:root {
    --ba-bg: #f4f7fa;
    --ba-surface: #ffffff;
    --ba-ink: #172033;
    --ba-muted: #64748b;
    --ba-line: #dbe3ec;
    --ba-primary: #0f766e;
    --ba-primary-dark: #115e59;
    --ba-info: #2563eb;
    --ba-danger: #dc2626;
    --ba-warning: #f59e0b;
    --ba-success: #16a34a;
    --ba-radius: .5rem;
    --ba-shadow: 0 .75rem 2rem rgba(15, 23, 42, .08);
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--ba-bg);
    color: var(--ba-ink);
    overflow-x: hidden;
}

body[data-theme="dark"] {
    --ba-bg: #111827;
    --ba-surface: #182235;
    --ba-ink: #e5edf7;
    --ba-muted: #9aa8bc;
    --ba-line: #304158;
    --ba-primary: #2dd4bf;
    --ba-primary-dark: #5eead4;
    --ba-info: #60a5fa;
    --ba-danger: #fb7185;
    --ba-warning: #fbbf24;
    --ba-success: #4ade80;
    --ba-shadow: 0 .75rem 2rem rgba(0, 0, 0, .28);
}

.app-body {
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .08) 0%, rgba(244, 247, 250, 0) 18rem),
        var(--ba-bg);
}

.app-body-admin {
    background: #f2f5f8;
}

body[data-theme="dark"].app-body,
body[data-theme="dark"].app-body-admin {
    background:
        linear-gradient(180deg, rgba(45, 212, 191, .08) 0%, rgba(17, 24, 39, 0) 18rem),
        var(--ba-bg);
}

.app-shell {
    width: min(100%, 1680px);
    margin-inline: auto;
    padding: clamp(.75rem, 1.6vw, 1.5rem);
    overflow: visible;
}

.app-shell-sm {
    width: min(100%, 760px);
    margin-inline: auto;
    padding: 1rem 1rem 6.5rem;
}

.app-shell-register {
    width: min(100%, 1280px);
    margin-inline: auto;
    padding: 1rem 1rem 9rem;
}

.app-chrome {
    position: relative;
    z-index: 2000;
    display: grid;
    gap: .9rem;
    margin-bottom: 1rem;
    overflow: visible;
}

.app-topbar {
    position: relative;
    z-index: 2010;
    display: grid;
    grid-template-columns: minmax(9rem, auto) minmax(12rem, 1fr) minmax(12rem, auto);
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(219, 227, 236, .9);
    border-radius: calc(var(--ba-radius) + .25rem);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--ba-shadow);
    backdrop-filter: blur(14px);
    overflow: visible;
}

.app-topbar-brand {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.app-brand-kicker {
    color: var(--ba-primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-brand-name {
    font-size: .98rem;
    line-height: 1.1;
}

.app-topbar-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.app-topbar-actions {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.app-dropdown {
    position: relative;
    z-index: 1;
}

.app-dropdown[open] {
    z-index: 2020;
}

.app-dropdown summary {
    list-style: none;
}

.app-dropdown summary::-webkit-details-marker {
    display: none;
}

.app-dropdown-trigger,
.app-account-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.75rem;
    border: 1px solid var(--ba-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    color: var(--ba-ink);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.app-dropdown-trigger {
    padding: .55rem .95rem;
}

.app-dropdown-trigger span {
    color: var(--ba-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.app-dropdown-trigger::after,
.app-account-trigger::after {
    content: "▾";
    color: var(--ba-muted);
    font-size: .8rem;
}

.app-account-trigger {
    padding: .45rem .8rem .45rem .9rem;
}

.app-account-copy {
    display: grid;
    gap: .05rem;
    min-width: 0;
    text-align: left;
}

.app-account-copy strong,
.app-account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-copy small {
    color: var(--ba-muted);
    font-size: .78rem;
}

.app-dropdown-trigger:hover,
.app-dropdown-trigger:focus-visible,
.app-account-trigger:hover,
.app-account-trigger:focus-visible,
.app-dropdown[open] > .app-dropdown-trigger,
.app-dropdown[open] > .app-account-trigger {
    border-color: rgba(15, 118, 110, .2);
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    outline: none;
}

.app-dropdown-menu {
    position: absolute;
    top: calc(100% + .5rem);
    left: 50%;
    z-index: 2030;
    display: grid;
    min-width: 14rem;
    padding: .45rem;
    border: 1px solid var(--ba-line);
    border-radius: .8rem;
    background: var(--ba-surface);
    box-shadow: var(--ba-shadow);
    transform: translateX(-50%);
}

.app-account-dropdown .app-dropdown-menu {
    right: 0;
    left: auto;
    width: min(20rem, calc(100vw - 2rem));
    min-width: 0;
    transform: none;
}

.app-module-group {
    display: grid;
    gap: .15rem;
}

.app-module-group + .app-module-group {
    margin-top: .35rem;
    padding-top: .5rem;
    border-top: 1px solid var(--ba-line);
}

.app-module-group-title {
    padding: .2rem .75rem .25rem;
    color: var(--ba-muted);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.app-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 2.5rem;
    padding: .6rem .75rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: var(--ba-ink);
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.app-dropdown-item:hover,
.app-dropdown-item:focus-visible,
.app-dropdown-item.is-active {
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    outline: none;
}

.app-dropdown-button {
    cursor: pointer;
}

.app-dropdown-button.is-danger {
    color: var(--ba-danger);
}

.app-account-menu {
    gap: .35rem;
    padding: .5rem;
}

.app-account-menu-head {
    display: grid;
    gap: .15rem;
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--ba-line);
}

.app-account-menu-head strong,
.app-account-menu-head span,
.app-account-menu-head small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-menu-head span,
.app-account-menu-head small {
    color: var(--ba-muted);
    font-size: .82rem;
}

.app-pagehead {
    position: relative;
    z-index: 0;
    margin-bottom: 0;
    border-radius: calc(var(--ba-radius) + .25rem);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, .1), transparent 18rem),
        var(--ba-surface);
}

.app-pagehead-copy {
    max-width: 56rem;
}

.login-shell {
    width: min(100%, 430px);
}

.login-shell-wide {
    width: min(100%, 1080px);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 28rem);
    gap: 1.25rem;
    align-items: stretch;
}

.login-hero {
    display: grid;
    gap: 1rem;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    border: 1px solid var(--ba-line);
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, .12), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96));
    box-shadow: var(--ba-shadow);
}

.login-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.login-hero-card {
    display: grid;
    gap: .35rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(219, 227, 236, .9);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .88);
}

.login-hero-card strong {
    font-size: .95rem;
}

.login-hero-card span {
    color: var(--ba-muted);
    font-size: .86rem;
    line-height: 1.45;
}

.app-header {
    display: none;
}

.app-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.app-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0;
}

.module-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 999px;
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35rem .65rem;
    margin-bottom: .5rem;
}

.app-subtitle {
    margin-top: .45rem;
    color: var(--ba-muted);
    font-size: .98rem;
    line-height: 1.5;
}

.app-panel,
.metric-card,
.login-card,
.student-card,
.risk-item,
.motivo-card {
    background: var(--ba-surface);
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    box-shadow: var(--ba-shadow);
}

.app-panel {
    padding: clamp(.875rem, 1.4vw, 1.25rem);
    margin-bottom: 1rem;
}

.login-card {
    padding: 1.25rem;
}

.login-card-head {
    margin-bottom: 1rem;
}

.login-form-note {
    margin-bottom: 1rem;
    padding: .8rem .9rem;
    border: 1px solid var(--ba-line);
    border-radius: .95rem;
    background: linear-gradient(180deg, #fbfdff, #f8fafc);
    color: var(--ba-muted);
    font-size: .92rem;
}

.metric-card {
    display: flex;
    min-height: 7rem;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(.875rem, 1.3vw, 1.15rem);
}

.metric-card label {
    display: block;
    color: var(--ba-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .45rem;
}

.metric-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.text-status-pendente,
.metric-card.is-danger strong {
    color: var(--ba-danger);
}

.text-status-tratado,
.metric-card.is-warning strong {
    color: var(--ba-warning);
}

.text-status-resolvido,
.metric-card.is-success strong {
    color: var(--ba-success);
}

.metric-card.is-primary strong {
    color: var(--ba-primary);
}

.metric-card.is-info strong {
    color: #0891b2;
}

.user-box {
    min-width: 12rem;
    padding: .75rem 1rem;
}

.app-topbar-account .user-box {
    flex: 1 1 16rem;
    min-width: 0;
    margin-bottom: 0;
}

.app-account-head {
    display: grid;
    gap: .12rem;
}

.app-account-head strong,
.app-account-head span {
    display: block;
    min-width: 0;
}

.app-account-meta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: .45rem;
    padding: .22rem .55rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: var(--ba-info);
    font-size: .76rem;
    font-weight: 700;
}

.app-context-switcher {
    display: grid;
    gap: .25rem;
    min-width: 0;
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--ba-line);
}

.app-context-switcher span {
    color: var(--ba-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.app-context-switcher select {
    width: 100%;
    min-height: 2.15rem;
    border: 1px solid var(--ba-line);
    border-radius: .55rem;
    background: #fff;
    color: var(--ba-ink);
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .app-topbar {
        gap: 1rem;
    }
}

.form-control,
.form-select,
.btn {
    border-radius: var(--ba-radius);
}

.form-control,
.form-select {
    min-height: 2.75rem;
}

.btn-primary {
    --bs-btn-bg: var(--ba-primary);
    --bs-btn-border-color: var(--ba-primary);
    --bs-btn-hover-bg: var(--ba-primary-dark);
    --bs-btn-hover-border-color: var(--ba-primary-dark);
    --bs-btn-active-bg: var(--ba-primary-dark);
    --bs-btn-active-border-color: var(--ba-primary-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--ba-primary);
    --bs-btn-border-color: var(--ba-primary);
    --bs-btn-hover-bg: var(--ba-primary);
    --bs-btn-hover-border-color: var(--ba-primary);
}

.bottom-action-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--ba-line);
    backdrop-filter: blur(10px);
    box-shadow: 0 -1rem 2rem rgba(15, 23, 42, .08);
}

.bottom-action-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: min(calc(100% - 2rem), 620px);
    margin-inline: auto;
    padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom));
    text-align: center;
}

.bottom-action-wrap > .small {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: .25rem .75rem !important;
    margin: 0 !important;
}

.bottom-action-wrap #statusRascunhoChamada {
    width: 100%;
    margin: 0 !important;
    padding: .45rem .75rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    text-align: center;
}

.bottom-action-wrap #statusRascunhoChamada.text-warning {
    border-color: #f2d675;
    background: #fff9df;
    color: #8a6200 !important;
}

.bottom-action-wrap #statusRascunhoChamada.text-success {
    border-color: #9edbb7;
    background: #eefbf3;
    color: #187642 !important;
}

.bottom-action-wrap .btn {
    width: min(100%, 440px) !important;
    min-height: 2.85rem;
}

.registrar-portal #formAusencia {
    padding-bottom: 1.5rem;
}

.registrar-portal .app-shell-register {
    padding-bottom: 9rem !important;
}

.registrar-portal textarea,
.registrar-portal input,
.registrar-portal select {
    scroll-margin-bottom: 8rem;
}

.students-list {
    display: grid;
    gap: .625rem;
    max-height: 48vh;
    overflow: auto;
    padding-right: .2rem;
}

.confirm-presence-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(22, 163, 74, .3);
    border-left: .25rem solid var(--ba-success);
    border-radius: var(--ba-radius);
    background: rgba(22, 163, 74, .06);
}

.confirm-presence-panel div {
    display: grid;
    gap: .15rem;
}

.confirm-presence-panel span {
    color: var(--ba-muted);
    font-size: .85rem;
}

body[data-theme="dark"] .confirm-presence-panel {
    background: rgba(74, 222, 128, .08);
}

.mode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .35rem;
    border: 1px solid var(--ba-line);
    border-radius: 999px;
    background: #f8fafc;
}

.mode-switch .btn {
    min-width: 10rem;
    border-radius: 999px;
}

.mode-switch .btn.active {
    box-shadow: 0 .5rem 1.2rem rgba(15, 118, 110, .18);
}

.register-quickstart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.register-quickstart div {
    display: grid;
    gap: .15rem;
}

.register-quickstart span {
    color: var(--ba-muted);
    font-weight: 600;
}

.register-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .5rem;
}

.register-tab-hidden {
    display: none !important;
}

.register-tab,
.filter-chip {
    min-height: 2.75rem;
    border: 1px solid var(--ba-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ba-ink);
    padding: .55rem .9rem;
    font-weight: 800;
}

.register-tab.is-active,
.filter-chip.is-active {
    border-color: var(--ba-primary);
    background: rgba(15, 118, 110, .1);
    color: var(--ba-primary-dark);
}

.guided-step {
    position: relative;
}

.guided-step::before {
    content: "";
    position: absolute;
    inset: .9rem auto .9rem 0;
    width: .22rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, .22);
}

