:root {
    --green: #14532D;
    --green-dark: #103F24;
    --green-deep: #0B321D;
    --green-main: #198754;
    --green-soft: #E8F3EC;
    --green-pale: #F2F8F4;
    --gold: #D4AF37;
    --gold-soft: #FBF6E6;
    --ink: #1F2937;
    --muted: #667085;
    --ink-muted: #667085;
    --line: #E1E8E3;
    --paper: #FFFFFF;
    --canvas: #F5F7F5;
    --danger: #B42318;
    --shadow: 0 18px 48px rgba(20, 83, 45, .09);
    font-family: Inter, Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

html,
body {
    min-width: 320px;
    background: var(--canvas);
    color: var(--ink);
}

body {
    overflow-x: hidden;
    font-family: Inter, Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(212, 175, 55, .58);
    outline-offset: 3px;
}

/* Shared components */
.button {
    min-height: 44px;
    border-radius: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

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

.button-primary {
    background: var(--green-main);
    box-shadow: 0 7px 18px rgba(25, 135, 84, .15);
}

.button-primary:hover {
    background: var(--green);
    box-shadow: 0 10px 22px rgba(20, 83, 45, .2);
}

.button-secondary {
    border-color: var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--green);
}

.button-secondary:hover {
    border-color: rgba(25, 135, 84, .35);
    background: var(--green-pale);
    color: var(--green);
}

.button-danger {
    border-color: #F3D0CD;
    background: #FFF5F4;
}

.form-label {
    margin-bottom: 8px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.form-control,
.form-select,
.content-card input:not([type="checkbox"]),
.content-card select,
.content-card textarea,
.assessment-form-grid input,
.assessment-form-grid select,
.assessment-filter-grid input,
.assessment-filter-grid select,
.inline-edit-form input,
.report-note-form textarea,
.report-note-form select {
    min-height: 46px;
    border: 1px solid #D8E2DA;
    border-radius: 10px;
    background-color: #FFFFFF;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}

.form-control:focus,
.form-select:focus,
.content-card input:focus,
.content-card select:focus,
.content-card textarea:focus,
.assessment-form-grid input:focus,
.assessment-form-grid select:focus,
.assessment-filter-grid input:focus,
.assessment-filter-grid select:focus {
    border-color: var(--green-main);
    box-shadow: 0 0 0 4px rgba(25, 135, 84, .11);
    outline: 0;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #D92D20;
    background-color: #FFFBFA;
}

.field-error {
    color: #B42318;
    font-weight: 600;
}

.field-help,
.form-section-note {
    color: #667085;
}

.flash {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 24, 40, .035);
}

.flash-success {
    border-color: #B7DCC2;
    background: #F0F8F2;
    color: #14532D;
}

.flash-error {
    border-color: #F2C6C2;
    background: #FFF4F2;
    color: #912018;
}

.panel-card,
.content-card,
.form-panel,
.stat-card,
.assignment-card,
.schedule-card,
.semester-card,
.teacher-class-card {
    border-color: var(--line);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 4px 16px rgba(20, 83, 45, .045);
}

.panel-card,
.content-card {
    padding: 22px;
}

.panel-heading h2,
.content-card h2,
.panel-title,
.form-panel-heading h2 {
    color: var(--green);
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-weight: 750;
    letter-spacing: -.025em;
}

.page-heading h1 {
    color: var(--green);
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 780;
    letter-spacing: -.04em;
}

.eyebrow {
    color: var(--green-main);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.page-subtitle,
.muted {
    color: var(--muted);
}

/* Login: editorial two-column composition */
.auth-body {
    min-height: 100vh;
    background: #FFFFFF;
}

.auth-page {
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    background: #FFFFFF;
}

.auth-brand-panel {
    isolation: isolate;
    min-height: 100vh;
    padding: 38px clamp(30px, 5.6vw, 84px) 28px;
    background:
        radial-gradient(circle at 82% 17%, rgba(212, 175, 55, .18), transparent 28%),
        linear-gradient(145deg, #14532D 0%, #103F24 58%, #0B321D 100%);
}

.auth-brand-panel::before {
    z-index: -1;
    top: 25%;
    right: -185px;
    width: 500px;
    height: 500px;
    border-color: rgba(255, 255, 255, .075);
    box-shadow: 0 0 0 34px rgba(255, 255, 255, .02), 0 0 0 78px rgba(255, 255, 255, .014);
}

.auth-brand-panel::after {
    z-index: -1;
    right: 9%;
    bottom: 10%;
    width: 116px;
    height: 116px;
    border-color: rgba(212, 175, 55, .42);
    border-radius: 24px;
    transform: rotate(45deg);
}

.auth-illustration {
    position: absolute;
    z-index: 0;
    right: clamp(22px, 4vw, 58px);
    bottom: 13%;
    width: min(40%, 370px);
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(212, 175, 55, .65);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02));
    box-shadow: 0 24px 64px rgba(3, 25, 14, .24);
    object-fit: cover;
}

.brand-lockup {
    gap: 12px;
}

.brand-symbol {
    width: 46px;
    height: 46px;
}

.brand-copy strong {
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.brand-copy em {
    color: var(--gold);
}

.brand-copy small {
    margin-top: 4px;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand-lockup-light {
    color: #FFFFFF;
}

.brand-lockup-light .brand-symbol {
    color: #FFFFFF;
}

.brand-lockup-light .brand-copy small {
    color: #D8E9DD;
}

.auth-brand-message {
    z-index: 1;
    max-width: 390px;
    margin: auto 0;
    padding: 80px 0 100px;
}

.auth-brand-message .eyebrow {
    color: #E9D88C;
    letter-spacing: .16em;
}

.auth-brand-message h1 {
    max-width: 390px;
    margin: 16px 0 18px;
    color: #FFFFFF;
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(38px, 4.2vw, 62px);
    font-weight: 780;
    letter-spacing: -.055em;
    line-height: 1.04;
}

.auth-brand-message p {
    max-width: 330px;
    color: #E1EEE5;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.75;
}

.unit-chips {
    gap: 10px;
    margin-top: 25px;
}

.unit-chips span {
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #F2DE9A;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.auth-panel-footer {
    color: #C6DCCB;
    font-size: 11px;
    font-weight: 550;
}

.auth-form-panel {
    justify-content: center;
    padding: 48px clamp(22px, 5vw, 78px) 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(25, 135, 84, .045), transparent 35%),
        #FFFFFF;
}

.auth-form-wrap {
    width: min(100%, 470px);
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid #E7ECE8;
    border-radius: 22px;
    background: #FFFFFF;
    box-shadow: 0 24px 64px rgba(18, 52, 31, .085);
}

.auth-heading {
    margin-bottom: 27px;
}

.auth-heading h2 {
    margin: 9px 0 9px;
    color: var(--green);
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 780;
    letter-spacing: -.04em;
}

.auth-heading p {
    color: #667085;
    font-size: 13px;
    line-height: 1.65;
}

.auth-form .form-label {
    margin-top: 18px;
}

.auth-form > .form-label:first-child {
    margin-top: 0;
}

.auth-form .form-control {
    min-height: 49px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.auth-form .form-control::placeholder {
    color: #98A2B3;
}

.auth-form .checkbox-row {
    margin: 16px 0 20px;
    color: #475467;
    font-size: 12px;
}

.auth-form .checkbox-row input,
.content-card input[type="checkbox"],
.unit-choice input {
    accent-color: var(--green-main);
}

.auth-form .button-full {
    min-height: 49px;
    margin-top: 8px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
}

.label-row {
    margin-top: 20px;
}

.text-link,
.back-link {
    color: var(--green-main);
    font-weight: 700;
}

.text-link:hover,
.back-link:hover {
    color: var(--green);
}

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

.password-input-wrap .form-control {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: var(--green-pale);
    color: var(--green);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle svg[hidden] {
    display: none;
}

.password-toggle[aria-pressed="true"] {
    color: var(--green-main);
}

.auth-note {
    color: #667085;
    font-size: 11px;
}

.auth-copyright {
    color: #98A2B3;
    font-size: 10px;
}

/* Internal application shell */
.app-body {
    background: var(--canvas);
}

.sidebar {
    width: 268px;
    padding: 24px 15px 17px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, #14532D 0%, #103F24 65%, #0B321D 100%);
    box-shadow: 10px 0 34px rgba(11, 50, 29, .075);
    color: #FFFFFF;
}

.sidebar > .brand-lockup {
    padding: 2px 10px 25px;
    color: #FFFFFF;
}

.sidebar .brand-symbol {
    color: #FFFFFF;
}

.sidebar .brand-logo-image {
    border: 1px solid rgba(255, 255, 255, .3);
    background: #FFFFFF;
}

.sidebar .brand-copy small {
    color: #D8E9DD;
}

.sidebar-section-label,
.sidebar-nav-group {
    color: #B8D4C0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
}

.sidebar-nav-group {
    padding-top: 16px;
}

.main-nav {
    gap: 4px;
}

.nav-link {
    position: relative;
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #D5E5D9;
    font-size: 12px;
    font-weight: 620;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-link::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: var(--gold);
    content: '';
    opacity: 0;
    transform: translate(-6px, -50%) scaleY(.72);
}

.nav-link svg {
    color: #BCD6C4;
    transition: color 180ms ease;
}

.nav-link:hover {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .09);
    color: #FFFFFF;
}

.nav-link:hover svg,
.nav-link.active svg {
    color: var(--gold);
}

.nav-link.active {
    border-color: rgba(212, 175, 55, .22);
    background: rgba(255, 255, 255, .12);
    color: #FFFFFF;
}

.nav-link.active::before {
    opacity: 1;
    transform: translate(0, -50%) scaleY(1);
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes simdi-nav-active-indicator {
        from {
            opacity: 0;
            transform: translate(-6px, -50%) scaleY(.72);
        }

        to {
            opacity: 1;
            transform: translate(0, -50%) scaleY(1);
        }
    }

    .nav-link.active::before {
        animation: simdi-nav-active-indicator 200ms cubic-bezier(.22, .68, .2, 1) both;
    }
}

.sidebar-unit-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.unit-nav-item {
    color: #F2F7F3;
}

.unit-nav-item small {
    color: #B8D4C0;
}

.unit-dot {
    background: #8CD0A6;
    box-shadow: 0 0 0 3px rgba(140, 208, 166, .15);
}

.sidebar-empty {
    color: #BDD2C3;
}

.sidebar-bottom {
    border-top-color: rgba(255, 255, 255, .14);
}

.sidebar-foundation {
    max-width: 205px;
    color: #F2F7F3;
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 720;
}

.sidebar-tagline {
    color: #E7D58C;
    font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
    font-style: normal;
    line-height: 1.55;
}

.app-main {
    min-width: 0;
}

.topbar {
    height: 72px;
    border-bottom-color: #E5EBE6;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 10px rgba(31, 41, 55, .025);
}

.topbar-context {
    color: #667085;
    font-size: 12px;
}

.topbar-context-label {
    color: var(--green);
    font-weight: 800;
}

.topbar-user-copy strong {
    color: #1F2937;
    font-size: 12px;
}

.topbar-user-copy span {
    color: #667085;
}

.user-avatar {
    border: 2px solid #E6F1E9;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 800;
}

.logout-button {
    border-color: #E5EBE6;
    color: #667085;
}

.logout-button:hover {
    border-color: #B8D6C1;
    background: var(--green-pale);
    color: var(--green);
}

.menu-toggle {
    border-color: #DCE6DE;
    border-radius: 10px;
}

.page-content {
    width: min(100%, 1500px);
    padding-top: 34px;
}

@media (prefers-reduced-motion: no-preference) {
    @keyframes simdi-page-enter {
        from {
            opacity: 0;
            transform: translateY(8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .page-content {
        animation: simdi-page-enter 200ms cubic-bezier(.22, .68, .2, 1) both;
    }
}

.page-heading {
    margin-bottom: 24px;
}

.status-pill {
    border-color: #D5E8DA;
    background: #F2F8F4;
    color: var(--green);
}

.status-pill .status-dot {
    background: var(--green-main);
    box-shadow: 0 0 0 3px #DFF0E4;
}

.stat-card {
    min-height: 170px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(20, 83, 45, .055);
}

.stat-card:hover,
.panel-card:hover,
.content-card:hover {
    box-shadow: 0 10px 30px rgba(20, 83, 45, .075);
}

.stat-icon {
    border-radius: 12px;
}

.stat-icon-green {
    background: #E7F4EB;
    color: var(--green-main);
}

.stat-icon-gold {
    background: var(--gold-soft);
    color: #8A6C10;
}

.stat-icon-soft {
    background: #EEF2EF;
    color: #52655A;
}

.stat-label {
    color: #667085;
    font-weight: 600;
}

.stat-value {
    color: var(--green);
    font-variant-numeric: tabular-nums;
}

.stat-foot {
    color: #7C8795;
}

.panel-heading {
    margin-bottom: 17px;
}

.panel-count,
.role-badge,
.level-tag,
.audit-event-chip {
    border-radius: 999px;
}

.panel-count {
    background: var(--green-soft);
    color: var(--green);
}

.foundation-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #F8FBF8 100%);
}

.foundation-tagline {
    color: #856A17;
}

.inline-action {
    color: var(--green-main);
}

.page-footer {
    border-top-color: #E5EBE6;
    color: #87928A;
}

/* Tables, filters and form panels */
.list-toolbar {
    align-items: flex-end;
    margin-bottom: 18px;
}

.filter-form {
    gap: 9px;
}

.table-wrap {
    overflow-x: auto;
    border-color: #E1E8E3;
    border-radius: 12px;
    background: #FFFFFF;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #B6C8BB #F5F7F5;
}

.data-table th {
    padding: 13px 15px;
    background: #F2F7F3;
    color: #53665A;
    font-size: 9px;
    letter-spacing: .09em;
}

.data-table td {
    padding: 13px 15px;
    border-top-color: #EDF1EE;
    color: #475467;
}

.data-table tbody tr:hover {
    background: #F8FBF8;
}

.table-primary {
    color: #1F2937;
}

.table-secondary {
    color: #7C8795;
}

.table-action,
.pagination-link {
    min-height: 32px;
    border-color: #E1E8E3;
    border-radius: 8px;
}

.table-action:hover,
.pagination-link:hover {
    border-color: #A7CDB2;
    background: var(--green-pale);
    color: var(--green);
}

.pagination-link[aria-current="page"] {
    border-color: var(--green-main);
    background: var(--green-main);
}

.role-badge {
    background: #E8F3EC;
    color: #14532D;
}

.role-badge.admin {
    background: var(--gold-soft);
    color: #775B0C;
}

.form-panel,
.content-card {
    border-radius: 16px;
}

.form-panel-heading {
    border-bottom-color: #E8EEE9;
}

.unit-choice {
    border-radius: 10px;
}

.unit-choice:has(input:checked) {
    border-color: #9EC9AA;
    background: #F2F8F4;
}

.form-actions {
    border-top-color: #E8EEE9;
}

.empty-state,
.empty-table {
    color: #667085;
}

.assignment-card,
.schedule-card,
.semester-card,
.teacher-class-card {
    padding: 18px;
}

.inline-editor {
    background: #F6F9F6;
}

.class-roster {
    background: #F8FBF8;
}

.report-metadata-grid > div,
.attendance-summary-grid > div,
.report-overall-grid > div {
    border-color: #E5EBE6;
    border-radius: 10px;
    background: #F8FBF8;
}

.report-overall-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-overall-grid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid #E5EBE6;
}

.report-overall-grid small {
    color: #65736B;
    font-size: 0.75rem;
}

.report-overall-grid strong {
    color: #0B4F3C;
    font-size: 1.15rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.report-overall-grid span {
    color: #65736B;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Accessibility and responsive layout */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}

@media (max-width: 1100px) {
    .auth-brand-panel {
        padding-right: 34px;
        padding-left: 34px;
    }

    .auth-illustration {
        right: 24px;
        width: 35%;
        opacity: .84;
    }

    .auth-brand-message {
        max-width: 330px;
    }

    .sidebar {
        width: 248px;
    }

    .app-main {
        margin-left: 248px;
    }
}

@media (max-width: 820px) {
    html,
    body {
        overflow-x: hidden;
    }

    .auth-page {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .auth-brand-panel {
        min-height: 250px;
        padding: 20px 23px 23px;
    }

    .auth-brand-panel::before {
        top: -210px;
        right: -90px;
    }

    .auth-brand-panel::after {
        right: 8%;
        bottom: -36px;
        width: 86px;
        height: 86px;
    }

    .auth-illustration {
        display: none;
    }

    .auth-brand-message {
        max-width: 100%;
        margin: 20px 0 0;
        padding: 0 0 14px;
    }

    .auth-brand-message h1 {
        max-width: 100%;
        margin: 9px 0 7px;
        font-size: 34px;
    }

    .auth-brand-message p {
        max-width: 520px;
        font-size: 12px;
    }

    .unit-chips {
        margin-top: 14px;
    }

    .auth-panel-footer {
        display: none;
    }

    .auth-form-panel {
        flex: 1;
        padding: 28px 20px 22px;
    }

    .auth-form-wrap {
        max-width: 480px;
        padding: 26px 22px;
    }

    .auth-copyright {
        margin-top: 18px;
    }

    .sidebar {
        z-index: 50;
        width: 280px;
        transform: translateX(-102%);
        transition: transform .2s ease, box-shadow .2s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 16px 0 40px rgba(3, 25, 14, .3);
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        height: 64px;
        padding: 0 18px;
    }

    .page-content {
        padding: 25px 18px 35px;
    }

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

@media (max-width: 560px) {
    .auth-brand-panel {
        min-height: 218px;
        padding: 16px 19px 18px;
    }

    .auth-brand-panel > .brand-lockup .brand-symbol {
        width: 37px;
        height: 37px;
    }

    .auth-brand-panel > .brand-lockup .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy small {
        max-width: 245px;
        font-size: 8px;
        letter-spacing: .055em;
    }

    .auth-brand-message h1 {
        font-size: 30px;
    }

    .auth-brand-message p {
        max-width: 340px;
        font-size: 11px;
        line-height: 1.55;
    }

    .unit-chips span {
        padding: 6px 11px;
        font-size: 9px;
    }

    .auth-form-panel {
        padding: 22px 14px 18px;
    }

    .auth-form-wrap {
        padding: 24px 19px;
        border-radius: 18px;
    }

    .auth-heading {
        margin-bottom: 21px;
    }

    .auth-heading h2 {
        font-size: 26px;
    }

    .topbar {
        padding: 0 13px;
    }

    .topbar-context {
        gap: 7px;
        font-size: 10px;
    }

    .page-content {
        padding: 21px 14px 30px;
    }

    .page-heading {
        display: block;
        margin-bottom: 18px;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .status-pill {
        margin-top: 12px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        min-height: 145px;
        padding: 13px;
    }

    .stat-grid .stat-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .stat-value {
        font-size: 25px;
    }

    .panel-card,
    .content-card {
        padding: 16px;
    }

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

    .filter-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(105px, .8fr);
        width: 100%;
    }

    .search-control {
        width: 100%;
    }

    .filter-form .form-select {
        width: 100%;
        min-width: 0;
    }

    .form-row,
    .form-grid,
    .assessment-form-grid,
    .assessment-filter-grid,
    .report-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-panel {
        padding: 16px;
    }

    .unit-checkboxes {
        grid-template-columns: minmax(0, 1fr);
    }

    .module-actions {
        align-items: stretch;
    }

    .module-actions form {
        width: 100%;
        flex-wrap: wrap;
    }

    .module-actions input[type="file"] {
        min-width: 0;
        flex: 1;
    }

    .data-table {
        min-width: 620px;
    }

    .attendance-table-wrap table {
        min-width: 580px;
    }

    .report-metadata-grid,
    .attendance-summary-grid,
    .report-overall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-publish-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-footer {
        gap: 8px;
        padding: 12px 14px;
        font-size: 9px;
    }
}

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

@media print {
    .sidebar,
    .topbar,
    .page-footer,
    .app-overlay,
    .menu-toggle,
    [data-print-hide] {
        display: none !important;
    }

    .app-main {
        margin: 0 !important;
    }

    .page-content {
        width: 100%;
        padding: 0;
    }

    body,
    .app-body {
        background: #FFFFFF;
    }

    .panel-card,
    .content-card {
        border: 0;
        box-shadow: none;
    }
}

.dashboard-analytics,
.dashboard-lower-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-analytics {
    grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
}

.dashboard-lower-grid {
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.analytics-card,
.finance-status-card,
.activity-card {
    min-width: 0;
    padding: 22px;
}

.chart-list,
.attendance-summary-list,
.activity-list {
    display: grid;
    gap: 18px;
    padding-top: 8px;
}

.chart-row-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--ink-muted);
    font-size: 12px;
}

.chart-row-heading strong {
    color: var(--green-main);
    letter-spacing: 0.04em;
}

.chart-track,
.attendance-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8efe9;
}

.chart-track span,
.attendance-track span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green-main), #389a71);
    transition: width 320ms ease;
}

.attendance-summary-row {
    display: grid;
    grid-template-columns: minmax(82px, 0.7fr) minmax(70px, 1fr) 28px;
    align-items: center;
    gap: 10px;
}

.attendance-status-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-muted);
    font-size: 12px;
}

.attendance-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #228b5d;
}

.status-sakit { background: #d29b22; }
.status-izin { background: #5f8ec4; }
.status-alfa { background: #cb665c; }
.status-terlambat { background: #9a78b7; }

.attendance-summary-row > strong {
    color: var(--ink);
    font-size: 12px;
    text-align: right;
}

.panel-footnote {
    margin: 18px 0 0;
    color: var(--ink-muted);
    font-size: 11px;
}

.release-tag {
    padding: 6px 9px;
    border: 1px solid #e8d7a2;
    border-radius: 999px;
    background: #fff9e9;
    color: #86651e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.finance-empty-state {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 20px;
    padding: 16px;
    border: 1px dashed #dfd8c4;
    border-radius: 14px;
    background: #fffcf4;
}

.finance-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    background: #f5edda;
    color: #977323;
    font-size: 22px;
}

.finance-empty-state strong {
    color: var(--ink);
    font-size: 13px;
}

.finance-empty-state p {
    margin: 6px 0 0;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.65;
}

.activity-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #eef1ed;
}

.activity-row:last-child {
    border-bottom: 0;
}

.activity-mark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px #faf3df;
}

.activity-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.activity-copy strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-copy span,
.activity-row time {
    color: var(--ink-muted);
    font-size: 11px;
}

.activity-row time {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .dashboard-analytics,
    .dashboard-lower-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .analytics-card,
    .finance-status-card,
    .activity-card {
        padding: 17px;
    }

    .attendance-summary-row {
        grid-template-columns: minmax(78px, 0.75fr) minmax(48px, 1fr) 24px;
        gap: 8px;
    }

    .activity-row {
        grid-template-columns: 10px minmax(0, 1fr);
    }

    .activity-row time {
        grid-column: 2;
    }
}


/* Dashboard: jadwal aktif hari ini */
.today-schedule-section {
    margin-bottom: 18px;
}

.today-schedule-card {
    padding: 22px;
}

.today-schedule-heading {
    align-items: flex-start;
    margin-bottom: 12px;
}

.today-schedule-heading > div {
    display: grid;
    gap: 4px;
}

.today-schedule-heading h2,
.today-schedule-heading p {
    margin: 0;
}

.today-schedule-heading p {
    color: var(--ink-muted);
    font-size: 12px;
}

.today-schedule-list {
    display: grid;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.today-schedule-item {
    display: grid;
    grid-template-columns: 96px 18px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 10px 0;
}

.today-schedule-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    padding-top: 1px;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.today-schedule-time span {
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 600;
}

.today-schedule-marker {
    position: relative;
    display: block;
    min-height: 48px;
}

.today-schedule-marker::before {
    position: absolute;
    top: 9px;
    bottom: -17px;
    left: 50%;
    width: 2px;
    background: var(--line);
    content: "";
    transform: translateX(-50%);
}

.today-schedule-marker::after {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--green-main);
    border-radius: 50%;
    background: #fff;
    content: "";
    transform: translateX(-50%);
}

.today-schedule-item:last-child .today-schedule-marker::before {
    bottom: auto;
    height: 0;
}

.today-schedule-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.today-schedule-item:last-child .today-schedule-copy {
    padding-bottom: 0;
    border-bottom: 0;
}

.today-schedule-copy-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.today-schedule-copy-heading strong {
    color: var(--ink);
    font-size: 14px;
}

.today-schedule-class {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--green-pale);
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
}

.today-schedule-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    color: var(--ink-muted);
    font-size: 11px;
}

.today-schedule-empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--green-pale);
}

