:root {
    --ew-primary: #4f46e5;
    --ew-primary-rgb: 79, 70, 229;
    --ew-sidebar-width: 280px;
    --ew-topbar-height: 64px;
    --ew-radius: 14px;
    --ew-font: "Plus Jakarta Sans", system-ui, sans-serif;
}

[data-bs-theme="light"] {
    --ew-sidebar-bg: #0f172a;
    --ew-sidebar-text: #cbd5e1;
    --ew-sidebar-active: #ffffff;
    --ew-body-bg: #f1f5f9;
    --ew-card-bg: #ffffff;
    --ew-heading: #0f172a;
    --ew-muted: #64748b;
    --ew-topbar-border: rgba(15, 23, 42, .08);
}

[data-bs-theme="dark"] {
    --ew-sidebar-bg: #020617;
    --ew-sidebar-text: #94a3b8;
    --ew-sidebar-active: #f8fafc;
    --ew-body-bg: #0b1220;
    --ew-card-bg: #111827;
    --ew-heading: #f1f5f9;
    --ew-muted: #94a3b8;
    --ew-topbar-border: rgba(255, 255, 255, .08);
}

* { box-sizing: border-box; }

body {
    font-family: var(--ew-font);
    background: var(--ew-body-bg);
}

.app-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .35);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.app-loader.is-active {
    opacity: 1;
    pointer-events: auto;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--ew-sidebar-width);
    background: var(--ew-sidebar-bg);
    color: var(--ew-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    transform: translateX(0);
    transition: transform .3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand strong {
    display: block;
    color: #fff;
    line-height: 1.2;
}

.sidebar-brand small {
    opacity: .65;
    font-size: .72rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--ew-primary), #06b6d4);
    color: #fff;
    font-size: 1.25rem;
}

.sidebar-nav {
    flex: 1;
    overflow: auto;
    padding: .75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    border-radius: 10px;
    color: var(--ew-sidebar-text);
    text-decoration: none;
    margin-bottom: .15rem;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: var(--ew-sidebar-active);
    transform: translateX(2px);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-theme-label {
    color: rgba(203, 213, 225, .75);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .5rem;
    padding: 0 .15rem;
}

.theme-switch .btn {
    flex: 1;
}

.theme-switch .btn.active {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

.app-main {
    flex: 1;
    margin-left: var(--ew-sidebar-width);
    min-width: 0;
}

.app-topbar {
    height: var(--ew-topbar-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    background: var(--ew-card-bg);
    border-bottom: 1px solid var(--ew-topbar-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-content {
    animation: fadeUp .35s ease;
}

.stat-card, .card {
    border-radius: var(--ew-radius);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.escola-stat-card {
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
}

.escola-stat-card:hover,
.escola-stat-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08) !important;
    border-color: rgba(var(--ew-primary-rgb), .25) !important;
}

.escola-stat-card:focus-visible {
    outline: 2px solid rgba(var(--ew-primary-rgb), .45);
    outline-offset: 2px;
}

.stat-card-link {
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
    transform: scale(1.05);
    box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08) !important;
}

.stat-card-link:focus-visible {
    outline: 2px solid rgba(var(--ew-primary-rgb), .45);
    outline-offset: 2px;
}

/* Cards de estatística do painel — gradientes distintos (sem repetir até 7 cards) */
.stat-card.stat-card-tone-green {
    background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    color: #fff;
}

.stat-card.stat-card-tone-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    color: #fff;
}

.stat-card.stat-card-tone-amber {
    background: linear-gradient(135deg, #fde047 0%, #d97706 100%);
    color: #fff;
}

.stat-card.stat-card-tone-purple {
    background: linear-gradient(135deg, #c084fc 0%, #7c3aed 100%);
    color: #fff;
}

.stat-card.stat-card-tone-rose {
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    color: #fff;
}

.stat-card.stat-card-tone-cyan {
    background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
    color: #fff;
}

.stat-card.stat-card-tone-indigo {
    background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
    color: #fff;
}

.stat-card[class*="stat-card-tone-"] .text-muted,
.stat-card[class*="stat-card-tone-"] .card-body {
    color: rgba(255, 255, 255, .92) !important;
}

.stat-card[class*="stat-card-tone-"] .h2,
.stat-card[class*="stat-card-tone-"] .h3,
.stat-card[class*="stat-card-tone-"] .display-6 {
    color: #fff !important;
}

.stat-card[class*="stat-card-tone-"] .stat-icon {
    background: rgba(255, 255, 255, .22) !important;
    color: #fff !important;
}

.stat-card-link[class*="stat-card-tone-"]:hover,
.stat-card-link[class*="stat-card-tone-"]:focus-visible {
    filter: brightness(1.06);
    color: #fff;
}

.page-header h1 {
    letter-spacing: -.02em;
}

.page-header h1,
.page-header .h3,
.page-header h2 {
    color: var(--ew-heading);
}

.page-header .text-muted {
    color: var(--ew-muted) !important;
}

.nav-tabs {
    border-bottom-color: var(--ew-topbar-border);
}

.nav-tabs .nav-link {
    color: var(--ew-muted);
}

.nav-tabs .nav-link:hover {
    color: var(--ew-heading);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--ew-heading);
    background-color: var(--ew-card-bg);
    border-color: var(--ew-topbar-border) var(--ew-topbar-border) var(--ew-card-bg);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .stat-card {
    background: var(--ew-card-bg);
    border-color: rgba(255, 255, 255, .06);
}

[data-bs-theme="dark"] .list-group-item {
    background: var(--ew-card-bg);
    border-color: rgba(255, 255, 255, .06);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background: rgba(255, 255, 255, .04);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--bs-body-color);
    --bs-table-border-color: rgba(255, 255, 255, .08);
}

[data-bs-theme="dark"] .text-muted {
    color: var(--ew-muted) !important;
}

[data-bs-theme="dark"] .module-hero {
    background: linear-gradient(135deg, rgba(var(--ew-primary-rgb), .18), rgba(6, 182, 212, .12));
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0f172a;
    border-color: rgba(255, 255, 255, .12);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .card-header.bg-transparent {
    color: var(--ew-heading);
}

[data-bs-theme="dark"] a:not(.btn):not(.sidebar-link):not(.nav-link) {
    color: #93c5fd;
}

.animate-in {
    animation: fadeUp .4s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-page {
    min-height: 100vh;
    position: relative;
}

.login-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--ew-primary-rgb), .25), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(6,182,212,.2), transparent 35%),
        linear-gradient(160deg, #0f172a, #1e1b4b 55%, #312e81);
    z-index: -1;
}

.login-card {
    width: min(440px, 100%);
    border-radius: calc(var(--ew-radius) + 4px);
    backdrop-filter: blur(8px);
}

.login-logo {
    width: 64px;
    height: 64px;
    margin-inline: auto;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    color: #fff;
    background: linear-gradient(135deg, var(--ew-primary), #06b6d4);
}

.module-hero {
    background: linear-gradient(135deg, rgba(var(--ew-primary-rgb), .08), rgba(6,182,212,.06));
}

.module-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(var(--ew-primary-rgb), .12);
    color: var(--ew-primary);
    font-size: 1.4rem;
}

.escola-select-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.escola-select-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15,23,42,.12) !important;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }
}