.absence-filters {
    display: grid;
    grid-template-columns: minmax(12rem, 1.4fr) repeat(4, minmax(9rem, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.absence-filters .form-label {
    margin-bottom: .25rem;
    color: var(--ba-muted);
    font-size: .78rem;
    font-weight: 800;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.student-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.student-card:hover,
.student-card:focus-within {
    border-color: rgba(15, 118, 110, .25);
    background: #fcfefe;
    box-shadow: 0 .75rem 1.5rem rgba(15, 23, 42, .08);
}

.student-card.is-selected {
    border-color: rgba(220, 38, 38, .35);
    background: #fff7f7;
}

.student-card.is-registered-absence {
    border-color: rgba(220, 38, 38, .7);
    border-style: dashed;
    background: #fff1f1;
    cursor: not-allowed;
}

.student-card.is-registered-absence:hover,
.student-card.is-registered-absence:focus-within {
    border-color: rgba(220, 38, 38, .8);
    background: #fff1f1;
    box-shadow: none;
}

.student-card input[type="checkbox"] {
    width: 1.35rem;
    height: 1.35rem;
    accent-color: var(--ba-danger);
}

.student-card.is-action {
    grid-template-columns: minmax(0, 1fr) auto;
    cursor: default;
}

.student-state,
.status-pill,
.risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
    font-size: .8rem;
    padding: .35rem .65rem;
}

.student-state {
    min-width: 5.5rem;
    background: rgba(22, 163, 74, .12);
    color: var(--ba-success);
}

.student-card.is-selected .student-state {
    background: rgba(220, 38, 38, .12);
    color: var(--ba-danger);
}

.student-card.is-registered-absence .student-state {
    background: rgba(220, 38, 38, .16);
    color: var(--ba-danger);
}

.student-certificate-active {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .3rem;
    margin-top: .3rem;
    padding: .2rem .5rem;
    border: 1px solid rgba(37, 99, 235, .24);
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 800;
}

.student-certificate-active::before {
    content: '✓';
    font-size: .76rem;
}

.motivo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .625rem;
}

.motivo-btn {
    min-height: 3.75rem;
    border: 1px solid var(--ba-line);
    background: #fff;
    color: var(--ba-ink);
    border-radius: var(--ba-radius);
    padding: .7rem .8rem;
    font-weight: 700;
    text-align: left;
}

.motivo-btn.active {
    background: var(--ba-primary);
    border-color: var(--ba-primary);
    color: #fff;
}

.motivo-btn span {
    display: none;
}

.table-responsive {
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: var(--ba-surface);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    min-width: 760px;
}

.table th {
    color: var(--ba-muted);
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    padding: 0;
    cursor: pointer;
}

.table-sort-button span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
    color: var(--ba-primary-dark);
    outline: none;
}

.table-sort-indicator::after {
    content: "↕";
    display: inline-block;
    min-width: .9rem;
    color: currentColor;
    opacity: .58;
    font-size: .78rem;
}

.table-sort-button[data-sort-direction="asc"] .table-sort-indicator::after {
    content: "↑";
    opacity: 1;
}

.table-sort-button[data-sort-direction="desc"] .table-sort-indicator::after {
    content: "↓";
    opacity: 1;
}

.status-pill.pendente {
    color: #fff;
    background: var(--ba-danger);
}

.status-pill.tratado {
    color: #3f2d00;
    background: #fde68a;
}

.status-pill.em_tratamento {
    color: #3f2d00;
    background: #fde68a;
}

.status-pill.atestado {
    color: #063046;
    background: #bfdbfe;
}

.pedagogico-certificate-note {
    display: block;
    margin-top: .35rem;
    color: #1d4f91;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.status-pill.resolvido,
.status-pill.resolvida,
.status-pill.ativo {
    color: #fff;
    background: var(--ba-success);
}

.status-pill.cancelada {
    color: #475569;
    background: #e2e8f0;
}

.status-pill.arquivado {
    color: #475569;
    background: #e2e8f0;
}

.status-pill.importacao-criar { color: #075985; background: #e0f2fe; }
.status-pill.importacao-atualizar { color: #166534; background: #dcfce7; }
.status-pill.importacao-conflito { color: #9a3412; background: #ffedd5; }
.status-pill.importacao-invalida { color: #991b1b; background: #fee2e2; }

.pedagogico-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0 0;
}

.pedagogico-pagination[hidden] {
    display: none;
}

.pedagogico-pagination span {
    color: var(--ba-muted);
    font-size: .875rem;
}

.status-pill.atrasado {
    color: #063046;
    background: #bae6fd;
}

.late-note {
    display: block;
    margin-top: .25rem;
    color: var(--ba-muted);
    line-height: 1.35;
}

.status-pill.inativo {
    color: #fff;
    background: var(--ba-danger);
}

.status-pill.transferido {
    color: #1f2937;
    background: #cbd5e1;
}

.status-pill.evadido {
    color: #fff;
    background: #7f1d1d;
}

.status-pill.sem_frequencia {
    color: #3730a3;
    background: #e0e7ff;
}

.metric-card.is-neutral {
    border-left-color: #6366f1;
}

.table-actions,
.filter-actions,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.mini-btn {
    border: 1px solid var(--ba-line);
    background: #fff;
    color: var(--ba-ink);
    border-radius: var(--ba-radius);
    padding: .4rem .6rem;
    font-weight: 700;
    font-size: .82rem;
}

.mini-btn.critical,
.mini-btn.deactivate {
    color: var(--ba-danger);
}

.mini-btn.activate {
    color: var(--ba-success);
}

.risk-list,
.timeline {
    display: grid;
    gap: .75rem;
}

.risk-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .85rem;
}

.risk-item.is-critical {
    border-color: rgba(220, 38, 38, .35);
    background: #fff7f7;
}

.risk-badge {
    background: rgba(220, 38, 38, .12);
    color: var(--ba-danger);
}

.risk-actions {
    margin-top: .5rem;
}

.pedagogico-risk-table-scroll {
    max-height: 34rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
}

.pedagogico-risk-table-scroll thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.risk-table-row-critical {
    background: rgba(220, 38, 38, .035);
}

.risk-level {
    display: inline-flex;
    align-items: center;
    min-width: 5.5rem;
    justify-content: center;
    padding: .3rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
}

.risk-level.is-critical {
    background: rgba(220, 38, 38, .13);
    color: var(--ba-danger);
}

.risk-level.is-relevant {
    background: rgba(245, 158, 11, .18);
    color: #854d0e;
}

.risk-level.is-attention {
    background: rgba(37, 99, 235, .12);
    color: #1d4ed8;
}

.risk-level.is-monitor {
    background: rgba(100, 116, 139, .12);
    color: #475569;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.timeline-item {
    border-left: 3px solid var(--ba-primary);
    padding-left: .75rem;
}

#insightsResumo small {
    display: none;
}

.empty,
.empty-state {
    padding: 1rem 1.1rem;
    text-align: center;
    color: var(--ba-muted);
    border: 1px dashed rgba(148, 163, 184, .38);
    border-radius: .95rem;
    background: rgba(248, 250, 252, .72);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 5200;
    display: none;
    overflow-y: auto;
    background: rgba(15, 23, 42, .48);
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(920px, 100%);
    max-height: 90vh;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96)),
        #fff;
    border: 1px solid rgba(219, 227, 236, .9);
    border-radius: 1.1rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.modal-card-sm {
    width: min(720px, 100%);
}

.modal-card .border-bottom {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-color: var(--ba-line) !important;
}

.modal-heading {
    display: grid;
    gap: .2rem;
}

.modal-subtitle {
    color: var(--ba-muted);
    font-size: .86rem;
    line-height: 1.4;
}

.result-box {
    display: none;
    margin-top: .75rem;
}

.alert {
    border-radius: .95rem;
    border-width: 1px;
}

.alert-success {
    background: rgba(22, 163, 74, .1);
    border-color: rgba(22, 163, 74, .18);
    color: #166534;
}

.alert-danger {
    background: rgba(220, 38, 38, .08);
    border-color: rgba(220, 38, 38, .16);
    color: #991b1b;
}

.alert-info {
    background: rgba(15, 118, 110, .08);
    border-color: rgba(15, 118, 110, .14);
    color: #115e59;
}

.audit-pre {
    white-space: pre-wrap;
    margin: 0;
    color: var(--ba-ink);
    font-size: .82rem;
}

.admin-nav-shell {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(219, 227, 236, .9);
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, .08), transparent 18rem),
        rgba(255, 255, 255, .88);
    box-shadow: var(--ba-shadow);
}

.admin-nav-copy {
    max-width: 48rem;
}

.admin-nav-kicker,
.admin-context-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .4rem;
    color: var(--ba-primary-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.admin-nav-copy h2,
.admin-context-title {
    margin: 0;
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
    line-height: 1.15;
}

.admin-nav-copy p,
.admin-context-text {
    margin: .45rem 0 0;
    color: var(--ba-muted);
    max-width: 44rem;
}

.admin-command-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.admin-command-card {
    display: grid;
    flex: 1 1 12rem;
    min-height: auto;
    align-content: start;
    gap: .18rem;
    border: 1px solid var(--ba-line);
    border-radius: .9rem;
    background: rgba(255, 255, 255, .92);
    color: var(--ba-ink);
    box-shadow: none;
    padding: .9rem 1rem;
    text-align: left;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.admin-command-card:hover,
.admin-command-card:focus-visible {
    border-color: rgba(15, 118, 110, .42);
    background: rgba(15, 118, 110, .06);
    transform: translateY(-1px);
    outline: none;
}

.admin-command-card.is-active {
    border-color: rgba(15, 118, 110, .7);
    background: linear-gradient(180deg, rgba(15, 118, 110, .12), rgba(255, 255, 255, .98) 75%);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .15);
}

.admin-command-card span {
    display: none;
}

.admin-command-card strong {
    display: block;
    font-size: .98rem;
    line-height: 1.15;
}

.admin-command-card small {
    color: var(--ba-muted);
    font-size: .8rem;
    font-weight: 700;
}

.admin-context-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .95fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--ba-line);
    border-radius: 1.1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .95)),
        var(--ba-surface);
    box-shadow: var(--ba-shadow);
}

.admin-context-copy {
    align-self: center;
}

.admin-context-hints {
    display: grid;
    gap: .7rem;
}

.admin-context-hints .timeline-item {
    border-left: none;
    padding-left: 0;
}

.admin-workspace-panel {
    background: var(--ba-surface);
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    box-shadow: var(--ba-shadow);
    padding: clamp(.875rem, 1.5vw, 1.25rem);
}

.admin-section {
    display: none;
}

.admin-section.is-active {
    display: block;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ba-line);
}

.section-header h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
}

.section-header span {
    display: block;
    margin-top: .25rem;
    color: var(--ba-muted);
    font-size: .92rem;
}

.admin-subpanel {
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: #f8fafc;
    padding: 1rem;
    margin-bottom: 1rem;
}
.admin-context-panel[hidden] { display: none; }
.admin-modal-kicker { color: var(--ba-primary); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.admin-role-summary { display: grid; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--ba-line); border-left: 4px solid var(--ba-primary); border-radius: var(--ba-radius); background: rgba(37, 99, 235, .04); }
.admin-role-summary span { color: var(--ba-muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.admin-role-summary strong { color: var(--ba-ink); font-size: 1rem; }
.admin-role-summary small { color: var(--ba-muted); }

.school-shifts-fieldset {
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
}

.school-shifts-fieldset legend {
    float: none;
    width: auto;
    margin: 0;
    padding: 0 .25rem;
    font-size: .95rem;
    font-weight: 800;
}

.school-shifts-fieldset p {
    margin: 0 0 .8rem;
    color: var(--ba-muted);
    font-size: .85rem;
}

.school-shift-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.school-shift-option {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-height: 4rem;
    padding: .75rem;
    border: 1px solid var(--ba-line);
    border-radius: .5rem;
    background: var(--ba-surface);
    cursor: pointer;
}

.school-shift-option:has(input:checked) {
    border-color: var(--ba-primary);
    background: rgba(15, 118, 110, .08);
}

.school-shift-option input {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.school-shift-option span,
.school-shift-option small {
    display: block;
}

.school-shift-option small {
    margin-top: .15rem;
    color: var(--ba-muted);
    font-size: .76rem;
}

@media (max-width: 900px) {
    .school-shift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .school-shift-grid {
        grid-template-columns: 1fr;
    }
}

.admin-process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.admin-process-card {
    display: grid;
    gap: .35rem;
    padding: .9rem 1rem;
    border: 1px solid var(--ba-line);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .9);
}

.admin-process-card strong {
    font-size: .95rem;
}

.admin-process-card span {
    color: var(--ba-muted);
    font-size: .86rem;
    line-height: 1.4;
}

.pedagogico-summary-grid .admin-process-card strong {
    font-size: 1rem;
}
.import-security-note { display: grid; gap: .25rem; margin-top: .8rem; padding: .75rem .9rem; border: 1px solid rgba(22, 128, 95, .22); border-left: 4px solid #16805f; border-radius: var(--ba-radius); background: rgba(22, 128, 95, .06); }
.import-security-note strong { color: var(--ba-ink); font-size: .85rem; }
.import-security-note span { color: var(--ba-muted); font-size: .78rem; line-height: 1.4; }

.pedagogico-summary-grid .admin-process-card {
    min-height: 100%;
}

.pedagogico-student-search {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) auto auto;
    align-items: end;
    gap: .75rem;
    margin-top: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--ba-line);
    border-bottom: 0;
    border-radius: var(--ba-radius) var(--ba-radius) 0 0;
    background: var(--ba-surface);
}

.pedagogico-student-search-field label {
    display: block;
    margin-bottom: .35rem;
    color: var(--ba-ink);
    cursor: pointer;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 800;
}

.pedagogico-student-search-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.4rem;
    color: var(--ba-muted);
    font-size: .8rem;
}

.pedagogico-student-search #btnAtestadoAlunoPesquisado {
    min-width: 10.5rem;
}

.pedagogico-student-search #btnAtestadoAlunoPesquisado:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pedagogico-student-search + .acompanhamento-table-scroll {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.pedagogico-filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pedagogico-filter-summary strong {
    display: block;
    margin-bottom: .2rem;
    font-size: .95rem;
}

.pedagogico-copy-footer,
.copy-summary-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: rgba(15, 118, 110, .05);
}

.pedagogico-copy-footer {
    display: grid;
    grid-template-columns: minmax(14rem, .7fr) minmax(32rem, 1.3fr);
    align-items: stretch;
    padding: 1.1rem;
    background: var(--ba-surface);
}

.pedagogico-copy-intro {
    align-content: center;
    padding-right: 1rem;
    border-right: 1px solid var(--ba-line);
}

.pedagogico-copy-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.pedagogico-copy-action {
    display: grid;
    gap: .22rem;
    min-width: 0;
    min-height: 6rem;
    padding: .85rem 1rem;
    border: 1px solid var(--ba-line);
    border-radius: .5rem;
    background: var(--ba-surface);
    color: var(--ba-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.pedagogico-copy-action:hover,
.pedagogico-copy-action:focus-visible {
    transform: translateY(-1px);
}

.pedagogico-copy-action.is-ata {
    border-left: 4px solid #b7791f;
    background: rgba(245, 158, 11, .08);
}

.pedagogico-copy-action.is-ata:hover,
.pedagogico-copy-action.is-ata:focus-visible {
    border-color: #b7791f;
    background: rgba(245, 158, 11, .14);
}

.pedagogico-copy-action.is-completo {
    border-left: 4px solid var(--ba-primary);
    background: rgba(15, 118, 110, .07);
}

.pedagogico-copy-action.is-completo:hover,
.pedagogico-copy-action.is-completo:focus-visible {
    border-color: var(--ba-primary);
    background: rgba(15, 118, 110, .13);
}

.pedagogico-copy-footer .pedagogico-copy-action-label {
    color: var(--ba-muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pedagogico-copy-action strong {
    font-size: .92rem;
}

.pedagogico-copy-action small {
    color: var(--ba-muted);
    font-size: .78rem;
    line-height: 1.35;
}

.pedagogico-copy-footer > div,
.copy-summary-footer > div {
    display: grid;
    gap: .2rem;
}

.pedagogico-copy-footer strong,
.copy-summary-footer strong {
    color: var(--ba-ink);
}

.pedagogico-copy-footer span,
.copy-summary-footer span {
    color: var(--ba-muted);
    font-size: .9rem;
}

.admin-motivos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.analysis-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.mini-btn.is-active {
    border-color: var(--ba-primary);
    background: rgba(15, 118, 110, .1);
    color: var(--ba-primary-dark);
}

.analysis-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.analysis-metrics .metric-card {
    min-height: 6.25rem;
}

.analysis-metrics .metric-card strong {
    font-size: 1.55rem;
}

.whatsapp-list {
    display: grid;
    gap: .75rem;
}

.whatsapp-card {
    display: grid;
    gap: .75rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: #fff;
    padding: .9rem;
}

.whatsapp-card.is-muted {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.absence-day-table tbody tr td {
    vertical-align: middle;
}

.collapsible-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
}

.collapsible-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--ba-ink);
    padding: 0;
    text-align: left;
    font-weight: 800;
}

.collapsible-panel-toggle:hover,
.collapsible-panel-toggle:focus-visible {
    color: var(--ba-primary);
}

.collapsible-arrow {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--ba-line);
    border-radius: 999px;
    color: var(--ba-muted);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform .16s ease, color .16s ease, border-color .16s ease;
}

.collapsible-panel.is-open .collapsible-arrow {
    transform: rotate(90deg);
    border-color: rgba(15, 118, 110, .35);
    color: var(--ba-primary);
}

.collapsible-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
}