.today-schedule-empty.is-holiday {
    border-color: #EAD9A1;
    background: var(--gold-soft);
}

.today-schedule-empty-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 800;
}

.today-schedule-empty.is-holiday .today-schedule-empty-icon {
    background: #F7EBC5;
    color: #7A5E06;
}

.today-schedule-empty > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.today-schedule-empty strong {
    color: var(--ink);
    font-size: 12px;
}

.today-schedule-empty p {
    margin: 0;
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1.5;
}

.today-schedule-link {
    margin-top: 12px;
}

@media (max-width: 700px) {
    .today-schedule-card {
        padding: 17px;
    }

    .today-schedule-item {
        grid-template-columns: 72px 12px minmax(0, 1fr);
        gap: 8px;
    }

    .today-schedule-time {
        font-size: 11px;
    }

    .today-schedule-copy-heading {
        display: grid;
        gap: 6px;
    }

    .today-schedule-class {
        justify-self: start;
        white-space: normal;
    }

    .today-schedule-details {
        font-size: 10px;
    }

    .today-schedule-heading {
        gap: 8px;
    }

    .today-schedule-heading .panel-count {
        text-align: right;
        white-space: normal;
    }
}


.today-schedule-tag {
    align-self: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
}

/* Jurnal mengajar terpadu dengan absensi */
.journal-panel {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #DCE9DF;
    border-left: 4px solid var(--gold);
    border-radius: 14px;
    background: linear-gradient(135deg, #F5FAF6, #FFFFFF 78%);
}

.journal-panel-heading h2 {
    margin: 6px 0;
    color: var(--green);
    font-size: 18px;
    font-weight: 760;
}

.journal-panel-heading p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.journal-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.journal-fields-grid .form-label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.journal-fields-grid textarea {
    width: 100%;
    min-height: 110px;
    padding: 11px 12px;
    border: 1px solid #D8E2DA;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--ink);
    line-height: 1.55;
    resize: vertical;
}

.journal-fields-grid small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
}