[data-bs-theme="dark"] .alert-light {
    background: var(--ew-card-bg);
    border-color: rgba(255, 255, 255, .08);
    color: var(--bs-body-color);
}

.doc-type-card { transition: transform .2s ease, box-shadow .2s ease; }
.doc-type-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.1) !important; }

/* Módulo frequência */
.frequencia-module .card {
    background: var(--ew-card-bg);
    border-radius: var(--ew-radius);
}

.frequencia-module .table thead th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ew-muted);
    border-bottom-width: 1px;
}

.frequencia-module .btn-group .btn.active {
    font-weight: 600;
}

.frequencia-module .chamada-pendente {
    --bs-table-bg: rgba(255, 193, 7, 0.08);
}

.frequencia-module .chamada-aluno-nome:hover {
    color: var(--bs-primary) !important;
}

.frequencia-module .pendente-check:disabled {
    opacity: 1;
    cursor: default;
}

.frequencia-module .just-input.is-invalid {
    border-color: var(--bs-warning);
}

.frequencia-module .form-select-sm,
.frequencia-module .form-control-sm {
    border-radius: 8px;
}

.frequencia-module .alert-warning .badge {
    font-weight: 500;
}

.frequencia-module .sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--ew-card-bg);
    min-width: 220px;
    width: max-content;
    max-width: none;
    white-space: nowrap;
    padding-left: .75rem;
    padding-right: 1rem;
    vertical-align: middle;
    box-shadow: 2px 0 0 rgba(15, 23, 42, .06);
}

.frequencia-module .table thead .sticky-col {
    z-index: 3;
}

.frequencia-module .grade-mensal-wrap {
    max-height: min(70vh, 720px);
    overflow: auto;
}

.frequencia-module .grade-mensal {
    font-size: .8125rem;
}

.frequencia-module .grade-mensal thead th {
    padding: .35rem .2rem;
    vertical-align: middle;
    line-height: 1.1;
}

.frequencia-module .grade-head-dow th {
    font-size: .68rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: none;
}

.frequencia-module .grade-head-day th {
    font-size: .75rem;
    font-weight: 700;
    border-top: none;
    padding-top: 0;
}

.frequencia-module .grade-sticky-corner {
    min-width: 220px;
    width: max-content;
    white-space: nowrap;
    vertical-align: bottom;
    padding-left: .75rem;
    padding-right: 1rem;
}

.frequencia-module .grade-mensal .grade-col-data,
.frequencia-module .grade-mensal td.grade-cell-edit,
.frequencia-module .grade-mensal td.grade-cell-off {
    min-width: 52px;
    width: 52px;
    max-width: 52px;
    padding-left: .15rem;
    padding-right: .15rem;
}

.frequencia-module .grade-col-weekend,
.frequencia-module .grade-cell-off.grade-col-weekend {
    background: #c4a882 !important;
    color: #5c4a32;
}

