:root {
    --app-font-size: 18px;
    --sidebar-collapsed: 76px;
    --sidebar-expanded: 268px;
    --topbar-height: 66px;
    --primary: #147fe8;
    --primary-dark: #0866c5;
    --navy-950: #06152d;
    --navy-900: #0b1d38;
    --navy-800: #082a55;
    --bg: #f3f7fc;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #0c1d36;
    --muted: #607493;
    --border: #dce6f2;
    --shadow: 0 14px 32px rgba(18, 50, 85, .07);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #06152d;
    --navy-800: #092447;
    --surface: #102644;
    --surface-soft: #0b1d38;
    --text: #f3f8ff;
    --muted: #9db4d2;
    --border: #274566;
    --shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    font-size: var(--app-font-size);
}

body {
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.section-label,
.hero-kicker {
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .13em;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

/* Login */
.auth-body {
    background: #fff;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(28rem, 52%) minmax(28rem, 48%);
    min-height: 100vh;
}

.auth-visual {
    background:
        radial-gradient(circle at 90% 14%, rgba(38, 151, 245, .22), transparent 22rem),
        radial-gradient(circle at 10% 90%, rgba(43, 204, 170, .1), transparent 20rem),
        linear-gradient(145deg, var(--navy-950), #102b50);
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 5rem);
    position: relative;
}

.auth-visual::before,
.auth-visual::after {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    position: absolute;
}

.auth-visual::before {
    height: 27rem;
    right: -12rem;
    top: -10rem;
    width: 27rem;
}

.auth-visual::after {
    bottom: -15rem;
    height: 31rem;
    left: -15rem;
    width: 31rem;
}

.auth-logo-corner {
    bottom: 1.75rem;
    height: auto;
    max-height: 2.75rem;
    object-fit: contain;
    position: absolute;
    right: 1.75rem;
    width: 4.5rem;
    z-index: 1;
}

.auth-logo {
    height: auto;
    max-height: 5rem;
    max-width: 11rem;
    object-fit: contain;
    position: relative;
    width: 34%;
    z-index: 1;
}

.auth-logo-mobile {
    display: none;
}

.auth-visual-content {
    margin: auto 0;
    max-width: 35rem;
    position: relative;
    z-index: 1;
}

.auth-visual-content .section-label {
    color: #5db9ff;
    margin-bottom: 1.25rem;
}

.auth-visual-content h2 {
    font-size: clamp(2.5rem, 4vw, 4.4rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: .98;
    margin-bottom: 1.5rem;
}

.auth-visual-lead {
    color: #b8d0eb;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 31rem;
}

.auth-feature-list {
    display: grid;
    gap: .8rem;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.auth-feature-list li {
    align-items: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .8rem;
    display: flex;
    gap: .8rem;
    max-width: 25rem;
    padding: .8rem 1rem;
}

.auth-feature-list i {
    color: #58b7ff;
    font-size: 1.15rem;
}

.auth-feature-list span {
    color: #d8e7f8;
    font-size: .85rem;
    font-weight: 650;
}

.auth-visual-footer {
    color: #8daacb;
    font-size: .72rem;
    position: relative;
    z-index: 1;
}

.auth-panel {
    align-items: center;
    background: #fff;
    color: #0c1d36;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(2rem, 6vw, 6rem);
}

.auth-form-wrap {
    max-width: 29rem;
    width: 100%;
}

.auth-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 850;
    letter-spacing: -.045em;
    margin-bottom: .75rem;
}

.auth-subtitle {
    color: #6c7f99;
    line-height: 1.65;
    margin-bottom: 2.4rem;
}

.auth-panel .form-label {
    font-size: .86rem;
    font-weight: 750;
    margin-bottom: .6rem;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap > i {
    color: #7b8da7;
    font-size: 1rem;
    left: 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.auth-panel .form-control {
    border: 1px solid #d8e2ef;
    border-radius: .75rem;
    color: #0c1d36;
    font-size: .95rem;
    min-height: 3.4rem;
    padding: .85rem 3.25rem .85rem 2.8rem;
}

.auth-panel .form-control:focus {
    border-color: #69a9ec;
    box-shadow: 0 0 0 .23rem rgba(20, 127, 232, .13);
}

.password-toggle {
    background: transparent;
    border: 0;
    color: #617795;
    padding: .65rem;
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.auth-submit {
    border-radius: .75rem;
    font-size: .94rem;
    font-weight: 750;
    min-height: 3.4rem;
}

.auth-security-note {
    align-items: center;
    color: #6c7f99;
    display: flex;
    font-size: .76rem;
    gap: .5rem;
    justify-content: center;
    margin-top: 2rem;
}

.auth-security-note i {
    color: #19a866;
}

/* Shell administrativo */
.app-body {
    background: var(--bg);
}

.app-shell {
    min-height: 100vh;
    padding-left: var(--sidebar-collapsed);
    transition: padding-left .22s ease;
}

.app-shell.sidebar-expanded {
    padding-left: var(--sidebar-expanded);
}

.app-sidebar {
    background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
    border-right: 1px solid rgba(255, 255, 255, .08);
    bottom: 0;
    display: flex;
    flex-direction: column;
    left: 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    transition: transform .22s ease, width .22s ease;
    width: var(--sidebar-collapsed);
    z-index: 1040;
}

.app-shell.sidebar-expanded .app-sidebar {
    width: var(--sidebar-expanded);
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex: 0 0 auto;
    height: var(--topbar-height);
    justify-content: center;
    padding: .5rem;
}

.brand-link {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.brand-logo {
    height: 48px;
    object-fit: contain;
}

.brand-logo-small {
    display: block;
    width: 48px;
}

.brand-logo-full {
    display: none;
    max-width: 220px;
    width: 100%;
}

.app-shell.sidebar-expanded .brand-logo-small {
    display: none;
}

.app-shell.sidebar-expanded .brand-logo-full {
    display: block;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: .85rem .6rem;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-section-label {
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: transparent;
    font-size: 0;
    height: 0;
    margin: .9rem .7rem;
    overflow: hidden;
    padding: 0;
    white-space: nowrap;
}

.nav-section-label:first-child {
    margin-top: 0;
}

.app-shell.sidebar-expanded .nav-section-label {
    border-top: 0;
    color: #79a1ce;
    font-size: .64rem;
    font-weight: 850;
    height: auto;
    letter-spacing: .09em;
    margin: 0;
    overflow: visible;
    padding: 1.15rem .85rem .45rem;
    text-transform: uppercase;
}

.sidebar-link {
    align-items: center;
    border-radius: .7rem;
    color: #d8e9ff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    margin: .25rem 0;
    min-height: 46px;
    position: relative;
    transition: background .18s ease, color .18s ease;
    width: 100%;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #147fe8, #269df2);
    box-shadow: 0 12px 25px rgba(20, 127, 232, .25);
    color: #fff;
}

.sidebar-link.is-disabled {
    cursor: default;
    opacity: .62;
}

.sidebar-link i {
    align-items: center;
    display: inline-flex;
    flex: 0 0 24px;
    font-size: 1.15rem;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.sidebar-link span {
    display: none;
    font-size: .84rem;
    font-weight: 700;
    margin-left: .8rem;
    white-space: nowrap;
}

.app-shell.sidebar-expanded .sidebar-link {
    justify-content: flex-start;
    padding: 0 .85rem;
}

.app-shell.sidebar-expanded .sidebar-link span {
    display: inline;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex: 0 0 auto;
    padding: .8rem .6rem 1rem;
}

.system-status {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border-radius: .7rem;
    color: #fff;
    display: flex;
    gap: .75rem;
    justify-content: center;
    min-height: 50px;
    overflow: hidden;
    width: 56px;
}

.status-dot {
    background: #23c47c;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(35, 196, 124, .12);
    flex: 0 0 12px;
    height: 12px;
    width: 12px;
}

.status-copy {
    display: none;
    line-height: 1.1;
    white-space: nowrap;
}

.status-copy strong,
.status-copy small {
    display: block;
}

.status-copy strong {
    font-size: .76rem;
}

.status-copy small {
    color: #91b0d4;
    font-size: .65rem;
    margin-top: .2rem;
}

.app-shell.sidebar-expanded .system-status {
    justify-content: flex-start;
    padding: .7rem .85rem;
    width: 100%;
}

.app-shell.sidebar-expanded .status-copy {
    display: block;
}

.app-main-shell {
    min-height: 100vh;
}

.app-topbar {
    align-items: center;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    height: var(--topbar-height);
    justify-content: space-between;
    padding: 0 1.15rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-left,
.topbar-actions,
.topbar-user {
    align-items: center;
    display: flex;
    gap: .65rem;
    min-width: 0;
}

.topbar-user {
    border-radius: .65rem;
    color: inherit;
    padding: .3rem .5rem;
    text-decoration: none;
    transition: .18s ease;
}

.topbar-user:hover {
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    color: inherit;
}

.topbar-icon-btn {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .65rem;
    color: var(--text);
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    transition: .18s ease;
    width: 42px;
}

.topbar-icon-btn:hover {
    background: color-mix(in srgb, var(--primary) 9%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    color: var(--primary);
}

.topbar-icon-btn i {
    font-size: 1.05rem;
}

.topbar-context {
    line-height: 1.1;
}

.topbar-context strong,
.topbar-context small {
    display: block;
}

.topbar-context strong {
    font-size: .82rem;
}

.topbar-context small {
    color: var(--muted);
    font-size: .67rem;
    margin-top: .2rem;
}

.notification-widget {
    position: relative;
}

.notification-bell-btn {
    position: relative;
}

.notification-badge {
    align-items: center;
    background: #e0434f;
    border-radius: 1rem;
    color: #fff;
    display: inline-flex;
    font-size: .62rem;
    font-weight: 800;
    height: 1.1rem;
    justify-content: center;
    min-width: 1.1rem;
    padding: 0 .3rem;
    position: absolute;
    right: -.25rem;
    top: -.25rem;
}

.notification-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .85rem;
    box-shadow: var(--shadow);
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + .6rem);
    width: 23rem;
    z-index: 1030;
}

.notification-panel-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: .75rem .95rem;
}

.notification-panel-actions {
    align-items: center;
    display: flex;
    gap: .7rem;
}

.notification-panel-actions a {
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.notification-mark-all-btn {
    background: none;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    padding: 0;
}

.notification-mark-all-btn:disabled {
    color: var(--muted);
    cursor: default;
}

.notification-panel-list {
    max-height: 22rem;
    overflow-y: auto;
}

.notification-panel-empty {
    color: var(--muted);
    font-size: .82rem;
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
}

.notification-panel-footer {
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 600;
    padding: .55rem .95rem;
    text-align: center;
}

.notification-item {
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    color: var(--text);
    display: block;
    padding: .7rem .95rem;
    text-decoration: none;
    transition: background .15s ease;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item:hover {
    background: var(--surface-soft);
}

.notification-item.is-unread {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    border-left-color: var(--primary);
}

.notification-item.severity-warning.is-unread {
    border-left-color: #d99424;
}

.notification-item.severity-danger.is-unread {
    border-left-color: #d9434f;
}

.notification-item-title {
    align-items: center;
    display: flex;
    font-size: .84rem;
    font-weight: 700;
    gap: .4rem;
    justify-content: space-between;
}

.notification-item-message {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
    margin: .25rem 0 0;
}

.notification-item-time {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}

.notification-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-directory-table td {
    vertical-align: middle;
}

.notification-row-unread {
    background: color-mix(in srgb, var(--primary) 5%, transparent);
}

.notification-row-title {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    min-width: 20rem;
}

.notification-row-title p {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
    margin: .2rem 0 .45rem;
    max-width: 45rem;
}

.notification-row-icon {
    align-items: center;
    border-radius: .8rem;
    color: #fff;
    display: inline-flex;
    flex: 0 0 2.35rem;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.notification-row-icon-info {
    background: #147fe8;
}

.notification-row-icon-warning {
    background: #d99424;
}

.notification-row-icon-danger {
    background: #d9434f;
}

.notification-severity-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: .68rem;
    font-weight: 850;
    padding: .25rem .55rem;
}

.notification-severity-info {
    background: color-mix(in srgb, #147fe8 16%, var(--surface));
    color: #2a8dea;
}

.notification-severity-warning {
    background: color-mix(in srgb, #d99424 16%, var(--surface));
    color: #d99424;
}

.notification-severity-danger {
    background: color-mix(in srgb, #d9434f 16%, var(--surface));
    color: #e34c58;
}

.status-pending {
    background: rgba(217, 148, 36, .13);
    color: #d99424;
}

.user-avatar,
.session-avatar {
    align-items: center;
    background: linear-gradient(145deg, #147fe8, #0866c5);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 850;
    height: 40px;
    justify-content: center;
    text-transform: uppercase;
    width: 40px;
}

.user-meta {
    flex-direction: column;
    line-height: 1.1;
    max-width: 12rem;
}

.user-meta strong,
.user-meta small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    font-size: .76rem;
}

.user-meta small {
    color: var(--muted);
    font-size: .65rem;
    margin-top: .2rem;
}

.sidebar-overlay {
    display: none;
}

.app-page {
    padding: clamp(1.25rem, 2.5vw, 2.5rem);
}

/* Dashboard */
.page-heading {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-heading h1 {
    font-size: clamp(1.7rem, 2.5vw, 2.35rem);
    font-weight: 850;
    letter-spacing: -.04em;
    margin: 0 0 .3rem;
}

.page-heading p,
.section-heading p,
.panel-heading p {
    color: var(--muted);
    font-size: .85rem;
    margin: 0;
}

.page-heading-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.page-heading-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 750;
    gap: .45rem;
    min-height: 42px;
    padding-inline: 1rem;
}

.breadcrumb-lite {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: .73rem;
    gap: .5rem;
}

.breadcrumb-lite a {
    color: var(--primary);
}

.dashboard-hero {
    align-items: center;
    background: linear-gradient(120deg, #075e98, #087dcc 58%, #21a9e6);
    border-radius: 1.15rem;
    box-shadow: 0 16px 35px rgba(8, 111, 188, .2);
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.4rem;
    min-height: 100px;
    overflow: hidden;
    padding: clamp(1.1rem, 2vw, 1.6rem) clamp(1.4rem, 3vw, 2rem);
    position: relative;
}

.dashboard-hero::after {
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    height: 18rem;
    position: absolute;
    right: -5rem;
    top: -8rem;
    width: 18rem;
}

.hero-kicker {
    color: #bce7ff;
    margin-bottom: .55rem;
}

.dashboard-hero h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    font-weight: 850;
    letter-spacing: -.04em;
    margin: 0;
}

.hero-period {
    background: rgba(3, 51, 95, .28);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    min-width: 9rem;
    padding: .85rem 1rem;
    position: relative;
    text-align: right;
    z-index: 1;
}

.hero-period small,
.hero-period span {
    color: #d2edff;
    font-size: .68rem;
}

.hero-period strong {
    font-size: 1.45rem;
}

.dashboard-section,
.dashboard-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: clamp(1rem, 2vw, 1.4rem);
}

.section-heading,
.panel-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-heading h2,
.panel-heading h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 .2rem;
}

.data-status,
.panel-badge {
    align-items: center;
    background: color-mix(in srgb, #21a866 12%, var(--surface));
    border-radius: 2rem;
    color: #168250;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .67rem;
    font-weight: 750;
    gap: .4rem;
    padding: .45rem .65rem;
}

.panel-badge {
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary);
}

.kpi-card {
    align-items: flex-start;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .9rem;
    display: flex;
    gap: .9rem;
    min-height: 128px;
    padding: 1rem;
}

.kpi-icon {
    align-items: center;
    border-radius: .75rem;
    color: #fff;
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 1.1rem;
    height: 42px;
    justify-content: center;
}

.kpi-blue { background: #147fe8; }
.kpi-green { background: #19b969; }
.kpi-purple { background: #7454e8; }
.kpi-cyan { background: #0eb5d1; }
.kpi-red { background: #dc3545; }

.performance-year-form {
    align-items: flex-end;
    display: flex;
    gap: .65rem;
}

.performance-year-form .form-control {
    width: 8rem;
}

.performance-chart {
    display: block;
    height: auto;
    width: 100%;
}

.performance-chart-grid {
    stroke: var(--border);
    stroke-width: 1;
}

.performance-chart-axis {
    fill: var(--muted);
    font-size: 11px;
}

.performance-chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.performance-chart-dot {
    fill: var(--primary);
    pointer-events: none;
    stroke: var(--surface);
    stroke-width: 2;
}

.performance-chart-hit {
    cursor: pointer;
    fill: transparent;
}

.performance-chart-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

.performance-chart-point:hover .performance-chart-tooltip {
    opacity: 1;
}

.performance-chart-tooltip rect {
    fill: var(--text);
}

.performance-chart-tooltip text {
    fill: var(--surface);
    font-size: 11px;
    font-weight: 750;
}

.kpi-card small,
.kpi-card strong,
.kpi-card p {
    display: block;
}

.kpi-card small {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
}

.kpi-card strong {
    font-size: 1.45rem;
    line-height: 1.15;
    margin: .18rem 0;
}

.kpi-card p {
    color: var(--muted);
    font-size: .66rem;
    margin: 0;
}

.dashboard-occupancy-list {
    display: grid;
    gap: .7rem;
}

.dashboard-occupancy-row {
    align-items: center;
    color: var(--text);
    display: grid;
    gap: .8rem;
    grid-template-columns: minmax(100px, .8fr) 2fr auto;
}

.dashboard-occupancy-name {
    font-size: .8rem;
    font-weight: 700;
}

.dashboard-occupancy-track {
    background: var(--border);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.dashboard-occupancy-fill {
    background: #20b66e;
    height: 100%;
    width: 0;
}

.dashboard-occupancy-fill.is-warning {
    background: #e0a72a;
}

.dashboard-occupancy-fill.is-over {
    background: #d3453f;
}

.dashboard-occupancy-fill[data-percent="10"] { width: 10%; }
.dashboard-occupancy-fill[data-percent="20"] { width: 20%; }
.dashboard-occupancy-fill[data-percent="30"] { width: 30%; }
.dashboard-occupancy-fill[data-percent="40"] { width: 40%; }
.dashboard-occupancy-fill[data-percent="50"] { width: 50%; }
.dashboard-occupancy-fill[data-percent="60"] { width: 60%; }
.dashboard-occupancy-fill[data-percent="70"] { width: 70%; }
.dashboard-occupancy-fill[data-percent="80"] { width: 80%; }
.dashboard-occupancy-fill[data-percent="90"] { width: 90%; }
.dashboard-occupancy-fill[data-percent="100"] { width: 100%; }

.dashboard-occupancy-count {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.dashboard-pending-list {
    display: grid;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-pending-list li a {
    align-items: flex-start;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .7rem;
    color: var(--text);
    display: flex;
    gap: .65rem;
    padding: .7rem .85rem;
}

.dashboard-pending-list li a:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.dashboard-pending-list li a i {
    font-size: 1rem;
    margin-top: .1rem;
}

.dashboard-pending-list li a span {
    font-size: .78rem;
    line-height: 1.4;
}

.dashboard-quicklink-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.dashboard-quicklink {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .8rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem .6rem;
    text-align: center;
}

.dashboard-quicklink:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    color: var(--primary);
}

.dashboard-quicklink i {
    font-size: 1.3rem;
}

.dashboard-quicklink span {
    font-size: .74rem;
    font-weight: 700;
}

.session-profile {
    align-items: center;
    display: flex;
    gap: .75rem;
    padding: .5rem 0 1.25rem;
}

.session-avatar {
    height: 48px;
    width: 48px;
}

.session-profile strong,
.session-profile small {
    display: block;
}

.session-profile strong {
    font-size: .85rem;
}

.session-profile small {
    color: var(--muted);
    font-size: .7rem;
}

.session-details {
    border-top: 1px solid var(--border);
    margin: 0;
}

.session-details > div {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: .75rem 0;
}

.session-details dt,
.session-details dd {
    font-size: .72rem;
    margin: 0;
}

.session-details dt {
    color: var(--muted);
    font-weight: 600;
}

.session-details dd {
    font-weight: 750;
    text-align: right;
}

.audit-details-hint {
    align-items: flex-start;
    color: var(--muted);
    display: flex;
    font-size: .72rem;
    gap: .4rem;
    margin: .85rem 0;
}

.audit-details-hint i {
    margin-top: .15rem;
}

.audit-details-metadata {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .6rem;
    font-size: .72rem;
    margin: 0;
    max-height: 260px;
    overflow: auto;
    padding: .75rem .9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.preference-toast {
    background: #102644;
    border: 1px solid #2a4d72;
    border-radius: .7rem;
    bottom: 1.25rem;
    color: #fff;
    font-size: .75rem;
    font-weight: 650;
    opacity: 0;
    padding: .75rem 1rem;
    pointer-events: none;
    position: fixed;
    right: 1.25rem;
    transform: translateY(.75rem);
    transition: .2s ease;
    z-index: 1200;
}

.preference-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.preference-toast.is-error {
    background: #7a2731;
    border-color: #a74753;
}

.sidebar-flyout-label {
    background: #13253f;
    border: 1px solid #28496f;
    border-radius: .45rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    opacity: 0;
    padding: .45rem .65rem;
    pointer-events: none;
    position: fixed;
    transform: translateY(-50%) translateX(-.3rem);
    transition: opacity .14s ease, transform .14s ease;
    white-space: nowrap;
    z-index: 1200;
}

.sidebar-flyout-label.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Matrículas */
.enrollment-summary {
    align-items: center;
    background: linear-gradient(120deg, #075e98, #138ed7);
    border-radius: 1rem;
    box-shadow: 0 14px 30px rgba(8, 111, 188, .16);
    color: #fff;
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    min-height: 100px;
    padding: 1.25rem 1.4rem;
}

.enrollment-summary .summary-icon {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .8rem;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 1.25rem;
    height: 48px;
    justify-content: center;
}

.enrollment-summary small,
.enrollment-summary strong {
    display: block;
}

.enrollment-summary small {
    color: #c9eaff;
    font-size: .68rem;
    font-weight: 750;
}

.enrollment-summary strong {
    font-size: 1.6rem;
    line-height: 1.1;
}

.enrollment-summary p {
    color: #d7efff;
    font-size: .78rem;
    margin: 0 0 0 auto;
}

.enrollment-panel {
    padding: 0;
    overflow: hidden;
}

.enrollment-filters {
    align-items: end;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: .85rem;
    grid-template-columns: minmax(16rem, 2fr) repeat(3, minmax(8rem, 1fr)) auto;
    padding: 1.2rem;
}

.enrollment-filters .form-label {
    color: var(--muted);
    font-size: .68rem;
    font-weight: 750;
    margin-bottom: .4rem;
}

.enrollment-filters .form-control,
.enrollment-filters .form-select,
.enrollment-filters .input-group-text {
    background-color: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
    min-height: 42px;
}

.filter-actions {
    display: flex;
    gap: .45rem;
}

.filter-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 700;
    gap: .4rem;
    min-height: 42px;
}

.enrollment-table-wrap {
    min-height: 18rem;
}

.enrollment-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    font-size: .75rem;
}

.enrollment-table thead th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .035em;
    padding: .8rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.enrollment-table tbody td {
    padding: .78rem 1rem;
    vertical-align: middle;
}

.student-cell {
    align-items: center;
    display: flex;
    gap: .7rem;
    min-width: 14rem;
}

.student-initial {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    border-radius: .65rem;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 36px;
    font-weight: 850;
    height: 36px;
    justify-content: center;
    text-transform: uppercase;
}

.student-cell strong,
.student-cell small,
.table-primary-text,
.table-secondary-text {
    display: block;
}

.student-cell strong,
.table-primary-text {
    color: var(--text);
    font-size: .78rem;
}

.student-cell small,
.table-secondary-text {
    color: var(--muted);
    font-size: .68rem;
    margin-top: .15rem;
}

.registration-number {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .45rem;
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .72rem;
    padding: .3rem .45rem;
    white-space: nowrap;
}

.status-pill {
    border-radius: 2rem;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 750;
    padding: .35rem .55rem;
    white-space: nowrap;
}

.status-pill-btn {
    border: 0;
    cursor: pointer;
    transition: transform .1s ease;
}

.status-pill-btn:hover {
    transform: scale(1.06);
}

.status-active {
    background: color-mix(in srgb, #19b969 13%, var(--surface));
    color: #159455;
}

.status-inactive {
    background: color-mix(in srgb, #f2a51a 14%, var(--surface));
    color: #b27309;
}

.status-disabled {
    background: color-mix(in srgb, #e85b67 13%, var(--surface));
    color: #c03b47;
}

.empty-table {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: .3rem;
    justify-content: center;
    min-height: 15rem;
}

.empty-table i {
    font-size: 1.5rem;
}

.empty-table strong {
    color: var(--text);
}

.table-footer {
    align-items: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    font-size: .68rem;
    justify-content: space-between;
    padding: .85rem 1rem;
}

.table-footer .page-link {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
}

.table-footer .page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Select pesquisável global */
.car-native-select {
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.car-select {
    min-width: 0;
    position: relative;
    width: 100%;
}

.car-select-search {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .6rem;
    color: var(--text);
    font-size: .75rem;
    min-height: 42px;
    outline: 0;
    padding: .55rem 2.4rem .55rem .8rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    width: 100%;
}

.car-select-search::placeholder {
    color: var(--muted);
}

.car-select-search:focus,
.car-select.is-open .car-select-search {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 12%, transparent);
}

.car-select-icon {
    align-items: center;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    position: absolute;
    right: .2rem;
    top: 0;
    transition: transform .18s ease;
    width: 2.1rem;
}

.car-select.is-open .car-select-icon {
    transform: rotate(180deg);
}

.car-select-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .7rem;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    display: none;
    left: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: .35rem;
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    z-index: 1100;
}

.car-select.is-open .car-select-menu {
    display: block;
}

.car-select.is-dropup .car-select-menu {
    bottom: calc(100% + 7px);
    top: auto;
}

.car-select-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: .55rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    font-size: .73rem;
    font-weight: 650;
    justify-content: flex-start;
    min-height: 38px;
    padding: .5rem .65rem;
    text-align: left;
    width: 100%;
}

.car-select-option:hover,
.car-select-option.is-selected,
.car-select-option.is-keyboard-active {
    background: color-mix(in srgb, var(--primary) 11%, var(--surface));
    color: var(--primary);
}

.car-select-option:disabled,
.car-select.is-disabled {
    cursor: not-allowed;
    opacity: .58;
}

.car-select-empty {
    color: var(--muted);
    font-size: .7rem;
    padding: .85rem .6rem;
    text-align: center;
}

select:invalid + .car-select .car-select-search {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

html[data-theme="dark"] .car-select-menu {
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.student-toolbar-main .car-select-search,
.enrollment-filters .car-select-search {
    height: 42px;
}

/* Diretório de alunos — padrão de consulta do Timob */
.page-kicker {
    color: var(--primary);
    display: block;
    font-size: .64rem;
    font-weight: 850;
    letter-spacing: .12em;
    margin-bottom: .3rem;
}

.student-kpi-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.staff-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-kpi-card {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .9rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: .85rem;
    min-height: 94px;
    padding: 1rem;
}

.student-kpi-card > i {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    border-radius: .7rem;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 1.05rem;
    height: 42px;
    justify-content: center;
}

.student-kpi-card span,
.student-kpi-card strong {
    display: block;
}

.student-kpi-card span {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 700;
}

.student-kpi-card strong {
    font-size: 1.4rem;
    line-height: 1.15;
    margin-top: .12rem;
}

.student-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: .9rem;
}

.student-toolbar-main {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: .65rem;
}

.student-toolbar-main .student-search-wrap {
    flex: 2 1 18rem;
}

.student-toolbar-main .form-select,
.student-toolbar-main .car-select {
    flex: 1 1 9rem;
    width: auto;
}

.audit-date-range {
    align-items: center;
    display: flex;
    flex: 1 1 20rem;
    gap: .5rem;
}

.audit-date-range input[type="date"] {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.audit-date-range span {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: .74rem;
    font-weight: 700;
}

.student-search-wrap {
    position: relative;
}

.student-search-wrap i {
    color: var(--muted);
    left: .85rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.student-search-wrap input,
.student-toolbar .form-select {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .6rem;
    color: var(--text);
    font-size: .8rem;
    height: 42px;
    outline: none;
    width: 100%;
}

.student-search-wrap input {
    padding: .6rem .8rem .6rem 2.45rem;
}

.student-search-wrap input:focus,
.student-toolbar .form-select:focus {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--primary) 11%, transparent);
}

.student-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    gap: .5rem;
}

.student-toolbar-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .77rem;
    font-weight: 700;
    gap: .4rem;
    height: 42px;
}

.student-table-card {
    overflow: hidden;
    padding: 0;
}

.students-ajax-loading,
.student-list-error {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 22rem;
}

.students-ajax-loading {
    flex-direction: column;
    gap: .65rem;
}

.students-ajax-loading span {
    animation: student-skeleton 1.1s ease-in-out infinite alternate;
    background: color-mix(in srgb, var(--muted) 13%, var(--surface));
    border-radius: .45rem;
    display: block;
    height: 42px;
    width: min(92%, 70rem);
}

.students-ajax-loading span:nth-child(2) { animation-delay: .12s; }
.students-ajax-loading span:nth-child(3) { animation-delay: .24s; }

.students-ajax-loading strong {
    color: var(--muted);
    font-size: .68rem;
    margin-top: .35rem;
}

.student-list-error {
    color: var(--muted);
    flex-direction: column;
    gap: .7rem;
}

.student-list-error i {
    color: #d44b58;
    font-size: 1.5rem;
}

@keyframes student-skeleton {
    from { opacity: .45; }
    to { opacity: 1; }
}

.student-table-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.15rem;
}

.student-table-header h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 .15rem;
}

.student-table-header p {
    color: var(--muted);
    font-size: .72rem;
    margin: 0;
}

.student-directory-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-hover-bg: color-mix(in srgb, var(--primary) 4%, var(--surface));
    --bs-table-border-color: var(--border);
    font-size: .78rem;
}

.student-directory-table thead th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .035em;
    padding: .75rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.student-directory-table tbody td {
    padding: .8rem 1rem;
}

.student-table-action-btn {
    align-items: center;
    color: #fff;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 36px;
}

/* Modal administrativo — padrão visual compartilhado com o Timob */
.admin-modal-content {
    background: var(--surface);
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
    color: var(--text);
    overflow: hidden;
}

/* Camada visual entre um modal de confirmação e o modal que permanece abaixo. */
.modal.is-stacked-modal {
    backdrop-filter: blur(2px);
    background: rgba(2, 12, 28, .72);
    z-index: var(--stacked-modal-z-index, 1075);
}

html[data-theme="light"] .modal.is-stacked-modal {
    background: rgba(5, 20, 42, .58);
}

.admin-modal-header {
    align-items: flex-start;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
    border: 0;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.25rem 1.4rem;
    width: 100%;
}

.admin-modal-header > div {
    min-width: 0;
}

.admin-modal-header .page-kicker {
    color: #9dd2ff;
}

.admin-modal-header .modal-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 850;
    margin: .15rem 0 .2rem;
}

.admin-modal-header .text-muted {
    color: #c8d7ea !important;
    display: block;
    font-size: .72rem;
}

.admin-modal-close {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: .65rem;
    color: #fff;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, border-color .15s ease;
    width: 38px;
}

.admin-modal-close:hover,
.admin-modal-close:focus-visible {
    background: rgba(255, 255, 255, .2);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
    outline: 0;
}

.admin-modal-close i {
    font-size: 1rem;
    line-height: 1;
}

.admin-modal-body {
    background: var(--surface);
    padding: 1.4rem;
}

.admin-modal-footer {
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
    gap: .6rem;
    padding: 1rem 1.4rem;
}

/* Vários modais admin envolvem .modal-body + .modal-footer num <form>, quebrando o
   layout flex que .modal-content (e o recurso modal-dialog-scrollable) espera entre
   header/body/footer. display:contents remove o <form> do fluxo de caixa sem tirar o
   comportamento de submit, deixando body/footer voltarem a ser filhos flex diretos. */
.admin-modal-content > form {
    display: contents;
}

.deactivate-warning {
    align-items: flex-start;
    background: color-mix(in srgb, #dc3545 9%, var(--surface));
    border: 1px solid color-mix(in srgb, #dc3545 30%, var(--border));
    border-radius: .75rem;
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
    padding: .85rem;
}

.deactivate-warning > i {
    color: #dc3545;
    font-size: 1.1rem;
}

.deactivate-warning strong,
.deactivate-warning span {
    display: block;
}

.deactivate-warning strong .promotion-inline-year {
    display: inline;
    font-weight: 800;
}

.reactivate-notice {
    align-items: flex-start;
    background: color-mix(in srgb, #198754 9%, var(--surface));
    border: 1px solid color-mix(in srgb, #198754 30%, var(--border));
    border-radius: .75rem;
    display: flex;
    gap: .75rem;
    padding: .85rem;
}

.reactivate-notice > i {
    color: #198754;
    font-size: 1.1rem;
}

.reactivate-notice strong,
.reactivate-notice span {
    display: block;
}

.reactivate-notice strong {
    font-size: .76rem;
}

.reactivate-notice span {
    color: var(--muted);
    font-size: .68rem;
    margin-top: .15rem;
}

.deactivate-warning strong {
    font-size: .76rem;
}

.deactivate-warning span {
    color: var(--muted);
    font-size: .68rem;
    margin-top: .15rem;
}

.document-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
}

.document-picker-item {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .5rem;
    display: flex;
    gap: .75rem;
    padding: .9rem 1rem;
    text-align: left;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}

.document-picker-item:hover,
.document-picker-item:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.document-picker-item i {
    color: var(--primary);
    flex-shrink: 0;
    font-size: 1.4rem;
    margin-top: .1rem;
}

.document-picker-item strong {
    display: block;
    color: var(--text);
}

.document-picker-item small {
    color: var(--muted);
}

.ajax-pagination-bar {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    padding: .85rem 1rem;
}

.ajax-pagination-count {
    color: var(--muted);
    font-size: .68rem;
    margin: 0;
}

.ajax-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.ajax-page-button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    display: inline-flex;
    font-size: .72rem;
    font-weight: 650;
    height: 36px;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
    width: 36px;
}

.ajax-page-button:hover,
.ajax-page-button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ajax-page-button:hover {
    transform: translateY(-1px);
}

.ajax-page-ellipsis {
    color: var(--muted);
    font-size: .76rem;
    line-height: 36px;
    padding: 0 .2rem;
}

.student-modal-content {
    background: var(--bg);
    color: var(--text);
}

.student-view-loading,
.student-view-error {
    align-items: center;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    min-height: 100vh;
}

.student-view-error i {
    color: #d44b58;
    font-size: 2rem;
}

.student-view-hero {
    align-items: center;
    background: linear-gradient(120deg, #075e98, #087dcc 60%, #21a9e6);
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 150px;
    padding: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
}

.student-view-identity {
    align-items: center;
    display: flex;
    gap: 1rem;
    min-width: 0;
}

.student-view-avatar {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 1rem;
    display: inline-flex;
    flex: 0 0 70px;
    font-size: 1.8rem;
    font-weight: 850;
    height: 70px;
    justify-content: center;
    text-transform: uppercase;
}

.student-view-hero .page-kicker {
    color: #bce7ff;
}

.student-view-hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -.035em;
    margin: 0;
}

.student-view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-top: .65rem;
}

.student-view-meta span {
    color: #d8f0ff;
    font-size: .78rem;
}

.student-view-hero-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .65rem;
}

.student-view-hero-actions .btn {
    align-items: center;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 750;
    gap: .4rem;
    min-height: 42px;
    white-space: nowrap;
}

/* Botões de ação devem preservar ícone e rótulo na mesma linha. */
.page-heading-actions .btn,
.filter-actions .btn,
.student-toolbar-actions .btn,
.enrollment-wizard-footer-actions .btn,
.modal-footer .btn,
.student-process-actions .btn,
.process-history-filter-actions .btn,
.process-history-actions .btn,
.effective-change-actions .btn,
.teacher-note-form-footer .btn {
    white-space: nowrap;
}

.student-modal-close {
    align-items: center;
    background: rgba(3, 51, 95, .28);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .7rem;
    color: #fff;
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
}

.student-view-body {
    padding: clamp(1rem, 2.5vw, 2rem);
}

.student-view-kpis {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-view-kpis > div,
.student-detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .9rem;
    box-shadow: var(--shadow);
}

.student-view-kpis > div {
    padding: 1rem;
}

.student-view-kpis span,
.student-view-kpis strong {
    display: block;
}

.student-view-kpis span {
    color: var(--muted);
    font-size: .74rem;
}

.student-view-kpis strong {
    font-size: 1.05rem;
    margin-top: .2rem;
}

.student-detail-card {
    padding: 1rem;
}

.student-detail-card h3 {
    align-items: center;
    display: flex;
    font-size: .92rem;
    font-weight: 800;
    gap: .5rem;
    margin: 0 0 .9rem;
}

.student-detail-card h3 i {
    color: var(--primary);
}

.student-detail-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .9rem;
}

.student-detail-title h3 {
    margin-bottom: 0;
}

.student-detail-card dl {
    margin: 0;
}

.student-detail-card dl > div {
    display: contents;
}

.student-detail-card dt,
.student-detail-card dd {
    border-bottom: 1px solid var(--border);
    font-size: .78rem;
    margin: 0;
    padding: .55rem 0;
}

.teacher-note-form {
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.teacher-note-form-footer {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: .75rem;
}

.teacher-note-form-footer .wizard-submit-error { flex: 1; }
.teacher-note-list,
.teacher-status-list { display: grid; gap: .75rem; }

.teacher-note-item,
.teacher-status-list > div {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: .85rem 1rem;
}

.teacher-note-meta {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.teacher-note-meta strong { font-size: .78rem; }
.teacher-note-meta time,
.teacher-status-list small { color: var(--muted); font-size: .7rem; }
.teacher-status-list > div strong + small { display: block; margin-top: .25rem; }
.teacher-note-item p { font-size: .8rem; margin: .55rem 0 0; white-space: normal; }
.teacher-status-list > div p { font-size: .78rem; margin: .55rem 0 .25rem; }

.student-detail-card dt {
    color: var(--muted);
    float: left;
    font-weight: 600;
    width: 45%;
}

.student-detail-card dd {
    font-weight: 700;
    margin-left: 45%;
    text-align: right;
}

.student-detail-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    font-size: .76rem;
}

.student-detail-table th {
    color: var(--muted);
    font-size: .68rem;
    text-transform: uppercase;
}

.guardian-list {
    display: grid;
    gap: .6rem;
}

.guardian-item {
    align-items: flex-start;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .7rem;
    display: flex;
    gap: .65rem;
    padding: .7rem;
}

.guardian-icon {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    border-radius: .55rem;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
}

.guardian-item strong,
.guardian-item small {
    display: block;
}

.guardian-item strong {
    font-size: .8rem;
}

.guardian-item small,
.student-detail-empty {
    color: var(--muted);
    font-size: .72rem;
    margin-top: .12rem;
}

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

.authorized-grid > div {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: .65rem;
    padding: .7rem;
}

.authorized-grid strong,
.authorized-grid span {
    display: block;
}

.authorized-grid strong {
    font-size: .78rem;
}

.authorized-grid span {
    color: var(--muted);
    font-size: .7rem;
    margin-top: .15rem;
}

/* Wizard de matrícula */
.enrollment-wizard {
    background: var(--bg);
    min-height: 100vh;
}

.enrollment-wizard-header {
    align-items: flex-start;
    background: linear-gradient(135deg, #06395c, #087dcc);
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 128px;
    padding: 1.4rem clamp(1.25rem, 3vw, 2.25rem);
}

.enrollment-wizard-header .page-kicker {
    color: #aeddff;
}

.enrollment-wizard-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 850;
    margin: .15rem 0 .3rem;
}

.enrollment-wizard-header p {
    color: #d2ebff;
    font-size: .78rem;
    margin: 0;
}

.enrollment-wizard-head-actions {
    align-items: flex-start;
    display: flex;
    flex: 0 0 auto;
    gap: .8rem;
}

.enrollment-code-preview {
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .8rem;
    min-width: 190px;
    padding: .7rem .9rem;
}

.enrollment-code-preview span,
.enrollment-code-preview strong {
    display: block;
}

.enrollment-code-preview span {
    color: #bfe5ff;
    font-size: .62rem;
}

.enrollment-code-preview strong {
    font-size: .8rem;
    margin-top: .15rem;
    white-space: nowrap;
}

.enrollment-wizard-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: calc(100vh - 128px);
}

.enrollment-wizard-steps {
    background: linear-gradient(180deg, #06152d, #0b1d38);
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 1.2rem .85rem;
}

.enrollment-step-pill {
    background: rgba(255, 255, 255, .06);
    border: 0;
    border-radius: .8rem;
    color: #a9bfd9;
    display: grid;
    gap: 0 .65rem;
    grid-template-areas: "number title" "number subtitle";
    grid-template-columns: 36px 1fr;
    padding: .75rem;
    text-align: left;
}

.enrollment-step-pill > span {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border-radius: .6rem;
    display: flex;
    font-size: .75rem;
    font-weight: 850;
    grid-area: number;
    height: 36px;
    justify-content: center;
}

.enrollment-step-pill strong {
    align-self: end;
    color: #e6f2ff;
    font-size: .74rem;
    grid-area: title;
}

.enrollment-step-pill small {
    font-size: .6rem;
    grid-area: subtitle;
}

.enrollment-step-pill.active {
    background: #fff;
    color: #4e6b8e;
}

.enrollment-step-pill.active > span {
    background: var(--primary);
    color: #fff;
}

.enrollment-step-pill.active strong {
    color: #0c284b;
}

.enrollment-step-pill.is-complete:not(.active) > span {
    background: #168f5a;
    color: #fff;
}

.enrollment-wizard-content {
    min-width: 0;
    padding: 1.4rem 1.5rem 0;
}

.enrollment-step-panel {
    display: none;
    min-height: calc(100vh - 250px);
}

.enrollment-step-panel.active {
    display: block;
}

.enrollment-step-heading {
    align-items: center;
    display: flex;
    gap: .8rem;
    margin-bottom: 1rem;
}

.enrollment-step-heading > i,
.enrollment-heading-between > div > i {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 13%, var(--surface));
    border-radius: .75rem;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 44px;
    font-size: 1.05rem;
    height: 44px;
    justify-content: center;
}

.enrollment-step-heading h3 {
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 .18rem;
}

.enrollment-step-heading p {
    color: var(--muted);
    font-size: .68rem;
    margin: 0;
}

.enrollment-heading-between {
    justify-content: space-between;
}

.wizard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.15rem;
}

.wizard-card-title {
    align-items: center;
    display: flex;
    font-size: .78rem;
    gap: .45rem;
    margin-bottom: .9rem;
}

.wizard-card-title i {
    color: var(--primary);
}

.enrollment-wizard .form-label {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 750;
    margin-bottom: .4rem;
}

.enrollment-wizard .form-control,
.enrollment-wizard .car-select-search {
    background-color: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
    font-size: .76rem;
    min-height: 44px;
}

.enrollment-wizard .form-control.is-loading-cep {
    background-image: linear-gradient(90deg, transparent, rgba(8, 125, 204, .12), transparent);
    background-size: 200% 100%;
    animation: cep-loading 1.1s linear infinite;
}

.cep-help {
    color: var(--muted);
    display: block;
    font-size: .64rem;
}

@keyframes cep-loading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.enrollment-wizard textarea.form-control {
    min-height: auto;
}

.wizard-info,
.wizard-optional-note {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: .7rem;
    color: var(--muted);
    display: flex;
    font-size: .68rem;
    gap: .55rem;
    margin: 0;
    padding: .7rem .8rem;
}

.wizard-info i,
.wizard-optional-note i {
    color: var(--primary);
}

.wizard-optional-note {
    margin-top: .8rem;
}

.authorized-form-list {
    display: grid;
    gap: .75rem;
}

.wizard-validation-message,
.wizard-submit-error {
    background: color-mix(in srgb, #dc3545 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #dc3545 35%, var(--border));
    border-radius: .7rem;
    color: #c43744;
    font-size: .7rem;
    font-weight: 700;
    margin-top: .8rem;
    padding: .7rem .85rem;
}

/* Mantém a mensagem separada do primeiro bloco nos formulários em etapas. */
.enrollment-wizard-content > form > .wizard-submit-error {
    margin-bottom: 1rem;
}

.enrollment-wizard-footer {
    align-items: center;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-top: 1px solid var(--border);
    bottom: 0;
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr auto 1fr;
    margin: 1.5rem -1.5rem 0;
    padding: .8rem 1.5rem;
    position: sticky;
    z-index: 20;
}

.enrollment-wizard-footer > span {
    color: var(--muted);
    font-size: .68rem;
    text-align: center;
}

.enrollment-wizard-footer [data-wizard-previous],
.enrollment-wizard-footer [data-user-previous] {
    justify-self: start;
    width: auto;
}

.enrollment-wizard-footer-actions {
    display: flex;
    gap: .55rem;
    justify-self: end;
}

.enrollment-wizard-footer .btn {
    align-items: center;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 750;
    gap: .4rem;
    min-height: 42px;
}

@media (max-width: 1199.98px) {
    .student-toolbar-main .student-search-wrap {
        flex-basis: 100%;
    }
}

@media (max-width: 991.98px) {
    .enrollment-wizard-layout {
        grid-template-columns: 1fr;
    }

    .enrollment-wizard-steps {
        display: grid;
        grid-template-columns: repeat(5, minmax(150px, 1fr));
        overflow-x: auto;
    }

    .enrollment-step-panel {
        min-height: auto;
    }

    .student-kpi-grid,
    .student-view-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .enrollment-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .auth-shell {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 3rem 1.5rem;
    }

    .auth-logo-mobile {
        display: block;
        margin-bottom: 2rem;
        max-height: 4.5rem;
        max-width: 9rem;
        width: 38%;
    }
}

@media (max-width: 767.98px) {
    .student-directory-table thead {
        display: none;
    }

    .student-directory-table,
    .student-directory-table tbody,
    .student-directory-table tr,
    .student-directory-table td {
        display: block;
        width: 100%;
    }

    .student-directory-table tr {
        border-bottom: 1px solid var(--border);
        padding: .7rem;
    }

    .student-directory-table tbody td {
        border: 0;
        padding: .4rem .3rem;
        text-align: left !important;
    }

    .student-directory-table td:not(:first-child)::before {
        color: var(--muted);
        content: attr(data-label);
        display: block;
        font-size: .58rem;
        font-weight: 800;
        margin-bottom: .2rem;
        text-transform: uppercase;
    }

    .app-shell,
    .app-shell.sidebar-expanded {
        padding-left: 0;
    }

    .app-sidebar,
    .app-shell.sidebar-expanded .app-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-expanded);
    }

    .app-shell.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-mobile-open .brand-logo-small {
        display: none;
    }

    .app-shell.sidebar-mobile-open .brand-logo-full,
    .app-shell.sidebar-mobile-open .sidebar-link span,
    .app-shell.sidebar-mobile-open .status-copy {
        display: block;
    }

    .app-shell.sidebar-mobile-open .nav-section-label {
        border-top: 0;
        color: #79a1ce;
        display: block;
        font-size: .64rem;
        font-weight: 850;
        height: auto;
        letter-spacing: .09em;
        margin: 0;
        overflow: visible;
        padding: 1.15rem .85rem .45rem;
        text-transform: uppercase;
    }

    .app-shell.sidebar-mobile-open .sidebar-link {
        justify-content: flex-start;
        padding: 0 .85rem;
    }

    .app-shell.sidebar-mobile-open .system-status {
        justify-content: flex-start;
        padding: .7rem .85rem;
        width: 100%;
    }

    .sidebar-overlay {
        background: rgba(3, 14, 30, .62);
        border: 0;
        bottom: 0;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity .2s ease;
        z-index: 1035;
    }

    .app-shell.sidebar-mobile-open .sidebar-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading-actions {
        align-items: flex-start;
        width: 100%;
    }

    .breadcrumb-lite {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .enrollment-wizard-header {
        flex-wrap: wrap;
    }

    .enrollment-wizard-head-actions {
        align-items: stretch;
        order: 3;
        width: 100%;
    }

    .enrollment-code-preview {
        flex: 1;
    }

    .enrollment-wizard-content {
        padding: 1rem 1rem 0;
    }

    .enrollment-heading-between {
        align-items: flex-start;
        flex-direction: column;
    }

    .enrollment-wizard-footer {
        grid-template-columns: 1fr 1fr;
        margin-left: -1rem;
        margin-right: -1rem;
        padding: .75rem 1rem;
    }

    .enrollment-wizard-footer > span {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .enrollment-wizard-footer [data-wizard-previous],
    .enrollment-wizard-footer [data-user-previous],
    .enrollment-wizard-footer-actions {
        justify-content: center;
        justify-self: stretch;
    }

    .enrollment-wizard-footer-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .ajax-pagination-bar {
        flex-direction: column-reverse;
        justify-content: center;
    }

    .ajax-pagination-count {
        text-align: center;
    }

    .student-kpi-grid,
    .student-view-kpis,
    .authorized-grid {
        grid-template-columns: 1fr;
    }

    .student-toolbar-main .form-select,
    .student-toolbar-main .car-select,
    .audit-date-range {
        flex-basis: 100%;
    }

    .student-toolbar-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .student-table-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .6rem;
    }

    .student-view-hero,
    .student-view-identity {
        align-items: flex-start;
    }

    .student-view-hero-actions {
        width: 100%;
    }

    .student-view-avatar {
        flex-basis: 48px;
        font-size: 1.2rem;
        height: 48px;
    }

    .student-view-meta {
        flex-direction: column;
    }

    .enrollment-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .enrollment-summary p {
        flex-basis: 100%;
        margin-left: 0;
    }

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

    .filter-search {
        grid-column: auto;
    }

    .table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
    }

    .app-topbar {
        padding: 0 .75rem;
    }

    .topbar-actions {
        gap: .4rem;
    }

    .topbar-icon-btn {
        height: 39px;
        width: 39px;
    }

    .app-page {
        padding: 1rem;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.25rem;
    }

    .hero-period {
        text-align: left;
    }

    .section-heading,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-progress-item {
        grid-template-columns: 38px 1fr;
    }

    .progress-state {
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Student reports */
.student-report-period-panel { margin-bottom: 1.25rem; }

.student-report-period-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, .55fr) auto auto;
    align-items: end;
    gap: 1rem;
}

.student-report-period-form .form-label {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.student-report-period-form .form-control,
.student-report-period-form .form-select,
.student-report-period-form .btn { min-height: 46px; }

.student-report-units {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.student-report-unit-card { padding: 0; overflow: hidden; }

.student-report-unit-card > header {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.25rem;
    border-bottom: 1px solid #21456f;
    background: linear-gradient(135deg, #06152d 0%, #0a2e59 100%);
}

.student-report-unit-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #0a6fd0, #18a9dc);
    font-size: 1.3rem;
}

.student-report-unit-card header small,
.student-report-unit-card header p { color: #9ecbff; }

.student-report-unit-card header small {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.student-report-unit-card h2 { margin: .12rem 0; color: #fff; font-size: 1.05rem; }
.student-report-unit-card header p { margin: 0; font-size: .78rem; }
.student-amendment-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .45rem;
    padding: .25rem .48rem;
    border-radius: 999px;
    color: #ffe9ad !important;
    background: rgba(245, 158, 11, .18);
    font-size: .66rem !important;
    font-weight: 800;
}

.student-process-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-left: auto;
    padding: .48rem .7rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: #dcecff;
    background: rgba(255, 255, 255, .08);
    font-size: .72rem;
    font-weight: 800;
}

.attendance-unit-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: .55rem;
    margin-left: auto;
}

.attendance-unit-actions .student-process-status { margin-left: 0; }
.attendance-unit-actions .btn { white-space: nowrap; }

.bulk-attendance-warning {
    align-items: flex-start;
    background: color-mix(in srgb, #f59e0b 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #f59e0b 38%, var(--border));
    border-radius: .85rem;
    color: var(--text);
    display: flex;
    gap: .75rem;
    margin-top: 1.25rem;
    padding: .9rem 1rem;
}

.bulk-attendance-warning > i { color: #d78800; font-size: 1.15rem; }
.bulk-attendance-warning p { margin: 0; }
.bulk-attendance-warning strong,
.bulk-attendance-warning span { display: block; }
.bulk-attendance-warning span { color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.student-process-status.is-in_review { color: #ffe69c; background: rgba(255, 193, 7, .13); }
.student-process-status.is-validated { color: #bff5d2; background: rgba(25, 135, 84, .2); }
.student-process-status.is-reopened { color: #ffd1a8; background: rgba(253, 126, 20, .18); }

.student-report-featured-link {
    padding: .8rem .9rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
    border-radius: .75rem;
    color: #fff;
    background: linear-gradient(135deg, #0b62a8, #129bda);
    text-decoration: none;
    box-shadow: 0 .45rem 1rem rgba(11, 120, 208, .16);
}

.student-report-featured-link:hover { color: #fff; transform: translateY(-1px); }
.student-report-featured-link.is-movement { background: linear-gradient(135deg, #163d72, #207bc0); }
.student-report-featured-link.is-value-sheet { background: linear-gradient(135deg, #5b3aa8, #8256d8); }
.student-report-featured-link.is-office { background: linear-gradient(135deg, #17623b, #249968); }
.student-report-featured-link.is-proportional { background: linear-gradient(135deg, #7a3c12, #bd6a24); }
.student-report-featured-link > span {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .6rem;
    background: rgba(255, 255, 255, .15);
}
.student-report-featured-link strong,
.student-report-featured-link small { display: block; }
.student-report-featured-link strong { font-size: .88rem; }
.student-report-featured-link small { margin-top: .08rem; color: rgba(255, 255, 255, .8); font-size: .7rem; }

.student-report-class-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    padding: 1rem;
}

.student-report-document-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    padding: 1rem;
}

.student-report-class-list > a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface-soft);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.student-report-class-list > a:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    transform: translateY(-1px);
}

.student-report-class-list > a > span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

.student-report-class-list strong,
.student-report-class-list small { display: block; }
.student-report-class-list strong { font-size: .86rem; }
.student-report-class-list small { margin-top: .08rem; color: var(--muted); font-size: .7rem; }
.student-report-class-list > a > i { color: var(--muted); }

.student-report-unit-card > footer {
    padding: .75rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface-soft);
    font-size: .7rem;
}

.student-process-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.student-process-detail strong,
.student-process-detail span { display: block; }
.student-process-detail strong { color: var(--text); font-size: .78rem; }
.student-process-detail span { margin-top: .2rem; font-size: .7rem; }
.student-process-actions { flex: 0 0 auto; }
.student-process-actions .btn { min-height: 38px; font-size: .75rem; }
.student-process-confirmation { margin: 0 0 1rem; color: var(--text); line-height: 1.6; }
.student-process-amendment-check {
    margin: 1rem 0;
    padding: .85rem .85rem .85rem 2.4rem;
    border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border));
    border-radius: .7rem;
    background: color-mix(in srgb, #f59e0b 9%, var(--surface));
}
.student-process-amendment-check .form-check-label { color: var(--text); font-size: .76rem; line-height: 1.5; }
.student-amendment-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--surface-soft);
}
.student-amendment-split div { text-align: center; }
.student-amendment-split small,
.student-amendment-split strong { display: block; }
.student-amendment-split small { color: var(--muted); font-size: .7rem; }
.student-amendment-split strong { margin-top: .2rem; color: var(--text); font-size: .9rem; }
.student-amendment-split > i { color: var(--primary); }
.student-amendment-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.student-amendment-rate-card { padding: .85rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); }
.student-amendment-rate-card > strong { display: block; margin-bottom: .65rem; color: var(--text); font-size: .78rem; }
.student-amendment-rate-card > div { display: flex; justify-content: space-between; margin-bottom: .65rem; color: var(--muted); font-size: .72rem; }
.student-amendment-rate-card > div span { color: var(--text); font-weight: 800; }
.student-amendment-rate-card label { color: var(--muted); font-size: .7rem; font-weight: 700; }
.student-amendment-rate-card .input-group { margin-top: .3rem; }
.student-amendment-rule { display: flex; gap: .65rem; margin-top: 1rem; padding: .8rem; border-radius: .7rem; color: var(--muted); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); font-size: .74rem; line-height: 1.5; }
.student-amendment-rule i { color: var(--primary); }

.student-report-next-step,
.student-report-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 1.2rem;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: var(--surface-soft);
}

.student-report-next-step > i,
.student-report-empty > i { color: var(--primary); font-size: 1.4rem; }
.student-report-next-step strong { color: var(--text); font-size: .84rem; }
.student-report-next-step p { margin: .15rem 0 0; font-size: .74rem; }
.student-report-empty { justify-content: center; flex-direction: column; min-height: 220px; text-align: center; }
.student-report-empty h2, .student-report-empty p { margin: 0; }

.effective-change-dialog {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.effective-change-dialog.d-none { display: none !important; }
.effective-change-backdrop { position: absolute; inset: 0; border: 0; background: rgba(3, 14, 32, .76); backdrop-filter: blur(3px); }
.effective-change-panel {
    position: relative;
    width: min(500px, 100%);
    padding: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border));
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .35);
}
.effective-change-panel h3 { margin: .2rem 0 .4rem; font-size: 1.25rem; }
.effective-change-panel p { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; }
.effective-change-icon {
    width: 46px;
    height: 46px;
    margin-bottom: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    color: #fff;
    background: linear-gradient(135deg, #0b62a8, #129bda);
    font-size: 1.2rem;
}
.effective-change-summary { margin-bottom: 1rem; padding: .75rem .85rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface-soft); }
.effective-change-summary small,
.effective-change-summary strong { display: block; }
.effective-change-summary small { margin-bottom: .15rem; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.effective-change-summary strong { font-size: .84rem; }
.effective-change-warning { display: flex; gap: .55rem; margin-top: .85rem; color: var(--muted); font-size: .74rem; }
.effective-change-warning i { color: var(--success); }
.effective-change-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.2rem; }

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

@media (max-width: 767.98px) {
    .student-report-period-form,
    .student-report-units { grid-template-columns: 1fr; }
    .student-report-class-list,
    .student-report-document-list { grid-template-columns: 1fr; }
    .student-report-unit-card > header,
    .student-process-footer { align-items: flex-start; flex-wrap: wrap; }
    .student-process-status { width: 100%; margin-left: 0; justify-content: center; }
    .attendance-unit-actions { align-items: stretch; margin-left: 0; width: 100%; }
    .attendance-unit-actions .btn { width: 100%; }
    .student-process-actions { width: 100%; }
    .student-process-actions .btn { width: 100%; margin-top: .35rem; }
    .student-amendment-rates { grid-template-columns: 1fr; }
}

/* Frequência individual do aluno (calendário) */
.attendance-alert {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: .6rem;
    font-size: .82rem;
    margin-bottom: 1rem;
}
.attendance-alert i { font-size: 1.1rem; }
.attendance-alert-warning { background: #fff8e5; color: #7c5e00; border: 1px solid #f3d98b; }
.attendance-alert-danger { background: #fdeaea; color: #8a1f1f; border: 1px solid #f2b8b8; }

.attendance-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.attendance-month-nav { display: flex; align-items: center; gap: .75rem; color: var(--text); }
.attendance-month-nav strong { min-width: 160px; text-align: center; }
.attendance-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.attendance-toolbar-actions .btn { white-space: nowrap; }

.attendance-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin-bottom: 1rem;
    font-size: .76rem;
    color: var(--muted);
}
.attendance-legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.attendance-chip {
    display: inline-flex;
    min-width: 26px;
    height: 20px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border-radius: .3rem;
    font-weight: 700;
    font-size: .68rem;
    color: var(--text);
    background: var(--surface-soft);
}
.attendance-chip-present { background: #d9f5de; color: #12632a; }
.attendance-chip-absence { background: #ffdada; color: #9b1c1c; }
.attendance-chip-excused,
.attendance-chip-school-week { background: #fff2b8; color: #735a00; }
.attendance-chip-holiday { background: #d9f4fa; color: #075c70; }
.attendance-chip-recess,
.attendance-chip-vacation { background: #eef2f7; color: #374151; }
.attendance-chip-meeting,
.attendance-chip-parent-meeting { background: #e5e0ff; color: #4b36a5; }
.attendance-chip-anpu { background: #eadcf8; color: #6c278f; }

.attendance-grid-wrap { overflow-x: auto; }
.attendance-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: .5rem;
    overflow: hidden;
    min-width: 980px;
}
.attendance-grid-weekday {
    padding: .5rem;
    text-align: center;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    background: var(--navy-800);
}
.attendance-day {
    background: var(--surface);
    min-height: 92px;
    padding: .5rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.attendance-day-blank { background: var(--surface-soft); }
.attendance-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.attendance-day.is-future { background: var(--surface-soft); }
.attendance-day.is-weekend { background: #fdf1f1; }
html[data-theme="dark"] .attendance-day.is-weekend { background: #2a1a1a; }
.attendance-day-number { font-weight: 700; font-size: .78rem; color: var(--text); }
.attendance-day-future-label { color: var(--muted); font-size: .74rem; }
.attendance-day-select { font-size: .74rem; }

@media (max-width: 991.98px) {
    .attendance-toolbar { flex-direction: column; align-items: stretch; }
    .attendance-month-nav { justify-content: space-between; }
    .attendance-toolbar-actions { justify-content: stretch; }
    .attendance-toolbar-actions .btn { flex: 1 1 180px; }
}

/* Histórico de processos escolares */
.process-history-filter-panel,
.process-history-list-panel { margin-bottom: 1.25rem; }
.process-history-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(140px, .6fr) minmax(220px, 1fr) auto;
    gap: 1rem;
    align-items: end;
}
.process-history-filter-actions { display: flex; gap: .6rem; }
.process-history-table { width: 100%; border-collapse: collapse; color: var(--text); font-size: .82rem; }
.process-history-table th { padding: .85rem 1rem; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--border); font-size: .68rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.process-history-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.process-history-table tbody tr:last-child td { border-bottom: 0; }
.process-history-table tbody tr:hover td { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.process-history-table td > strong,
.process-history-table td > span,
.process-history-table td > small { display: block; }
.process-history-table td > small { margin-top: .25rem; color: var(--muted); font-size: .7rem; }
.process-history-table td > span:not(.student-process-status) { color: var(--text); }
.process-history-page .student-process-status,
.process-history-detail .student-process-status { width: auto; margin: 0; justify-content: center; }
.process-history-page .student-process-status.is-in_review,
.process-history-detail .student-process-status.is-in_review { color: #7c5200; background: #fff0bd; }
.process-history-page .student-process-status.is-validated,
.process-history-detail .student-process-status.is-validated { color: #08733c; background: #d9f7e7; }
.process-history-page .student-process-status.is-reopened,
.process-history-detail .student-process-status.is-reopened { color: #9a3f00; background: #ffe4cf; }
html[data-theme="dark"] .process-history-page .student-process-status.is-in_review,
html[data-theme="dark"] .process-history-detail .student-process-status.is-in_review { color: #ffe69c; background: rgba(255, 193, 7, .16); }
html[data-theme="dark"] .process-history-page .student-process-status.is-validated,
html[data-theme="dark"] .process-history-detail .student-process-status.is-validated { color: #bff5d2; background: rgba(25, 135, 84, .22); }
html[data-theme="dark"] .process-history-page .student-process-status.is-reopened,
html[data-theme="dark"] .process-history-detail .student-process-status.is-reopened { color: #ffd1a8; background: rgba(253, 126, 20, .2); }
.process-history-actions { display: flex; gap: .45rem; justify-content: flex-end; white-space: nowrap; }
.process-history-empty { height: 220px; text-align: center; color: var(--muted); }
.process-history-empty i,
.process-history-empty strong,
.process-history-empty span { display: block; }
.process-history-empty i { margin-bottom: .6rem; color: var(--primary); font-size: 2rem; }
.process-history-empty strong { color: var(--text); font-size: 1rem; }
.process-history-empty span { margin-top: .3rem; }
.process-history-pagination { display: flex; justify-content: center; gap: .35rem; padding: 1rem; border-top: 1px solid var(--border); }
.process-history-pagination a { display: inline-flex; min-width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: .55rem; color: var(--text); text-decoration: none; }
.process-history-pagination a:hover,
.process-history-pagination a.is-active { color: #fff; border-color: var(--primary); background: var(--primary); }
.process-history-pagination a.is-disabled { opacity: .35; pointer-events: none; }
.process-history-detail { min-height: 100%; background: var(--background); color: var(--text); }
.student-modal-hero {
    align-items: center;
    background: linear-gradient(120deg, #075e98, #087dcc 60%, #21a9e6);
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 130px;
    padding: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
}
.student-modal-hero .page-kicker { color: #bce7ff; margin-bottom: .4rem; }
.student-modal-hero h1 { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 850; letter-spacing: -.03em; margin: 0; color: #fff; }
.student-modal-hero p { margin: .5rem 0 0; color: #d8f0ff; font-size: .8rem; }
.process-history-detail-body { padding: 1.25rem; }
.process-history-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.process-history-summary-grid article { min-height: 105px; padding: 1rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--surface); }
.process-history-summary-grid span,
.process-history-summary-grid strong,
.process-history-summary-grid small { display: block; }
.process-history-summary-grid > article > span { margin-bottom: .5rem; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.process-history-summary-grid > article > strong { font-size: 1rem; }
.process-history-summary-grid > article > small { margin-top: .3rem; color: var(--muted); }
.process-history-amendment { display: flex; gap: .7rem; align-items: center; margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border)); border-radius: .75rem; color: var(--text); background: color-mix(in srgb, #f59e0b 8%, var(--surface)); }
.process-history-amendment i { color: #f59e0b; font-size: 1.15rem; }
.process-history-detail-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .8fr); gap: 1rem; }
.process-history-version-card { margin-top: .85rem; padding: 1rem; border: 1px solid var(--border); border-radius: .8rem; background: var(--surface-soft); }
.process-history-version-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.process-history-version-card header strong,
.process-history-version-card header span { display: block; }
.process-history-version-card header span { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.process-history-version-card code { max-width: 310px; overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.process-history-document-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-top: .85rem; }
.process-history-document-links a { display: flex; gap: .45rem; align-items: center; padding: .65rem .7rem; border: 1px solid var(--border); border-radius: .6rem; color: var(--text); background: var(--surface); font-size: .72rem; font-weight: 700; text-decoration: none; }
.process-history-document-links a:hover { color: var(--primary); border-color: var(--primary); }
.process-history-document-links i { color: var(--primary); }
.process-history-no-data { margin: 1rem 0 0; color: var(--muted); }
.process-history-timeline { position: relative; margin: 1rem 0 0; padding: 0; list-style: none; }
.process-history-timeline::before { position: absolute; top: 8px; bottom: 8px; left: 18px; width: 1px; content: ""; background: var(--border); }
.process-history-timeline li { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: .7rem; padding-bottom: 1.15rem; }
.process-history-timeline li > span { z-index: 1; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; color: var(--primary); background: var(--surface); }
.process-history-timeline li.is-validated > span { color: #16a34a; }
.process-history-timeline li.is-reopened > span { color: #f59e0b; }
.process-history-timeline strong,
.process-history-timeline small { display: block; }
.process-history-timeline small { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.process-history-timeline p { margin: .35rem 0 0; color: var(--text); font-size: .76rem; }

@media (max-width: 1199.98px) {
    .process-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process-history-detail-columns { grid-template-columns: 1fr; }
    .process-history-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .process-history-filters,
    .process-history-summary-grid { grid-template-columns: 1fr; }
    .process-history-filter-actions { flex-wrap: wrap; }
    .process-history-document-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process-history-version-card header { flex-direction: column; }
    .process-history-version-card code { max-width: 100%; }
}

/* Gestão versionada dos valores dos processos escolares */
.process-values-page { display: grid; gap: 1.15rem; }
.process-values-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.process-values-current,
.process-values-history { overflow: hidden; padding: 0; }
.process-values-current > .panel-heading,
.process-values-history > .panel-heading { padding: 1.15rem 1.25rem; }
.process-values-current .panel-heading h2,
.process-values-history .panel-heading h2 { font-size: 1.05rem; margin: .12rem 0 .25rem; }
.process-values-current .panel-heading p,
.process-values-history .panel-heading p { color: var(--muted); font-size: .74rem; margin: 0; }
.process-value-unit-list { display: grid; gap: 1rem; padding: 0 1.25rem 1.25rem; }
.process-value-unit-card { border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; }
.process-value-unit-card > header { align-items: center; background: linear-gradient(135deg, var(--navy-950), var(--navy-800)); color: #fff; display: flex; gap: .85rem; padding: 1rem 1.15rem; }
.process-value-unit-card > header > div:nth-child(2) { flex: 1; }
.process-value-unit-card > header span:not(.status-pill) { color: #9dd2ff; display: block; font-size: .64rem; font-weight: 800; letter-spacing: .08em; }
.process-value-unit-card > header h3 { color: #fff; font-size: 1rem; margin: .12rem 0 0; }
.process-value-unit-icon { align-items: center; background: #078bea; border-radius: .7rem; display: inline-flex; height: 42px; justify-content: center; width: 42px; }
.process-value-unit-icon i { font-size: 1.05rem; }
.process-value-matrix { background: var(--surface); }
.process-value-matrix-head,
.process-value-matrix-row { align-items: stretch; display: grid; grid-template-columns: minmax(120px, .7fr) repeat(3, minmax(160px, 1fr)); }
.process-value-matrix[data-columns="1"] .process-value-matrix-head,
.process-value-matrix[data-columns="1"] .process-value-matrix-row { grid-template-columns: minmax(120px, .7fr) repeat(1, minmax(160px, 1fr)); }
.process-value-matrix[data-columns="2"] .process-value-matrix-head,
.process-value-matrix[data-columns="2"] .process-value-matrix-row { grid-template-columns: minmax(120px, .7fr) repeat(2, minmax(160px, 1fr)); }
.process-value-matrix[data-columns="4"] .process-value-matrix-head,
.process-value-matrix[data-columns="4"] .process-value-matrix-row { grid-template-columns: minmax(120px, .7fr) repeat(4, minmax(160px, 1fr)); }
.process-value-matrix[data-columns="5"] .process-value-matrix-head,
.process-value-matrix[data-columns="5"] .process-value-matrix-row { grid-template-columns: minmax(120px, .7fr) repeat(5, minmax(160px, 1fr)); }
.process-value-matrix-head { background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.process-value-matrix-head span { color: var(--muted); font-size: .67rem; font-weight: 800; padding: .7rem .9rem; text-transform: uppercase; }
.process-value-matrix-row { border-bottom: 1px solid var(--border); }
.process-value-matrix-row:last-child { border-bottom: 0; }
.process-value-matrix-row > strong { align-items: center; display: flex; font-size: .78rem; padding: .85rem .9rem; }
.promotion-unresolved-scroll { max-height: 260px; overflow-y: auto; }
.process-value-amount { border-left: 1px solid var(--border); padding: .72rem .9rem; }
.process-value-amount strong,
.process-value-amount small { display: block; }
.process-value-amount strong { font-size: .82rem; }
.process-value-amount small { color: var(--muted); font-size: .68rem; margin-top: .16rem; }
.process-value-amount.is-warning strong { color: #b27309; }
.process-value-amount.is-warning small { color: #b27309; }
.process-value-amount.is-over strong { color: #c8323e; }
.process-value-amount.is-over small { color: #c8323e; }
.process-values-filters { align-items: center; display: grid; gap: .55rem; grid-template-columns: minmax(190px, 1fr) minmax(150px, .7fr) auto auto; }
.process-values-table { margin: 0; }
.process-value-note { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-rate-status { border-radius: 999px; display: inline-flex; font-size: .67rem; font-weight: 800; padding: .35rem .65rem; white-space: nowrap; }
.process-rate-status.is-current { background: color-mix(in srgb, #16a34a 14%, var(--surface)); color: #15914b; }
.process-rate-status.is-scheduled { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); color: var(--primary); }
.process-rate-status.is-ended { background: color-mix(in srgb, var(--muted) 12%, var(--surface)); color: var(--muted); }
.rate-version-notice { align-items: center; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: .8rem; display: flex; gap: .75rem; padding: .85rem 1rem; }
.rate-version-notice i { color: var(--primary); font-size: 1.2rem; }
.rate-version-notice strong,
.rate-version-notice span { display: block; }
.rate-version-notice span { color: var(--muted); font-size: .7rem; margin-top: .12rem; }
.process-rate-loading { align-items: center; color: var(--muted); display: flex; font-size: .72rem; gap: .5rem; margin-top: 1rem; }
.process-rate-editor { border: 1px solid var(--border); border-radius: .85rem; overflow: hidden; }
.process-rate-editor-head,
.process-rate-editor-row { display: grid; grid-template-columns: minmax(110px, .62fr) repeat(3, minmax(170px, 1fr)); }
.process-rate-editor-head { background: var(--navy-900); color: #fff; }
.process-rate-editor-head span { font-size: .67rem; font-weight: 800; padding: .7rem .8rem; text-transform: uppercase; }
.process-rate-editor-row { align-items: center; border-bottom: 1px solid var(--border); padding: .7rem .8rem; }
.process-rate-editor-row:last-child { border-bottom: 0; }
.process-rate-editor-row > strong { font-size: .77rem; }
.process-rate-editor-row label { padding-left: .7rem; }
.process-rate-editor-row label small { color: var(--muted); display: block; font-size: .62rem; margin-top: .25rem; }
.process-rate-view-meta { display: grid; gap: .75rem; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1rem; }
.process-rate-view-meta > div { background: var(--surface-soft); border: 1px solid var(--border); border-radius: .75rem; padding: .8rem; }
.process-rate-view-meta span,
.process-rate-view-meta strong { display: block; }
.process-rate-view-meta span { color: var(--muted); font-size: .66rem; margin-bottom: .25rem; }
.process-rate-view-meta strong { font-size: .78rem; }
.process-rate-view-matrix { border: 1px solid var(--border); border-radius: .85rem; overflow: hidden; }
.rate-version-note { background: var(--surface-soft); border: 1px solid var(--border); border-radius: .75rem; margin-top: 1rem; padding: .85rem 1rem; }
.rate-version-note span { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.rate-version-note p { font-size: .76rem; margin: .3rem 0 0; }

/* Listas "achatadas" — usadas onde o conjunto de turma x período varia por unidade
   (Estrutura escolar configurável), então uma grade fixa de linhas/colunas não serve mais. */
.process-rate-editor-flat { border: 1px solid var(--border); border-radius: .85rem; overflow: hidden; }
.process-rate-editor-flat-row { align-items: center; border-bottom: 1px solid var(--border); display: grid; gap: .7rem; grid-template-columns: minmax(140px, .8fr) minmax(160px, 1fr) minmax(140px, .8fr); padding: .65rem .8rem; }
.process-rate-editor-flat-row:last-child { border-bottom: 0; }
.process-rate-editor-flat-label strong { display: block; font-size: .78rem; }
.process-rate-editor-flat-label small { color: var(--muted); display: block; font-size: .68rem; margin-top: .1rem; }
.process-rate-editor-flat-row > small { color: var(--muted); font-size: .66rem; }

.process-occupancy-flat { display: grid; }
.process-occupancy-flat-row { align-items: center; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(140px, .8fr) minmax(120px, .6fr); padding: .7rem 1.15rem; }
.process-occupancy-flat-row:first-child { border-top: 0; }
.process-occupancy-flat-row > div:first-child strong { display: block; font-size: .78rem; }
.process-occupancy-flat-row > div:first-child small { color: var(--muted); display: block; font-size: .66rem; margin-top: .1rem; }
.process-occupancy-flat-row > div:last-child { text-align: right; }
.process-occupancy-flat-row > div:last-child strong { display: block; font-size: .82rem; }
.process-occupancy-flat-row > div:last-child small { color: var(--muted); display: block; font-size: .66rem; margin-top: .16rem; }
.process-occupancy-flat-row.is-warning > div:last-child strong,
.process-occupancy-flat-row.is-warning > div:last-child small { color: #b27309; }
.process-occupancy-flat-row.is-over > div:last-child strong,
.process-occupancy-flat-row.is-over > div:last-child small { color: #c8323e; }
.school-structure-class-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-start; }

@media (max-width: 991.98px) {
    .process-values-kpis { grid-template-columns: 1fr; }
    .process-values-filters { grid-template-columns: 1fr 1fr; width: 100%; }
    .process-value-matrix,
    .process-rate-editor { overflow-x: auto; }
    .process-value-matrix-head,
    .process-value-matrix-row,
    .process-rate-editor-head,
    .process-rate-editor-row { min-width: 760px; }
    .process-rate-view-meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575.98px) {
    .process-values-filters,
    .process-rate-view-meta { grid-template-columns: 1fr; }
}