.required-mark,
.optional-mark {
    align-self: flex-start;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
}

.required-mark {
    background: #FBF6E6;
    color: #775B0C;
}

.optional-mark {
    background: #EEF2EF;
    color: #667085;
}

.journal-reflection {
    grid-column: 1 / -1;
}

.journal-reflection textarea {
    min-height: 82px;
}

.attendance-journal-cell {
    max-width: 360px;
    margin-top: 8px;
}

.attendance-journal-list {
    display: grid;
    gap: 6px;
}

.attendance-journal-details {
    overflow: hidden;
    border: 1px solid #E1E8E3;
    border-radius: 9px;
    background: #F8FBF8;
}

.attendance-journal-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: var(--green);
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
}

.attendance-journal-details summary small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 600;
    text-align: right;
}

.attendance-journal-content {
    padding: 0 10px 9px;
    color: #475467;
    font-size: 10px;
    line-height: 1.55;
}

.attendance-journal-content p {
    margin: 7px 0 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 700px) {
    .journal-panel {
        padding: 14px;
    }

    .journal-fields-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .journal-reflection {
        grid-column: auto;
    }

    .attendance-journal-cell {
        max-width: 280px;
    }
}

@media print {
    .attendance-journal-details:not([open]) > .attendance-journal-content {
        display: block !important;
    }
}


