/* ==========================================================================
   tema.css — camada visual do SistemaClubes.
   Só aparência: nenhuma regra aqui muda comportamento, rotas ou campos.
   Tudo é prefixado com "body.tema" para vencer os estilos antigos de cada tela
   sem precisar editá-los. Para voltar ao visual anterior basta tirar a classe
   "tema" do <body> em Views/Shared/_Layout.cshtml.
   ========================================================================== */

:root {
    --t-navy: #0b2447;
    --t-navy-2: #12336a;
    --t-primary: #1f6feb;
    --t-primary-600: #1a5fd0;
    --t-primary-700: #154fb0;
    --t-primary-soft: #e8f0fe;
    --t-accent: #f6b43e;
    --t-success: #16a34a;
    --t-success-soft: #e7f6ec;
    --t-danger: #dc2626;
    --t-danger-soft: #fdecec;
    --t-warning: #f59e0b;
    --t-warning-soft: #fef3e2;
    --t-info: #0891b2;
    --t-info-soft: #e3f6fa;
    --t-neutral-soft: #eef1f6;
    --t-bg: #f3f6fb;
    --t-surface: #ffffff;
    --t-border: #e3e8f1;
    --t-border-strong: #d2d9e6;
    --t-text: #1b2538;
    --t-text-2: #344054;
    --t-muted: #667085;
    --t-radius: 10px;
    --t-radius-lg: 16px;
    --t-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --t-shadow: 0 6px 20px rgba(16, 24, 40, .06);
    --t-shadow-lg: 0 20px 50px rgba(11, 36, 71, .18);
    --t-ring: 0 0 0 4px rgba(31, 111, 235, .16);
    --t-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --t-font-title: "Plus Jakarta Sans", "Inter", system-ui, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
body.tema {
    --bs-body-font-family: var(--t-font);
    --bs-body-color: var(--t-text);
    --bs-primary: var(--t-primary);
    --bs-primary-rgb: 31, 111, 235;
    --bs-success-rgb: 22, 163, 74;
    --bs-danger-rgb: 220, 38, 38;
    --bs-warning-rgb: 245, 158, 11;
    --bs-info-rgb: 8, 145, 178;
    --bs-light-rgb: 246, 248, 252;
    --bs-dark-rgb: 11, 36, 71;
    --bs-link-color: var(--t-primary);
    --bs-link-hover-color: var(--t-primary-700);
    --bs-border-color: var(--t-border);
    font-family: var(--t-font);
    color: var(--t-text);
    background: var(--t-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.tema ::selection { background: rgba(31, 111, 235, .2); }

body.tema main { padding-bottom: 1rem; }

body.tema main h1,
body.tema main h2,
body.tema main h3,
body.tema main h4 {
    font-family: var(--t-font-title);
    letter-spacing: -.02em;
}

body.tema main h2 { font-weight: 800; }
body.tema main > :is(.container, .container-fluid) > :is(h1, h2, h3),
body.tema main > :is(.container, .container-fluid) > div > :is(h1, h2, h3) { color: var(--t-navy); }
body.tema main h5, body.tema main h6 { font-family: var(--t-font-title); color: var(--t-text); }

body.tema main a { color: var(--t-primary); text-decoration: none; }
body.tema main a:hover { color: var(--t-primary-700); }

body.tema .text-primary { color: var(--t-primary) !important; }
body.tema .text-muted, body.tema .subtext { color: var(--t-muted) !important; }

body.tema main > .container.my-5,
body.tema main > .container-fluid.my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }

/* ---------- Menu superior ---------- */
body.tema .tc-header { position: sticky; top: 0; z-index: 1030; }

body.tema .tc-navbar {
    background: linear-gradient(100deg, #0b2447 0%, #12336a 55%, #18428f 100%) !important;
    padding: .45rem 1.25rem;
    box-shadow: 0 2px 16px rgba(11, 36, 71, .28);
}

body.tema .tc-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-right: 1.25rem;
    font-family: var(--t-font-title);
    font-size: 1.12rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    word-break: normal;
    text-align: left;
}

body.tema .tc-navbar .navbar-brand b { font-weight: 800; }

body.tema .tc-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8c35c, #f08c1a);
    color: var(--t-navy);
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(240, 140, 26, .35);
}

body.tema .tc-navbar .navbar-nav { gap: .15rem; }

body.tema .tc-navbar .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .8rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
    transition: background-color .15s ease, color .15s ease;
}

body.tema .tc-navbar .navbar-nav .nav-link:hover,
body.tema .tc-navbar .navbar-nav .nav-item.show > .nav-link,
body.tema .tc-navbar .navbar-nav .nav-item.active > .nav-link {
    color: #fff;
    background: rgba(255, 255, 255, .13);
}

body.tema .tc-navbar .navbar-nav .nav-item.active > .nav-link { box-shadow: inset 0 -2px 0 var(--t-accent); }
body.tema .tc-navbar .dropdown-toggle::after { opacity: .6; margin-left: .1rem; }

body.tema .dropdown-menu {
    border: 1px solid var(--t-border);
    border-radius: 14px;
    box-shadow: var(--t-shadow-lg);
    padding: .4rem;
    font-size: .9rem;
}

body.tema .tc-navbar .dropdown-menu { margin-top: .5rem; min-width: 15.5rem; }

body.tema .dropdown-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .65rem;
    border-radius: 9px;
    font-weight: 500;
    color: var(--t-text-2);
}

body.tema .dropdown-item:hover,
body.tema .dropdown-item:focus {
    background: var(--t-primary-soft);
    color: var(--t-primary-700);
}

body.tema .dropdown-item > i {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    font-size: .88rem;
}

body.tema .dropdown-item:hover > i { background: #fff; }

body.tema .dropdown-header {
    padding: .5rem .65rem .25rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--t-muted);
}

body.tema .dropdown-divider { border-color: var(--t-border); margin: .35rem .25rem; }