.frequencia-module td.grade-cell-weekend-oculto {
    background: #c4a882 !important;
}

.frequencia-module td.grade-cell-weekend-oculto.grade-status-presente,
.frequencia-module td.grade-cell-weekend-oculto.grade-status-falta,
.frequencia-module td.grade-cell-weekend-oculto.grade-status-falta-just,
.frequencia-module td.grade-cell-weekend-oculto.grade-status-vazio {
    background: #c4a882 !important;
}

.frequencia-module td.grade-cell-weekend-oculto .grade-freq-select.grade-select-preenchido {
    color: #5c4a32 !important;
}

.frequencia-module td.grade-cell-weekend-oculto .grade-freq-select.grade-select-vazio {
    background-color: rgba(255, 255, 255, .55) !important;
    border-color: rgba(92, 74, 50, .35);
}

.frequencia-module .grade-col-nao-letivo,
.frequencia-module .grade-cell-off.grade-col-nao-letivo {
    background: #f1f5f9;
    color: #94a3b8;
}

.frequencia-module .grade-cell-off {
    font-weight: 600;
    padding: .35rem .15rem;
}

.frequencia-module .grade-cell-edit {
    padding: .2rem;
}

.frequencia-module td.grade-cell-edit.grade-status-vazio {
    background: #fff !important;
}