/* SIMDI supplied logo and teacher scheduling UI additions */
.brand-logo-image {
    display: block;
    flex: 0 0 auto;
    width: 48px;
    height: 46px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 10px;
    background: #FFFFFF;
    object-fit: contain;
    object-position: center;
}

.auth-brand-panel > .brand-lockup .brand-logo-image {
    width: 76px;
    height: 70px;
    padding: 7px;
    border-color: rgba(255, 255, 255, .42);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(3, 25, 14, .18);
}

.sidebar > .brand-lockup .brand-logo-image {
    width: 48px;
    height: 46px;
    padding: 5px;
}

.teacher-form-section {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid #E8EEE9;
}

.form-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.form-section-heading .panel-title {
    margin: 5px 0 0;
    font-size: 19px;
}

.teacher-day-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(92px, 1fr));
    gap: 9px;
    margin: 15px 0 10px;
}

.teacher-day-choice {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid #D8E2DA;
    border-radius: 10px;
    background: #FFFFFF;
    color: #475467;
    cursor: pointer;
    font-size: 11px;
    font-weight: 650;
}

.teacher-day-choice:has(input:checked) {
    border-color: #9EC9AA;
    background: #F2F8F4;
    color: var(--green);
}

.teacher-day-choice input {
    accent-color: var(--green-main);
}