body.tema .tc-user { display: flex; align-items: center; gap: .75rem; }
body.tema .tc-user-chip { display: flex; align-items: center; gap: .55rem; }

body.tema .tc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

body.tema .tc-user-text { display: flex; flex-direction: column; line-height: 1.15; }
body.tema .tc-user-text strong { color: #fff; font-size: .84rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.tema .tc-user-text small { color: rgba(255, 255, 255, .65); font-size: .72rem; }

body.tema .tc-btn-sair {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .85rem;
    font-size: .85rem;
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .28);
}

body.tema .tc-btn-sair:hover { background: rgba(255, 255, 255, .18); color: #fff; }

body.tema .tc-navbar .navbar-toggler { border-color: rgba(255, 255, 255, .3); border-radius: 10px; padding: .35rem .6rem; }

@media (max-width: 991.98px) {
    body.tema .tc-navbar .navbar-collapse { padding-top: .6rem; }
    body.tema .tc-navbar .dropdown-menu { box-shadow: none; margin: .2rem 0 .4rem; }
    body.tema .tc-user { margin: .6rem 0 .3rem; justify-content: space-between; }
}

/* ---------- Marca (logo do Instituto Boa Esperança) ---------- */
/* No menu o logo fica sobre uma plaquinha branca: ele tem letras verde-escuras, que sumiriam no azul. */
body.tema .tc-navbar .navbar-brand.tc-logo {
    margin-right: 1.1rem;
    padding: .28rem .75rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
    line-height: 0;
    transition: transform .15s ease, box-shadow .15s ease;
}

body.tema .tc-navbar .navbar-brand.tc-logo:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .28); }
body.tema .tc-logo img { display: block; height: 46px; width: auto; }

body.tema .tc-print-marca { display: none; }

.login-marca { justify-content: center; margin-bottom: 1.5rem; }
.login-marca img { display: block; height: 96px; width: auto; max-width: 100%; }

@media (max-width: 575.98px) {
    body.tema .tc-logo img { height: 34px; }
    .login-marca img { height: 80px; }
}

@media print {
    body.tema .tc-print-marca { display: block; margin: 0 0 14px; }
    body.tema .tc-print-marca img { height: 64px; width: auto; }
}
/* ---------- Rodapé ---------- */
body.tema .tc-footer {
    display: block;
    height: auto;
    margin-top: 2.5rem;
    padding: 1.1rem 1rem 1.4rem;
    background: transparent;
    border-top: 1px solid var(--t-border);
    color: var(--t-muted);
    font-size: .8rem;
    text-align: center;
}

body.tema .tc-footer p { margin: 0; color: inherit; }

/* ---------- Cabeçalho das telas ---------- */
body.tema .page-title {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .3rem;
    font-family: var(--t-font-title);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--t-navy);
}

body.tema .page-title > i {
    width: 46px;
    height: 46px;
    flex: none;
    margin: 0 !important;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--t-primary-soft);
    color: var(--t-primary) !important;
    font-size: 1.3rem;
}

body.tema .subtext { font-size: .92rem; margin: 0; }