.frequencia-module td.grade-cell-edit.grade-status-presente {
    background: var(--freq-cor-presente, #22c55e) !important;
}

.frequencia-module td.grade-cell-edit.grade-status-falta {
    background: var(--freq-cor-falta, #ef4444) !important;
}

.frequencia-module td.grade-cell-edit.grade-status-falta-just {
    background: var(--freq-cor-falta-justificada, #f59e0b) !important;
}

.frequencia-module .grade-freq-select {
    min-width: 42px;
    max-width: 48px;
    height: 1.75rem;
    margin: 0 auto;
    padding: 0 .2rem;
    padding-right: .2rem !important;
    font-weight: 800;
    font-size: .8125rem;
    line-height: 1.75rem;
    text-align: center;
    text-align-last: center;
    border-width: 1px;
    border-radius: .375rem;
    box-shadow: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.frequencia-module .grade-freq-select.grade-select-vazio {
    font-size: 0;
    color: #64748b;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%2364748b'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
    border-color: #cbd5e1;
}

.frequencia-module .grade-freq-select.grade-select-preenchido {
    color: #fff !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
}

.frequencia-module .grade-freq-select option {
    font-size: .8125rem;
    font-weight: 700;
    color: #0f172a !important;
    background-color: #fff !important;
}

.frequencia-module .grade-freq-select option[value=""] {
    color: #94a3b8 !important;
}

.frequencia-module td.grade-cell-edit.grade-status-vazio .grade-freq-select.grade-select-vazio {
    border-color: #cbd5e1;
}

.frequencia-module .grade-status-vazio {
    background: #fff;
    border-color: #e2e8f0;
    color: #64748b;
}

.frequencia-module .grade-status-presente {
    background: var(--freq-cor-presente, #22c55e);
    border-color: var(--freq-cor-presente, #16a34a);
    color: #fff;
}

.frequencia-module .grade-status-falta {
    background: var(--freq-cor-falta, #ef4444);
    border-color: var(--freq-cor-falta, #dc2626);
    color: #fff;
}

.frequencia-module .grade-status-falta-just {
    background: var(--freq-cor-falta-justificada, #f59e0b);
    border-color: var(--freq-cor-falta-justificada, #d97706);
    color: #fff;
}

.frequencia-module .grade-legenda {
    align-items: center;
}

.frequencia-module .grade-legenda-cor {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    margin-right: .35rem;
    vertical-align: middle;
    border: 1px solid rgba(15, 23, 42, .12);
}

.frequencia-module .grade-legenda-presente {
    background: var(--freq-cor-presente, #22c55e);
}

.frequencia-module .grade-legenda-falta {
    background: var(--freq-cor-falta, #ef4444);
}

.frequencia-module .grade-col-hoje {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .45);
}

.frequencia-module thead .grade-col-hoje {
    background: rgba(37, 99, 235, .08);
}

.frequencia-module td.grade-cell-edit.grade-cell-focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    z-index: 1;
    position: relative;
}

.frequencia-module .grade-atalhos-teclado {
    margin-top: .35rem;
}

.frequencia-module .grade-legenda-falta-just {
    background: var(--freq-cor-falta-justificada, #f59e0b);
}

.frequencia-module .grade-legenda-weekend {
    background: #c4a882;
}

.frequencia-module [data-status-quick="presente"].active,
.frequencia-module [data-status-quick="presente"]:hover {
    background-color: var(--freq-cor-presente, #22c55e) !important;
    border-color: var(--freq-cor-presente, #22c55e) !important;
    color: #fff !important;
}

.frequencia-module [data-status-quick="falta"].active,
.frequencia-module [data-status-quick="falta"]:hover {
    background-color: var(--freq-cor-falta, #ef4444) !important;
    border-color: var(--freq-cor-falta, #ef4444) !important;
    color: #fff !important;
}

.frequencia-module .freq-cor-amostra-presente,
.frequencia-module .freq-cor-preview.freq-cor-amostra-presente {
    background: var(--freq-cor-presente, #22c55e);
}

.frequencia-module .freq-cor-amostra-falta {
    background: var(--freq-cor-falta, #ef4444);
}

.frequencia-module .freq-cor-amostra-falta-just {
    background: var(--freq-cor-falta-justificada, #f59e0b);
}

.frequencia-module .freq-cor-amostra-atraso {
    background: var(--freq-cor-atraso, #8b5cf6);
}

.frequencia-module .freq-cor-amostra-dispensa {
    background: var(--freq-cor-dispensa, #64748b);
}

.frequencia-module .freq-nav-wrap .btn.active {
    background: var(--bs-secondary-bg);
}

.quadro-celula-intervalo {
    background: rgba(148, 163, 184, 0.15);
}

.quadro-legenda-cor {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.quadro-item-lista.is-editing,
.quadro-horario-lista.is-editing {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.quadro-module .quadro-grade-wrap {
    overflow-x: auto;
}

.quadro-module .quadro-col-horario {
    min-width: 7.5rem;
    white-space: nowrap;
}

.quadro-module td.quadro-cell-edit {
    padding: 0.35rem 0.25rem;
    vertical-align: middle;
    min-width: 8.5rem;
}

.quadro-module td.quadro-cell-edit.quadro-cell-vazia {
    background: var(--bs-body-bg);
}

.quadro-module .quadro-disc-select {
    font-size: 0;
    line-height: 1.2;
    padding: 0.25rem 1.5rem 0.25rem 0.35rem;
    min-height: 2rem;
    border-color: transparent;
    background-color: transparent;
    cursor: pointer;
}

.quadro-module .quadro-disc-select.quadro-select-vazio {
    color: transparent;
}

.quadro-module .quadro-disc-select.quadro-select-vazio option {
    color: var(--bs-body-color);
    font-size: 0.875rem;
}

.quadro-module .quadro-disc-select.quadro-select-preenchido {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.quadro-module .quadro-disc-select option {
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--bs-body-color);
}

.quadro-module .quadro-disc-select option[value=""] {
    color: var(--bs-secondary-color);
}

.quadro-module .quadro-prof-hint {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.quadro-module td.quadro-cell-edit.quadro-cell-focus {
    outline: 2px solid rgba(var(--bs-primary-rgb), 0.65);
    outline-offset: -2px;
}

.quadro-module .quadro-atalhos-teclado {
    margin-top: 0.25rem;
}

.quadro-slot-row {
    display: grid;
    grid-template-columns: 4.75rem auto 1fr;
    align-items: baseline;
    column-gap: 0.35rem;
}

.quadro-slot-label {
    text-align: right;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.quadro-slot-sep {
    color: var(--bs-secondary-color);
}

.quadro-slot-hora {
    white-space: nowrap;
}

.quadro-carga-bar {
    display: flex;
    width: 100%;
    height: 0.65rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.quadro-carga-fill {
    height: 100%;
    transition: width 0.25s ease;
}

.quadro-carga-fill--base {
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}

.quadro-carga-bar--alerta .quadro-carga-fill--base {
    background: linear-gradient(180deg, #fde047 0%, #ca8a04 100%);
}

.quadro-carga-bar--completo .quadro-carga-fill--base {
    background: linear-gradient(180deg, #86efac 0%, #15803d 100%);
}

.quadro-carga-fill--extra {
    background: linear-gradient(180deg, #fb923c 0%, #dc2626 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.quadro-carga-fill--neutro {
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
}

.quadro-carga-tag {
    font-size: 0.75rem;
    font-weight: 600;
}

.quadro-carga-tag--extra {
    color: #c2410c;
}

.quadro-carga-tag--ok {
    color: #15803d;
}

.quadro-carga-tag--alerta {
    color: #a16207;
}

.quadro-carga-legenda-hint {
    line-height: 1.4;
}

.quadro-carga-legenda-dot {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    vertical-align: -1px;
    margin-right: 0.2rem;
}

.quadro-carga-legenda-dot--base {
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
}

.quadro-carga-legenda-dot--extra {
    background: linear-gradient(180deg, #fb923c 0%, #dc2626 100%);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ——— Formulários de cadastro (blocos) ——— */
.form-cadastro .form-cadastro-body {
    padding: 1rem 1.125rem;
}

@media (min-width: 768px) {
    .form-cadastro .form-cadastro-body {
        padding: 1.25rem 1.5rem;
    }
}

.form-cadastro-stack {
    gap: 1.25rem !important;
}

@media (min-width: 768px) {
    .form-cadastro-stack {
        gap: 1.5rem !important;
    }
}

.form-section {
    background: var(--ew-card-bg);
    border: 1px solid var(--ew-topbar-border);
    border-radius: calc(var(--ew-radius) - 2px);
    overflow: hidden;
}

.form-section__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .875rem 1rem;
    background: rgba(var(--ew-primary-rgb), .05);
    border-bottom: 1px solid var(--ew-topbar-border);
}

.form-section__titles {
    flex: 1;
    min-width: 0;
}

.form-section__ra {
    margin-left: auto;
    text-align: right;
    padding: .35rem .85rem;
    border-radius: 12px;
    background: rgba(var(--ew-primary-rgb), .1);
    border: 1px solid rgba(var(--ew-primary-rgb), .18);
    flex-shrink: 0;
    min-width: 7.5rem;
}

.form-section__ra .form-control-sm {
    text-align: right;
    font-weight: 700;
    color: var(--ew-primary);
}

.form-section__ra-label {
    display: block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ew-muted);
    line-height: 1.2;
}

.form-section__ra-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: var(--ew-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

[data-bs-theme="dark"] .form-section__header {
    background: rgba(255, 255, 255, .04);
}

.form-section__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: rgba(var(--ew-primary-rgb), .12);
    color: var(--ew-primary);
    flex-shrink: 0;
}

.form-section__icon .bi {
    font-size: 1rem;
}

.form-section__title {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
    color: var(--ew-heading);
    margin: 0;
    line-height: 1.3;
}

.form-section__desc {
    font-size: .8125rem;
    color: var(--ew-muted);
    margin: .25rem 0 0;
    line-height: 1.45;
}

.form-section__body {
    padding: 1rem;
    margin: 0;
}

@media (min-width: 768px) {
    .form-section__body {
        padding: 1.125rem 1.25rem 1.25rem;
    }
}

.form-cadastro-footer {
    border-top: 1px solid var(--ew-topbar-border) !important;
    padding-top: 1rem !important;
}

.form-cadastro .form-label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--ew-heading);
    margin-bottom: .35rem;
}

.form-cadastro .form-text,
.form-cadastro small.text-muted {
    font-size: .78rem;
}

/* Impressora flutuante — ficha do aluno */
.print-fab {
    position: fixed;
    top: calc(var(--ew-topbar-height) + 1rem);
    right: 1.25rem;
    z-index: 1040;
}

.print-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #f97316;
    color: #fff;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.print-fab-btn:hover,
.print-fab-btn:focus {
    background: #ea580c;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.5);
}

.print-fab .dropdown-menu {
    min-width: 240px;
    border-radius: 10px;
    padding: .35rem 0;
}

.print-fab .dropdown-item {
    padding: .6rem 1rem;
    font-size: .9rem;
}

@media (max-width: 767.98px) {
    .print-fab {
        top: auto;
        bottom: 1.25rem;
        right: 1rem;
    }
}

@media print {
    .print-fab {
        display: none !important;
    }
}

.aluno-lista-foto-col {
    width: 64px;
}

.aluno-lista-foto-btn {
    cursor: zoom-in;
    line-height: 0;
}

.aluno-lista-foto-btn img {
    transition: box-shadow .15s ease, opacity .15s ease;
}

.aluno-lista-foto-btn:hover img,
.aluno-lista-foto-btn:focus-visible img {
    opacity: .92;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, .4);
}

.aluno-ficha-foto-btn {
    position: relative;
    cursor: zoom-in;
    line-height: 0;
}

.aluno-ficha-foto-btn__hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, .35);
    color: #fff;
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
}

.aluno-ficha-foto-btn:hover .aluno-ficha-foto-btn__hint,
.aluno-ficha-foto-btn:focus-visible .aluno-ficha-foto-btn__hint {
    opacity: 1;
}

/* Notas — lançamento */
.notas-module .card {
    border-radius: var(--ew-radius);
}

.notas-module .card-esquema-ativo {
    border-left: 4px solid var(--ew-primary) !important;
}

.notas-module .table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ew-muted);
    font-weight: 600;
}

.notas-module #cardLancarNota {
    scroll-margin-top: 5rem;
}

#notaExistenteHintBadge.nota-lancamento-destaque {
    animation: nota-lancamento-destaque 2s ease-out;
}

@keyframes nota-lancamento-destaque {
    0% {
        background-color: #198754 !important;
        color: #fff !important;
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.55);
        transform: scale(1);
    }
    20% {
        transform: scale(1.04);
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0.2);
    }
    50% {
        background-color: #157347 !important;
        color: #fff !important;
        box-shadow: 0 0 0 6px rgba(25, 135, 84, 0.12);
    }
    100% {
        background-color: var(--bs-info-bg-subtle, #cff4fc);
        color: var(--bs-info-text-emphasis, #055160);
        box-shadow: none;
        transform: scale(1);
    }
}

.notas-module #cardLancarNota .card-header,
.notas-module .col-lg-7 > .card > .card-header {
    border-bottom: 1px solid var(--ew-topbar-border);
}

.notas-module #tabelaNotasLancadas thead .form-select-sm {
    font-size: .8125rem;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

.notas-module #tabelaNotasLancadas thead th {
    vertical-align: top;
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.notas-module .filtros-notas .form-label {
    font-size: .8125rem;
    font-weight: 600;
}

.notas-module .btn-editar-nota {
    min-width: 4.5rem;
}

.notas-sequencial-module .notas-seq-lista-alunos .list-group-item.active {
    background-color: var(--bs-primary-bg-subtle, #e8eef9);
    border-color: var(--bs-primary-border-subtle, #b6c4ff);
    color: inherit;
}

.notas-sequencial-module .notas-seq-aluno-lancado:not(.active) {
    border-left: 3px solid var(--bs-success, #198754);
}

.notas-sequencial-module .notas-seq-painel .form-control-lg {
    font-size: 1.5rem;
    font-weight: 600;
}

.alunos-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: flex-end;
}

.alunos-filtros .form-label {
    font-size: .8125rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.alunos-filtros .form-select,
.alunos-filtros .form-control {
    min-height: 38px;
}

.alunos-filtros .input-group .form-control {
    border-left: 0;
}

.alunos-filtros .input-group-text {
    min-height: 38px;
    border-right: 0;
}

.alunos-filtro-field--escola {
    flex: 0 1 240px;
    min-width: 180px;
    max-width: 100%;
}

.alunos-filtro-field--serie {
    flex: 0 1 120px;
    min-width: 96px;
    max-width: 100%;
}

.alunos-filtro-field--turma {
    flex: 0 1 200px;
    min-width: 160px;
    max-width: 100%;
}

.alunos-filtro-field--busca {
    flex: 1 1 280px;
    min-width: 220px;
}

.estatisticas-serie-filtros__limpar {
    flex: 0 0 auto;
    align-self: flex-end;
}

.estatisticas-serie-filtros__limpar .btn {
    min-height: 38px;
}

/* ——— Perfis de acesso (matriz com switches) ——— */
.perfil-acesso-form .form-section--collapsible .form-section__body:not(.show) {
    display: none;
}

.perfil-acesso-form .perfil-secao-toggle {
    text-decoration: none;
    padding: .25rem .5rem;
}

.perfil-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.perfil-toolbar__busca {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.perfil-toolbar__busca .bi-search {
    position: absolute;
    left: .65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.perfil-toolbar__busca .form-control {
    padding-left: 2rem;
}

.perfil-escolas-grid {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.perfil-escola-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    border: 1px solid var(--ew-topbar-border);
    border-radius: calc(var(--ew-radius) - 4px);
    background: var(--ew-card-bg);
    cursor: pointer;
    margin: 0;
}

.perfil-escola-item:hover {
    border-color: rgba(var(--ew-primary-rgb), .35);
}

.perfil-escola-item__nome {
    font-size: .875rem;
    font-weight: 500;
}

.perfil-switch .form-check-input {
    width: 2.5rem;
    height: 1.35rem;
    cursor: pointer;
    border-width: 2px;
    border-color: #64748b;
    background-color: #94a3b8;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.perfil-switch .form-check-input:not(:checked):hover:not(:disabled) {
    background-color: #64748b;
    border-color: #475569;
}

.perfil-switch .form-check-input:checked {
    background-color: var(--ew-primary);
    border-color: #4338ca;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.perfil-switch .form-check-input:checked:hover:not(:disabled) {
    background-color: #4338ca;
    border-color: #3730a3;
}

.perfil-switch .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(var(--ew-primary-rgb), .28);
}

/* Desligado + bloqueado — cores vivas, sem esmaecer */
.perfil-switch .form-check-input:not(:checked):disabled {
    opacity: 1;
    cursor: not-allowed;
    background-color: #fda4af;
    border-color: #f43f5e;
    box-shadow: inset 0 1px 2px rgba(244, 63, 94, .15);
}

/* Ligado + bloqueado */
.perfil-switch .form-check-input:checked:disabled {
    opacity: 1;
    cursor: not-allowed;
    background-color: #818cf8;
    border-color: #6366f1;
    box-shadow: inset 0 1px 2px rgba(79, 70, 229, .2);
}

.perfil-switch--lg .form-check-input {
    width: 2.75rem;
    height: 1.5rem;
}

.perfil-matriz-head {
    grid-template-columns: minmax(160px, 1.4fr) repeat(4, 5rem) 5rem 4rem;
    gap: .5rem;
    padding: .5rem .75rem;
    margin-bottom: .5rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--bs-secondary-color);
    background: rgba(var(--ew-primary-rgb), .04);
    border-radius: calc(var(--ew-radius) - 4px);
}

.perfil-grupos {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.perfil-grupo {
    border: 1px solid var(--ew-topbar-border);
    border-radius: calc(var(--ew-radius) - 2px);
    overflow: hidden;
    background: var(--ew-card-bg);
}

.perfil-grupo__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .75rem;
    background: rgba(var(--ew-primary-rgb), .05);
    border-bottom: 1px solid var(--ew-topbar-border);
}

.perfil-grupo__toggle {
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    padding: .15rem .25rem;
    line-height: 1;
}

.perfil-grupo__icon {
    color: var(--ew-primary);
}

.perfil-grupo__info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.perfil-grupo__titulo {
    font-weight: 600;
    font-size: .9375rem;
}

.perfil-grupo__contagem {
    font-size: .7rem;
    font-weight: 600;
}

.perfil-grupo__master {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.perfil-grupo__body:not(.show) {
    display: none;
}

.perfil-modulo {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) repeat(4, minmax(4.5rem, 5rem)) minmax(4.5rem, 5rem) 4rem;
    gap: .35rem .5rem;
    align-items: center;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--ew-topbar-border);
    transition: background .15s ease;
}

.perfil-modulo:last-child {
    border-bottom: 0;
}

.perfil-modulo--ativo {
    background: rgba(var(--ew-primary-rgb), .03);
}

.perfil-modulo--inativo {
    background: rgba(148, 163, 184, .08);
}

.perfil-modulo--inativo .perfil-modulo__nome {
    color: var(--bs-secondary-color);
}

.perfil-modulo__nome {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.perfil-modulo__hint {
    color: var(--bs-secondary-color);
    font-size: .8rem;
    cursor: help;
}

.perfil-modulo__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
}

.perfil-modulo__cell-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

@media (max-width: 1199.98px) {
    .perfil-modulo {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
        padding: .75rem;
    }

    .perfil-modulo__nome {
        grid-column: 1 / -1;
        padding-bottom: .25rem;
        border-bottom: 1px dashed var(--ew-topbar-border);
        margin-bottom: .15rem;
    }

    .perfil-modulo__cell {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: .2rem 0;
    }

    .perfil-modulo__cell-label {
        font-size: .75rem;
        text-transform: none;
    }
}

@media (max-width: 575.98px) {
    .perfil-toolbar__acoes {
        width: 100%;
        flex-wrap: wrap;
    }

    .perfil-toolbar__acoes .btn {
        flex: 1 1 auto;
    }
}

[data-bs-theme="dark"] .perfil-switch .form-check-input:not(:checked):not(:disabled) {
    background-color: #64748b;
    border-color: #475569;
}

[data-bs-theme="dark"] .perfil-switch .form-check-input:not(:checked):disabled {
    background-color: #be123c;
    border-color: #fb7185;
}

[data-bs-theme="dark"] .perfil-switch .form-check-input:checked:disabled {
    background-color: #6366f1;
    border-color: #818cf8;
}

[data-bs-theme="dark"] .perfil-modulo--ativo {
    background: rgba(var(--ew-primary-rgb), .08);
}

/* ——— Relatórios estatísticos ——— */
.relatorio-stat-accordion .accordion-button {
    font-weight: 600;
    font-size: .9375rem;
}

.relatorio-stat-accordion .accordion-button:not(.collapsed) {
    background: rgba(var(--ew-primary-rgb), .06);
    color: inherit;
}

.relatorio-stat-bar {
    height: .55rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.relatorio-stat-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--stat-pct, 0%);
    background: linear-gradient(90deg, var(--ew-primary), #06b6d4);
    border-radius: inherit;
    transition: width .25s ease;
}

.relatorio-stat-tabela td {
    vertical-align: middle;
}

.relatorio-hub-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.relatorio-hub-card:hover,
.relatorio-hub-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .08) !important;
}

.relatorio-hub-card__icon {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    font-size: 1.5rem;
}

.relatorio-hub-card__icon--sm {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Badges subtle — legíveis no tema claro e escuro */
.badge.text-bg-success-subtle.text-success-emphasis,
.badge.text-bg-primary-subtle.text-primary-emphasis,
.badge.text-bg-secondary-subtle.text-secondary-emphasis,
.badge.text-bg-warning-subtle.text-warning-emphasis,
.badge.text-bg-danger-subtle.text-danger-emphasis,
.badge.text-bg-info-subtle.text-info-emphasis {
    font-weight: 600;
}

.badge.text-bg-warning-subtle:not(.text-warning-emphasis) {
    color: var(--bs-warning-text-emphasis, #664d03) !important;
}

.badge.text-bg-primary-subtle:not(.text-primary-emphasis),
.badge.text-bg-success-subtle:not(.text-success-emphasis),
.badge.text-bg-info-subtle:not(.text-info-emphasis),
.badge.text-bg-danger-subtle:not(.text-danger-emphasis),
.badge.text-bg-secondary-subtle:not(.text-secondary-emphasis) {
    color: var(--bs-emphasis-color, var(--bs-body-color)) !important;
}

.badge.text-bg-primary-subtle:not(.text-primary-emphasis) {
    color: var(--bs-primary-text-emphasis, #052c65) !important;
}

.badge.text-bg-success-subtle:not(.text-success-emphasis) {
    color: var(--bs-success-text-emphasis, #0a3622) !important;
}

.badge.text-bg-info-subtle:not(.text-info-emphasis) {
    color: var(--bs-info-text-emphasis, #055160) !important;
}

.badge.text-bg-danger-subtle:not(.text-danger-emphasis) {
    color: var(--bs-danger-text-emphasis, #58151c) !important;
}

.badge.text-bg-secondary-subtle:not(.text-secondary-emphasis) {
    color: var(--bs-secondary-text-emphasis, #41464b) !important;
}

[data-bs-theme="dark"] .badge.text-bg-primary-subtle:not(.text-primary-emphasis) {
    color: var(--bs-primary-text-emphasis, #6ea8fe) !important;
}

[data-bs-theme="dark"] .badge.text-bg-success-subtle:not(.text-success-emphasis) {
    color: var(--bs-success-text-emphasis, #75b798) !important;
}

[data-bs-theme="dark"] .badge.text-bg-info-subtle:not(.text-info-emphasis) {
    color: var(--bs-info-text-emphasis, #6edff6) !important;
}

[data-bs-theme="dark"] .badge.text-bg-danger-subtle:not(.text-danger-emphasis) {
    color: var(--bs-danger-text-emphasis, #ea868f) !important;
}

[data-bs-theme="dark"] .badge.text-bg-secondary-subtle:not(.text-secondary-emphasis) {
    color: var(--bs-secondary-text-emphasis, #a7acb1) !important;
}

/* Situação do aluno — legível em tema claro e escuro */
.ew-badge-situacao-aluno {
    font-weight: 600;
    border: 1px solid transparent;
}

.ew-badge-situacao-aluno--ativo {
    background-color: rgba(34, 197, 94, 0.16);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.28);
}

.ew-badge-situacao-aluno--transferido {
    background-color: rgba(245, 158, 11, 0.18);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.32);
}

.ew-badge-situacao-aluno--evadido {
    background-color: rgba(239, 68, 68, 0.16);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.28);
}

.ew-badge-situacao-aluno--concluinte {
    background-color: rgba(14, 165, 233, 0.16);
    color: #075985;
    border-color: rgba(14, 165, 233, 0.28);
}

.ew-badge-situacao-aluno--inativo,
.ew-badge-situacao-aluno--default {
    background-color: rgba(100, 116, 139, 0.16);
    color: #334155;
    border-color: rgba(100, 116, 139, 0.28);
}

[data-bs-theme="dark"] .ew-badge-situacao-aluno--ativo {
    background-color: rgba(34, 197, 94, 0.22);
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.35);
}

[data-bs-theme="dark"] .ew-badge-situacao-aluno--transferido {
    background-color: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border-color: rgba(252, 211, 77, 0.35);
}

[data-bs-theme="dark"] .ew-badge-situacao-aluno--evadido {
    background-color: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.35);
}

[data-bs-theme="dark"] .ew-badge-situacao-aluno--concluinte {
    background-color: rgba(14, 165, 233, 0.22);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.35);
}

[data-bs-theme="dark"] .ew-badge-situacao-aluno--inativo,
[data-bs-theme="dark"] .ew-badge-situacao-aluno--default {
    background-color: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border-color: rgba(203, 213, 225, 0.28);
}

.ew-text-pendencia {
    color: var(--bs-warning-text-emphasis, #664d03);
    font-weight: 600;
}

[data-bs-theme="dark"] .ew-text-pendencia {
    color: var(--bs-warning-text-emphasis, #ffda6a);
}

[data-bs-theme="dark"] .badge.text-bg-light.text-body-secondary {
    color: var(--bs-secondary-color) !important;
    border-color: var(--bs-border-color) !important;
}

/* Flash messages */
.ew-flash-alert {
    border-left: 4px solid transparent;
    border-radius: .75rem;
}
.ew-flash-alert.alert-success { border-left-color: var(--bs-success); }
.ew-flash-alert.alert-danger { border-left-color: var(--bs-danger); }
.ew-flash-alert.alert-warning { border-left-color: var(--bs-warning); }
.ew-flash-alert.alert-info { border-left-color: var(--bs-info); }
.ew-flash-alert__icon { font-size: 1.15rem; margin-top: .1rem; }

/* Modal de confirmação */
.ew-confirm-modal .modal-content {
    border-radius: 1rem;
    overflow: hidden;
}
.ew-confirm-modal__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}
.ew-confirm-modal__icon--danger {
    background: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis, var(--bs-danger));
}
.ew-confirm-modal__icon--warning {
    background: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis, var(--bs-warning));
}
.ew-confirm-modal__icon--primary {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis, var(--bs-primary));
}
.ew-confirm-modal__icon--success {
    background: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis, var(--bs-success));
}
@media (max-width: 575.98px) {
    .ew-confirm-modal .modal-footer .btn {
        min-height: 2.75rem;
    }
}

/* Destaque Educacenso — campos pendentes no formulário */
.ew-campo-destaque-wrap {
    position: relative;
}

.ew-campo-destaque-wrap > .form-label,
.ew-campo-destaque-wrap > label.form-label {
    color: #b45309;
    font-weight: 600;
}

.ew-campo-destaque,
.ew-campo-destaque-wrap .form-select.ew-campo-destaque {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.22);
    background-color: rgba(245, 158, 11, 0.08);
}

[data-bs-theme="dark"] .ew-campo-destaque,
[data-bs-theme="dark"] .ew-campo-destaque-wrap .form-select.ew-campo-destaque {
    background-color: rgba(245, 158, 11, 0.12);
}