.teacher-assignment-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.teacher-assignment-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(190px, .8fr) auto;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #E1E8E3;
    border-radius: 12px;
    background: #FBFCFB;
}

.teacher-assignment-row .form-label {
    margin: 0;
}

.teacher-assignment-context {
    min-height: 46px;
    padding: 13px 12px;
    border: 1px dashed #C9D8CC;
    border-radius: 10px;
    background: #F5F9F6;
    color: #667085;
    font-size: 10px;
    line-height: 1.4;
}

.teacher-assignment-remove {
    min-height: 46px;
    white-space: nowrap;
}

.teacher-history-block {
    margin-top: 22px;
    padding: 17px;
    border: 1px solid #E1E8E3;
    border-radius: 12px;
    background: #F8FBF8;
}

.teacher-history-block .form-section-heading {
    margin-bottom: 4px;
}

.teacher-history-block h3 {
    margin: 5px 0 0;
    font-size: 16px;
}

.teacher-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #E5EBE6;
    color: #475467;
    font-size: 11px;
}

.teacher-history-row > div,
.teacher-index-details {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.teacher-history-row strong {
    color: var(--ink);
    font-size: 12px;
}

.teacher-history-row span,
.teacher-index-details span {
    color: #667085;
    line-height: 1.45;
}

.teacher-index-details {
    max-width: 300px;
    font-size: 10px;
}

.teacher-index-availability {
    margin-top: 2px;
    color: var(--green-main) !important;
    font-weight: 700;
}

.schedule-selection-message {
    display: block;
    grid-column: 1 / -1;
    margin: -2px 0 0;
    color: #9A6700;
    font-size: 11px;
    line-height: 1.5;
}

.schedule-selection-message[hidden] {
    display: none;
}

@media (max-width: 980px) {
    .teacher-assignment-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-assignment-remove {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .teacher-assignment-context {
        min-height: 0;
    }
}

@media (max-width: 700px) {
    .auth-brand-panel > .brand-lockup .brand-logo-image {
        width: 62px;
        height: 58px;
        padding: 6px;
    }

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

    .teacher-assignment-row,
    .teacher-history-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .teacher-assignment-remove {
        width: 100%;
    }
}

/* PDF jadwal gabungan dan siklus hidup profil Guru */
.schedule-pdf-panel { margin-bottom: 20px; padding: 22px; display: grid; gap: 16px; }
.schedule-pdf-panel .panel-title { margin: 6px 0 8px; }
.schedule-pdf-panel p { margin: 0; line-height: 1.6; }
.schedule-pdf-actions, .teacher-list-tabs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.schedule-pdf-actions .button:disabled { opacity: .65; cursor: wait; }
.teacher-list-tabs { margin-bottom: 18px; }
.teacher-lifecycle-note { padding: 0 20px 12px; max-width: 1000px; line-height: 1.6; }
.teacher-lifecycle-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; min-width: 170px; }
.teacher-lifecycle-actions form { margin: 0; }
.teacher-delete-menu summary { cursor: pointer; display: inline-flex; list-style: none; }
.teacher-delete-menu summary::-webkit-details-marker { display: none; }
.teacher-delete-confirm { display: grid; gap: 10px; min-width: 180px; max-width: 240px; white-space: normal; padding: 12px; margin-top: 10px !important; border: 1px solid #E9CFCF; border-radius: 10px; background: #FFF8F8; font-size: 12px; }
.teacher-delete-confirm p { margin: 0; line-height: 1.5; }
.teacher-delete-confirm input { min-width: 0; max-width: 100%; }
@media (max-width: 700px) {
    .schedule-pdf-panel { padding: 18px; }
    .schedule-pdf-actions { align-items: stretch; flex-direction: column; }
    .schedule-pdf-actions .button { width: 100%; justify-content: center; }
    .teacher-list-tabs .button { flex: 1; justify-content: center; }
    .teacher-lifecycle-note { padding-left: 16px; padding-right: 16px; }
}


/* Checklist kelas pada baris penugasan Guru */
.teacher-class-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.teacher-class-fieldset legend {
    float: none;
    width: 100%;
    margin-bottom: 0;
}

.teacher-class-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    max-height: 245px;
    overflow-y: auto;
    padding: 2px;
}

.teacher-class-choice {
    min-width: 0;
    min-height: 52px;
    padding: 8px 10px;
}

.teacher-class-choice span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.teacher-class-choice small {
    color: #667085;
    font-size: 9px;
    font-weight: 550;
    line-height: 1.35;
}

.teacher-class-fieldset [data-assignment-context] {
    margin: 7px 0 0;
}

.teacher-class-fieldset [data-assignment-error] {
    margin: 5px 0 0;
    font-size: 11px;
}

@media (max-width: 700px) {
    .teacher-class-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 220px;
    }
}


/* Checklist multi-mapel untuk komponen penilaian */
.assessment-subject-fieldset {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.assessment-subject-fieldset legend {
    float: none;
    width: 100%;
    margin-bottom: 6px;
}
.assessment-subject-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
    max-height: 245px;
    overflow-y: auto;
    padding: 2px;
}
.assessment-subject-option {
    min-width: 0;
    min-height: 52px;
    padding: 8px 10px;
}
.assessment-subject-option span {
    display: grid;
    min-width: 0;
    gap: 3px;
}
.assessment-subject-option small {
    color: #667085;
    font-size: 9px;
    font-weight: 550;
    line-height: 1.35;
}
.assessment-subject-option[hidden] {
    display: none !important;
}
.assessment-subject-hint {
    margin: 7px 0 0;
}
@media (max-width: 700px) {
    .assessment-subject-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 220px;
    }
}