/* ---------- Botões ---------- */
body.tema .btn {
    border-radius: var(--t-radius);
    font-weight: 600;
    font-size: .9rem;
    padding: .56rem 1.05rem;
    line-height: 1.35;
    letter-spacing: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

body.tema .btn:focus { box-shadow: none; }
body.tema .btn:focus-visible { outline: 0; box-shadow: var(--t-ring); }
body.tema .btn:hover { transform: translateY(-1px); }
body.tema .btn:active { transform: translateY(0); }
body.tema .btn:disabled, body.tema .btn.disabled { opacity: .55; transform: none; }

body.tema .btn-sm { padding: .36rem .7rem; font-size: .82rem; border-radius: 8px; }
body.tema .btn-lg { padding: .75rem 1.5rem; font-size: 1rem; border-radius: 12px; }

body.tema .btn-primary, body.tema .btn-action {
    --b-bg: var(--t-primary); --b-fg: #fff; --b-bd: var(--t-primary);
    --b-bg-h: var(--t-primary-600); --b-fg-h: #fff; --b-bd-h: var(--t-primary-600);
    box-shadow: 0 6px 16px rgba(31, 111, 235, .24);
}
body.tema .btn-secondary {
    --b-bg: var(--t-neutral-soft); --b-fg: var(--t-text-2); --b-bd: var(--t-border);
    --b-bg-h: #e2e7f0; --b-fg-h: var(--t-text); --b-bd-h: var(--t-border-strong);
}
body.tema .btn-success {
    --b-bg: var(--t-success); --b-fg: #fff; --b-bd: var(--t-success);
    --b-bg-h: #128a3e; --b-fg-h: #fff; --b-bd-h: #128a3e;
    box-shadow: 0 6px 16px rgba(22, 163, 74, .22);
}
body.tema .btn-danger {
    --b-bg: var(--t-danger); --b-fg: #fff; --b-bd: var(--t-danger);
    --b-bg-h: #b91c1c; --b-fg-h: #fff; --b-bd-h: #b91c1c;
}
body.tema .btn-warning {
    --b-bg: var(--t-warning); --b-fg: #422006; --b-bd: var(--t-warning);
    --b-bg-h: #e08e00; --b-fg-h: #422006; --b-bd-h: #e08e00;
}
body.tema .btn-info {
    --b-bg: var(--t-info); --b-fg: #fff; --b-bd: var(--t-info);
    --b-bg-h: #0b7a96; --b-fg-h: #fff; --b-bd-h: #0b7a96;
}
body.tema .btn-light {
    --b-bg: #fff; --b-fg: var(--t-text-2); --b-bd: var(--t-border-strong);
    --b-bg-h: var(--t-bg); --b-fg-h: var(--t-text); --b-bd-h: var(--t-border-strong);
}
body.tema .btn-dark {
    --b-bg: var(--t-navy); --b-fg: #fff; --b-bd: var(--t-navy);
    --b-bg-h: var(--t-navy-2); --b-fg-h: #fff; --b-bd-h: var(--t-navy-2);
}
body.tema .btn-outline-primary {
    --b-bg: #fff; --b-fg: var(--t-primary); --b-bd: #b9cffa; --b-soft: var(--t-primary-soft);
    --b-bg-h: var(--t-primary); --b-fg-h: #fff; --b-bd-h: var(--t-primary);
}
body.tema .btn-outline-secondary {
    --b-bg: #fff; --b-fg: #475467; --b-bd: var(--t-border-strong); --b-soft: var(--t-neutral-soft);
    --b-bg-h: var(--t-neutral-soft); --b-fg-h: var(--t-text); --b-bd-h: #c5cede;
}
body.tema .btn-outline-success {
    --b-bg: #fff; --b-fg: #15803d; --b-bd: #a7dfbb; --b-soft: var(--t-success-soft);
    --b-bg-h: var(--t-success); --b-fg-h: #fff; --b-bd-h: var(--t-success);
}
body.tema .btn-outline-danger {
    --b-bg: #fff; --b-fg: var(--t-danger); --b-bd: #f5b5b5; --b-soft: var(--t-danger-soft);
    --b-bg-h: var(--t-danger); --b-fg-h: #fff; --b-bd-h: var(--t-danger);
}
body.tema .btn-outline-warning {
    --b-bg: #fff; --b-fg: #b45309; --b-bd: #f8d49a; --b-soft: var(--t-warning-soft);
    --b-bg-h: var(--t-warning); --b-fg-h: #422006; --b-bd-h: var(--t-warning);
}
body.tema .btn-outline-info {
    --b-bg: #fff; --b-fg: #0e7490; --b-bd: #a5dfeb; --b-soft: var(--t-info-soft);
    --b-bg-h: var(--t-info); --b-fg-h: #fff; --b-bd-h: var(--t-info);
}

body.tema :is(.btn-primary, .btn-action, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark,
              .btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info) {
    background-color: var(--b-bg);
    color: var(--b-fg);
    border: 1px solid var(--b-bd);
}

body.tema :is(.btn-primary, .btn-action, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark,
              .btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info):is(:hover, :focus-visible, :active, .active) {
    background-color: var(--b-bg-h);
    color: var(--b-fg-h);
    border-color: var(--b-bd-h);
}

/* Botões de ação nas linhas das tabelas: quadrados suaves, só com o ícone. */
body.tema td .btn.btn-sm[class*="btn-outline-"] {
    min-width: 34px;
    height: 34px;
    padding: 0 .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-radius: 9px;
    border-color: transparent;
    background-color: var(--b-soft);
    box-shadow: none;
}

body.tema td .btn.btn-sm[class*="btn-outline-"]:is(:hover, :focus-visible) {
    background-color: var(--b-bg-h);
    color: var(--b-fg-h);
    border-color: var(--b-bd-h);
}

body.tema .action-btns { gap: .35rem; }
body.tema .action-btns a, body.tema .action-btns button { margin-right: 0; }

/* ---------- Campos ---------- */
body.tema .form-label,
body.tema .modal-body label:not(.form-check-label):not(.upload-area) {
    margin-bottom: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--t-text-2);
}