.collapsible-panel-content {
    margin-top: 1rem;
}

.collapsible-panel-content[hidden] {
    display: none !important;
}

.absence-class-grid {
    display: grid;
    gap: .75rem;
}

.absence-class-card {
    overflow: visible;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: #fff;
}

.absence-class-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    border: 0;
    background: transparent;
    color: var(--ba-ink);
    padding: .9rem 1rem;
    text-align: left;
}

.absence-class-toggle:hover,
.absence-class-toggle:focus-visible {
    background: rgba(15, 118, 110, .06);
}

.absence-class-title,
.absence-student-card div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.absence-class-title strong {
    font-size: 1.02rem;
}

.absence-class-title small,
.absence-student-card small {
    color: var(--ba-muted);
    font-weight: 700;
}

.absence-class-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
}

.absence-class-detail {
    display: none;
    border-top: 1px solid var(--ba-line);
}

.absence-class-card.is-open .absence-class-detail {
    display: grid;
}

.absence-student-card {
    display: grid;
    grid-template-columns: minmax(14rem, 1.25fr) minmax(10rem, .9fr) auto minmax(10rem, .8fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--ba-line);
}

.absence-student-card:last-child {
    border-bottom: 0;
}

.absence-student-card .table-actions {
    justify-content: flex-end;
}

@media (max-width: 991.98px) {
    .absence-student-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .absence-student-card .table-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .collapsible-panel-header {
        grid-template-columns: 1fr;
    }

    .collapsible-panel-actions {
        justify-content: flex-start;
    }

    .absence-class-toggle {
        grid-template-columns: 1fr;
    }

    .absence-class-meta {
        justify-content: flex-start;
    }
}

.empty-state,
.empty {
    color: var(--ba-muted);
    font-weight: 600;
}

.whatsapp-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
}

.whatsapp-card-main strong,
.whatsapp-card-main small,
.whatsapp-phone {
    display: block;
}

.whatsapp-card-main small,
.whatsapp-phone {
    color: var(--ba-muted);
}

.whatsapp-message {
    max-height: 12rem;
    overflow: auto;
    margin: 0;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: #f8fafc;
    color: var(--ba-ink);
    font: inherit;
    font-size: .9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    padding: .75rem;
}

.whatsapp-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

@media (max-width: 767.98px) {
    .register-quickstart {
        display: grid;
    }

    .register-quickstart .btn {
        width: 100%;
    }

    .register-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .absence-filters {
        grid-template-columns: 1fr;
    }

    .filter-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-chip,
    .register-tab {
        width: 100%;
    }

    .absence-day-table,
    .absence-day-table thead,
    .absence-day-table tbody,
    .absence-day-table tr,
    .absence-day-table td {
        display: block;
        width: 100%;
    }

    .absence-day-table {
        min-width: 0;
    }

    .absence-day-table thead {
        display: none;
    }

    .absence-day-table tr {
        margin-bottom: .75rem;
        border: 1px solid var(--ba-line);
        border-radius: var(--ba-radius);
        background: var(--ba-surface);
        overflow: visible;
    }

    .absence-day-table td {
        display: grid;
        grid-template-columns: minmax(7rem, .42fr) minmax(0, 1fr);
        gap: .75rem;
        padding: .65rem .8rem;
        border-bottom: 1px solid var(--ba-line);
        white-space: normal !important;
    }

    .absence-day-table td::before {
        content: attr(data-label);
        color: var(--ba-muted);
        font-size: .78rem;
        font-weight: 800;
    }

    .absence-day-table td:last-child {
        border-bottom: 0;
    }

    .absence-day-table td[data-label="Ações"] {
        display: block;
    }

    .absence-day-table td[data-label="Ações"]::before {
        display: none;
    }

    .occurrence-actions,
    .absence-student-card .table-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .occurrence-actions .btn,
    .occurrence-actions .occurrence-menu,
    .occurrence-actions .js-absence-menu-toggle {
        width: 100%;
    }

    .occurrence-menu-list {
        position: static;
        width: 100%;
        margin-top: .4rem;
        box-shadow: none;
    }

    .mobile-only {
        display: inline;
    }

    .desktop-only {
        display: none;
    }

    .action-mobile {
        display: inline-flex;
    }

    .app-topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .app-topbar-center,
    .app-topbar-actions {
        justify-content: stretch;
    }

    .app-dropdown,
    .app-dropdown-trigger,
    .app-account-trigger {
        width: 100%;
    }

    .app-dropdown-menu,
    .app-account-dropdown .app-dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
        min-width: 0;
        transform: none;
    }

    .app-header {
        grid-template-columns: 1fr;
    }

    .app-header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-header-actions .btn {
        width: 100%;
    }

    .motivo-grid {
        grid-template-columns: 1fr;
    }

    .student-card {
        grid-template-columns: auto 1fr;
    }

    .student-state {
        grid-column: 2;
        justify-self: start;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .admin-command-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-context-panel {
        grid-template-columns: 1fr;
    }

    .section-header {
        display: grid;
    }

    .section-header .btn,
    .section-header .actions {
        width: 100%;
    }

    .pedagogico-filter-summary {
        display: grid;
    }

    .pedagogico-copy-footer,
    .copy-summary-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pedagogico-copy-footer {
        grid-template-columns: 1fr;
    }

    .pedagogico-copy-intro {
        padding: 0 0 .85rem;
        border-right: 0;
        border-bottom: 1px solid var(--ba-line);
    }

    .pedagogico-copy-actions {
        grid-template-columns: 1fr;
    }

    .pedagogico-student-search {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pedagogico-student-search-meta {
        justify-content: space-between;
    }

    .pedagogico-student-search #btnAtestadoAlunoPesquisado {
        width: 100%;
    }

    .section-header .actions .btn {
        flex: 1;
    }

    .admin-motivos-grid {
        grid-template-columns: 1fr;
    }

    .analysis-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-process-grid {
        grid-template-columns: 1fr;
    }

    .login-layout,
    .password-layout,
    .login-hero-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp-card-main {
        grid-template-columns: 1fr;
    }

    .whatsapp-actions .btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .app-shell {
        padding: .75rem;
    }

    .app-shell-sm {
        padding-inline: .75rem;
    }

    .app-shell-register {
        padding-inline: .75rem;
    }

    .app-topbar {
        padding: .8rem;
        gap: .85rem;
    }

    .app-title {
        font-size: 1.45rem;
    }

    .metric-card {
        min-height: 6rem;
    }

    .metric-card strong {
        font-size: 1.65rem;
    }

    .app-panel {
        padding: .875rem;
    }

    .table {
        min-width: 680px;
    }

    .btn {
        min-height: 2.75rem;
        font-weight: 700;
    }

    .admin-command-card {
        min-height: 7rem;
        padding: .85rem;
    }

    .admin-nav-shell,
    .admin-context-panel {
        padding: .85rem;
    }

    .login-hero,
    .login-card {
        padding: 1rem;
    }
}

.metric-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94)),
        var(--ba-surface);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: .28rem;
    background: rgba(15, 118, 110, .14);
}

.metric-card.is-primary::before {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.metric-card.is-danger::before {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.metric-card.is-warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.metric-card.is-success::before {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.metric-card.is-info::before {
    background: linear-gradient(90deg, #0891b2, #22d3ee);
}

.admin-workspace-panel {
    border-radius: 1.1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96)),
        var(--ba-surface);
}

.section-header {
    align-items: center;
}

.section-header h2 {
    font-size: 1.2rem;
}

.section-header .actions,
.section-header .filter-actions {
    justify-content: flex-end;
}

.table-responsive {
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.table {
    background: transparent;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    border-bottom-width: 1px;
    color: #475569;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.table tbody tr {
    transition: background-color .16s ease;
}

.table tbody tr:hover {
    background: rgba(15, 118, 110, .04);
}

.table td,
.table th {
    padding: .9rem .85rem;
}

.table td:last-child,
.table th:last-child {
    width: 1%;
    white-space: nowrap;
}

.admin-subpanel {
    border-radius: 1rem;
    background: linear-gradient(180deg, #fbfdff, #f8fafc);
}

.senha-admin-field .btn {
    min-width: 4.8rem;
    font-weight: 700;
}

.modal-card-user {
    width: min(760px, 100%);
}

.password-requirements {
    padding: .85rem;
    border: 1px solid var(--ba-line);
    border-radius: .85rem;
    background: rgba(248, 250, 252, .9);
}

.password-requirements > strong {
    display: block;
    margin-bottom: .55rem;
    color: var(--ba-text);
    font-size: .8rem;
}

.password-requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem .75rem;
}

.password-requirements [data-password-rule] {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--ba-muted);
    font-size: .76rem;
}

.password-requirements [data-password-rule]::before {
    display: grid;
    place-items: center;
    flex: 0 0 1.15rem;
    width: 1.15rem;
    height: 1.15rem;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: transparent;
    content: "✓";
    font-size: .7rem;
    font-weight: 900;
}

.password-requirements [data-password-rule].is-valid {
    color: #166534;
    font-weight: 750;
}

.password-requirements [data-password-rule].is-valid::before {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

@media (max-width: 575px) {
    .password-requirements-grid {
        grid-template-columns: 1fr;
    }
}

.alunos-manual-table-scroll {
    max-height: min(62vh, 42rem);
    overflow: auto;
    border: 1px solid var(--ba-line);
    border-radius: .75rem;
    background: #fff;
}

body.has-student-modal-open { overflow: hidden; }
[data-alunos-modal-layout] .alunos-manual-modal-form { display: none; }
[data-alunos-modal-layout].is-student-modal-open .alunos-manual-modal-form {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 2050;
    display: block;
    width: min(calc(100% - 2rem), 58rem);
    max-height: min(90vh, 56rem);
    padding: 1.1rem;
    overflow: auto;
    border: 1px solid var(--ba-line);
    border-radius: 1rem;
    background: var(--ba-surface);
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .58), 0 1.5rem 4rem rgba(15, 23, 42, .28);
    transform: translate(-50%, -50%);
}
.alunos-manual-modal-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin: -1.1rem -1.1rem 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--ba-line); }
.alunos-manual-modal-header > div { display: grid; gap: .15rem; }
.alunos-manual-modal-header span { color: var(--ba-primary); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.alunos-manual-modal-header h3 { margin: 0; font-size: 1.25rem; }
.alunos-manual-modal-header small { color: var(--ba-muted); }
.student-modal-section-heading { --student-section-color: #216aa2; display: flex; align-items: center; gap: .7rem; margin-top: 1.25rem; padding: .72rem .8rem; border-left: .22rem solid var(--student-section-color); border-radius: .5rem; background: color-mix(in srgb, var(--student-section-color) 8%, var(--ba-surface)); }
.student-modal-section-heading:first-child { margin-top: 0; }
.student-modal-section-heading.is-identity { --student-section-color: #216aa2; }
.student-modal-section-heading.is-school-link { --student-section-color: #087f7a; }
.student-modal-section-heading.is-family { --student-section-color: #7450a8; }
.student-modal-section-heading.is-enrollment { --student-section-color: #b56a0b; }
.student-modal-section-heading.is-certificate { --student-section-color: #21875f; }
.student-modal-section-heading b { display: grid; place-items: center; flex: 0 0 1.65rem; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: var(--student-section-color); color: #fff; font-size: .72rem; }
.student-modal-section-heading > div { display: grid; gap: .05rem; min-width: 0; }
.student-modal-section-heading strong { font-size: .85rem; }
.student-modal-section-heading small { color: var(--ba-muted); font-size: .74rem; line-height: 1.35; }
.alunos-manual-modal-actions { position: sticky; bottom: -1.1rem; z-index: 2; justify-content: flex-end; margin: 1rem -1.1rem -1.1rem !important; padding: .85rem 1.1rem; border-top: 1px solid var(--ba-line); background: var(--ba-surface); box-shadow: 0 -.45rem 1rem rgba(15, 23, 42, .05); }
.alunos-manual-list-result { margin-bottom: .75rem; }

/* Alteração em lote de turma: sempre preserva a prévia e o contexto da escola. */
.alunos-turma-modal { position: fixed; inset: 0; z-index: 2100; display: none; background: rgba(15, 23, 42, .58); }
.alunos-turma-modal .modal-content { width: min(100%, 46rem); max-height: min(90dvh, 42rem); overflow: auto; border: 1px solid var(--ba-line); border-radius: 1rem; background: var(--ba-surface); box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .28); }
.alunos-turma-modal .modal-header,
.alunos-turma-modal .modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-color: var(--ba-line); }
.alunos-turma-modal .modal-header { border-bottom: 1px solid var(--ba-line); }
.alunos-turma-modal .modal-header > div { display: grid; gap: .2rem; }
.alunos-turma-modal .modal-header h2 { margin: 0; font-size: 1.25rem; }
.alunos-turma-modal .modal-header p { margin: 0; color: var(--ba-muted); font-size: .88rem; }
.alunos-turma-modal .modal-body { padding: 1.2rem; }
.alunos-turma-modal .modal-footer { justify-content: flex-end; border-top: 1px solid var(--ba-line); }
@media (max-width: 575px) {
    .alunos-turma-modal { padding: .65rem !important; }
    .alunos-turma-modal .modal-content { max-height: calc(100dvh - 1.3rem); }
    .alunos-turma-modal .modal-header { align-items: flex-start; }
    .alunos-turma-modal .modal-footer { flex-wrap: wrap; }
}
.alunos-manual-pagination { display: grid; grid-template-columns: minmax(12rem, 1fr) auto minmax(15rem, 1fr); align-items: center; gap: 1rem; margin-top: .8rem; color: var(--ba-muted); font-size: .8rem; }
.alunos-manual-pagination > label { display: flex; align-items: center; gap: .45rem; margin: 0; }
.alunos-manual-pagination select { width: 4.5rem; }
.alunos-manual-pagination > span { text-align: center; }
.alunos-manual-pagination > div { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.alunos-manual-pagination strong { min-width: 7rem; color: var(--ba-ink); text-align: center; }

.alunos-manual-table-scroll .table {
    margin-bottom: 0;
}

.alunos-manual-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--ba-line);
}

.alunos-manual-filter-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) repeat(3, minmax(10rem, 14rem)) minmax(8rem, 11rem);
    align-items: end;
    gap: .85rem;
    margin-bottom: 1rem;
}

.alunos-manual-filter-grid .form-label {
    margin-bottom: .35rem;
}

.alunos-manual-filter-action {
    display: flex;
    align-items: end;
}

.alunos-manual-filter-action .btn {
    min-height: 2.75rem;
}

.acompanhamento-table-scroll {
    max-height: min(64vh, 44rem);
    overflow: auto;
    border: 1px solid var(--ba-line);
    border-radius: .75rem;
    background: #fff;
}

.acompanhamento-table-scroll .table {
    margin-bottom: 0;
}

.acompanhamento-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--ba-line);
}

.auditoria-table-scroll {
    max-height: 42rem;
    overflow: auto;
    border: 1px solid var(--ba-line);
    border-radius: .75rem;
    background: #fff;
}

.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-top: .75rem;
    color: var(--ba-muted);
    font-size: .85rem;
}

