:root {
    --mdm-primary: #1e3a8a;
    --mdm-accent: #f59e0b;
}

body {
    background: #f4f6fb;
    min-height: 100vh;
}

/* ---- Login page ---- */
body.login-page {
    background: #f0f4ff;
    min-height: 100vh;
    margin: 0;
}

body.login-page .login-main {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.login-brand {
    flex: 1 1 50%;
    background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 45%, #3b82f6 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -120px;
    right: -80px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    bottom: -60px;
    left: -40px;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.login-brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.login-brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.login-brand-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-brand-features li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.login-brand-features li i {
    color: #93c5fd;
    flex-shrink: 0;
}

.login-form-panel {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f0f4ff;
}

.login-form-inner {
    width: 100%;
    max-width: 420px;
}

.login-mobile-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.login-card {
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(30, 58, 138, 0.12);
    background: #fff;
}

.login-input {
    border-radius: 0.5rem;
    border-color: #e2e8f0;
}

.login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

/* Mobile / tablet: full-width gradient header area */
@media (max-width: 991.98px) {
    body.login-page {
        background: linear-gradient(180deg, #1e3a8a 0%, #3b82f6 38%, #f0f4ff 38%);
    }

    .login-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    .login-form-panel {
        flex: 1;
        align-items: flex-start;
        padding-top: 0.5rem;
        background: transparent;
    }

    .login-form-inner {
        max-width: 480px;
        margin: 0 auto;
    }

    .login-card {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .login-brand {
        flex: 1 1 45%;
        padding: 2rem;
    }

    .login-form-panel {
        flex: 1 1 55%;
    }

    .login-brand-title {
        font-size: 1.65rem;
    }
}

@media (min-width: 1400px) {
    .login-form-inner {
        max-width: 460px;
    }

    .login-brand-inner {
        max-width: 480px;
    }
}

/* School data entry page */
body.data-entry-page {
    --data-entry-nav-height: 56px;
}

.section-timeline-sticky {
    position: sticky;
    top: var(--data-entry-nav-height);
    z-index: 1020;
    background: #fff;
    margin: 0 -0.75rem 1rem;
    padding: 0.5rem 0.75rem 0.6rem;
    border-bottom: 1px solid #dbeafe;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.1);
}

@media (min-width: 992px) {
    body.data-entry-page .section-timeline-sticky {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.data-entry-page-header .section-card {
    margin-bottom: 0.75rem !important;
}

.data-entry-title-bar {
    margin-bottom: 0;
}

.section-progress-summary {
    font-size: 0.75rem;
    font-weight: 600;
}

.school-simple-class-table th,
.school-simple-class-table td {
    text-align: center;
    vertical-align: middle;
}

.school-simple-class-table th.class-label,
.school-simple-class-table td.class-label {
    text-align: left;
}

@media print {
    .school-simple-class-table {
        font-size: 0.95rem;
    }
}

.review-compare-table th.review-col-pending,
.review-compare-table td.review-diff-pending {
    background-color: #fff8e6;
}

.review-compare-table th.review-col-current,
.review-compare-table td.review-diff-current {
    background-color: #f1f5f9;
}

.review-compare-table tr.review-row-changed td {
    border-top-width: 2px;
}

.review-compare-text {
    white-space: pre-line;
    font-size: 0.875rem;
    vertical-align: top;
    min-width: 14rem;
}

.section-progress-timeline-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.section-progress-timeline {
    display: inline-flex;
    align-items: flex-start;
    gap: 0;
    padding: 0.35rem 0.25rem 0.15rem;
    text-align: left;
}

.progress-timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    min-width: 3.4rem;
    padding: 0 0.15rem 0.25rem;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.progress-timeline-step:hover {
    color: #1e3a8a;
}

.progress-timeline-step .timeline-connector {
    position: absolute;
    top: 11px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: #cbd5e1;
    z-index: 0;
}

.progress-timeline-step .timeline-connector-first {
    display: none;
}

.progress-timeline-step .timeline-dot {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.15s ease;
}

.progress-timeline-step .timeline-num {
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 0.2rem;
    line-height: 1;
}

.progress-timeline-step .timeline-label {
    font-size: 0.62rem;
    text-align: center;
    max-width: 5.5rem;
    line-height: 1.15;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-timeline-step.is-partial .timeline-dot {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: inset 0 0 0 3px #fffbeb;
}

.progress-timeline-step.is-partial .timeline-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
}

.progress-timeline-step.is-complete .timeline-dot {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

.progress-timeline-step.is-complete .timeline-dot::after {
    content: '✓';
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.progress-timeline-step.is-complete .timeline-connector,
.progress-timeline-step.is-partial .timeline-connector {
    background: #93c5fd;
}

.progress-timeline-step.is-complete + .progress-timeline-step .timeline-connector,
.progress-timeline-step.is-complete .timeline-connector {
    background: linear-gradient(90deg, #86efac 0%, #cbd5e1 100%);
}

.progress-timeline-step.is-complete + .progress-timeline-step.is-complete .timeline-connector,
.progress-timeline-step.is-complete:has(+ .progress-timeline-step.is-complete) .timeline-connector {
    background: #86efac;
}

.progress-timeline-step.is-active .timeline-dot {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.18);
}

.progress-timeline-step.is-active {
    color: #1e3a8a;
}

.data-entry-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0.75rem 0;
}

body:has(.data-entry-action-bar:not(.d-none)) main {
    padding-bottom: 5rem !important;
}

body.data-entry-page:has(.data-entry-action-bar:not(.d-none)) main {
    scroll-padding-top: 220px;
}

body.data-entry-page #formContent > .section-card:first-child {
    scroll-margin-top: 220px;
}

body.data-entry-page .section-card {
    scroll-margin-top: 220px;
}

/* Guided enrolment wizard */
body.data-entry-page {
    --wizard-ink: #172033;
    --wizard-muted: #657188;
    --wizard-line: #dfe5ee;
    --wizard-soft: #f4f7fb;
    --wizard-primary: #2457c5;
    --wizard-primary-dark: #183f96;
    --wizard-success: #16815f;
    background:
        radial-gradient(circle at 10% 0%, rgba(36, 87, 197, 0.08), transparent 28rem),
        #f5f7fb;
    color: var(--wizard-ink);
}

body.data-entry-page main.container-fluid {
    max-width: 1540px;
    margin: 0 auto;
}

.entry-workspace-header {
    margin-bottom: 1rem;
}

.entry-workspace-header > .section-card {
    border: 1px solid #dbe3f0 !important;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(25, 42, 78, 0.06);
    overflow: hidden;
}

.entry-workspace-header > .section-card .card-body {
    padding: 0.9rem 1.1rem !important;
}

.data-entry-title-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.5rem 0.15rem 0;
}

.entry-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--wizard-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.entry-title-copy h1 {
    margin: 0;
    color: var(--wizard-ink);
    font-size: clamp(1.55rem, 2.3vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.entry-title-copy p {
    color: var(--wizard-muted);
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
}

.entry-title-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.entry-title-status #formStatusBadge .badge,
.entry-title-status .section-progress-summary {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem !important;
    font-weight: 700;
}

.entry-title-status .section-progress-summary {
    color: #334155;
    background: #fff;
    border: 1px solid #d9e1ec;
}

body.data-entry-page .section-timeline-sticky {
    top: calc(var(--data-entry-nav-height) + 0.5rem);
    margin: 0 0 1.15rem;
    padding: 0.8rem 1rem 0.65rem;
    border: 1px solid #dbe3ef;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(30, 52, 91, 0.09);
    backdrop-filter: blur(12px);
}

.wizard-current-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.15rem 0.55rem;
}

.wizard-current-copy {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.wizard-current-kicker {
    color: var(--wizard-primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wizard-current-copy strong {
    color: var(--wizard-ink);
    font-size: 0.92rem;
}

.wizard-current-state {
    color: #68758c;
    background: #f3f5f8;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.wizard-current-state.is-complete {
    color: #087455;
    background: #e9f8f2;
}

.wizard-current-state.is-partial {
    color: #9a5b05;
    background: #fff6df;
}

body.data-entry-page .section-progress-timeline-wrap {
    margin: 0;
    padding: 0.2rem 0 0.35rem;
}

body.data-entry-page .section-progress-timeline {
    display: flex;
    justify-content: center;
    width: 100%;
    min-width: 64rem;
    padding: 0.1rem 0.25rem;
}

body.data-entry-page .progress-timeline-step {
    min-width: 5.7rem;
    padding: 0 0.2rem 0.2rem;
    color: #718096;
}

body.data-entry-page .progress-timeline-step .timeline-connector {
    top: 16px;
    height: 2px;
    background: #d9e0ea;
}

body.data-entry-page .progress-timeline-step .timeline-dot {
    width: 32px;
    height: 32px;
    border: 2px solid #cdd6e3;
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
}

body.data-entry-page .progress-timeline-step .timeline-num {
    margin: 0;
    color: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}

body.data-entry-page .progress-timeline-step .timeline-label {
    display: block !important;
    max-width: 5.9rem;
    margin-top: 0.4rem;
    color: inherit;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

body.data-entry-page .progress-timeline-step:hover .timeline-dot {
    border-color: #8da9e5;
    transform: translateY(-1px);
}

body.data-entry-page .progress-timeline-step.is-active {
    color: var(--wizard-primary);
}

body.data-entry-page .progress-timeline-step.is-active .timeline-dot {
    border-color: var(--wizard-primary);
    background: #eef3ff;
    box-shadow: 0 0 0 4px rgba(36, 87, 197, 0.12);
}

body.data-entry-page .progress-timeline-step.is-partial .timeline-dot::after {
    display: none;
}

body.data-entry-page .progress-timeline-step.is-complete .timeline-dot {
    border-color: var(--wizard-success);
    background: var(--wizard-success);
    box-shadow: 0 0 0 4px rgba(22, 129, 95, 0.1);
}

body.data-entry-page .progress-timeline-step.is-complete .timeline-num {
    display: none;
}

body.data-entry-page .progress-timeline-step.is-complete .timeline-dot::after {
    font-size: 0.88rem;
}

.wizard-progress-track {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ebf1;
}

.wizard-progress-track span {
    display: block;
    width: 9.09%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--wizard-primary), #4f86ed);
    transition: width 0.25s ease;
}

.entry-wizard-workspace {
    max-width: 1460px;
    margin: 0 auto;
}

.wizard-step-intro {
    display: flex;
    align-items: center;
    margin: 0 0 0.9rem;
    padding: 0 0.2rem;
    scroll-margin-top: 13rem;
}

.wizard-step-overline {
    color: var(--wizard-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wizard-step-intro h2 {
    margin: 0.05rem 0 0;
    color: var(--wizard-ink);
    font-size: 1.28rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.wizard-step-intro p {
    margin: 0.18rem 0 0;
    color: var(--wizard-muted);
    font-size: 0.9rem;
}

.wizard-form-surface {
    min-height: 24rem;
}

body.wizard-step-mode #enrolmentForm > .section-card[hidden] {
    display: none !important;
}

body.wizard-step-mode #enrolmentForm > .section-card.wizard-active-panel {
    animation: wizard-panel-in 0.2s ease-out;
}

@keyframes wizard-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

body.data-entry-page .wizard-form-surface .section-card {
    margin-bottom: 0.9rem;
    border: 1px solid var(--wizard-line);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px rgba(27, 45, 80, 0.07);
}

body.data-entry-page .wizard-form-surface .section-card .card-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #e2e7ef;
    border-radius: 0 !important;
    color: #22304a;
    background: #f8faff;
    font-size: 0.96rem;
    font-weight: 750;
}

body.data-entry-page .wizard-form-surface .section-card .card-header i {
    color: var(--wizard-primary);
}

body.data-entry-page .wizard-form-surface .section-card .card-body {
    padding: 1.2rem;
}

body.data-entry-page .detail-entry-form {
    border-color: #dfe6f1 !important;
    border-radius: 0.8rem !important;
    background: #f8fafd;
}

body.data-entry-page .form-label,
body.data-entry-page .form-check-label {
    color: #354158;
    font-size: 0.9rem;
    font-weight: 600;
}

body.data-entry-page .form-control,
body.data-entry-page .form-select {
    min-height: 2.5rem;
    border-color: #ccd6e4;
    border-radius: 0.55rem;
}

body.data-entry-page .form-control:focus,
body.data-entry-page .form-select:focus {
    border-color: #5b82d8;
    box-shadow: 0 0 0 0.2rem rgba(36, 87, 197, 0.12);
}

.wizard-navigation {
    display: grid;
    grid-template-columns: auto minmax(12rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #dce3ed;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 8px 22px rgba(27, 45, 80, 0.06);
}

.wizard-back-btn {
    color: #44516a;
    border: 1px solid #d4dce8;
    background: #fff;
}

.wizard-back-btn:hover:not(:disabled) {
    color: var(--wizard-primary);
    border-color: #a9bde7;
    background: #f6f8fd;
}

.wizard-navigation-message {
    color: #7a5a18;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
}

.wizard-navigation-message .bi-check-circle-fill {
    color: var(--wizard-success);
}

.wizard-next-btn,
.wizard-navigation .btn,
.final-step-buttons .btn {
    min-height: 2.65rem;
    border-radius: 0.62rem;
    font-weight: 700;
}

.wizard-next-btn:disabled {
    color: #8b96a8;
    border-color: #dce1e9;
    background: #e9edf3;
    opacity: 1;
}

body.data-entry-page .data-entry-action-bar {
    position: static;
    display: none;
    margin-top: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.final-step-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid #cfe0da;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f3fbf8, #fff);
    box-shadow: 0 10px 28px rgba(20, 96, 73, 0.08);
}

.final-step-actions-copy {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 15rem;
}

.final-actions-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #fff;
    background: var(--wizard-success);
    font-size: 1.2rem;
}

.final-step-actions h3 {
    margin: 0;
    color: #173a30;
    font-size: 1rem;
    font-weight: 800;
}

.final-step-actions p {
    margin: 0.2rem 0 0;
    color: #60756e;
    font-size: 0.82rem;
}

.final-step-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.55rem;
}

#wizardBackFromFinalBtn {
    margin-right: auto;
}

body.wizard-step-mode main.container-fluid {
    padding-bottom: 1.75rem !important;
    scroll-padding-top: 13rem;
}

@media (max-width: 991.98px) {
    .data-entry-title-bar,
    .final-step-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .entry-title-status {
        justify-content: flex-start;
        width: 100%;
    }

    body.data-entry-page .section-timeline-sticky {
        top: var(--data-entry-nav-height);
        margin-left: -0.25rem;
        margin-right: -0.25rem;
        border-radius: 0.75rem;
    }

    .wizard-current-copy strong {
        display: none;
    }

    body.data-entry-page .section-progress-timeline {
        justify-content: flex-start;
    }

    .wizard-navigation {
        grid-template-columns: auto 1fr auto;
    }
}

@media (max-width: 575.98px) {
    .entry-workspace-header > .section-card .row > div:first-child {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .wizard-current-row {
        align-items: flex-start;
    }

    .wizard-current-state {
        font-size: 0.75rem;
    }

    .wizard-step-intro {
        align-items: flex-start;
    }

    .wizard-step-intro p {
        font-size: 0.84rem;
    }

    body.data-entry-page .wizard-form-surface .section-card .card-body {
        padding: 0.9rem;
    }

    .wizard-navigation {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .wizard-navigation-message {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: left;
    }

    .wizard-navigation .wizard-back-btn,
    .wizard-navigation .wizard-next-btn {
        width: 100%;
    }

    .final-step-buttons .btn {
        flex: 1 1 calc(50% - 0.55rem);
    }

    #wizardBackFromFinalBtn {
        flex: 0 0 auto;
    }
}

.enrollment-table-scroll-hint {
    font-size: 0.75rem;
    color: #64748b;
}

.stat-card {
    border: none;
    border-radius: .75rem;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,.1);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.dashboard-cat-item .stat-icon {
    margin: 0;
}

.section-card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    margin-bottom: 1.5rem;
}

.section-card .card-header {
    background: linear-gradient(90deg, #1e3a8a, #2563eb);
    color: #fff;
    border-radius: .75rem .75rem 0 0 !important;
    font-weight: 600;
}

/* Cook-cum-Helper & Teacher entry sections */
.detail-entry-form,
.cook-entry-form {
    background: #f8fafc;
}

.detail-list-table thead th,
.cook-list-table thead th {
    font-size: 0.85rem;
    white-space: nowrap;
}

.detail-list-table tbody td,
.cook-list-table tbody td {
    font-size: 0.9rem;
    vertical-align: middle;
}

#teacherEntryForm.opacity-50 {
    pointer-events: none;
}

.report-enrollment-table {
    font-size: 0.78rem;
}

.report-enrollment-table th,
.report-enrollment-table td {
    text-align: center;
    vertical-align: middle;
}

.report-enrollment-table .class-label {
    text-align: left !important;
    white-space: nowrap;
}

@media print {
    body:not(.a4-preview-body) .report-enrollment-table {
        font-size: 7pt;
    }

    body:not(.a4-preview-body) .aadhaar-report-table {
        font-size: 7pt;
    }
}

.aadhaar-report-table {
    font-size: 0.82rem;
}

.aadhaar-summary-table {
    font-size: 0.88rem;
    max-width: 56rem;
    margin: 0 auto;
}

.aadhaar-summary-table th,
.aadhaar-summary-table td {
    vertical-align: middle;
    text-align: center;
}

.aadhaar-summary-table tbody td {
    text-align: right;
}

.aadhaar-report-table th,
.aadhaar-report-table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.aadhaar-report-table .school-name-cell {
    text-align: left;
    white-space: normal;
    min-width: 12rem;
    max-width: 18rem;
}

.aadhaar-report-table .na-cell {
    background: #f8fafc;
}

.aadhaar-report-table thead th {
    font-size: 0.78rem;
}

.block-enrolment-report-table {
    font-size: 0.82rem;
}

.block-enrolment-report-table th,
.block-enrolment-report-table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    padding: 0.35rem 0.45rem;
}

.block-enrolment-report-table .block-label-cell,
.block-enrolment-report-table .mgmt-label-cell {
    text-align: left;
    font-weight: 600;
}

.pm-poshan-schools-table {
    font-size: 0.85rem;
}

.pm-poshan-schools-table th,
.pm-poshan-schools-table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.pm-poshan-schools-table .label-col {
    text-align: left;
    min-width: 14rem;
    white-space: normal;
}

.cook-helpers-table {
    font-size: 0.88rem;
    max-width: 56rem;
    margin: 0 auto;
}

.cook-helpers-table th,
.cook-helpers-table td {
    vertical-align: middle;
    text-align: center;
}

.cook-helpers-table .label-col {
    text-align: left;
    min-width: 8rem;
    white-space: nowrap;
}

.cook-details-table {
    font-size: 0.85rem;
}

.cook-details-table th,
.cook-details-table td {
    vertical-align: middle;
}

.school-wise-enrolment-table {
    font-size: 0.82rem;
}

.school-wise-enrolment-table th,
.school-wise-enrolment-table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.school-wise-enrolment-table .school-name-cell {
    text-align: left;
    white-space: normal;
    min-width: 14rem;
    max-width: 22rem;
}

.school-wise-enrolment-table .na-cell {
    background: #f8fafc;
}

.school-wise-report-title {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.monthly-consolidated-table {
    font-size: 0.78rem;
}

.monthly-consolidated-table th,
.monthly-consolidated-table td {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.monthly-consolidated-table .school-name-cell {
    text-align: left;
    white-space: normal;
    min-width: 12rem;
    max-width: 18rem;
}

.monthly-consolidated-title {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

@media print {
    body:not(.a4-preview-body) .school-wise-enrolment-table {
        font-size: 7pt;
    }
}

.block-report-card .table-responsive {
    overflow-x: auto;
}

.block-report-section + .block-report-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
}

.block-enrolment-report-table thead tr.table-primary th {
    background: #cfe2ff;
    font-weight: 700;
    vertical-align: middle;
}

@media print {
    body:not(.a4-preview-body) .block-enrolment-report-table {
        font-size: 6.5pt;
    }

    body:not(.a4-preview-body) .block-report-card {
        box-shadow: none !important;
        border: none !important;
    }

    body:not(.a4-preview-body) .block-report-section {
        page-break-inside: avoid;
    }
}

.aadhaar-report-table thead th {
    font-weight: 700;
}

.enrollment-table {
    font-size: .72rem;
}

.enrollment-table input {
    width: 42px;
    padding: 2px 3px;
    text-align: center;
    font-size: .72rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.enrollment-table input[type=number]::-webkit-outer-spin-button,
.enrollment-table input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.enrollment-table thead tr.table-secondary th {
    background: #e8f4fc;
    font-size: .68rem;
}

.enrollment-table thead tr.table-light th {
    background: #dbeafe;
    font-size: .68rem;
    font-weight: 600;
}

.enrollment-table th {
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

.enrollment-table td {
    vertical-align: middle;
    text-align: center;
}

.class-label {
    font-weight: 600;
    background: #eff6ff;
    text-align: left !important;
    padding-left: .5rem !important;
    white-space: nowrap;
}

.enrollment-level-header td {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    font-size: .85rem;
    text-align: left !important;
}

.enrollment-level-subtotal td {
    background: #f1f5f9;
    font-weight: 600;
}

.subtotal-row {
    background: #fef3c7;
    font-weight: 700;
}

.grandtotal-row {
    background: #dbeafe;
    font-weight: 700;
}

.nav-pills .nav-link {
    color: #374151;
    border-radius: .5rem;
    margin-bottom: .25rem;
}

.nav-pills .nav-link.active {
    background: #1e3a8a;
}

.toast-container {
    z-index: 9999;
}

.table-actions .btn {
    padding: .2rem .5rem;
    font-size: .8rem;
}

.progress-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 600;
}

.progress-step.done {
    background: #22c55e;
    color: #fff;
}

.progress-step.active {
    background: #1e3a8a;
    color: #fff;
}

.progress-step.pending {
    background: #e5e7eb;
    color: #6b7280;
}

@media print {
    body.a4-preview-body .navbar,
    body.a4-preview-body .a4-preview-toolbar,
    body.a4-preview-body footer,
    body.a4-preview-body .no-print {
        display: none !important;
    }

    body.a4-preview-body main.container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .navbar, #refreshReports, .nav-tabs, .btn { display: none !important; }
    .tab-pane { display: block !important; opacity: 1 !important; }
}

@media (max-width: 768px) {
    .enrollment-table {
        font-size: .65rem;
    }
    .enrollment-table input {
        width: 36px;
    }
}

/* ---- School dashboard ---- */
body.school-dashboard-page {
    background: linear-gradient(180deg, #eef2ff 0%, #f4f6fb 220px, #f4f6fb 100%);
}

.school-dashboard-page .school-dash-shell > .section-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.07);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.school-dash-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.75rem 1.85rem;
    border-radius: 1.15rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
    position: relative;
    overflow: hidden;
}

.school-dash-hero::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -120px;
    right: -40px;
}

.school-dash-hero-main,
.school-dash-hero-aside {
    position: relative;
    z-index: 1;
}

.school-dash-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.82;
    font-weight: 600;
}

.school-dash-title {
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.school-dash-subtitle {
    opacity: 0.92;
    font-size: 0.95rem;
}

.school-dash-hero-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.school-dash-session-pill,
.school-dash-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.school-dash-session-pill {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.school-dash-status-pill.tone-success { background: rgba(34, 197, 94, 0.22); }
.school-dash-status-pill.tone-warning,
.school-dash-status-pill.tone-amber { background: rgba(245, 158, 11, 0.24); }
.school-dash-status-pill.tone-muted { background: rgba(255, 255, 255, 0.12); }

.school-dash-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1.15rem 1.2rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.school-dash-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.school-dash-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.school-dash-stat.tone-primary .school-dash-stat-icon { background: #dbeafe; color: #1d4ed8; }
.school-dash-stat.tone-success .school-dash-stat-icon { background: #dcfce7; color: #15803d; }
.school-dash-stat.tone-info .school-dash-stat-icon { background: #e0f2fe; color: #0369a1; }
.school-dash-stat.tone-indigo .school-dash-stat-icon { background: #e0e7ff; color: #4338ca; }
.school-dash-stat.tone-rose .school-dash-stat-icon { background: #ffe4e6; color: #e11d48; }

.school-dash-stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.school-dash-stat-value {
    display: block;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    font-size: 1rem;
}

.school-dash-stat-value.lg { font-size: 1.65rem; }
.school-dash-stat-value.sm { font-size: 0.92rem; }

.school-dash-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    padding: 1.25rem 1.35rem;
}

.school-dash-panel-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.school-dash-panel-icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.school-dash-panel-icon.tone-primary { background: #dbeafe; color: #1d4ed8; }
.school-dash-panel-icon.tone-sky { background: #e0f2fe; color: #0284c7; }
.school-dash-panel-icon.tone-emerald { background: #d1fae5; color: #059669; }
.school-dash-panel-icon.tone-violet { background: #ede9fe; color: #7c3aed; }
.school-dash-panel-icon.tone-indigo { background: #e0e7ff; color: #4338ca; }

.school-dash-panel-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.school-dash-panel-desc {
    font-size: 0.8rem;
    color: #64748b;
}

.school-dash-metric + .school-dash-metric {
    margin-top: 1rem;
}

.school-dash-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.school-dash-bar {
    height: 0.45rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.school-dash-bar .fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.5s ease;
}

.school-dash-bar .fill.tone-sky { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.school-dash-bar .fill.tone-rose { background: linear-gradient(90deg, #fb7185, #e11d48); }
.school-dash-bar .fill.tone-emerald { background: linear-gradient(90deg, #34d399, #059669); }
.school-dash-bar .fill.tone-amber { background: linear-gradient(90deg, #fbbf24, #d97706); }

.school-dash-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.school-dash-category-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.school-dash-category-chip .chip-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.school-dash-category-chip.tone-primary .chip-icon { background: #dbeafe; color: #1d4ed8; }
.school-dash-category-chip.tone-success .chip-icon { background: #dcfce7; color: #15803d; }
.school-dash-category-chip.tone-info .chip-icon { background: #e0f2fe; color: #0369a1; }
.school-dash-category-chip.tone-indigo .chip-icon { background: #e0e7ff; color: #4338ca; }
.school-dash-category-chip.tone-amber .chip-icon { background: #fef3c7; color: #b45309; }

.school-dash-category-chip .chip-data {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.school-dash-category-chip .chip-data strong {
    font-size: 1.05rem;
    color: #0f172a;
}

.school-dash-category-chip .chip-data small {
    color: #64748b;
    font-size: 0.72rem;
}

.school-dash-empty-insight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    color: #475569;
}

.school-dash-empty-insight > i {
    font-size: 1.75rem;
    color: #94a3b8;
}

.school-dash-checklist {
    padding-top: 0.35rem;
}

.school-dash-check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.15rem;
    border-bottom: 1px solid #f1f5f9;
}

.school-dash-check-item:last-child {
    border-bottom: none;
}

.school-dash-check-item .check-num {
    width: 1.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    flex-shrink: 0;
}

.school-dash-check-item .check-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.6rem;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.school-dash-check-item .check-copy {
    flex: 1;
    min-width: 0;
}

.school-dash-check-item .check-copy strong {
    display: block;
    font-size: 0.92rem;
    color: #0f172a;
}

.school-dash-check-item .check-copy small {
    color: #64748b;
    font-size: 0.78rem;
}

.school-dash-check-item .check-state {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.school-dash-check-item .check-state.done {
    background: #dcfce7;
    color: #16a34a;
}

.school-dash-check-item .check-state.progress {
    background: #fef3c7;
    color: #d97706;
}

.school-dash-check-item .check-state.pending {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Compact enrolment form checklist panel */
.school-dash-form-checklist {
    padding: 0.75rem 0.95rem;
}

.school-dash-form-checklist .school-dash-panel-head {
    margin-bottom: 0.35rem;
    gap: 0.55rem;
    padding-bottom: 0.55rem !important;
}

.school-dash-form-checklist .school-dash-panel-icon {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.85rem;
    border-radius: 0.55rem;
}

.school-dash-form-checklist .school-dash-panel-title {
    font-size: 0.88rem;
}

.school-dash-form-checklist .school-dash-panel-desc {
    font-size: 0.68rem;
}

.school-dash-form-checklist .school-dash-chip {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
}

.school-dash-form-checklist .school-dash-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.85rem;
    padding-top: 0.1rem;
}

.school-dash-form-checklist .school-dash-check-item {
    padding: 0.35rem 0.05rem;
    gap: 0.45rem;
}

.school-dash-form-checklist .school-dash-check-item .check-num {
    width: 1rem;
    font-size: 0.62rem;
}

.school-dash-form-checklist .school-dash-check-item .check-icon {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.72rem;
    border-radius: 0.4rem;
}

.school-dash-form-checklist .school-dash-check-item .check-copy strong {
    font-size: 0.78rem;
    line-height: 1.2;
}

.school-dash-form-checklist .school-dash-check-item .check-copy small {
    font-size: 0.65rem;
    line-height: 1.2;
}

.school-dash-form-checklist .school-dash-check-item .check-state {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.7rem;
}

@media (max-width: 767.98px) {
    .school-dash-form-checklist .school-dash-checklist {
        grid-template-columns: 1fr;
    }
}

/* School login reminder for the currently due monthly report */
.monthly-reminder-modal .modal-content {
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 1.2rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.monthly-reminder-modal .modal-header,
.monthly-reminder-modal .modal-body,
.monthly-reminder-modal .modal-footer {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.monthly-reminder-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
}

.monthly-reminder-status.tone-pending {
    color: #9a3412;
    background: #ffedd5;
}

.monthly-reminder-status.tone-draft {
    color: #1d4ed8;
    background: #dbeafe;
}

.monthly-reminder-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.7rem 0 1rem;
}

.monthly-reminder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    color: #b45309;
    background: #fef3c7;
    font-size: 1.45rem;
}

.monthly-reminder-heading h2 {
    margin: 0 0 0.3rem;
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.monthly-reminder-heading p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.55;
}

.monthly-reminder-deadline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.85rem;
    color: #1e3a8a;
    background: #eff6ff;
}

.monthly-reminder-deadline > i {
    font-size: 1.25rem;
}

.monthly-reminder-deadline div {
    display: grid;
    gap: 0.1rem;
}

.monthly-reminder-deadline div span {
    color: #64748b;
    font-size: 0.875rem;
}

.monthly-reminder-deadline div strong {
    font-size: 0.95rem;
}

.monthly-reminder-days {
    margin-left: auto;
    padding: 0.3rem 0.55rem;
    border-radius: 0.55rem;
    color: #047857;
    background: #d1fae5;
    font-size: 0.875rem;
    font-weight: 750;
    white-space: nowrap;
}

.monthly-reminder-days.is-urgent {
    color: #b91c1c;
    background: #fee2e2;
}

.monthly-reminder-note {
    padding-top: 0.85rem;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 575.98px) {
    .monthly-reminder-heading {
        gap: 0.7rem;
    }

    .monthly-reminder-icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 0.8rem;
        font-size: 1.2rem;
    }

    .monthly-reminder-deadline {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .monthly-reminder-days {
        width: 100%;
        margin-left: 2rem;
        text-align: center;
    }

    .monthly-reminder-modal .modal-footer .btn {
        flex: 1 1 100%;
    }
}

.school-dash-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.school-dash-chip.tone-primary { background: #dbeafe; color: #1d4ed8; }
.school-dash-chip.tone-success { background: #dcfce7; color: #15803d; }
.school-dash-chip.tone-amber { background: #fef3c7; color: #b45309; }

.school-dash-cta {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.school-dash-cta:hover {
    color: #fff;
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.school-dash-history thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom-width: 1px;
    background: #f8fafc;
}

.school-dash-history tbody td {
    font-size: 0.88rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-color: #f1f5f9;
}

@media (max-width: 767.98px) {
    .school-dash-hero {
        padding: 1.35rem;
    }

    .school-dash-hero-aside {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .school-dash-category-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- School enrolment report ---- */
body.school-enrolment-report-page {
    background: linear-gradient(180deg, #eef2ff 0%, #f4f6fb 220px, #f4f6fb 100%);
}

.school-enrolment-report-page .school-report-shell > .section-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.07);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
}

.school-report-hero {
    margin-bottom: 1.5rem;
}

.school-report-hero-actions {
    align-items: flex-end;
    gap: 0.75rem;
}

.school-report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.school-report-btn-light {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-weight: 600;
    border-radius: 0.55rem;
    backdrop-filter: blur(4px);
}

.school-report-btn-light:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
}

.school-report-btn-accent {
    background: #fff;
    border: none;
    color: #1d4ed8;
    font-weight: 600;
    border-radius: 0.55rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.school-report-btn-accent:hover {
    background: #f8fafc;
    color: #1e40af;
}

.school-report-empty {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px dashed #cbd5e1;
    color: #475569;
}

.school-report-empty > i {
    font-size: 1.85rem;
    color: #94a3b8;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.school-report-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin-bottom: 1.5rem;
}

.school-report-loading-inner {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    min-width: 260px;
}

.school-report-table-panel {
    padding: 0;
    overflow: hidden;
    max-width: 520px;
}

.school-report-table-panel .school-dash-panel-head {
    padding: 0.75rem 1rem 0.55rem;
    margin-bottom: 0;
    gap: 0.55rem;
}

.school-report-table-panel .school-dash-panel-icon {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.85rem;
    border-radius: 0.55rem;
}

.school-report-table-panel .school-dash-panel-title {
    font-size: 0.88rem;
}

.school-report-table-panel .school-dash-panel-desc {
    font-size: 0.68rem;
}

.school-report-table-wrap {
    padding: 0 1rem 1rem;
}

.school-report-class-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    overflow: hidden;
    font-size: 0.78rem;
}

.school-report-class-table thead th {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e3a8a;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #bfdbfe;
    padding: 0.4rem 0.55rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.school-report-class-table thead th i {
    font-size: 0.7rem;
}

.school-report-class-table thead th.class-label {
    text-align: left;
}

.school-report-class-table tbody td {
    padding: 0.35rem 0.55rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #334155;
}

.school-report-class-table tbody tr:hover td {
    background: #f8fafc;
}

.school-report-class-table tbody td.class-label {
    text-align: left;
    font-weight: 600;
    color: #0f172a;
    font-size: 0.76rem;
}

.school-report-class-table tbody td.fw-bold {
    color: #1d4ed8;
    font-weight: 700 !important;
}

.school-report-class-table tfoot td {
    background: linear-gradient(180deg, #fef9c3 0%, #fef08a 100%);
    color: #713f12;
    font-weight: 700;
    padding: 0.4rem 0.55rem;
    text-align: center;
    border-top: 1px solid #fde047;
    font-size: 0.78rem;
}

.school-report-class-table tfoot td:first-child {
    text-align: left;
}

.school-report-meta {
    margin-top: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.78rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .school-report-hero-actions {
        align-items: flex-start;
        width: 100%;
    }

    .school-report-toolbar {
        justify-content: flex-start;
    }

    .school-report-table-wrap {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .school-report-table-panel {
        max-width: none;
    }
}

@media print {
    body.school-enrolment-report-page {
        background: #fff !important;
    }

    .school-enrolment-report-page .school-report-shell > .section-card,
    .school-report-table-panel,
    .school-dash-stat {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    .school-report-class-table thead th {
        background: #e9ecef !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .school-report-class-table tfoot td {
        background: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---- Monthly entry ---- */
body.monthly-entry-page {
    background: linear-gradient(180deg, #eef2ff 0%, #f4f6fb 220px, #f4f6fb 100%);
}

.school-report-toolbar select.form-select.school-report-btn-light {
    min-width: 10rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-weight: 600;
    border-radius: 0.55rem;
}

.school-report-toolbar select.form-select.school-report-btn-light option {
    color: #0f172a;
}

.monthly-entry-shell > .section-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(30, 58, 138, 0.07);
    background: rgba(255, 255, 255, 0.92);
}

.monthly-section-i-panel {
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.monthly-section-i-panel .school-dash-panel-head {
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.35) 0%, transparent 100%);
}

.monthly-panel-body {
    padding: 1.15rem 1.25rem;
}

.monthly-section-i-body {
    padding: 0.75rem 1rem 1rem;
}

.monthly-section-i-wrap {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #dbeafe;
}

.monthly-section-table {
    font-size: 0.82rem;
    margin-bottom: 0;
    border-color: #e2e8f0;
}

.monthly-section-table thead th {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e3a8a;
    text-align: center;
    vertical-align: middle;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.55rem 0.4rem;
    border-color: #bfdbfe;
    line-height: 1.25;
}

.monthly-section-table .monthly-th-group th {
    padding-top: 0.65rem;
    padding-bottom: 0.35rem;
}

.monthly-section-table .monthly-th-sub th {
    font-size: 0.68rem;
    font-weight: 600;
    padding-top: 0.35rem;
    padding-bottom: 0.55rem;
}

.monthly-section-table .th-group.th-aadhaar-yes {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.monthly-section-table .th-group.th-aadhaar-no {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
}

.monthly-section-table .th-group.th-total {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
}

.monthly-section-table .th-group.th-impl {
    background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
    color: #5b21b6;
}

.monthly-section-table .th-meals {
    background: linear-gradient(180deg, #fef9c3 0%, #fef08a 100%);
    color: #854d0e;
    min-width: 4.5rem;
}

.monthly-section-table .level-col {
    text-align: left;
    min-width: 7.5rem;
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(15, 23, 42, 0.04);
}

.monthly-section-table tbody tr:nth-child(even) td:not(.level-col) {
    background: #fafbfc;
}

.monthly-section-table td {
    vertical-align: middle;
    padding: 0.4rem 0.35rem;
    border-color: #e2e8f0;
}

.monthly-section-table td:nth-child(2),
.monthly-section-table td:nth-child(3),
.monthly-section-table thead .monthly-th-sub th:nth-child(1),
.monthly-section-table thead .monthly-th-sub th:nth-child(2) {
    background-color: rgba(239, 246, 255, 0.55);
}

.monthly-section-table td:nth-child(4),
.monthly-section-table td:nth-child(5),
.monthly-section-table thead .monthly-th-sub th:nth-child(3),
.monthly-section-table thead .monthly-th-sub th:nth-child(4) {
    background-color: rgba(255, 247, 237, 0.55);
}

.monthly-section-table td:nth-child(6),
.monthly-section-table td:nth-child(7),
.monthly-section-table thead .monthly-th-sub th:nth-child(5),
.monthly-section-table thead .monthly-th-sub th:nth-child(6) {
    background-color: rgba(240, 253, 244, 0.55);
}

.monthly-section-table td:nth-child(8),
.monthly-section-table td:nth-child(9),
.monthly-section-table td:nth-child(10),
.monthly-section-table thead .monthly-th-sub th:nth-child(7),
.monthly-section-table thead .monthly-th-sub th:nth-child(8),
.monthly-section-table thead .monthly-th-sub th:nth-child(9) {
    background-color: rgba(245, 243, 255, 0.45);
}

.monthly-section-table td:last-child,
.monthly-section-table .th-meals {
    background-color: rgba(254, 249, 195, 0.45);
}

.monthly-section-table .calc-cell {
    font-weight: 700;
    color: #334155;
    min-width: 3rem;
}

.monthly-section-table .calc-boys { color: #1d4ed8; }
.monthly-section-table .calc-girls { color: #be123c; }
.monthly-section-table .calc-meals { color: #15803d; }

.monthly-section-table .monthly-i-readonly {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
}

.monthly-section-table .monthly-section-i-editable {
    border-color: #3b82f6;
    background: #fff;
}

.monthly-section-table .monthly-section-i-input {
    min-width: 3.25rem;
    max-width: 4.5rem;
    margin: 0 auto;
    padding: 0.4rem 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.45rem;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.monthly-section-table .monthly-section-i-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.monthly-section-table tfoot td {
    background: #fef9c3;
    font-weight: 700;
    text-align: center;
    border-color: #fde047;
}

.monthly-section-table tfoot .level-col {
    text-align: left;
    background: #fef08a;
}

.monthly-section-table tfoot .monthly-i-total-row .calc-meals {
    color: #854d0e;
    font-size: 0.9rem;
}

.session-wd-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    height: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
}

.session-wd-shell {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    background: #fff;
}

.session-wd-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
}

.session-wd-eyebrow {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.82;
    margin-bottom: 0.15rem !important;
}

.session-wd-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.session-wd-subtitle {
    font-size: 0.74rem;
    opacity: 0.9;
}

.session-wd-hero-stats {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.session-wd-stat {
    min-width: 4.25rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    text-align: center;
}

.session-wd-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.session-wd-stat-label {
    display: block;
    font-size: 0.6rem;
    opacity: 0.85;
    margin-top: 0.1rem;
}

.session-wd-body {
    padding: 0.75rem 0.85rem 0.85rem;
}

.session-wd-loading {
    text-align: center;
    padding: 1rem 0.75rem;
}

.session-wd-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

.session-wd-loading p {
    font-size: 0.78rem;
    margin-top: 0.5rem !important;
}

.session-wd-note {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.65rem;
    border-radius: 0.55rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 0.72rem;
    line-height: 1.35;
}

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

.session-wd-month-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.session-wd-month-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.session-wd-month-card.is-filled {
    border-color: #86efac;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.session-wd-month-card.is-entry-open {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.session-wd-month-card.tone-spring { border-top: 2px solid #34d399; }
.session-wd-month-card.tone-summer { border-top: 2px solid #fbbf24; }
.session-wd-month-card.tone-monsoon { border-top: 2px solid #60a5fa; }
.session-wd-month-card.tone-winter { border-top: 2px solid #a78bfa; }

.session-wd-month-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
}

.session-wd-month-date {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    line-height: 1.1;
}

.session-wd-month-abbr {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
}

.session-wd-month-year {
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 600;
}

.session-wd-open-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.58rem;
    font-weight: 700;
    white-space: nowrap;
}

.session-wd-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
}

.session-wd-input-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.session-wd-input {
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    border-radius: 0.45rem;
    border: 1px solid #cbd5e1;
    padding: 0.25rem 0.35rem;
    min-height: 0;
}

.session-wd-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.session-wd-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

.session-wd-hint {
    font-size: 0.58rem;
    color: #94a3b8;
}

.session-wd-status {
    font-size: 0.58rem;
    font-weight: 700;
}

.session-wd-status.tone-set { color: #15803d; }
.session-wd-status.tone-empty { color: #94a3b8; }

.session-wd-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e2e8f0;
}

.ac-submission-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ac-submission-row-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
}

.ac-submission-name {
    font-weight: 700;
    color: #0f172a;
    min-width: 6.5rem;
}

.ac-submission-count {
    color: #64748b;
    flex: 1 1 auto;
}

.ac-submission-pct {
    font-weight: 700;
    color: #15803d;
    min-width: 2.5rem;
    text-align: right;
}

.ac-submission-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
}

.overall-submission-bar {
    border-radius: 999px;
}

@media (max-width: 575.98px) {
    .ac-submission-row-head {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .ac-submission-count {
        flex-basis: 100%;
        order: 3;
    }
}

@media (max-width: 1399.98px) {
    .session-wd-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .session-wd-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .session-wd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .session-wd-hero {
        padding: 0.65rem 0.75rem;
    }
}

@media (max-width: 479.98px) {
    .session-wd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.monthly-submitted-list-table tbody tr:hover {
    background: #f0fdf4;
}

.monthly-submitted-list-table .monthly-view-submitted {
    border-radius: 0.45rem;
}

.monthly-submitted-panel {
    border: 1px solid #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.monthly-submitted-wrap {
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: hidden;
}

.monthly-submitted-table {
    font-size: 0.82rem;
    margin-bottom: 0;
}

.monthly-submitted-table .monthly-submitted-meta th {
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
    color: #166534;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-color: #bbf7d0;
}

.monthly-submitted-meta-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    margin-bottom: 0.15rem;
    font-size: 0.78rem;
}

.monthly-submitted-table .monthly-submitted-section-row td,
.monthly-submitted-table .monthly-submitted-section-row th {
    background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 100%);
    color: #1e40af;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.55rem 0.85rem;
    border-color: #bfdbfe;
}

.monthly-submitted-ii-row td {
    vertical-align: middle;
    padding: 0.55rem 0.75rem;
}

.monthly-submitted-ii-label {
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
}

.monthly-submitted-ii-value {
    font-weight: 700;
    color: #0f172a;
}

.monthly-submitted-table .monthly-i-total-row td {
    background: #fef9c3;
    font-weight: 700;
}

.monthly-submitted-table .monthly-i-readonly {
    background: #fff;
}

.monthly-input {
    border-radius: 0.6rem;
    border: 1px solid #cbd5e1;
    padding: 0.55rem 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.monthly-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sticky-bottom-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: rgba(244, 246, 251, 0.95);
    backdrop-filter: blur(6px);
    padding: 0.85rem 0;
    margin-top: 0.5rem;
}

.monthly-submitted-lock .monthly-section-i-input,
.monthly-submitted-lock .monthly-input,
.monthly-submitted-lock .monthly-num,
.monthly-submitted-lock .monthly-text,
.monthly-submitted-lock select,
.monthly-submitted-lock input:not([readonly]) {
    pointer-events: none;
    background: #f8fafc;
}

.monthly-field-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.monthly-split-input {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.monthly-split-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.monthly-split-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    width: fit-content;
}

.monthly-split-tag.tone-boys { background: #dbeafe; color: #1d4ed8; }
.monthly-split-tag.tone-girls { background: #ffe4e6; color: #be123c; }

@media (max-width: 767.98px) {
    .monthly-split-input {
        grid-template-columns: 1fr;
    }

    .monthly-section-table {
        font-size: 0.72rem;
    }

    .monthly-section-table .monthly-section-i-input {
        min-width: 2.75rem;
        max-width: 3.5rem;
        padding: 0.3rem 0.2rem;
        font-size: 0.75rem;
    }
}