body.tema .form-control,
body.tema .form-select {
    min-height: 44px;
    height: auto;
    padding: .55rem .85rem;
    border: 1px solid var(--t-border-strong);
    border-radius: var(--t-radius);
    background-color: #fff;
    color: var(--t-text);
    font-size: .93rem;
    box-shadow: var(--t-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

body.tema .form-select { padding-right: 2.25rem; }
body.tema textarea.form-control { min-height: 96px; }
body.tema input[type="file"].form-control { padding: .5rem .7rem; }

body.tema .form-control-sm,
body.tema .form-select-sm { min-height: 36px; padding: .35rem .65rem; font-size: .85rem; border-radius: 8px; }

body.tema .form-control:hover,
body.tema .form-select:hover { border-color: #b9c3d6; }

body.tema .form-control:focus,
body.tema .form-select:focus {
    border-color: var(--t-primary);
    box-shadow: var(--t-ring);
    outline: 0;
}

body.tema .form-control::placeholder { color: #98a2b3; text-align: left; }

body.tema .form-control:disabled,
body.tema .form-control[readonly],
body.tema .form-select:disabled { background-color: #f3f5f9; color: var(--t-muted); box-shadow: none; }

body.tema .form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: .2em;
    border: 1.5px solid #b3bdcf;
    box-shadow: none;
}

body.tema .form-check-input:checked { background-color: var(--t-primary); border-color: var(--t-primary); }
body.tema .form-check-input:focus { border-color: var(--t-primary); box-shadow: var(--t-ring); }
body.tema .form-switch .form-check-input { width: 2.4em; height: 1.3em; }
body.tema .form-check-label { font-size: .9rem; color: var(--t-text-2); }
body.tema .form-text { color: var(--t-muted); font-size: .8rem; }

body.tema .field-validation-error { display: block; margin-top: .3rem; font-size: .8rem; font-weight: 500; }

body.tema .validation-summary-errors {
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border: 1px solid #f7c5c5;
    border-radius: 12px;
    background: var(--t-danger-soft);
    color: #9b1c1c !important;
    font-size: .88rem;
}

body.tema .validation-summary-errors ul { margin: 0; padding-left: 1.1rem; list-style: disc; }
body.tema .required::after { color: var(--t-danger); }

/* Select2 (combos com busca) */
body.tema .select2-container .select2-selection--single,
body.tema .select2-container .select2-selection--multiple {
    min-height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid var(--t-border-strong);
    border-radius: var(--t-radius);
    background-color: #fff;
    box-shadow: var(--t-shadow-sm);
}

body.tema .select2-container .select2-selection--single .select2-selection__rendered {
    flex: 1;
    max-width: none;
    padding-left: .85rem;
    padding-right: 2rem !important;
    line-height: 1.4;
    color: var(--t-text);
    font-size: .93rem;
}

body.tema .select2-container .select2-selection--single { position: relative; padding: 0 !important; }

body.tema .select2-container .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 0 !important;
    bottom: 0;
    right: .15rem;
    width: 2rem;
    height: auto !important;
    margin: 0;
    transform: none;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667085' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat center / 13px 10px;
}

body.tema .select2-container .select2-selection--single .select2-selection__arrow b { display: none; }

/* "x" de limpar a escolha: discreto, alinhado antes da seta. */
body.tema .select2-container .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 50%;
    right: 2.05rem;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #98a2b3;
    font-size: 1.05rem;
    line-height: 1;
}

body.tema .select2-container .select2-selection--single .select2-selection__clear:hover { background: var(--t-neutral-soft); color: var(--t-danger); }
body.tema .select2-container .select2-selection--clearable .select2-selection__rendered { padding-right: 3.4rem !important; }

/* Combos estreitos (ex.: "Exibir 5/10/25" e as células da chamada): sem o "x", que roubava o espaço do texto. */
body.tema :is(.col-md-1, .col-1, .col-lg-1, td) .select2-container .select2-selection--single .select2-selection__clear { display: none; }
body.tema :is(.col-md-1, .col-1, .col-lg-1, td) .select2-container .select2-selection--single .select2-selection__rendered { padding-left: .7rem; padding-right: 1.9rem !important; }
body.tema td .select2-container { min-width: 132px; }
body.tema td .select2-container .select2-selection--single { min-height: 38px; }
body.tema td .select2-container .select2-selection--single .select2-selection__rendered { font-size: .86rem; }

body.tema .select2-container--focus .select2-selection--single,
body.tema .select2-container--open .select2-selection--single { border-color: var(--t-primary); box-shadow: var(--t-ring); }

body.tema .select2-dropdown {
    border: 1px solid var(--t-border);
    border-radius: 12px;
    box-shadow: var(--t-shadow-lg);
    overflow: hidden;
    font-size: .9rem;
}

body.tema .select2-search--dropdown { padding: .5rem; }
body.tema .select2-search--dropdown .select2-search__field { border: 1px solid var(--t-border-strong); border-radius: 8px; padding: .4rem .6rem; }
body.tema .select2-results__option { padding: .5rem .8rem; }
body.tema .select2-container--default .select2-results__option--highlighted[aria-selected],
body.tema .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
body.tema .select2-container--bootstrap4 .select2-results__option--highlighted { background-color: var(--t-primary); color: #fff; }

/* ---------- Barra de filtros, cartões e tabelas ---------- */
body.tema .filter-bar {
    padding: 1.1rem 1.25rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow-sm);
}

body.tema .card {
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    background-color: var(--t-surface);
}

body.tema .card.shadow-sm, body.tema .shadow-sm { box-shadow: var(--t-shadow) !important; }

body.tema .card-header {
    padding: .9rem 1.15rem;
    background-color: #fff;
    border-bottom: 1px solid var(--t-border);
    font-weight: 700;
    color: var(--t-text);
}

body.tema .card > .card-header:first-child { border-radius: var(--t-radius-lg) var(--t-radius-lg) 0 0; }
body.tema .card-body { padding: 1.15rem; }
body.tema .card-title { font-family: var(--t-font-title); font-weight: 700; }

body.tema .card.bg-primary, body.tema .card.bg-danger, body.tema .card.bg-warning, body.tema .card.bg-info,
body.tema .card.bg-success, body.tema .card.bg-secondary, body.tema .card.bg-dark {
    border: 0;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 60%);
}

body.tema .card.text-white :is(h1, h2, h3, h4, h5, h6) { color: #fff; }
body.tema .card.bg-warning :is(h1, h2, h3, h4, h5, h6) { color: #422006; }
body.tema .card .card-title + .display-6, body.tema .card .display-6 { font-family: var(--t-font-title); font-weight: 800; font-size: 2rem; margin: 0; }

body.tema .table-container {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow-sm);
    overflow: hidden;
}

body.tema .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #edf0f5;
    --bs-table-hover-bg: #f5f8ff;
    margin-bottom: 0;
    color: var(--t-text);
}

body.tema .table > thead > tr > th {
    padding: .8rem 1rem;
    background: #f6f8fc;
    border-bottom: 1px solid var(--t-border);
    color: var(--t-muted);
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.tema .table > tbody > tr > td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-color: #edf0f5;
    font-size: .92rem;
}

body.tema .table > tbody > tr:last-child > td { border-bottom: 0; }
body.tema .table-hover > tbody > tr:hover > * { background-color: #f5f8ff; }
body.tema .table-sm > thead > tr > th, body.tema .table-sm > tbody > tr > td { padding: .5rem .7rem; }

body.tema .empty-state { padding: 2.5rem 1rem; color: var(--t-muted); font-size: .95rem; }

body.tema .list-group { border-radius: 12px; }
body.tema .list-group-item { border-color: var(--t-border); padding: .75rem 1rem; }

/* Áreas com rolagem lateral: viram a referência dos combos ocultos do Select2, que antes "vazavam" e criavam
   uma barra de rolagem na página inteira (ex.: lista de chamada mensal). */
body.tema :is(.table-responsive, .chamada-wrap, .table-container) { position: relative; }

/* Telas de logs (título solto, sem o cabeçalho padrão) */
body.tema main > .container-fluid.mt-4 { padding: 0 1.5rem; }
body.tema main > .container-fluid > h2 > i { margin-right: .5rem; color: var(--t-primary); }
/* ---------- Paginação ---------- */
body.tema .pagination { gap: .35rem; margin-bottom: .5rem; }

body.tema .pagination .page-item .page-link {
    min-width: 38px;
    height: 38px;
    padding: 0 .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--t-border);
    border-radius: 10px !important;
    background: #fff;
    color: var(--t-text-2);
    font-size: .88rem;
    font-weight: 600;
    box-shadow: none;
}

body.tema .pagination .page-item .page-link:hover { background: var(--t-primary-soft); border-color: #b9cffa; color: var(--t-primary-700); }
body.tema .pagination .page-item.active .page-link { background: var(--t-primary); border-color: var(--t-primary); color: #fff; box-shadow: 0 6px 14px rgba(31, 111, 235, .28); }
body.tema .pagination .page-item.disabled .page-link { background: #f6f8fc; color: #b3bdcf; }
body.tema nav[aria-label] > p.text-muted { font-size: .82rem; }

/* ---------- Selos e avisos ---------- */
body.tema .badge {
    padding: .38em .72em;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .01em;
}

body.tema .badge:is(.bg-success, .badge-success) { background-color: var(--t-success-soft) !important; color: #11743a !important; }
body.tema .badge:is(.bg-danger, .badge-danger) { background-color: var(--t-danger-soft) !important; color: #b42318 !important; }
body.tema .badge:is(.bg-warning, .badge-warning) { background-color: var(--t-warning-soft) !important; color: #93500a !important; }
body.tema .badge:is(.bg-info, .badge-info) { background-color: var(--t-info-soft) !important; color: #0b6278 !important; }
body.tema .badge:is(.bg-primary, .badge-primary) { background-color: var(--t-primary-soft) !important; color: var(--t-primary-700) !important; }
body.tema .badge:is(.bg-secondary, .badge-secondary, .bg-light) { background-color: var(--t-neutral-soft) !important; color: #475467 !important; }
body.tema .badge:is(.bg-dark, .badge-dark) { background-color: var(--t-navy) !important; color: #fff !important; }

body.tema .alert { border: 1px solid transparent; border-radius: 12px; padding: .85rem 1rem; font-size: .92rem; }
body.tema .alert-danger { background: var(--t-danger-soft); border-color: #f7c5c5; color: #9b1c1c; }
body.tema .alert-success { background: var(--t-success-soft); border-color: #b9e6c9; color: #11643a; }
body.tema .alert-warning { background: var(--t-warning-soft); border-color: #f8dba8; color: #7a4a06; }
body.tema .alert-info { background: var(--t-info-soft); border-color: #b5e4ee; color: #0b566a; }
body.tema .alert-secondary, body.tema .alert-light { background: #f6f8fc; border-color: var(--t-border); color: var(--t-text-2); }

/* ---------- Modais ---------- */
body.tema .modal { backdrop-filter: blur(2px); }
body.tema .modal-backdrop.show { background-color: #0b1730; opacity: .55; }

body.tema .modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--t-shadow-lg);
    overflow: hidden;
}

body.tema .modal-header {
    padding: 1.05rem 1.4rem;
    background: linear-gradient(110deg, var(--t-navy) 0%, #1b4fb8 100%);
    border-bottom: 0;
    color: #fff;
}

body.tema .modal-header :is(.modal-title, h4, h5) {
    margin: 0;
    font-family: var(--t-font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

body.tema .modal-header :is(button, .close) { color: #fff; opacity: .85; text-shadow: none; background-color: transparent; border: 0; }
body.tema .modal-header :is(button, .close):hover { opacity: 1; }
body.tema .modal-header .btn-close { filter: invert(1) grayscale(1) brightness(2); }
body.tema .modal-body { padding: 1.4rem 1.5rem; background: #fff; }

body.tema .modal-footer {
    padding: .9rem 1.4rem;
    gap: .5rem;
    background: #f8fafc;
    border-top: 1px solid var(--t-border);
}

body.tema .modal-body .modal-footer {
    margin: 1.4rem 0 0;
    padding: 1rem 0 0;
    background: transparent;
    border-radius: 0;
}

body.tema .modal-body .btn-primary { border: 1px solid var(--b-bd); border-radius: var(--t-radius); padding: .56rem 1.05rem; }
body.tema .modal-body .btn-secondary { border-radius: var(--t-radius); padding: .56rem 1.05rem; }
body.tema .modal-body .form-control, body.tema .modal-body .form-select { border-radius: var(--t-radius); padding: .55rem .85rem; border-color: var(--t-border-strong); }
body.tema .modal-body .form-control:focus, body.tema .modal-body .form-select:focus { border-color: var(--t-primary); box-shadow: var(--t-ring); }

/* SweetAlert2 (confirmações e avisos) */
body.tema .swal2-popup { border-radius: 18px; padding: 1.6rem 1.4rem 1.4rem; font-family: var(--t-font); }
body.tema .swal2-title { font-family: var(--t-font-title); font-size: 1.3rem; font-weight: 700; color: var(--t-navy); }
body.tema .swal2-html-container { font-size: .95rem; color: var(--t-muted); }
body.tema .swal2-styled { border-radius: 10px !important; padding: .62rem 1.3rem; font-weight: 600; font-size: .92rem; box-shadow: none !important; }
body.tema .swal2-actions { gap: .4rem; }

/* Ajustes finos de modais e confirmações */
body.tema .modal-header .close { margin: 0; padding: 0 .25rem; font-size: 1.6rem; font-weight: 400; line-height: 1; }
body.tema .modal .select2-container .select2-selection--single .select2-selection__rendered { font-weight: 400; }
/* O SweetAlert traz um <select> oculto; o Select2 criava uma caixa vazia visível ao lado dele. */
body.tema .swal2-popup .swal2-select[style*="display: none"] + .select2-container,
body.tema .swal2-popup .swal2-select[style*="display:none"] + .select2-container { display: none !important; }
/* ---------- Formulários de cadastro (em etapas) e telas de detalhe ---------- */
body.tema .container-form {
    max-width: 1040px;
    margin: 2rem auto;
    padding: 2rem 2.4rem 2.2rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 20px;
    box-shadow: var(--t-shadow);
}

body.tema .container-form > h2 {
    margin-bottom: 1.1rem;
    font-size: 1.55rem;
    text-align: center;
    color: var(--t-navy);
}

body.tema .container-form > h2 > i { color: var(--t-primary) !important; }

body.tema .container-form .card,
body.tema .form-section {
    border: 1px solid var(--t-border);
    border-radius: 14px;
    background: #fcfdff;
    box-shadow: none !important;
}

body.tema .container-form .card.p-3 { padding: 1.15rem 1.25rem 1.3rem !important; }

body.tema .form-section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .2rem 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--t-border);
    font-family: var(--t-font-title);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--t-navy);
}

body.tema .form-section-title > i {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    font-size: .95rem;
}

body.tema .progress { height: 8px; border-radius: 999px; background: #e7ecf4; overflow: hidden; }
body.tema .progress-bar { background: linear-gradient(90deg, var(--t-primary), #4c9bff); border-radius: 999px; }
body.tema .progress-info { margin: .45rem 0 1rem; text-align: center; font-size: .85rem; font-weight: 700; color: var(--t-primary); }

body.tema .numbered-indicators { display: flex; justify-content: center; gap: .7rem; margin: 1.3rem 0 1rem; padding: 0; list-style: none; }

body.tema .numbered-indicators li {
    width: 36px;
    height: 36px;
    line-height: 34px;
    border: 1px solid var(--t-border-strong);
    border-radius: 50%;
    background: #fff;
    color: var(--t-muted);
    font-size: .88rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
}

body.tema .numbered-indicators li:hover { border-color: var(--t-primary); color: var(--t-primary); }

body.tema .numbered-indicators li.active {
    background: var(--t-primary);
    border-color: var(--t-primary);
    color: #fff;
    transform: none;
    box-shadow: 0 6px 14px rgba(31, 111, 235, .3);
}

body.tema .upload-area {
    border: 1.5px dashed #b9cffa;
    border-radius: 14px;
    background: #f7faff;
    color: var(--t-text-2);
    transition: background-color .15s ease, border-color .15s ease;
}

body.tema .upload-area:hover { background: var(--t-primary-soft); border-color: var(--t-primary); }
body.tema .upload-area i { color: var(--t-primary); }
body.tema .file-name { color: var(--t-muted); font-size: .85rem; }

body.tema :is(.detalhe-rotulo, .campo-rotulo) {
    margin-bottom: .15rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--t-muted);
}

body.tema :is(.detalhe-valor, .campo-valor) { font-size: .95rem; font-weight: 500; color: var(--t-text); }
body.tema :is(.foto-atual, .detalhe-foto, .foto-registro) { border: 1px solid var(--t-border); border-radius: 12px; }

/* ---------- Calendário (FullCalendar) ---------- */
body.tema .fc {
    --fc-border-color: var(--t-border);
    --fc-button-bg-color: #fff;
    --fc-button-text-color: var(--t-text-2);
    --fc-button-border-color: var(--t-border-strong);
    --fc-button-hover-bg-color: var(--t-bg);
    --fc-button-hover-border-color: var(--t-border-strong);
    --fc-button-active-bg-color: var(--t-primary);
    --fc-button-active-border-color: var(--t-primary);
    --fc-today-bg-color: #eef4ff;
    font-family: var(--t-font);
}

body.tema .fc .fc-toolbar-title { font-family: var(--t-font-title); font-size: 1.15rem; font-weight: 700; color: var(--t-navy); text-transform: none; }
body.tema .fc .fc-toolbar-title::first-letter { text-transform: uppercase; }
body.tema .fc .fc-button { border-radius: 10px; font-weight: 600; font-size: .85rem; text-transform: capitalize; box-shadow: none !important; }
body.tema .fc .fc-button-primary:hover { color: var(--t-text); }
body.tema .fc .fc-button-primary:not(:disabled):active, body.tema .fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
body.tema .fc .fc-button-group > .fc-button:not(:first-child) { margin-left: .3rem; border-radius: 10px; }
body.tema .fc .fc-button-group > .fc-button:not(:last-child) { border-radius: 10px; }
body.tema .fc .fc-scrollgrid { border-radius: 12px; overflow: hidden; }
body.tema .fc .fc-col-header-cell { background: #f6f8fc; }
body.tema .fc .fc-col-header-cell-cushion { padding: .6rem 0; color: var(--t-muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
body.tema .fc .fc-daygrid-day-number { padding: .4rem .55rem; color: var(--t-text-2); font-size: .82rem; font-weight: 600; text-decoration: none; }
body.tema .fc .fc-event { border-radius: 6px; padding: 1px 4px; font-size: .74rem; }

/* ---------- Controle de acesso ---------- */
body.tema .controle-acesso-container { max-width: 1320px; margin: 0 auto; padding: 1.5rem 1.25rem 0; background: transparent; box-shadow: none; overflow: visible; }

body.tema .controle-acesso-header {
    padding: 1.8rem 2rem;
    border-radius: 20px;
    background: linear-gradient(120deg, var(--t-navy) 0%, #1b4fb8 100%);
    box-shadow: var(--t-shadow);
}

body.tema main .controle-acesso-header h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: .01em; color: #fff; text-shadow: none; animation: none; }
body.tema .controle-acesso-header .subtitle { margin-top: .3rem; font-size: 1rem; color: rgba(255, 255, 255, .85); }
body.tema .controle-acesso-content { padding: 1.5rem 0 0; }

body.tema .filtros-container,
body.tema .controle-rapido {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.4rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow-sm);
}

body.tema .filtros-container::before { display: none; }
body.tema .filtros-container .form-control { border: 1px solid var(--t-border-strong); border-radius: var(--t-radius); }
body.tema .filtros-container .form-control:focus { border-color: var(--t-primary); box-shadow: var(--t-ring); }
body.tema label.form-label.fw-bold { color: var(--t-text-2); font-weight: 600 !important; }

body.tema .controle-rapido { padding: 1.5rem 1.6rem; background: linear-gradient(180deg, #f7faff 0%, #fff 100%); border-color: #d6e4fb; }
body.tema main .controle-rapido h3 { margin-bottom: 1.2rem; font-size: 1.2rem; font-weight: 800; color: var(--t-navy); }
body.tema .controle-rapido h3 > i { color: var(--t-accent); }

body.tema .contador-item { padding: 1.1rem 1rem; background: #fff; border: 1px solid var(--t-border); border-radius: 14px; box-shadow: var(--t-shadow-sm); }
body.tema .contador-item:hover { border-color: #b9cffa; box-shadow: var(--t-shadow); }
body.tema .contador-item .label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--t-muted); }
body.tema .contador-item .valor { font-family: var(--t-font-title); font-size: 2.1rem; font-weight: 800; color: var(--t-primary); }

body.tema .btn-contador { width: 40px; height: 40px; border: 0; border-radius: 50%; font-size: 1.2rem; font-weight: 700; }
body.tema .btn-contador.mais { background: var(--t-success); color: #fff; box-shadow: 0 6px 14px rgba(22, 163, 74, .28); }
body.tema .btn-contador.mais:hover { background: #128a3e; }
body.tema .btn-contador.menos { background: var(--t-neutral-soft); color: var(--t-text-2); }
body.tema .btn-contador.menos:hover { background: #dfe5ee; }

body.tema .btn-lancar {
    padding: .7rem 1.5rem;
    border: 0;
    border-radius: var(--t-radius);
    background: linear-gradient(135deg, var(--t-primary), #1552c4);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(31, 111, 235, .3);
}

body.tema .atalhos-info { background: var(--t-warning-soft); border: 1px solid #f8dba8; border-radius: 12px; color: #7a4a06; font-size: .86rem; }
body.tema .atalhos-info kbd { background: #fff; border: 1px solid #f0d9ad; border-radius: 6px; padding: .1rem .4rem; color: var(--t-text); font-weight: 700; }
body.tema .success-feedback { background: var(--t-success-soft); border: 1px solid #b9e6c9; border-radius: 12px; color: #11643a; }

body.tema .resumo-cards { gap: .9rem; margin-bottom: 1.5rem; }
body.tema .resumo-card { padding: 1.2rem 1rem; background: var(--t-success-soft); border: 1px solid #cdebd6; border-radius: var(--t-radius-lg); }
body.tema .resumo-card::before { display: none; }
body.tema .resumo-card .titulo { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #11743a; }
body.tema .resumo-card .valor { font-family: var(--t-font-title); font-size: 1.9rem; font-weight: 800; color: #0d5a2c; }
body.tema .resumo-card.total { background: var(--t-primary-soft); border-color: #c9dbfd; }
body.tema .resumo-card.total .titulo { color: var(--t-primary-700); }
body.tema .resumo-card.total .valor { color: var(--t-navy); }

body.tema .tabela-container { background: var(--t-surface); border: 1px solid var(--t-border); border-radius: var(--t-radius-lg); box-shadow: var(--t-shadow-sm); overflow: hidden; }
body.tema .tabela-relatorio thead th { text-align: center; }
body.tema .tabela-relatorio thead th::after { display: none; }
body.tema .tabela-relatorio tbody tr { opacity: 1; animation: none; }
body.tema .tabela-relatorio tfoot td { padding: .8rem 1rem; background: #f6f8fc; border-color: var(--t-border); color: var(--t-navy); font-weight: 700; }
body.tema .assinatura-bloco { border-top: 2px solid var(--t-border-strong); color: var(--t-text-2); }
body.tema .assinatura-bloco::before { display: none; }

/* ---------- Logs ---------- */
body.tema .table > tbody > tr.table-danger > td { --bs-table-bg: #fdf3f3; background-color: #fdf3f3; }
body.tema .table > tbody > tr.table-warning > td { --bs-table-bg: #fff8eb; background-color: #fff8eb; }
body.tema .card-header.bg-dark, body.tema .card-header.bg-secondary, body.tema .card-header.bg-primary { color: #fff; border-bottom: 0; }
body.tema .card-header.bg-secondary { background-color: #475467 !important; }
/* ---------- Tela inicial ---------- */
body.tema .tc-hero {
    position: relative;
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2.5rem clamp(1.25rem, 5vw, 5rem);
    background-color: #1593dc;
    background-size: cover;
    background-position: left center;
    overflow: hidden;
}

body.tema .tc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 36, 71, 0) 30%, rgba(11, 36, 71, .55) 100%);
}

body.tema .tc-hero-conteudo { position: relative; max-width: 470px; color: #fff; }

body.tema .tc-hero-selo {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.tema main .tc-hero h1 {
    margin: .8rem 0 .5rem;
    padding: 0;
    background: none;
    font-family: var(--t-font-title);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

body.tema .tc-hero p { margin: 0; font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, .92); }

body.tema .tc-atalhos { margin-top: -2.2rem; position: relative; }
body.tema .tc-atalhos-titulo { margin: 2rem 0 .9rem; font-family: var(--t-font-title); font-size: 1.05rem; font-weight: 700; color: var(--t-navy); }

body.tema .tc-atalhos-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: .9rem;
}

body.tema main a.tc-atalho {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.05rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: var(--t-radius-lg);
    box-shadow: var(--t-shadow-sm);
    color: var(--t-text);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

body.tema main a.tc-atalho:hover { transform: translateY(-2px); border-color: #b9cffa; box-shadow: var(--t-shadow); color: var(--t-text); }

body.tema .tc-atalho-icone {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--t-primary-soft);
    color: var(--t-primary);
    font-size: 1.2rem;
}

body.tema .tc-atalho.cor-2 .tc-atalho-icone { background: var(--t-success-soft); color: var(--t-success); }
body.tema .tc-atalho.cor-3 .tc-atalho-icone { background: var(--t-warning-soft); color: #b45309; }
body.tema .tc-atalho.cor-4 .tc-atalho-icone { background: var(--t-info-soft); color: var(--t-info); }
body.tema .tc-atalho.cor-5 .tc-atalho-icone { background: #f1eafe; color: #7c3aed; }
body.tema .tc-atalho strong { display: block; font-size: .95rem; font-weight: 700; line-height: 1.2; }
body.tema .tc-atalho small { display: block; margin-top: .15rem; color: var(--t-muted); font-size: .78rem; line-height: 1.3; }

/* ---------- Mensagens (acesso negado, erro) ---------- */
body.tema .tc-mensagem {
    max-width: 520px;
    margin: 4rem auto;
    padding: 2.5rem 2rem;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 20px;
    box-shadow: var(--t-shadow);
    text-align: center;
}

body.tema .tc-mensagem-icone {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--t-danger-soft);
    color: var(--t-danger);
    font-size: 1.8rem;
}

body.tema main .tc-mensagem h2 { font-size: 1.45rem; margin-bottom: .4rem; }
body.tema .tc-mensagem p { color: var(--t-muted); margin-bottom: 1.4rem; }

/* ---------- Telas pequenas (celular) ---------- */
@media (max-width: 767.98px) {
    body.tema .tc-hero { min-height: 250px; justify-content: flex-start; padding: 2rem 1.25rem 3.2rem; background-position: 18% center; }
    body.tema .tc-hero::before { background: linear-gradient(180deg, rgba(11, 36, 71, .62) 0%, rgba(11, 36, 71, .86) 100%); }
    body.tema .page-title { font-size: 1.3rem; }
    body.tema .page-title > i { width: 40px; height: 40px; font-size: 1.1rem; }
    body.tema main .d-flex.justify-content-between.align-items-center.mb-4 { flex-wrap: wrap; gap: .75rem; }
    body.tema .container-form { margin: 1rem .6rem; padding: 1.3rem 1rem 1.5rem; border-radius: 16px; }
    body.tema .controle-acesso-container { padding: 1rem .6rem 0; }
    body.tema .modal-body { padding: 1.1rem 1rem; }
}
/* ==========================================================================
   Telas de acesso (login, primeiro acesso, troca de senha)
   ========================================================================== */
body.tema-login {
    margin: 0;
    min-height: 100vh;
    font-family: var(--t-font);
    color: var(--t-text);
    background: var(--t-navy);
    -webkit-font-smoothing: antialiased;
}

body.tema-login *, body.tema-login *::before, body.tema-login *::after { box-sizing: border-box; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); }

.login-arte { position: relative; background-size: cover; background-position: center; }
.login-arte::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 36, 71, .05) 35%, rgba(11, 36, 71, .82) 100%); }
.login-arte-texto { position: absolute; left: 3rem; right: 3rem; bottom: 3rem; z-index: 1; color: #fff; }
.login-arte-texto h2 { margin: 0 0 .5rem; font-family: var(--t-font-title); font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.login-arte-texto p { margin: 0; max-width: 32rem; font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, .88); }

.login-painel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at 85% 0%, rgba(31, 111, 235, .55) 0, rgba(31, 111, 235, 0) 55%), linear-gradient(160deg, #0b2447, #091a36);
}

.login-card { width: 100%; max-width: 420px; padding: 2.2rem 2.1rem 1.8rem; background: #fff; border-radius: 22px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }

.login-marca { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.6rem; font-family: var(--t-font-title); font-size: 1.15rem; font-weight: 500; color: var(--t-navy); }
.login-marca b { font-weight: 800; }
.login-marca .tc-brand-mark { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f8c35c, #f08c1a); color: var(--t-navy); font-size: 1.1rem; box-shadow: 0 4px 12px rgba(240, 140, 26, .35); }

.login-card h1 { margin: 0 0 .3rem; font-family: var(--t-font-title); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--t-navy); }
.login-sub { margin: 0 0 1.4rem; font-size: .92rem; line-height: 1.45; color: var(--t-muted); }

.login-campo { margin-bottom: 1rem; }
.login-campo label { display: block; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; color: var(--t-text-2); }
.login-input { position: relative; }

.login-input input {
    width: 100%;
    height: 48px;
    padding: 0 2.9rem 0 2.75rem;
    border: 1px solid var(--t-border-strong);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--t-text);
    font-family: inherit;
    font-size: .98rem;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.login-input input:focus { outline: 0; background: #fff; border-color: var(--t-primary); box-shadow: var(--t-ring); }
.login-input > .login-icone { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 1.05rem; pointer-events: none; }

.login-olho {
    position: absolute;
    right: .4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-muted);
    font-size: 1.05rem;
    cursor: pointer;
}

.login-olho:hover { background: var(--t-neutral-soft); color: var(--t-text); }

.login-links { display: flex; justify-content: space-between; gap: 1rem; margin: .1rem 0 1.2rem; font-size: .86rem; }
.login-links a, .login-voltar { color: var(--t-primary); font-weight: 600; text-decoration: none; }
.login-links a:hover, .login-voltar:hover { color: var(--t-primary-700); text-decoration: underline; }
.login-voltar { display: block; margin-top: 1.1rem; text-align: center; font-size: .88rem; }

.login-btn {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f6feb, #1552c4);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(31, 111, 235, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.login-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px rgba(31, 111, 235, .4); }
.login-btn:focus-visible { outline: 0; box-shadow: var(--t-ring), 0 10px 24px rgba(31, 111, 235, .35); }

.login-msg { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: 1rem; padding: .75rem .9rem; border-radius: 12px; font-size: .88rem; line-height: 1.4; }
.login-msg.erro { background: var(--t-danger-soft); border: 1px solid #f7c5c5; color: #9b1c1c; }
.login-msg.aviso { background: var(--t-info-soft); border: 1px solid #b5e4ee; color: #0b566a; }

.login-rodape { margin: 1.5rem 0 0; text-align: center; font-size: .75rem; color: #98a2b3; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-arte { display: none; }
    .login-painel { padding: 1.25rem; background-image: linear-gradient(rgba(11, 36, 71, .78), rgba(9, 26, 54, .92)), var(--login-foto); background-size: cover; background-position: center; }
    .login-card { padding: 1.8rem 1.5rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    body.tema *, body.tema-login * { transition: none !important; }
}

@media print {
    body.tema .tc-header, body.tema .tc-footer { display: none !important; }
    body.tema { background: #fff; }
}