@media (max-width: 575.98px) {
    .audit-pagination {
        align-items: stretch;
        flex-direction: column;
    }
}

.auditoria-table-scroll .table {
    margin-bottom: 0;
}

.auditoria-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--ba-line);
}

.risk-list,
.timeline {
    display: grid;
    gap: .75rem;
}

.timeline-item {
    border: 1px solid var(--ba-line);
    border-radius: .9rem;
    background: #fff;
    padding: .9rem 1rem;
}

.risk-item {
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96));
}

.risk-item.is-critical {
    border-color: rgba(220, 38, 38, .25);
    background: linear-gradient(180deg, rgba(254, 242, 242, .95), rgba(255, 255, 255, .98));
}

.status-pill,
.risk-badge {
    letter-spacing: .01em;
}

.table-actions {
    gap: .4rem;
    align-items: center;
}

.occurrence-actions {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
}

.occurrence-menu {
    position: relative;
}

.occurrence-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 5000;
    display: grid;
    width: max-content;
    min-width: 14rem;
    padding: .35rem;
    border: 1px solid var(--ba-line);
    border-radius: .7rem;
    background: var(--ba-surface);
    box-shadow: var(--ba-shadow);
}

.occurrence-menu-list.is-floating,
.pedagogico-menu-list.is-floating {
    position: fixed;
    inset: auto auto auto auto;
    z-index: 5000;
    max-width: min(22rem, calc(100vw - 1rem));
}

.absence-student-card:last-child .occurrence-menu-list,
.absence-table-row:last-child .occurrence-menu-list {
    top: auto;
    bottom: calc(100% + .35rem);
}

.occurrence-menu-list[hidden] {
    display: none;
}

.occurrence-menu-item {
    min-height: 2.5rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--ba-ink);
    padding: .55rem .7rem;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.occurrence-menu-item:hover,
.occurrence-menu-item:focus-visible {
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    outline: none;
}

.occurrence-menu-item.is-danger {
    color: var(--ba-danger);
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: inline;
}

.action-mobile {
    display: none;
}

@media (max-width: 767.98px) {
    .occurrence-menu-list,
    .occurrence-menu-list.is-floating,
    .absence-student-card:last-child .occurrence-menu-list,
    .absence-table-row:last-child .occurrence-menu-list {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        margin-top: .4rem;
        box-shadow: none;
    }
}

.table-actions .mini-btn {
    min-width: 0;
    padding-inline: .62rem;
}

.table td .btn.btn-sm {
    min-height: 2.1rem;
    padding-inline: .72rem;
    font-weight: 700;
}

.mini-btn {
    min-height: 2.15rem;
    padding: .42rem .68rem;
    font-weight: 700;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.mini-btn:hover,
.mini-btn:focus-visible {
    border-color: rgba(15, 118, 110, .35);
    background: rgba(15, 118, 110, .06);
    color: var(--ba-primary-dark);
    outline: none;
}

.mini-btn.critical:hover,
.mini-btn.critical:focus-visible {
    border-color: rgba(220, 38, 38, .25);
    background: rgba(220, 38, 38, .06);
    color: #991b1b;
}

.password-layout {
    display: grid;
    grid-template-columns: minmax(0, 38rem) minmax(18rem, 24rem);
    justify-content: center;
    gap: 1rem;
}

/* Privacidade por escola: decisão explícita e reversível da Direção. */
.privacy-choice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.125rem 1rem;
    border: 1px solid var(--ba-border);
    border-radius: .8rem;
    background: var(--ba-surface);
}

.privacy-choice-card > div {
    min-width: 0;
}

.privacy-choice-card .btn {
    flex: 0 0 10.75rem;
    width: 10.75rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.privacy-choice-card small {
    display: block;
    margin-top: .25rem;
    color: var(--ba-muted);
}

.privacy-choice-card.is-permission {
    border-color: rgba(15, 118, 110, .3);
    background: rgba(15, 118, 110, .045);
}

.privacy-access-control {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--ba-border);
    border-radius: .85rem;
    background: linear-gradient(135deg, rgba(15, 118, 110, .045), transparent 55%), var(--ba-surface);
}

.privacy-toggle {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1rem;
    border: 1px solid var(--ba-border);
    border-radius: .75rem;
    background: var(--ba-surface);
    cursor: pointer;
}

.privacy-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.privacy-toggle-track {
    flex: 0 0 3rem;
    width: 3rem;
    height: 1.75rem;
    padding: .1875rem;
    border-radius: 999px;
    background: #94a3b8;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.privacy-toggle-thumb {
    display: block;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 .125rem .25rem rgba(15, 23, 42, .22);
    transition: transform .18s ease;
}

.privacy-toggle input:checked + .privacy-toggle-track { background: var(--ba-primary); }
.privacy-toggle input:checked + .privacy-toggle-track .privacy-toggle-thumb { transform: translateX(1.25rem); }
.privacy-toggle input:focus-visible + .privacy-toggle-track { outline: .1875rem solid rgba(37, 99, 235, .26); outline-offset: .1875rem; }
.privacy-toggle input:disabled + .privacy-toggle-track { opacity: .58; }

.privacy-toggle-copy { display: grid; gap: .125rem; }
.privacy-toggle-copy small,
.privacy-toggle-feedback { color: var(--ba-muted); }
.privacy-toggle-feedback { padding-left: .125rem; }

.app-modal-backdrop {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .58);
}

.app-modal-backdrop.is-open {
    display: flex;
}

.app-modal-card {
    width: min(100%, 42rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.5rem;
    border: 1px solid var(--ba-border);
    border-radius: 1rem;
    background: var(--ba-surface);
    box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .25);
}

.app-modal-heading {
    margin-bottom: 1rem;
}

@media (max-width: 47.998rem) {
    .privacy-choice-card {
        align-items: stretch;
        flex-direction: column;
    }

    .privacy-choice-card .btn {
        flex-basis: auto;
        width: 100%;
    }

    .privacy-toggle { align-items: flex-start; }
}

.pedagogico-feedback {
    position: sticky;
    top: .75rem;
    z-index: 1040;
    margin-bottom: 1rem;
}

.pedagogico-metric-filter {
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.pedagogico-metric-filter:hover,
.pedagogico-metric-filter:focus-visible {
    border-color: rgba(15, 118, 110, .38);
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, .12);
    outline: none;
    transform: translateY(-1px);
}

.pedagogico-focus-pulse {
    animation: pedagogicoFocusPulse 1.4s ease;
}

.link-button {
    display: inline;
    border: 0;
    background: transparent;
    color: var(--ba-primary-dark);
    font: inherit;
    font-weight: 800;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
    color: var(--ba-primary);
    outline: none;
}

@keyframes pedagogicoFocusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(27, 95, 158, .32);
    }
    45% {
        box-shadow: 0 0 0 .35rem rgba(27, 95, 158, .12);
    }
    100% {
        box-shadow: none;
    }
}

.pedagogico-fixed-filters {
    position: sticky;
    top: .75rem;
    z-index: 12;
}

.pedagogico-top-filters {
    margin-bottom: 1rem;
}

.pedagogico-fixed-filters-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.pedagogico-fixed-filters-head div {
    display: grid;
    gap: .15rem;
}

.pedagogico-fixed-filters-head span {
    color: var(--ba-muted);
    font-weight: 600;
}

.pedagogico-fixed-filters [hidden] {
    display: none !important;
}

.pedagogico-active-filter-copy {
    margin-top: .75rem;
    color: var(--ba-muted);
    font-size: .9rem;
    font-weight: 600;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) {
    --ba-bg: #eef1f5;
    --ba-surface: #ffffff;
    --ba-ink: #30343b;
    --ba-muted: #7a808a;
    --ba-line: #dde3ea;
    --ba-primary: #1b5f9e;
    --ba-primary-dark: #174f83;
    --ba-radius: .35rem;
    --ba-shadow: 0 .65rem 1.65rem rgba(39, 47, 59, .12);
    background: #eef1f5;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]).app-body,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]).app-body-admin {
    background: #eef1f5;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell-register,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell-sm {
    width: min(100%, 1440px);
    padding: 0 1.25rem 2rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-chrome {
    gap: 0;
    margin-inline: 0;
    margin-bottom: 1.55rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-topbar {
    min-height: 3.25rem;
    border: 0;
    border-radius: 0;
    background: #fbfcfe;
    box-shadow: 0 .15rem .7rem rgba(30, 41, 59, .08);
    backdrop-filter: none;
    padding: .45rem 1rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-brand-kicker {
    color: #1b5f9e;
    font-size: .78rem;
    letter-spacing: .02em;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-brand-name {
    color: #555b66;
    font-size: .82rem;
    font-weight: 600;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-dropdown-trigger,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-account-trigger {
    min-height: 2.25rem;
    border-color: transparent;
    background: transparent;
    color: #4b5563;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-dropdown-trigger:hover,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-account-trigger:hover,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-dropdown[open] > .app-dropdown-trigger,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-dropdown[open] > .app-account-trigger {
    border-color: #d7dee8;
    background: #f3f6f9;
    color: #174f83;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead {
    min-height: 8.4rem;
    display: flex;
    align-items: center;
    margin: 0;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 92% 20%, transparent 0 2.2rem, rgba(255, 255, 255, .1) 2.25rem 2.35rem, transparent 2.4rem),
        radial-gradient(circle at 84% 42%, transparent 0 4.2rem, rgba(255, 255, 255, .08) 4.25rem 4.35rem, transparent 4.4rem),
        linear-gradient(120deg, #23262b, #151719 72%);
    box-shadow: none;
    padding: 1.4rem 1rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead::before {
    content: "Busca Ativa - Sistema de acompanhamento escolar";
    position: absolute;
    left: 1rem;
    top: .9rem;
    color: rgba(255, 255, 255, .72);
    font-size: .98rem;
    font-weight: 600;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead-copy {
    padding-top: 1.25rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .module-label {
    display: none;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-title {
    color: #f9fafb;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 400;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-subtitle {
    color: rgba(255, 255, 255, .78);
    font-size: .92rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-panel,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-nav-shell,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-context-panel,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-workspace-panel,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card {
    border: 1px solid #e1e6ee;
    border-radius: .45rem;
    background: #fff;
    box-shadow: 0 .8rem 1.8rem rgba(30, 41, 59, .12);
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead.app-panel {
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 92% 20%, transparent 0 2.2rem, rgba(255, 255, 255, .1) 2.25rem 2.35rem, transparent 2.4rem),
        radial-gradient(circle at 84% 42%, transparent 0 4.2rem, rgba(255, 255, 255, .08) 4.25rem 4.35rem, transparent 4.4rem),
        linear-gradient(120deg, #23262b, #151719 72%);
    box-shadow: none;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead.app-panel .app-title {
    color: #f9fafb;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead.app-panel .app-subtitle {
    color: rgba(255, 255, 255, .78);
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card {
    min-height: 6.2rem;
    justify-content: center;
    gap: .65rem;
    padding: 1rem 1.1rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card::before {
    inset: 0 auto 0 0;
    width: .35rem;
    height: 100%;
    background: #4a4f58;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card label {
    color: #7a808a;
    font-size: .72rem;
    letter-spacing: .02em;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card strong {
    color: #3f4652;
    font-size: 1.75rem;
    font-weight: 600;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card.is-primary::before {
    background: #1b5f9e;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card.is-danger::before {
    background: #b8325f;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card.is-warning::before {
    background: #c99516;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .metric-card.is-success::before {
    background: #24845b;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-nav-shell,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-context-panel {
    grid-template-columns: minmax(16rem, .55fr) minmax(0, 1fr);
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-nav-copy,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-context-copy {
    display: grid;
    align-content: center;
    padding: 1.1rem;
    border-right: 1px solid #e1e6ee;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-card {
    min-height: 7.2rem;
    border-width: 0 0 0 1px;
    border-color: #e1e6ee;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    padding: 1rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-card:hover,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-card:focus-visible,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-card.is-active {
    background: #f8fafc;
    border-color: #cfd7e3;
    color: #174f83;
    transform: none;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-workspace-panel {
    padding: 0;
    overflow: hidden;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-section.is-active {
    padding: 1.15rem;
}

body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-subpanel,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-process-card,
body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .timeline-item {
    border-color: #e1e6ee;
    border-radius: .35rem;
    background: #fff;
    box-shadow: none;
}

body.login-portal:not([data-theme="dark"]) {
    --ba-bg: #eef1f5;
    --ba-surface: #ffffff;
    --ba-ink: #30343b;
    --ba-muted: #7a808a;
    --ba-line: #dde3ea;
    --ba-primary: #1b5f9e;
    --ba-primary-dark: #174f83;
    background:
        linear-gradient(180deg, #fbfcfe 0 3.25rem, transparent 3.25rem),
        #eef1f5;
}

body.login-portal:not([data-theme="dark"]) .login-shell-wide {
    width: min(100%, 1180px);
}

body.login-portal:not([data-theme="dark"]) .login-layout {
    align-items: stretch;
    gap: 1.25rem;
}

body.login-portal:not([data-theme="dark"]) .login-hero,
body.login-portal:not([data-theme="dark"]) .login-card {
    border: 1px solid #e1e6ee;
    border-radius: .45rem;
    background: #fff;
    box-shadow: 0 .8rem 1.8rem rgba(30, 41, 59, .12);
}

body.login-portal:not([data-theme="dark"]) .login-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 18%, transparent 0 2.2rem, rgba(255, 255, 255, .1) 2.25rem 2.35rem, transparent 2.4rem),
        radial-gradient(circle at 82% 48%, transparent 0 4.2rem, rgba(255, 255, 255, .08) 4.25rem 4.35rem, transparent 4.4rem),
        linear-gradient(120deg, #23262b, #151719 72%);
}

body.login-portal:not([data-theme="dark"]) .login-hero .app-title,
body.login-portal:not([data-theme="dark"]) .login-hero .app-subtitle {
    color: #f9fafb;
}

body.login-portal:not([data-theme="dark"]) .login-hero-card {
    border-radius: .35rem;
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #f9fafb;
}

body.login-portal:not([data-theme="dark"]) .login-hero-card span {
    color: rgba(255, 255, 255, .72);
}

@media (max-width: 1199.98px) {
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-nav-shell,
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-context-panel {
        grid-template-columns: 1fr;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-nav-copy,
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-context-copy {
        border-right: 0;
        border-bottom: 1px solid #e1e6ee;
    }
}

@media (max-width: 767.98px) {
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell,
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell-register,
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-shell-sm {
        padding-inline: .75rem;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-chrome {
        margin-inline: -.75rem;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-topbar {
        grid-template-columns: 1fr;
        gap: .45rem;
        padding: .7rem .75rem;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-topbar-center,
    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-topbar-actions {
        justify-content: flex-start;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead {
        min-height: 7.8rem;
        padding-inline: .75rem;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .app-pagehead::before {
        left: .75rem;
        max-width: calc(100% - 1.5rem);
        font-size: .82rem;
    }

    body.portal-skin:not(.pedagogico-portal):not([data-theme="dark"]) .admin-command-card {
        min-height: 4.5rem;
        border-width: 1px 0 0;
    }
}

body.pedagogico-portal:not([data-theme="dark"]) {
    --ba-bg: #eef1f5;
    --ba-surface: #ffffff;
    --ba-ink: #30343b;
    --ba-muted: #7a808a;
    --ba-line: #dde3ea;
    --ba-primary: #1b5f9e;
    --ba-primary-dark: #174f83;
    --ba-radius: .35rem;
    --ba-shadow: 0 .65rem 1.65rem rgba(39, 47, 59, .12);
    background: #eef1f5;
}

body.pedagogico-portal:not([data-theme="dark"]).app-body {
    background: #eef1f5;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-shell {
    width: min(100%, 1440px);
    padding: 0 1.25rem 2rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-chrome {
    gap: 0;
    margin-inline: 0;
    margin-bottom: 1.55rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-topbar {
    min-height: 3.25rem;
    border: 0;
    border-radius: 0;
    background: #fbfcfe;
    box-shadow: 0 .15rem .7rem rgba(30, 41, 59, .08);
    backdrop-filter: none;
    padding: .45rem 1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-topbar-brand {
    position: relative;
    padding-left: .1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-brand-kicker {
    color: #1b5f9e;
    font-size: .78rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-brand-name {
    color: #555b66;
    font-size: .82rem;
    font-weight: 600;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-dropdown-trigger,
body.pedagogico-portal:not([data-theme="dark"]) .app-account-trigger {
    min-height: 2.25rem;
    border-color: transparent;
    background: transparent;
    color: #4b5563;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-dropdown-trigger:hover,
body.pedagogico-portal:not([data-theme="dark"]) .app-account-trigger:hover,
body.pedagogico-portal:not([data-theme="dark"]) .app-dropdown[open] > .app-dropdown-trigger,
body.pedagogico-portal:not([data-theme="dark"]) .app-dropdown[open] > .app-account-trigger {
    border-color: #d7dee8;
    background: #f3f6f9;
    color: #174f83;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-pagehead {
    min-height: 8.4rem;
    display: flex;
    align-items: center;
    margin: 0;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 92% 20%, transparent 0 2.2rem, rgba(255, 255, 255, .1) 2.25rem 2.35rem, transparent 2.4rem),
        radial-gradient(circle at 84% 42%, transparent 0 4.2rem, rgba(255, 255, 255, .08) 4.25rem 4.35rem, transparent 4.4rem),
        linear-gradient(120deg, #23262b, #151719 72%);
    box-shadow: none;
    padding: 1.4rem 1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-pagehead::before {
    content: "Busca Ativa - Sistema de acompanhamento escolar";
    position: absolute;
    left: 1rem;
    top: .9rem;
    color: rgba(255, 255, 255, .72);
    font-size: .98rem;
    font-weight: 600;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-pagehead-copy {
    padding-top: 1.25rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .module-label {
    display: none;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-title {
    color: #f9fafb;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 400;
}

body.pedagogico-portal:not([data-theme="dark"]) .app-subtitle {
    color: rgba(255, 255, 255, .78);
    font-size: .92rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .pedagogico-top-filters,
body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-shell,
body.pedagogico-portal:not([data-theme="dark"]) .admin-context-panel,
body.pedagogico-portal:not([data-theme="dark"]) .admin-workspace-panel,
body.pedagogico-portal:not([data-theme="dark"]) .metric-card {
    border: 1px solid #e1e6ee;
    border-radius: .45rem;
    background: #fff;
    box-shadow: 0 .8rem 1.8rem rgba(30, 41, 59, .12);
}

body.pedagogico-portal:not([data-theme="dark"]) .pedagogico-top-filters {
    position: relative;
    top: auto;
    margin-top: -1.1rem;
    padding: 1rem 1.1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .pedagogico-fixed-filters-head strong,
body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-copy h2,
body.pedagogico-portal:not([data-theme="dark"]) .section-header h2 {
    color: #4a4f58;
    font-weight: 500;
}

body.pedagogico-portal:not([data-theme="dark"]) .analysis-quick-filters .mini-btn {
    border-radius: .25rem;
    border-color: #d7dde6;
    background: #f8fafc;
    color: #555d6b;
}

body.pedagogico-portal:not([data-theme="dark"]) .analysis-quick-filters .mini-btn.is-active {
    border-color: #1b5f9e;
    background: #e9f2fb;
    color: #174f83;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card {
    min-height: 6.2rem;
    justify-content: center;
    gap: .65rem;
    padding: 1rem 1.1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card::before {
    inset: 0 auto 0 0;
    width: .35rem;
    height: 100%;
    background: #4a4f58;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card label {
    color: #7a808a;
    font-size: .72rem;
    letter-spacing: .02em;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card strong {
    color: #3f4652;
    font-size: 1.75rem;
    font-weight: 600;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card.is-primary::before,
body.pedagogico-portal:not([data-theme="dark"]) .metric-card.is-info::before {
    background: #1b5f9e;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card.is-danger::before {
    background: #b8325f;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card.is-warning::before {
    background: #c99516;
}

body.pedagogico-portal:not([data-theme="dark"]) .metric-card.is-success::before {
    background: #24845b;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-shell {
    grid-template-columns: minmax(16rem, .55fr) minmax(0, 1fr);
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-copy {
    display: grid;
    align-content: center;
    padding: 1.1rem;
    border-right: 1px solid #e1e6ee;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-command-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-command-card {
    min-height: 7.2rem;
    border-width: 0 0 0 1px;
    border-color: #e1e6ee;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    padding: 1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-command-card:hover,
body.pedagogico-portal:not([data-theme="dark"]) .admin-command-card:focus-visible,
body.pedagogico-portal:not([data-theme="dark"]) .admin-command-card.is-active {
    background: #f8fafc;
    border-color: #cfd7e3;
    color: #174f83;
    transform: none;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-context-panel {
    grid-template-columns: minmax(16rem, .55fr) minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-context-copy,
body.pedagogico-portal:not([data-theme="dark"]) .admin-context-hints {
    padding: 1.1rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-context-copy {
    border-right: 1px solid #e1e6ee;
}

body.pedagogico-portal:not([data-theme="dark"]) .timeline-item {
    border-color: #e1e6ee;
    background: #fff;
    box-shadow: none;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-workspace-panel {
    padding: 0;
    overflow: hidden;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-section.is-active {
    padding: 1.15rem;
}

body.pedagogico-portal:not([data-theme="dark"]) .admin-subpanel,
body.pedagogico-portal:not([data-theme="dark"]) .admin-process-card {
    border-color: #e1e6ee;
    border-radius: .35rem;
    background: #fff;
    box-shadow: none;
}

@media (max-width: 1199.98px) {
    body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-shell,
    body.pedagogico-portal:not([data-theme="dark"]) .admin-context-panel {
        grid-template-columns: 1fr;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .admin-nav-copy,
    body.pedagogico-portal:not([data-theme="dark"]) .admin-context-copy {
        border-right: 0;
        border-bottom: 1px solid #e1e6ee;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .admin-command-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    body.pedagogico-portal:not([data-theme="dark"]) .app-shell {
        padding-inline: .75rem;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .app-chrome {
        margin-inline: -.75rem;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .app-topbar {
        grid-template-columns: 1fr;
        gap: .45rem;
        padding: .7rem .75rem;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .app-topbar-center,
    body.pedagogico-portal:not([data-theme="dark"]) .app-topbar-actions {
        justify-content: flex-start;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .app-pagehead {
        min-height: 7.8rem;
        padding-inline: .75rem;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .app-pagehead::before {
        left: .75rem;
        max-width: calc(100% - 1.5rem);
        font-size: .82rem;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .admin-command-grid {
        grid-template-columns: 1fr;
    }

    body.pedagogico-portal:not([data-theme="dark"]) .admin-command-card {
        min-height: 4.5rem;
        border-width: 1px 0 0;
    }
}

.pedagogico-actions {
    position: relative;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.pedagogico-menu {
    position: relative;
}

.pedagogico-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + .35rem);
    z-index: 5000;
    display: grid;
    width: max-content;
    min-width: 14rem;
    padding: .35rem;
    border: 1px solid var(--ba-line);
    border-radius: .7rem;
    background: var(--ba-surface);
    box-shadow: var(--ba-shadow);
}

.pedagogico-menu-list[hidden] {
    display: none;
}

.pedagogico-menu-item {
    min-height: 2.5rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--ba-ink);
    padding: .55rem .7rem;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.pedagogico-menu-item:hover,
.pedagogico-menu-item:focus-visible {
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    outline: none;
}

.pedagogico-menu-item.is-danger {
    color: var(--ba-danger);
}

.pedagogico-row:last-child .pedagogico-menu-list {
    top: auto;
    bottom: calc(100% + .35rem);
}

.pedagogico-row .status-pill.atrasado {
    margin-left: .4rem;
}

.atestados-list-row td {
    padding: .75rem !important;
}

.atestados-direct-list {
    display: grid;
    gap: .7rem;
}

.atestado-inner-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: .75rem 0 1rem;
}

.atestado-inner-tab {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    min-width: 11rem;
    min-height: 2.75rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: var(--ba-surface);
    color: var(--ba-ink);
    padding: .55rem .75rem;
    font-weight: 800;
}

.atestado-inner-tab strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 1.65rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, .1);
    color: var(--ba-primary-dark);
    font-size: .82rem;
}

.atestado-inner-tab:hover,
.atestado-inner-tab:focus-visible,
.atestado-inner-tab.is-active {
    border-color: rgba(15, 118, 110, .42);
    background: rgba(15, 118, 110, .08);
    color: var(--ba-primary-dark);
    outline: none;
}

.atestado-query-actions {
    display: flex;
    justify-content: flex-end;
    margin: -.25rem 0 1rem;
}

.atestado-student-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(6rem, .42fr) minmax(11rem, .85fr) auto;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 4.5rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: var(--ba-surface);
    color: var(--ba-ink);
    padding: .85rem 1rem;
    text-align: left;
}

.atestado-student-card:hover,
.atestado-student-card:focus-visible,
.atestado-student-card.is-selected {
    border-color: rgba(15, 118, 110, .38);
    background: rgba(15, 118, 110, .05);
    outline: none;
}

.atestado-student-card.is-selected {
    box-shadow: inset .25rem 0 0 var(--ba-primary);
}

.atestado-student-card span,
.atestado-card-main {
    display: grid;
    gap: .15rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.atestado-student-card b {
    color: var(--ba-muted);
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.atestado-student-card strong {
    color: var(--ba-ink);
}

.atestado-student-card small,
.atestado-card-note {
    color: var(--ba-muted);
}

.atestado-card-note {
    grid-column: 1 / -1;
    padding-top: .55rem;
    border-top: 1px solid var(--ba-line);
}

.atestado-card-action {
    justify-items: end;
}

.atestado-card-action .mini-btn {
    white-space: nowrap;
}

.atestado-aluno-selector {
    display: none;
}

.manual-section-heading {
    display: grid;
    gap: .15rem;
    padding: .75rem .85rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: rgba(15, 118, 110, .06);
}

.alunos-manual-form-column > .row.g-3 {
    padding: .75rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: rgba(248, 250, 252, .46);
}

.manual-atestado-heading {
    margin-top: .85rem;
    border-color: rgba(15, 118, 110, .32);
    background: rgba(15, 118, 110, .1);
}

.manual-section-heading strong {
    color: var(--ba-ink);
}

.manual-section-heading span {
    color: var(--ba-muted);
    font-size: .86rem;
}

[data-alunos-manual-root].is-atestado-mode > .row.g-3 {
    display: grid;
    grid-template-columns: 1fr;
}

[data-alunos-manual-root].is-atestado-mode > .row.g-3 > .col-xl-5,
[data-alunos-manual-root].is-atestado-mode > .row.g-3 > .col-xl-7 {
    width: 100%;
    max-width: 100%;
}

[data-alunos-manual-root].is-atestado-mode > .row.g-3 > .col-xl-7 {
    order: 1;
}

[data-alunos-manual-root].is-atestado-mode > .row.g-3 > .col-xl-5 {
    order: 2;
}

[data-alunos-manual-root].is-atestado-mode:not(.is-editing-atestado) .alunos-manual-form-column {
    display: none;
}

[data-alunos-manual-root].is-atestado-mode.is-editing-atestado .alunos-manual-form-column > .row.g-3 > :nth-child(-n+14) {
    display: none;
}

[data-alunos-manual-root].is-atestado-mode.is-editing-atestado .alunos-manual-form-column {
    max-width: min(100%, 46rem);
}

[data-alunos-manual-root].is-atestado-mode.is-new-atestado .atestado-aluno-selector {
    display: block;
}

[data-alunos-manual-root].is-atestado-mode.is-new-atestado .atestado-inner-tabs,
[data-alunos-manual-root].is-atestado-mode.is-new-atestado .atestado-query-actions,
[data-alunos-manual-root].is-atestado-mode.is-new-atestado .alunos-manual-table-scroll {
    display: none !important;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll {
    max-height: min(58vh, 34rem);
    border: 0;
    background: transparent;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-pagination {
    display: none;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll .table {
    min-width: 0;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll thead {
    display: none;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll table,
[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll tbody,
[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll tr,
[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll td {
    display: block;
    width: 100%;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll td {
    padding: 0 !important;
    border: 0;
}

[data-alunos-manual-root].is-atestado-mode .alunos-manual-table-scroll tr:hover {
    background: transparent;
}

@media (max-width: 1199.98px) {
    .absence-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alunos-manual-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) minmax(10rem, 14rem);
    }

    .alunos-manual-filter-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .alunos-manual-filter-grid {
        grid-template-columns: 1fr;
    }

    .alunos-manual-filter-action,
    .alunos-manual-filter-action .btn {
        width: 100%;
    }

    .pedagogico-filter-summary .btn {
        width: 100%;
    }

    .pedagogico-copy-footer .btn,
    .copy-summary-footer .btn {
        width: 100%;
    }

    .pedagogico-fixed-filters {
        position: static;
    }

    .pedagogico-fixed-filters-head {
        display: grid;
    }

    .pedagogico-fixed-filters .filter-actions,
    .pedagogico-fixed-filters .analysis-quick-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pedagogico-fixed-filters .filter-actions .btn,
    .pedagogico-fixed-filters .analysis-quick-filters .mini-btn,
    .mobile-filter-toggle {
        width: 100%;
        min-height: 2.75rem;
    }

    .atestado-inner-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }

    .atestado-inner-tab {
        width: 100%;
    }

    .acompanhamento-table-scroll {
        max-height: none;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    #tableAusencias,
    #tableAusencias thead,
    #tableAusencias tbody,
    #tableAusencias tr,
    #tableAusencias td {
        display: block;
        width: 100%;
    }

    #tableAusencias {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    #tableAusencias thead {
        display: none;
    }

    #tableAusencias .pedagogico-row {
        margin-bottom: .85rem;
        border: 1px solid var(--ba-line);
        border-radius: var(--ba-radius);
        background: var(--ba-surface);
        overflow: visible;
    }

    #tableAusencias td {
        display: grid;
        grid-template-columns: minmax(6.5rem, .38fr) minmax(0, 1fr);
        gap: .75rem;
        padding: .7rem .85rem;
        border-bottom: 1px solid var(--ba-line);
        white-space: normal !important;
    }

    #tableAusencias td::before {
        content: attr(data-label);
        color: var(--ba-muted);
        font-size: .78rem;
        font-weight: 800;
    }

    #tableAusencias td:last-child {
        display: block;
        border-bottom: 0;
    }

    #tableAusencias td:last-child::before {
        display: none;
    }

    .pedagogico-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: .5rem;
    }

    .pedagogico-actions .mini-btn,
    .pedagogico-actions .pedagogico-menu,
    .pedagogico-actions .js-pedagogico-menu-toggle {
        width: 100%;
        min-height: 2.75rem;
    }

    .pedagogico-menu-list,
    .pedagogico-menu-list.is-floating,
    .pedagogico-row:last-child .pedagogico-menu-list {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        margin-top: .45rem;
        box-shadow: none;
    }

    .pedagogico-row .status-pill.atrasado {
        width: fit-content;
        margin: .35rem 0 0;
    }

    .atestados-list-row,
    .atestados-list-row td {
        display: block !important;
        width: 100%;
    }

    .atestados-list-row td::before {
        display: none !important;
    }

    .atestado-student-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .atestado-card-action,
    .atestado-card-action .mini-btn {
        width: 100%;
        justify-items: stretch;
    }

    .manual-section-heading {
        padding: .75rem;
    }
}

.password-panel,
.password-sidecard {
    align-self: start;
}

body[data-theme="dark"] .app-topbar,
body[data-theme="dark"] .app-panel,
body[data-theme="dark"] .user-box,
body[data-theme="dark"] .admin-command-card,
body[data-theme="dark"] .admin-context-panel,
body[data-theme="dark"] .admin-section,
body[data-theme="dark"] .admin-subpanel,
body[data-theme="dark"] .metric-card,
body[data-theme="dark"] .timeline-item,
body[data-theme="dark"] .risk-item,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .whatsapp-card,
body[data-theme="dark"] .student-card,
body[data-theme="dark"] .call-summary-card,
body[data-theme="dark"] .process-card,
body[data-theme="dark"] .admin-process-card,
body[data-theme="dark"] .alunos-manual-table-scroll,
body[data-theme="dark"] .acompanhamento-table-scroll,
body[data-theme="dark"] .auditoria-table-scroll {
    background: linear-gradient(180deg, rgba(24, 34, 53, .98), rgba(17, 24, 39, .96));
    border-color: var(--ba-line);
    color: var(--ba-ink);
    box-shadow: var(--ba-shadow);
}

body[data-theme="dark"] .app-pagehead,
body[data-theme="dark"] .admin-context-panel {
    background:
        radial-gradient(circle at top left, rgba(45, 212, 191, .12), transparent 18rem),
        linear-gradient(180deg, rgba(24, 34, 53, .98), rgba(17, 24, 39, .96));
}

body[data-theme="dark"] .app-module-link,
body[data-theme="dark"] .admin-command-card,
body[data-theme="dark"] .mini-btn,
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .btn-outline-secondary,
body[data-theme="dark"] .btn-outline-primary {
    background-color: #111827;
    border-color: var(--ba-line);
    color: var(--ba-ink);
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: #111827;
    border-color: rgba(45, 212, 191, .7);
    color: var(--ba-ink);
    box-shadow: 0 0 0 .2rem rgba(45, 212, 191, .18);
}

body[data-theme="dark"] .form-select option {
    background: #111827;
    color: var(--ba-ink);
}

body[data-theme="dark"] .app-module-link:hover,
body[data-theme="dark"] .app-module-link.is-active,
body[data-theme="dark"] .admin-command-card:hover,
body[data-theme="dark"] .admin-command-card.is-active,
body[data-theme="dark"] .mini-btn:hover,
body[data-theme="dark"] .mini-btn:focus-visible {
    background: rgba(45, 212, 191, .12);
    border-color: rgba(45, 212, 191, .38);
    color: var(--ba-primary-dark);
}

body[data-theme="dark"] .form-control::placeholder {
    color: #7f8ea3;
}

body[data-theme="dark"] .table,
body[data-theme="dark"] .table td,
body[data-theme="dark"] .table th {
    --bs-table-bg: #111827;
    --bs-table-color: var(--ba-ink);
    --bs-table-border-color: var(--ba-line);
    --bs-table-hover-bg: rgba(45, 212, 191, .08);
    --bs-table-hover-color: var(--ba-ink);
    color: var(--ba-ink);
    border-color: var(--ba-line);
}

body[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: var(--bs-table-bg);
    color: var(--bs-table-color);
    border-bottom-color: var(--ba-line);
}

body[data-theme="dark"] .table thead th,
body[data-theme="dark"] .alunos-manual-table-scroll thead th,
body[data-theme="dark"] .acompanhamento-table-scroll thead th,
body[data-theme="dark"] .auditoria-table-scroll thead th {
    background: #172033;
    color: #cbd5e1;
    box-shadow: inset 0 -1px 0 var(--ba-line);
}

body[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(45, 212, 191, .08);
    color: var(--ba-ink);
}

body[data-theme="dark"] .app-brand-kicker,
body[data-theme="dark"] .module-label,
body[data-theme="dark"] .metric-card label,
body[data-theme="dark"] .admin-command-card span,
body[data-theme="dark"] .app-context-switcher span {
    color: var(--ba-primary-dark);
}

body[data-theme="dark"] .admin-context-panel strong,
body[data-theme="dark"] .timeline-item strong,
body[data-theme="dark"] .risk-item strong,
body[data-theme="dark"] .table strong {
    color: #f8fafc;
}

body[data-theme="dark"] .admin-section > .section-header,
body[data-theme="dark"] .border-bottom {
    border-color: var(--ba-line) !important;
}

body[data-theme="dark"] .status-pill.ativo,
body[data-theme="dark"] .status-pill.resolvido,
body[data-theme="dark"] .status-pill.resolvida {
    background: rgba(74, 222, 128, .18);
    color: #bbf7d0;
}

body[data-theme="dark"] .status-pill.pendente {
    background: rgba(251, 113, 133, .18);
    color: #fecdd3;
}

body[data-theme="dark"] .status-pill.tratado,
body[data-theme="dark"] .status-pill.em_tratamento {
    background: rgba(251, 191, 36, .2);
    color: #fde68a;
}

body[data-theme="dark"] .status-pill.atestado {
    background: rgba(59, 130, 246, .24);
    color: #dbeafe;
}

body[data-theme="dark"] .status-pill.sem_frequencia {
    background: rgba(129, 140, 248, .22);
    color: #e0e7ff;
}

body[data-theme="dark"] .risk-table-row-critical {
    background: rgba(248, 113, 113, .06);
}

body[data-theme="dark"] .risk-level.is-relevant {
    color: #fde68a;
}

body[data-theme="dark"] .risk-level.is-attention {
    color: #bfdbfe;
}

body[data-theme="dark"] .risk-level.is-monitor {
    color: #cbd5e1;
}

body[data-theme="dark"] .empty,
body[data-theme="dark"] .text-muted,
body[data-theme="dark"] .app-subtitle,
body[data-theme="dark"] .app-account-meta,
body[data-theme="dark"] .modal-subtitle {
    color: var(--ba-muted) !important;
}

body[data-theme="dark"] .alert-info,
body[data-theme="dark"] .result-box {
    background: rgba(96, 165, 250, .12);
    border-color: rgba(96, 165, 250, .24);
    color: #bfdbfe;
}

body[data-theme="dark"] .alert-danger {
    background: rgba(251, 113, 133, .12);
    border-color: rgba(251, 113, 133, .24);
    color: #fecdd3;
}

body[data-theme="dark"] .alert-success {
    background: rgba(74, 222, 128, .12);
    border-color: rgba(74, 222, 128, .24);
    color: #bbf7d0;
}

body[data-theme="dark"] .modal {
    background: rgba(3, 7, 18, .68);
}

body[data-theme="dark"] .audit-pre,
body[data-theme="dark"] .whatsapp-message {
    background: #111827;
    color: var(--ba-ink);
    border-color: var(--ba-line);
}

/* Acompanhamento individual e identidade documental */
.acompanhamento-page .admin-section {
    display: block;
    min-width: 0;
    padding: 1.15rem;
    border: 1px solid var(--ba-line);
    border-radius: var(--ba-radius);
    background: var(--ba-surface);
    box-shadow: var(--ba-shadow);
}
.risk-table-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.risk-table-actions a { text-decoration: none; }
.acompanhamento-backbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.acompanhamento-backbar span { color: var(--ba-muted); font-size: .9rem; }
.acompanhamento-student-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(26rem, .9fr); gap: 1.5rem; margin-bottom: 1rem; padding: 1.4rem; border-left: .25rem solid var(--ba-primary); }
.student-identity-main h2 { margin: .3rem 0; font-size: 1.45rem; }
.student-identity-main p { margin: 0; color: var(--ba-muted); }
.student-contact-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.student-contact-summary div { display: grid; align-content: center; gap: .2rem; min-width: 0; padding: .7rem .8rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); }
.student-contact-summary small, .student-event-content small, .student-report-item small, .student-document-item span { color: var(--ba-muted); }
.student-contact-summary strong { overflow-wrap: anywhere; }
.acompanhamento-workspace-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); box-shadow: var(--ba-shadow); }
.acompanhamento-workspace-intro > div { display: grid; gap: .2rem; }
.acompanhamento-eyebrow { color: var(--ba-primary); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.acompanhamento-workspace-intro ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.acompanhamento-workspace-intro li { display: flex; align-items: center; gap: .4rem; padding: .45rem .65rem; border-radius: 999px; background: rgba(100, 116, 139, .08); color: var(--ba-muted); font-size: .78rem; font-weight: 700; }
.acompanhamento-workspace-intro li span, .action-priority { display: grid; place-items: center; flex: 0 0 1.55rem; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--ba-primary); color: #fff; font-size: .75rem; font-weight: 800; }
.acompanhamento-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(22rem, .8fr); align-items: start; gap: 1rem; }
.acompanhamento-main, .student-report-list, .student-document-list { display: grid; gap: 1rem; }
.acompanhamento-sticky-panel { position: sticky; top: 1rem; }
.acompanhamento-section-accordion { padding: 0 !important; overflow: hidden; }
.acompanhamento-section-accordion > summary { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem; cursor: pointer; list-style: none; }
.acompanhamento-section-accordion > summary::-webkit-details-marker, .acompanhamento-action-group > summary::-webkit-details-marker { display: none; }
.acompanhamento-section-accordion > summary::after, .acompanhamento-action-group > summary::after { content: "⌄"; margin-left: auto; color: var(--ba-muted); font-size: 1.1rem; transition: transform .2s ease; }
.acompanhamento-section-accordion[open] > summary::after, .acompanhamento-action-group[open] > summary::after { transform: rotate(180deg); }
.acompanhamento-section-accordion > summary > span:nth-child(2) { display: grid; gap: .12rem; }
.acompanhamento-section-accordion > summary strong { font-size: 1.05rem; }
.acompanhamento-section-accordion > summary small { color: var(--ba-muted); }
.acompanhamento-summary-icon { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: .55rem; background: rgba(30, 100, 165, .09); color: var(--ba-primary); font-size: .78rem; font-weight: 800; }
.acompanhamento-section-body { padding: 0 1.15rem 1.15rem; border-top: 1px solid var(--ba-line); }
.acompanhamento-actions-heading { margin-bottom: .85rem; }
.acompanhamento-actions-heading h2 { margin: .15rem 0; font-size: 1.25rem; }
.acompanhamento-actions-heading p { margin: 0; color: var(--ba-muted); font-size: .84rem; }
.acompanhamento-action-group { margin-top: .65rem; overflow: hidden; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); }
.acompanhamento-action-group > summary { display: flex; align-items: center; gap: .65rem; padding: .8rem; cursor: pointer; list-style: none; }
.acompanhamento-action-group > summary > span:nth-child(2) { display: grid; min-width: 0; gap: .08rem; }
.acompanhamento-action-group > summary small { color: var(--ba-muted); font-size: .75rem; }
.acompanhamento-action-group.is-contact .action-priority { background: #a26a10; }
.acompanhamento-action-group.is-document .action-priority { background: #16805f; }
.acompanhamento-action-group[open] > summary { background: rgba(30, 100, 165, .05); }
.acompanhamento-action-body { padding: .9rem; border-top: 1px solid var(--ba-line); }
.ata-identification-fieldset { margin: 0; padding: .8rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: rgba(30, 100, 165, .04); }
.ata-identification-fieldset legend { float: none; width: auto; margin: 0 0 .55rem; font-size: .9rem; font-weight: 700; }
.ata-identification-row { display: grid; grid-template-columns: auto minmax(8rem, 1fr) auto minmax(4.5rem, .35fr) auto; align-items: center; gap: .5rem; }
.ata-identification-row > strong { white-space: nowrap; }
.atendimento-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; margin-bottom: 1rem; }
.atendimento-grid label { display: grid; gap: .375rem; font-weight: 600; }
.acompanhamento-action-group.is-minute .action-priority { background: #2563eb; }
.student-report-meta-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; }
.student-event-print-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.ata-number-input { min-width: 0; text-align: center; }
.acompanhamento-required-field { padding: .8rem; border: 1px solid rgba(193, 125, 18, .42); border-left: .25rem solid #c17d12; border-radius: var(--ba-radius); background: rgba(193, 125, 18, .08); }
.acompanhamento-required-field label { color: #7a4b05; }
.acompanhamento-required-field small { display: block; margin-top: .4rem; color: var(--ba-muted); font-size: .76rem; }
.acompanhamento-required-field .form-control:focus { border-color: #c17d12; box-shadow: 0 0 0 .2rem rgba(193, 125, 18, .14); }
.acompanhamento-filter-row { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 1fr) auto; align-items: end; gap: .75rem; padding: .9rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: rgba(100, 116, 139, .04); }
.acompanhamento-filter-row label { display: grid; gap: .4rem; font-weight: 700; }
.document-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .75rem; padding: .75rem .9rem; border: 1px solid rgba(15, 118, 110, .25); border-radius: var(--ba-radius); background: rgba(15, 118, 110, .06); }
.document-selection-bar > div:first-child { display: grid; gap: .15rem; }
.document-selection-bar span { color: var(--ba-muted); font-size: .85rem; }
.student-event-timeline { position: relative; display: grid; margin-top: 1rem; }
.student-event-timeline::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: .6rem; width: 2px; background: var(--ba-line); }
.student-event { position: relative; display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .85rem; padding-bottom: .85rem; }
.student-event-marker { z-index: 1; width: .75rem; height: .75rem; margin: .5rem 0 0 .3rem; border: 3px solid var(--ba-surface); border-radius: 50%; background: var(--ba-muted); box-shadow: 0 0 0 1px var(--ba-line); }
.student-event.is-late .student-event-marker { background: #1685a9; }
.student-event.is-certificate .student-event-marker { background: #2767ad; }
.student-event.is-shared .student-event-marker { background: #16805f; }
.student-event.is-internal .student-event-marker { background: #a26a10; }
.student-event.is-action .student-event-marker { background: #7c3aed; }
.student-event-content { overflow: hidden; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); }
.student-event-head { display: flex; justify-content: space-between; gap: .6rem; margin-bottom: .3rem; color: var(--ba-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.student-event-toggle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .8rem .9rem; border: 0; background: transparent; color: var(--ba-ink); text-align: left; cursor: pointer; }
.student-event-toggle::after { content: "⌄"; color: var(--ba-muted); transition: transform .2s ease; }
.student-event-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.student-event-toggle time { margin-left: auto; color: var(--ba-muted); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.student-event-overview { display: grid; min-width: 0; gap: .12rem; }
.student-event-overview strong { overflow-wrap: anywhere; }
.student-event-details { padding: .75rem .9rem .85rem; border-top: 1px solid var(--ba-line); background: rgba(100, 116, 139, .035); }
.student-event-details[hidden] { display: none; }
.student-event-details p { margin: 0 0 .65rem; }
.document-event-selector { display: inline-flex; align-items: center; gap: .4rem; color: var(--ba-primary-dark); cursor: pointer; }
.document-event-selector input { width: 1rem; height: 1rem; accent-color: var(--ba-primary); }
.document-event-selector.is-disabled { color: var(--ba-muted); cursor: default; }
.student-event-type { display: block; margin-bottom: .2rem; color: var(--ba-muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.student-event-content p, .student-report-item p { margin: .35rem 0; color: var(--ba-muted); white-space: pre-line; }
.student-report-item, .student-document-item { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: .85rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); }
.student-report-item div, .student-document-item div { display: grid; gap: .3rem; }
.report-visibility { width: max-content; padding: .2rem .45rem; border-radius: .25rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.report-visibility.is-internal { color: #704d0d; background: #fff2cf; }
.report-visibility.is-shared { color: #075f46; background: #d9f5e9; }
.report-visibility-options { display: grid; gap: .5rem; margin: 0 0 .9rem; padding: 0; border: 0; }
.report-visibility-options legend { margin-bottom: .35rem; font-size: .9rem; font-weight: 700; }
.report-visibility-options label { display: flex; gap: .55rem; padding: .65rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); cursor: pointer; }
.report-visibility-options span { display: grid; }
.report-visibility-options small { color: var(--ba-muted); }
.document-safety-note { margin-bottom: .9rem; padding: .65rem; border-left: 3px solid #16805f; background: rgba(22, 128, 95, .08); color: var(--ba-muted); font-size: .85rem; }
.document-alert-builder { display: grid; gap: .65rem; margin-bottom: .9rem; padding: .85rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: rgba(100, 116, 139, .04); }
.alert-checklist-grid { display: grid; gap: .55rem; }
.alert-checklist-grid label { display: flex; align-items: start; gap: .55rem; padding: .7rem .75rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); cursor: pointer; font-weight: 600; }
.alert-checklist-grid input { margin-top: .15rem; accent-color: var(--ba-primary); }
.document-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.document-action-grid.is-single-action { grid-template-columns: 1fr; margin-bottom: .5rem; }
.document-identity-panel { margin-top: 1rem; }
.document-identity-panel.is-standalone { margin-top: 0; }
.school-context-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.school-context-summary > div { display: grid; align-content: start; gap: .2rem; min-width: 0; padding: .7rem .75rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: rgba(100, 116, 139, .04); }
.school-context-summary span { color: var(--ba-muted); font-size: .7rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.school-context-summary strong { overflow-wrap: anywhere; font-size: .84rem; line-height: 1.35; }
.school-context-summary small { color: var(--ba-muted); font-size: .7rem; }
.document-identity-grid { display: grid; grid-template-columns: minmax(14rem, .8fr) repeat(3, minmax(11rem, 1fr)); align-items: end; gap: .85rem; }
.document-identity-title-field, .document-identity-subtitle-field { padding: .8rem; border: 1px solid rgba(15, 118, 110, .22); border-radius: var(--ba-radius); background: rgba(15, 118, 110, .05); }
.document-identity-title-field { grid-column: 1 / span 2; }
.document-identity-subtitle-field { grid-column: 3 / span 2; }
.document-identity-address { grid-column: 2 / span 2; grid-row: 3; }
.document-identity-colors { grid-column: 4; grid-row: 2 / span 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: center; align-content: center; gap: .65rem; min-width: 0; height: 7.2rem; margin: 0; padding: .75rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: rgba(100, 116, 139, .04); }
.document-identity-colors legend { grid-column: 1 / -1; width: auto; margin: 0; color: var(--ba-ink); font-size: .82rem; font-weight: 800; }
.document-color-field { display: grid; gap: .4rem; min-width: 0; color: var(--ba-muted); font-size: .76rem; font-weight: 700; cursor: pointer; }
.document-color-field input[type="color"] { width: 100%; min-width: 0; height: 2.75rem; padding: .25rem; border: 1px solid var(--ba-line); border-radius: .5rem; background: var(--ba-surface); cursor: pointer; }
.document-color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.document-color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: .3rem; }
.document-color-field input[type="color"]::-moz-color-swatch { border: 0; border-radius: .3rem; }
.document-logo-upload { grid-column: 1; grid-row: 2 / span 2; align-self: center; display: flex; align-items: center; gap: .75rem; width: 100%; height: 7.2rem; min-height: 7.2rem; padding: .85rem; border: 1px dashed var(--ba-line); border-radius: var(--ba-radius); cursor: pointer; }
.document-logo-upload img { width: 4.5rem; height: 4.5rem; object-fit: contain; }
.document-logo-upload span { display: grid; gap: .2rem; }
.document-logo-upload small { color: var(--ba-muted); }
.document-logo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.document-identity-preview { --document-preview-primary: #165f95; --document-preview-secondary: #d7a21d; position: relative; display: grid; gap: .85rem; margin-top: 1rem; padding: 1.2rem; overflow: hidden; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); box-shadow: 0 .5rem 1.5rem rgba(15, 23, 42, .06); }
.document-preview-accent { position: absolute; inset: 0 0 auto; height: .35rem; background: linear-gradient(90deg, var(--document-preview-primary) 0 72%, var(--document-preview-secondary) 72% 100%); }
.document-preview-header { display: flex; align-items: center; gap: 1rem; padding-top: .35rem; }
.document-preview-header > div:last-child { display: grid; gap: .18rem; min-width: 0; }
.document-preview-header strong { color: var(--document-preview-primary); font-size: 1.15rem; }
.document-preview-header span { color: var(--ba-ink); font-weight: 700; }
.document-preview-header small { color: var(--ba-muted); overflow-wrap: anywhere; }
.document-preview-logo { display: grid; place-items: center; flex: 0 0 4.5rem; height: 4.5rem; border: 1px dashed var(--document-preview-primary); border-radius: .55rem; color: var(--document-preview-primary); font-size: .7rem; font-weight: 800; }
.document-preview-logo.has-image { border-style: solid; background: #fff; }
.document-preview-logo img { width: 100%; height: 100%; padding: .35rem; object-fit: contain; }
.document-preview-rule { height: .2rem; border-radius: 999px; background: var(--document-preview-secondary); }
.document-preview-label { width: max-content; padding: .25rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--document-preview-secondary) 16%, transparent); color: var(--ba-ink); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
body[data-theme="dark"] .report-visibility.is-internal { color: #fde68a; background: rgba(162, 106, 16, .22); }
body[data-theme="dark"] .report-visibility.is-shared { color: #a7f3d0; background: rgba(22, 128, 95, .22); }

/* Mapa de frequência por turma */
.frequency-heatmap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.frequency-heatmap-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.frequency-heatmap-tab { min-height: 2.1rem; padding: .3rem .65rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); color: var(--ba-ink); font-size: .78rem; font-weight: 700; cursor: pointer; }
.frequency-heatmap-tab:hover { border-color: var(--ba-primary); }
.frequency-heatmap-tab.is-active { border-color: var(--ba-primary); background: var(--ba-primary); color: #fff; }
.frequency-heatmap-period { display: grid; justify-items: end; gap: .05rem; color: var(--ba-muted); font-size: .7rem; }
.frequency-heatmap-period strong { color: var(--ba-ink); }
.frequency-heatmap-legend { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .5rem; color: var(--ba-muted); font-size: .68rem; }
.frequency-heatmap-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.frequency-heatmap-legend i { width: .65rem; height: .65rem; border: 1px solid var(--ba-line); border-radius: 2px; }
.frequency-heatmap-legend .is-critical, .frequency-heatmap-cell.is-critical { background: #b93b4f; color: #fff; }
.frequency-heatmap-legend .is-attention, .frequency-heatmap-cell.is-attention { background: #d7a21d; color: #18202c; }
.frequency-heatmap-legend .is-good, .frequency-heatmap-cell.is-good { background: #21875f; color: #fff; }
.frequency-heatmap-legend .is-empty, .frequency-heatmap-cell.is-empty { background: rgba(100, 116, 139, .08); color: var(--ba-muted); }
.frequency-heatmap-wrap { max-height: 29rem; overflow: auto; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); }
.frequency-heatmap-table { width: 100%; min-width: 42rem; border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.frequency-heatmap-table th, .frequency-heatmap-table td { padding: .42rem .5rem; border-right: 1px solid var(--ba-line); border-bottom: 1px solid var(--ba-line); text-align: center; }
.frequency-heatmap-table thead th { position: sticky; top: 0; z-index: 2; background: #f5f8fb; }
.frequency-heatmap-table tfoot th, .frequency-heatmap-table tfoot td { position: sticky; bottom: 0; z-index: 2; border-top: 2px solid var(--ba-line); }
.frequency-heatmap-table tfoot .frequency-heatmap-sticky { z-index: 4; }
.frequency-heatmap-table thead small, .frequency-heatmap-sticky small { display: block; margin-top: .08rem; color: var(--ba-muted); font-size: .6rem; font-weight: 500; }
.frequency-heatmap-sticky { position: sticky; left: 0; z-index: 3; min-width: 10rem; background: var(--ba-surface); text-align: left !important; }
.frequency-heatmap-cell { min-width: 4.6rem; font-weight: 800; cursor: help; transition: filter .15s ease, box-shadow .15s ease; }
.frequency-heatmap-cell:hover { filter: brightness(1.08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.frequency-heatmap-tooltip { position: fixed; z-index: 2000; display: none; min-width: 10rem; padding: .55rem .65rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); background: var(--ba-surface); color: var(--ba-ink); box-shadow: var(--ba-shadow); font-size: .72rem; font-weight: 650; line-height: 1.45; white-space: pre-line; pointer-events: none; }
.frequency-heatmap-tooltip.is-visible { display: block; }
.frequency-heatmap-cell.is-average { border-left: 2px solid var(--ba-ink); }
.frequency-heatmap-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .55rem; font-size: .78rem; }
.frequency-heatmap-summary div { display: grid; gap: .1rem; padding: .55rem .65rem; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); }
.frequency-heatmap-summary small { color: var(--ba-muted); }
body[data-theme="dark"] .frequency-heatmap-table thead th { background: #18253a; }
body[data-theme="dark"] .frequency-heatmap-table tfoot .frequency-heatmap-sticky { background: #111c2d; }
body[data-theme="dark"] .frequency-heatmap-sticky { background: #111c2d; }
body[data-theme="dark"] .frequency-heatmap-legend .is-empty,
body[data-theme="dark"] .frequency-heatmap-cell.is-empty { background: #18253a; }

.gestao-card { height: 100%; padding: 1rem; border: 1px solid var(--ba-line); border-radius: calc(var(--ba-radius) + .1rem); background: var(--ba-surface); box-shadow: var(--ba-shadow); }
.gestao-stack { display: grid; gap: .75rem; }
.gestao-list-item { padding: .85rem .9rem; border: 1px solid rgba(15, 118, 110, .12); border-radius: var(--ba-radius); background: rgba(15, 118, 110, .04); }
.gestao-list-item strong { display: block; margin-top: .4rem; margin-bottom: .2rem; }
.gestao-list-item p { margin: 0; color: var(--ba-muted); font-size: .83rem; line-height: 1.45; }
.gestao-badge { display: inline-flex; align-items: center; min-height: 1.5rem; padding: .2rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.gestao-status-badge { display: inline-flex; align-items: center; min-height: 1.5rem; margin-left: .35rem; padding: .2rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.gestao-badge.prioridade-critica { color: #fff; background: #b42318; }
.gestao-badge.prioridade-alta { color: #fff; background: #dc2626; }
.gestao-badge.prioridade-media { color: #5b3d00; background: #fde68a; }
.gestao-badge.prioridade-baixa { color: #0f5132; background: #bbf7d0; }
.gestao-status-badge.status-pendente { color: #7c2d12; background: #fed7aa; }
.gestao-status-badge.status-agendado { color: #7c2d12; background: #fed7aa; }
.gestao-status-badge.status-em_andamento { color: #1d4ed8; background: #dbeafe; }
.gestao-status-badge.status-realizado { color: #166534; background: #dcfce7; }
.gestao-status-badge.status-concluida { color: #166534; background: #dcfce7; }
.gestao-status-badge.status-cancelada { color: #991b1b; background: #fee2e2; }
.gestao-status-badge.status-cancelado { color: #991b1b; background: #fee2e2; }
.gestao-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .7rem; }
.gestao-filter-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.gestao-empty-state { padding: 1rem; border: 1px dashed var(--ba-line); border-radius: var(--ba-radius); color: var(--ba-muted); background: rgba(100, 116, 139, .05); }
body[data-theme="dark"] .gestao-list-item { background: rgba(45, 212, 191, .08); border-color: rgba(45, 212, 191, .14); }
body[data-theme="dark"] .gestao-badge.prioridade-media { color: #172033; }
body[data-theme="dark"] .gestao-status-badge.status-pendente { color: #ffd7aa; background: rgba(124, 45, 18, .45); }
body[data-theme="dark"] .gestao-status-badge.status-agendado { color: #ffd7aa; background: rgba(124, 45, 18, .45); }
body[data-theme="dark"] .gestao-status-badge.status-em_andamento { color: #bfdbfe; background: rgba(29, 78, 216, .34); }
body[data-theme="dark"] .gestao-status-badge.status-realizado { color: #bbf7d0; background: rgba(22, 101, 52, .34); }
body[data-theme="dark"] .gestao-status-badge.status-concluida { color: #bbf7d0; background: rgba(22, 101, 52, .34); }
body[data-theme="dark"] .gestao-status-badge.status-cancelada { color: #fecaca; background: rgba(153, 27, 27, .34); }
body[data-theme="dark"] .gestao-status-badge.status-cancelado { color: #fecaca; background: rgba(153, 27, 27, .34); }

/* Administrador geral: planos e vigencias */
.app-platform-return {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    color: var(--ba-muted, #5f6f86);
    background: #f1f5fb;
    font-size: .72rem;
    font-weight: 750;
    white-space: nowrap;
    text-decoration: none;
}

.app-platform-return span:first-child {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #fff;
    background: #315da8;
    line-height: 1;
}

.app-platform-return:hover,
.app-platform-return:focus-visible {
    color: var(--ba-primary, #1f5f9b);
    background: #e7effb;
    transform: translateX(-1px);
}

.plan-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.plan-summary-grid .admin-process-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.65rem;
}

.plan-catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.plan-catalog-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--ba-border, #dbe3ec);
    border-radius: 12px;
    background: var(--ba-surface, #fff);
}

.plan-catalog-card.is-selected {
    border-color: #2563eb;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .10);
}

.plan-catalog-card > div:first-child span,
.plan-history-panel summary span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: .82rem;
}

.plan-module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plan-module-list span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .7rem;
    font-weight: 700;
}

.plan-module-list.is-compact {
    max-width: 330px;
}

.plan-history-panel {
    margin-top: 16px;
}

.plan-history-panel > summary {
    cursor: pointer;
    list-style: none;
}

.status-pill.teste { color: #6b3f00; background: #fef3c7; }
.status-pill.suspenso { color: #9f1239; background: #ffe4e6; }
.status-pill.cancelado { color: #475569; background: #e2e8f0; }

body[data-theme="dark"] .plan-catalog-card { background: #172033; border-color: #334155; }
body[data-theme="dark"] .plan-module-list span { color: #bfdbfe; background: rgba(37, 99, 235, .25); }

@media (max-width: 900px) {
    .plan-summary-grid,
    .plan-catalog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .plan-summary-grid,
    .plan-catalog-grid { grid-template-columns: 1fr; }
}
body[data-theme="dark"] .gestao-empty-state { background: rgba(24, 37, 58, .72); }

@media (max-width: 1100px) {
    .acompanhamento-layout, .acompanhamento-student-header { grid-template-columns: 1fr; }
    .acompanhamento-sticky-panel { position: static; }
    .school-context-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .document-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-logo-upload, .document-identity-address, .document-identity-title-field, .document-identity-subtitle-field, .document-identity-colors { grid-column: 1 / -1; grid-row: auto; }
    .gestao-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    [data-alunos-modal-layout].is-student-modal-open .alunos-manual-modal-form { inset: .5rem; width: auto; max-height: calc(100dvh - 1rem); transform: none; }
    .alunos-manual-modal-header { position: sticky; top: -1.1rem; z-index: 2; background: var(--ba-surface); }
    .alunos-manual-pagination { grid-template-columns: 1fr; justify-items: center; }
    .alunos-manual-pagination > div { justify-content: center; }
    .school-context-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .acompanhamento-workspace-intro { align-items: stretch; flex-direction: column; }
    .acompanhamento-workspace-intro ol { display: grid; grid-template-columns: 1fr; }
    .acompanhamento-filter-row, .student-contact-summary, .document-identity-grid, .document-action-grid { grid-template-columns: 1fr; }
    .acompanhamento-backbar, .student-report-item, .student-document-item, .document-selection-bar { align-items: stretch; flex-direction: column; }
    .student-event-toggle { align-items: flex-start; }
    .student-event-toggle time { margin-top: .15rem; }
    .ata-identification-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .ata-identification-row > :nth-child(1) { grid-area: 1 / 1; }
    .ata-identification-row > :nth-child(2) { grid-area: 1 / 2 / 2 / 4; }
    .ata-identification-row > :nth-child(3) { grid-area: 2 / 1; }
    .ata-identification-row > :nth-child(4) { grid-area: 2 / 2; }
    .ata-identification-row > :nth-child(5) { grid-area: 2 / 3; }
    .atendimento-grid { grid-template-columns: 1fr; }
    .document-identity-address, .document-identity-colors { grid-column: auto; }
    .frequency-heatmap-toolbar { align-items: stretch; flex-direction: column; }
    .frequency-heatmap-period { justify-items: start; }
    .frequency-heatmap-summary { grid-template-columns: 1fr; }
    .confirm-presence-panel { align-items: stretch; flex-direction: column; }
    .gestao-filter-bar { grid-template-columns: 1fr; }
    .registrar-portal .app-shell-register { padding-bottom: 11rem !important; }
    .bottom-action-wrap { grid-template-columns: 1fr; width: min(calc(100% - 1.5rem), 36rem); gap: .45rem; }
    .bottom-action-wrap > .small { grid-template-columns: 1fr auto; justify-content: space-between !important; }
}
.student-presence-confirmed {
    display: block;
    margin-top: 3px;
    color: #16835d !important;
    font-weight: 700;
}
.app-management-login-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    width: min(390px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    color: #172033;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .2);
    opacity: 0;
    transform: translateY(24px) scale(.98);
    transition: opacity .22s ease, transform .22s ease, width .28s ease, padding .28s ease, border-radius .28s ease;
}

.app-management-login-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-management-login-toast.is-attention:not(.is-collapsed) {
    animation: app-management-toast-attention .58s ease .28s 2;
}

@keyframes app-management-toast-attention {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.012); }
}

.app-management-login-toast-close {
    position: absolute;
    top: 10px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.app-management-login-toast-close:hover,
.app-management-login-toast-close:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.app-management-login-toast-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.app-management-login-toast-icon svg {
    width: 23px;
    height: 23px;
}

.app-management-login-toast-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #dc2626;
}

.app-management-login-toast.is-collapsing .app-management-login-toast-content,
.app-management-login-toast.is-collapsing .app-management-login-toast-close {
    opacity: 0;
}

.app-management-login-toast.is-collapsed {
    width: 56px;
    grid-template-columns: 44px;
    gap: 0;
    padding: 6px;
    border-radius: 16px;
}

.app-management-login-toast.is-collapsed .app-management-login-toast-content,
.app-management-login-toast.is-collapsed .app-management-login-toast-close {
    display: none;
}

.app-management-login-toast.is-collapsed .app-management-login-toast-icon {
    cursor: pointer;
    animation: app-management-toast-icon-pulse 1.8s ease-in-out 2;
}

.app-management-login-toast.is-collapsed .app-management-login-toast-icon:hover,
.app-management-login-toast.is-collapsed .app-management-login-toast-icon:focus-visible {
    background: #dbeafe;
    outline: 3px solid rgba(37, 99, 235, .2);
}

@keyframes app-management-toast-icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, .15); }
}

.app-management-login-toast-content {
    display: grid;
    gap: 6px;
    padding-right: 22px;
    transition: opacity .16s ease;
}

.app-management-login-toast-content > span {
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.app-management-login-toast-content > strong {
    font-size: 16px;
    line-height: 1.35;
}

.app-management-login-toast-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}

.app-management-login-toast-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
}

.app-management-login-toast-metrics span.is-warning {
    background: #fff7ed;
    color: #c2410c;
}

.app-management-login-toast-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    margin-top: 5px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.app-management-login-toast-action:hover,
.app-management-login-toast-action:focus-visible {
    color: #1e3a8a;
    text-decoration: underline;
}

body[data-theme="dark"] .app-management-login-toast {
    border-color: #334155;
    background: rgba(15, 23, 42, .98);
    color: #f8fafc;
}

body[data-theme="dark"] .app-management-login-toast-close {
    color: #94a3b8;
}

body[data-theme="dark"] .app-management-login-toast-close:hover,
body[data-theme="dark"] .app-management-login-toast-close:focus-visible,
body[data-theme="dark"] .app-management-login-toast-metrics span {
    background: #1e293b;
    color: #e2e8f0;
}

body[data-theme="dark"] .app-management-login-toast-icon {
    background: #172554;
    color: #93c5fd;
}

body[data-theme="dark"] .app-management-login-toast-dot {
    border-color: #0f172a;
}

@media (max-width: 600px) {
    .app-management-login-toast {
        right: 16px;
        bottom: 16px;
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 16px;
    }

    .app-management-login-toast-icon {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-management-login-toast {
        transition: none;
    }

    .app-management-login-toast.is-attention:not(.is-collapsed),
    .app-management-login-toast.is-collapsed .app-management-login-toast-icon {
        animation: none;
    }
}
.pedagogico-context-filter {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #cfe0ee;
    border-left: 4px solid var(--ba-primary, #1b5f9e);
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbff 0%, #f2f7fb 100%);
}

.pedagogico-context-filter > div:first-child {
    display: grid;
    gap: 2px;
}

.pedagogico-context-filter span {
    color: var(--ba-muted, #64748b);
    font-size: .82rem;
}

.general-day-context-filter {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 1rem;
    padding: 12px 14px;
    border: 1px solid #cfe0ee;
    border-left: 4px solid #1b5f9e;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbff 0%, #f2f7fb 100%);
}

.general-day-context-filter > div:first-child {
    display: grid;
    gap: 2px;
}

.general-day-context-filter span {
    color: var(--ba-muted, #64748b);
    font-size: .82rem;
}

.general-day-context-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 4px;
    border: 1px solid #d7e1ec;
    border-radius: 10px;
    background: #fff;
}

.general-day-context-options .mini-btn {
    min-height: 36px;
    border-color: transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.general-day-context-options .mini-btn.is-active {
    border-color: #aacbea !important;
    background: #e8f3ff !important;
    color: #124f84 !important;
    box-shadow: inset 0 0 0 1px rgba(27, 95, 158, .08) !important;
}

.pedagogico-context-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 4px;
    border: 1px solid #d8e3ec;
    border-radius: 10px;
    background: #fff;
}

.pedagogico-context-options .mini-btn {
    min-height: 36px;
    border-color: transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.pedagogico-context-options .mini-btn.is-active {
    border-color: #aacbea !important;
    background: #e8f3ff !important;
    color: #124f84 !important;
    box-shadow: inset 0 0 0 1px rgba(27, 95, 158, .08) !important;
}

.pedagogico-date-shortcuts {
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 4px;
    border: 1px solid #d8e3ec;
    border-radius: 10px;
    background: #fff;
}

.pedagogico-date-shortcuts::before {
    content: none;
}

.pedagogico-date-shortcuts .mini-btn,
.app-segmented-filter .mini-btn {
    min-height: 36px;
    border-color: transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.pedagogico-date-shortcuts .mini-btn.is-active,
.app-segmented-filter .mini-btn.is-active {
    border-color: #aacbea !important;
    background: #e8f3ff !important;
    color: #124f84 !important;
}

.app-segmented-filter {
    width: fit-content;
    max-width: 100%;
    gap: 8px;
    padding: 4px;
    border: 1px solid #d8e3ec;
    border-radius: 10px;
    background: #fff;
}

.pedagogico-filter-footer {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ba-line, #d8e3ea);
}

.pedagogico-filter-footer .filter-actions {
    margin: 0;
}

.pedagogico-filter-footer .pedagogico-active-filter-copy {
    margin-top: 0;
    padding: 7px 10px;
    border-radius: 8px;
    background: #edf4fa;
    color: #4b6175;
    text-align: left;
}

@media (max-width: 767.98px) {
    .pedagogico-context-filter {
        align-items: stretch;
        flex-direction: column;
    }
    .pedagogico-context-options {
        justify-content: flex-start;
    }
    .pedagogico-context-options .mini-btn {
        flex: 1 1 calc(50% - 4px);
    }

    .general-day-context-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .general-day-context-options .mini-btn {
        flex: 1 1 calc(50% - 4px);
    }
    .pedagogico-date-shortcuts,
    .app-segmented-filter {
        width: 100%;
    }
    .pedagogico-filter-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .pedagogico-filter-footer .pedagogico-active-filter-copy {
        text-align: left;
    }
}
