:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #5b6575;
    --navy: #0d2c54;
    --navy-dark: #0a2143;
    --primary: #103c73;
    --primary-dark: #0d2c54;
    --accent: #e8760f;
    --accent-dark: #cf6300;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(13, 44, 84, 0.08);
    --brand-logo-h: 84px;
    --page-pad-x: clamp(0.85rem, 3vw, 1.25rem);
    --page-pad-y: clamp(1.1rem, 2.5vw, 2rem);
    --font-ui: "Source Sans 3", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --font-display: "IBM Plex Sans", "Source Sans 3", "Segoe UI", sans-serif;
    --admin-line: #c5d2e3;
    --admin-wash: #e6eef7;
    --admin-panel: #ffffff;
    --admin-ink: #0d2c54;
    --admin-space: clamp(1.35rem, 2.8vw, 2.1rem);
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
    margin: 0;
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.card-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: var(--page-pad-y) var(--page-pad-x);
    min-height: 0;
    min-width: 0;
}

.page-frame {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-home .page-frame,
body.page-auth .page-frame {
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

body.page-home .page-frame > .hero,
body.page-auth .page-frame > .auth-shell {
    flex: 0 0 auto;
    min-width: 0;
}

body.page-home > .site-footer,
body.page-auth > .site-footer {
    margin-top: 0;
}

body.page-home > .container,
body.page-auth > .container {
    display: none;
}

.topbar {
    position: relative;
    background: var(--navy);
    color: #dbe4f0;
    font-size: 0.85rem;
}

.topbar .inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
}

.topbar-contact { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.topbar a { color: #dbe4f0; }
.topbar a:hover { color: #fff; text-decoration: none; }

.topbar-social {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: 0.15rem;
}

.topbar-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dbe4f0;
    transition: color 0.15s;
}

.topbar-social a:hover { color: #fff; text-decoration: none; }
.topbar-social svg { width: 16px; height: 16px; }

.topbar-accent {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 10px;
    background: var(--accent);
}

.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--navy);
    padding: 0.85rem 0;
    box-shadow: 0 2px 10px rgba(13, 44, 84, 0.06);
}

.site-header .inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
}

.brand:hover { text-decoration: none; }

.brand-logo {
    display: block;
    height: var(--brand-logo-h);
    width: auto;
}

.brand-text {
    color: var(--navy);
    font-size: clamp(0.95rem, 2.6vw, 1.55rem);
    font-weight: 700;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-left: auto;
    min-width: 0;
}

.nav-links > a:not(.btn),
.nav-links .nav-dropdown__toggle {
    color: var(--navy);
    font-family: var(--font-ui, inherit);
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links > a:not(.btn):hover,
.nav-links .nav-dropdown__toggle:hover,
.nav-links .nav-dropdown.is-open .nav-dropdown__toggle {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 3px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1100px) {
    .site-header {
        position: relative;
    }

    .site-header .inner {
        flex-wrap: nowrap;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
    }

    .brand-logo {
        flex-shrink: 0;
    }

    .brand-text {
        min-width: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        flex: none;
        margin-left: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(13, 44, 84, 0.12);
        padding: 0.5rem 1.25rem 1rem;
        z-index: 40;
        max-height: min(70vh, 520px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links > a:not(.btn) {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links > .btn.btn-accent.btn-sm {
        margin-top: 0.75rem;
        text-align: center;
        width: 100%;
    }
}

/* Footer (UET pattern: logo, Contact, Important Links) */
.site-footer {
    background: var(--navy);
    color: #fff;
    font-size: 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}

.footer-grid {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(1.75rem, 4vw, 3rem) var(--page-pad-x) clamp(1.35rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) minmax(220px, 1fr);
    column-gap: clamp(1.5rem, 4vw, 4rem);
    row-gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
    box-sizing: border-box;
}

.footer-logo-col {
    display: flex;
    align-items: flex-start;
    padding-top: 0.25rem;
    min-width: 0;
}

.footer-logo {
    height: clamp(72px, 12vw, 130px);
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.footer-col {
    min-width: 0;
}

.footer-col h3 {
    color: #fff;
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 800;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.footer-contact-groups { display: grid; gap: 1.15rem; }

.fc-line {
    margin: 0;
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.92rem, 2vw, 1.05rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.footer-links li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}

.footer-links li::before {
    content: "\00BB";
    color: #fff;
    font-weight: 700;
    flex: 0 0 auto;
}

.footer-links a {
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.92rem, 2vw, 1.05rem);
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    padding: 1.15rem var(--page-pad-x);
    color: #fff;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-weight: 400;
    line-height: 1.45;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 1.5rem;
        row-gap: 1.75rem;
    }

    .footer-logo-col {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .footer-col h3 {
        padding-bottom: 0.75rem;
        margin-bottom: 0.85rem;
    }

    .footer-contact-groups {
        gap: 0.9rem;
    }

    .footer-links {
        gap: 0.7rem;
    }
}

@media (max-width: 640px) {
    .site-footer {
        margin-top: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem var(--page-pad-x) 1.25rem;
    }

    .footer-logo-col {
        grid-column: auto;
        justify-content: center;
        padding-top: 0;
    }

    .footer-logo {
        height: 80px;
    }

    .footer-col h3 {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.65rem;
    }

    .footer-contact-groups {
        gap: 0.75rem;
    }

    .footer-links {
        gap: 0.35rem;
    }

    .footer-links li {
        padding: 0.35rem 0;
    }

    .footer-links a,
    .fc-line {
        font-size: 0.95rem;
    }

    .footer-bottom {
        font-size: 0.85rem;
        padding: 0.95rem var(--page-pad-x);
        text-wrap: balance;
    }
}

@media (max-width: 480px) {
    .footer-logo {
        height: 68px;
    }

    .footer-grid {
        gap: 1.25rem;
        padding: 1.35rem 0.9rem 1.1rem;
    }
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.card-link {
    display: block;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: inherit;
    box-shadow: var(--shadow);
}

.card-link {
    border-top: 3px solid transparent;
}

.card-link:hover {
    border-color: var(--border);
    border-top-color: var(--accent);
    box-shadow: 0 10px 24px rgba(13, 44, 84, 0.12);
    text-decoration: none;
}

.card-link h2,
.card-link h3 {
    color: var(--navy);
    font-size: 1.05rem;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}

.card-link p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.4;
}

/* Centered narrow admin settings forms (e.g. Application Deadline) */
.settings-panel {
    width: min(28rem, 100%);
    margin: 0 auto;
}

.settings-panel .card {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    text-align: left;
}

.settings-panel .actions {
    justify-content: flex-end;
}

.input-amount {
    width: min(12rem, 100%) !important;
    max-width: 12rem;
}

.input-locked {
    resize: none;
}

.card--compact {
    padding: 0.9rem 1.05rem;
}

.card--compact h2 {
    font-size: 1.1rem;
    margin-bottom: 0.55rem;
}

.card--compact .tag {
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
}

h1, h2, h3 {
    margin-top: 0;
    color: var(--navy);
    font-family: var(--font-display);
}

.muted { color: var(--muted); }

.form-group { margin-bottom: 1rem; }

.form-group--narrow {
    max-width: 22rem;
}

.form-group--narrow select,
select.select-narrow {
    width: 100%;
    max-width: 22rem;
}

.existing-alloc-clear {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.flash[hidden],
.flash[hidden] *,
.btn[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.existing-alloc-lms-sync-status {
    align-items: center;
    margin: 0 0 1rem;
}

.existing-alloc-lms-sync-status__stop {
    flex-shrink: 0;
    margin-left: auto;
}

.existing-alloc-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.existing-alloc-result__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 8rem;
}

.existing-alloc-result__stats {
    margin: 0 0 0.75rem;
}

.existing-alloc-clear .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.existing-alloc-list-header {
    margin-top: 1.75rem;
}

.existing-alloc-set-challan {
    margin-top: 1rem;
}

.existing-alloc-set-challan__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.existing-alloc-set-challan__hint {
    margin: 0 0 1rem;
}

.existing-alloc-set-challan__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 18rem));
    gap: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}

@media (max-width: 640px) {
    .existing-alloc-set-challan__grid {
        grid-template-columns: 1fr;
    }
}

.existing-alloc-set-challan__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 14rem;
}

.existing-alloc-set-challan__input {
    flex: 1 1 8rem;
    min-width: 0;
    font-family: inherit;
}

.existing-alloc-set-challan__save {
    flex: 0 0 auto;
    height: 2.15rem;
    min-height: 2.15rem;
    padding: 0 0.7rem;
    font-size: 0.82rem;
}

.existing-alloc-add {
    margin-top: 1rem;
}

.existing-alloc-add__toggle.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 7px;
    box-sizing: border-box;
}

body.page-admin .existing-alloc-add__toggle {
    background: #fff;
    color: var(--navy);
    border: 1px solid #c0cedf;
}

body.page-admin .existing-alloc-add__toggle:hover,
body.page-admin .existing-alloc-add.is-open .existing-alloc-add__toggle {
    background: #e8eef6;
    border-color: #a8b9d0;
    color: var(--navy-dark);
    transform: none;
}

.existing-alloc-add__caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.15rem;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    flex-shrink: 0;
    opacity: 0.7;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.existing-alloc-add.is-open .existing-alloc-add__caret {
    transform: rotate(180deg);
}

.existing-alloc-add__panel {
    margin-top: 0.9rem;
}

.existing-alloc-add__hint {
    margin: 0 0 1rem;
    max-width: 46rem;
}

.existing-alloc-add__lms {
    margin: 0.35rem 0 0;
    min-height: 1.2em;
    font-size: 0.85rem;
}

.existing-alloc-add__lms--error {
    color: #991b1b;
}

.existing-alloc-add__cnic {
    grid-column: 1 / -1;
}

.existing-alloc-add__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
    .existing-alloc-add__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .existing-alloc-add__toggle {
        width: 100%;
        justify-content: center;
    }

    .existing-alloc-add__grid {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 60, 115, 0.15);
}

textarea { min-height: 100px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; text-decoration: none; }

.btn-accent { background: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

.btn-secondary { background: #e5e7eb; color: var(--text); }
.btn-secondary:hover { background: #d5d9df; text-decoration: none; }
.btn-light { background: #fff; color: var(--navy); font-weight: 600; }
.btn-light:hover { background: #eef2f8; color: var(--navy); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; text-decoration: none; }

/* Soft destructive — secondary danger for toolbars (solid danger reserved for confirms) */
.btn-danger-outline {
    background: #fff8f8;
    color: #9b1c1c;
    border: 1px solid #e7b6b6;
    box-shadow: none;
}
.btn-danger-outline:hover {
    background: #feecec;
    color: #7f1d1d;
    border-color: #c53030;
    text-decoration: none;
}

.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.875rem; }

.flash-stack {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: min(380px, calc(100vw - 2.5rem));
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(13, 44, 84, 0.18);
    animation: flash-in 0.25s ease-out;
}

.flash span { flex: 1; }

.flash-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    margin: -0.1rem -0.15rem 0 0;
    font-size: 1.2rem;
    line-height: 1;
    color: inherit;
    opacity: 0.55;
    cursor: pointer;
}
.flash-close:hover { opacity: 1; }

@keyframes flash-in {
    from { transform: translateX(24px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 480px) {
    .flash-stack {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
}

.flash-success { background: #d1fae5; color: #065f46; }
.flash-danger { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }
.flash-info { background: #dbeafe; color: #1e40af; }

.field-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table { min-width: 640px; }

.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(70vh, calc(2.55rem + (12 * 2.65rem)));
    -webkit-overflow-scrolling: touch;
}

/* ~10 compact rows visible; scroll for the rest (sticky header). */
body.page-admin .card.table-scroll.table-scroll--rows-10 {
    max-height: calc(2.55rem + (10 * 2.65rem));
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.page-admin .card.table-scroll.table-scroll--rows-10 thead th,
.table-scroll > table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--admin-line, #e3eaf2);
}

.table-scroll-hint {
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
}

/* Compact admin data tables (wide RT / staff lists) */
.data-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid #e3eaf2;
    border-radius: 8px;
    background:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to right, rgba(255, 255, 255, 0), #fff 70%) 100% 0,
        linear-gradient(to right, rgba(13, 44, 84, 0.08), transparent),
        linear-gradient(to left, rgba(13, 44, 84, 0.08), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.data-table--compact th,
.data-table--compact td {
    padding: 0.55rem 0.7rem;
    font-size: 0.86rem;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid #eef2f7;
}

.data-table--compact thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef2f8;
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 1px solid #d7e0ec;
}

.data-table--compact tbody tr:nth-child(even) td {
    background: #fafbfd;
}

.data-table--compact tbody tr:hover td {
    background: #f3f7fc;
}

.data-table--compact .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.data-table--compact .mono {
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.data-table__sticky {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 #e3eaf2;
}

.data-table__sticky--end {
    left: auto;
    right: 0;
    box-shadow: -1px 0 0 #e3eaf2;
}

.data-table thead .data-table__sticky {
    background: #eef2f8;
    z-index: 4;
}

.data-table tbody tr:nth-child(even) .data-table__sticky {
    background: #fafbfd;
}

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

.rt-provisional {
    max-width: 100%;
    min-width: 0;
}

/* —— RT Provisional list (redesign) —— */
.rt-prov {
    max-width: 1180px;
    margin: 0 auto;
}

.rt-prov__hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(13, 44, 84, 0.96), rgba(13, 44, 84, 0.82)),
        #0d2c54;
    color: #fff;
}

.rt-prov__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    font-weight: 600;
}

.rt-prov__hero h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    color: #fff;
}

.rt-prov__lead {
    margin: 0;
    max-width: 36rem;
    font-size: 0.95rem;
    line-height: 1.45;
    opacity: 0.9;
}

.rt-prov__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.rt-prov__hero-actions .btn-secondary,
.rt-prov__hero-actions .btn-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.rt-prov__hero-actions .btn-secondary:hover,
.rt-prov__hero-actions .btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
}

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

.rt-prov__stat {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d9e2ef);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.rt-prov__stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}

.rt-prov__stat-label {
    font-size: 0.8rem;
    color: #6b7c8f;
    font-weight: 600;
}

.rt-prov__stat--warn {
    border-color: #f0c36d;
    background: #fff9ef;
}

.rt-prov__stat--ok .rt-prov__stat-value {
    color: #1a7f4b;
}

.rt-prov__panel {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d9e2ef);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.rt-prov__filters {
    display: grid;
    grid-template-columns: minmax(10rem, 1.3fr) minmax(8rem, 0.9fr) minmax(11rem, 1.1fr) auto;
    gap: 0.75rem 1rem;
    align-items: end;
}

.rt-prov__filters .form-group {
    margin: 0;
}

.rt-prov__filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.rt-prov__assign {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d9e2ef);
    border-radius: 12px;
    overflow: hidden;
}

.rt-prov__toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 1.1rem;
    background: #f5f8fc;
    border-bottom: 1px solid var(--border, #d9e2ef);
}

.rt-prov__toolbar-note {
    margin: 0;
    font-size: 0.9rem;
    color: #44566c;
    max-width: 40rem;
}

.rt-prov__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rt-prov__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.rt-prov__table th {
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7c8f;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border, #d9e2ef);
    background: #fafbfd;
    white-space: nowrap;
}

.rt-prov__table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    font-size: 0.92rem;
}

.rt-prov__table tr:last-child td {
    border-bottom: none;
}

.rt-prov__row--needs-room {
    background: #fffaf2;
}

.rt-prov__student {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.rt-prov__student .mono {
    font-size: 0.82rem;
    color: #44566c;
}

.rt-prov__meta {
    font-size: 0.8rem;
}

.rt-prov__select {
    width: 100%;
    min-width: 12rem;
    max-width: 18rem;
    min-height: 2.4rem;
    font-size: 0.88rem;
    border-radius: 8px;
    border: 1px solid #c5d2e3;
    padding: 0.35rem 0.55rem;
    background: #fff;
}

.rt-prov__room-locked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.rt-prov__room-no {
    font-weight: 700;
    color: var(--navy);
}

.rt-prov__pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e8eef7;
    color: var(--navy);
}

.rt-prov__challan {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.rt-prov__challan .muted {
    font-size: 0.78rem;
}

.rt-prov__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.rt-prov__badge--warn {
    background: #fff0d6;
    color: #9a6200;
}

.rt-prov__badge--info {
    background: #e7f1ff;
    color: #1d4f91;
}

.rt-prov__badge--ok {
    background: #e4f7ec;
    color: #1a7f4b;
}

.rt-prov__badge--pending {
    background: #fde8e8;
    color: #b42318;
}

.rt-prov__demo-btn {
    display: block;
    margin-top: 0.35rem;
}

.rt-prov__empty {
    text-align: center;
    color: #6b7c8f;
    padding: 2rem 1rem !important;
}

.rt-prov__footer-save {
    display: flex;
    justify-content: flex-end;
    padding: 0.9rem 1.1rem;
    border-top: 1px solid var(--border, #d9e2ef);
    background: #f5f8fc;
}

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

    .rt-prov__filters {
        grid-template-columns: 1fr 1fr;
    }

    .rt-prov__filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .rt-prov__hero {
        padding: 1rem;
    }

    .rt-prov__filters {
        grid-template-columns: 1fr;
    }

    .rt-prov__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .rt-prov__toolbar .btn {
        width: 100%;
    }
}

/* legacy hooks kept for older markup references */
.rt-provisional__filters {
    margin-bottom: 1rem;
}

.rt-provisional__filter-form {
    display: grid;
    grid-template-columns: minmax(12rem, 1.4fr) minmax(9rem, 0.9fr) minmax(12rem, 1.2fr) auto;
    gap: 0.85rem 1rem;
    align-items: end;
}

.rt-provisional__filter-form .form-group {
    margin: 0;
    min-width: 0;
}

.rt-provisional__filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rt-provisional__table-card {
    padding: 0.85rem;
    overflow: hidden;
    max-width: 100%;
}

.rt-provisional__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.rt-provisional__demo {
    display: inline;
    margin: 0;
}

.rt-provisional__room-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    min-width: 12rem;
}

.rt-provisional__room-form select {
    max-width: 14rem;
    font-size: 0.85rem;
    min-height: 2rem;
}

.rt-prov-auto {
    justify-content: space-between;
    align-items: flex-end;
}

.rt-prov-auto__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    align-items: flex-end;
}

.rt-prov-auto__mode {
    margin: 0;
    min-width: 9.5rem;
}

.rt-prov-auto__mode label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
}

.rt-prov-auto__mode select {
    min-width: 10rem;
    min-height: 2.35rem;
}

.rt-prov-room-select {
    max-width: 18rem;
}

/*
 * Mess Security list — Room Assigned (view text / edit select).
 * Cap column/control width so long labels do not dominate the row.
 */
.rt-security-table .rt-security-room-col {
    width: 16rem;
    max-width: 18rem;
    vertical-align: middle;
}

.rt-security-move {
    margin: 0 0 1.15rem;
    padding: 0.95rem 1.2rem 0.9rem;
}

.rt-security-move__form {
    margin: 0;
}

.rt-security-move__main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.7rem 0.9rem;
}

.rt-security-move__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    flex: 1 1 22rem;
    min-width: 14rem;
    max-width: 40rem;
}

.rt-security-move__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0d2c54;
}

.rt-security-move__field .rt-security-room-select {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.rt-security-move__form .btn {
    min-height: 2.35rem;
    min-width: 8.75rem;
}

.rt-security-move__hint {
    margin: 0.55rem 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #5b6b80;
}

.rt-security-move__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--admin-line, #d7e0ea);
}

.rt-security-move__status.is-solo {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.rt-security-move__count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1f6b3a;
}

.rt-security-move__empty {
    font-size: 0.82rem;
    color: #6b7280;
}

.rt-security-vacant__chip {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #e8f1ea;
    color: #1f6b3a;
    font-size: 0.78rem;
    font-weight: 600;
}

.rt-security-table .rt-security-swap-col {
    width: 2.4rem;
    text-align: center;
    vertical-align: middle;
}

.rt-security-swap-check {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    vertical-align: middle;
    cursor: pointer;
}

.rt-security-swap-check:disabled {
    cursor: not-allowed;
}

.rt-security-room-view {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 16rem;
}

.rt-security-room-label {
    font-size: 0.88rem;
    line-height: 1.35;
    word-break: break-word;
}

.rt-security-room-edit {
    max-width: 16rem;
}

.rt-security-room-select {
    display: block;
    width: 100%;
    max-width: 16rem;
    min-width: 11rem;
    box-sizing: border-box;
    padding: 0.45rem 1.85rem 0.45rem 0.65rem;
    font-size: 0.88rem;
    line-height: 1.25;
    min-height: 2.35rem;
    border-radius: 8px;
    border-color: #c5d2e3;
    background-color: #fff;
}

.rt-security-row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    white-space: nowrap;
}

.rt-security-row-actions .btn {
    flex: 0 0 auto;
}

/*
 * RT Provisional list table
 * Seven equal columns via table-layout: fixed + colgroup ~14.286%.
 * Hostel Challan: number + Unpaid/Paid inline; Status: separate column.
 */
.rt-provisional-table,
.rt-prov-list__table.rt-provisional-table {
    width: 100%;
    min-width: 56rem;
    table-layout: fixed;
}

.rt-provisional-table > colgroup > col {
    width: 14.286%;
}

body.page-admin .table-card .rt-provisional-table.data-table--compact > thead > tr > th,
body.page-admin .table-card .rt-provisional-table.data-table--compact > tbody > tr > td,
body.page-admin .card.table-scroll .rt-provisional-table.data-table--compact > thead > tr > th,
body.page-admin .card.table-scroll .rt-provisional-table.data-table--compact > tbody > tr > td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}

body.page-admin .table-card .rt-provisional-table.data-table thead th,
body.page-admin .card.table-scroll .rt-provisional-table.data-table thead th {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rt-provisional-table .rt-prov-list__cell-name,
.rt-provisional-table .rt-prov-list__cell-hostel {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.rt-provisional-table .rt-prov-list__cell-room {
    overflow: hidden;
}

.rt-provisional-table .rt-prov-room-select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.page-admin .table-card .rt-provisional-table.data-table thead th.rt-provisional-table__agg,
body.page-admin .table-card .rt-provisional-table.data-table tbody td.rt-provisional-table__agg,
body.page-admin .card.table-scroll .rt-provisional-table.data-table thead th.rt-provisional-table__agg,
body.page-admin .card.table-scroll .rt-provisional-table.data-table tbody td.rt-provisional-table__agg {
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hostel Challan: number + Unpaid/Paid badge inline */
body.page-admin .table-card .rt-provisional-table.data-table thead th.rt-provisional-table__challan,
body.page-admin .table-card .rt-provisional-table.data-table tbody td.rt-provisional-table__challan,
body.page-admin .card.table-scroll .rt-provisional-table.data-table thead th.rt-provisional-table__challan,
body.page-admin .card.table-scroll .rt-provisional-table.data-table tbody td.rt-provisional-table__challan {
    text-align: left;
    white-space: normal;
    vertical-align: middle;
    line-height: 1.35;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rt-provisional-table__challan-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.rt-provisional-table__challan-no {
    display: inline-block;
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rt-provisional-table__challan .badge,
.rt-provisional-table__status .badge {
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
    white-space: normal;
    vertical-align: middle;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.page-admin .table-card .rt-provisional-table.data-table thead th.rt-provisional-table__status,
body.page-admin .table-card .rt-provisional-table.data-table tbody td.rt-provisional-table__status,
body.page-admin .card.table-scroll .rt-provisional-table.data-table thead th.rt-provisional-table__status,
body.page-admin .card.table-scroll .rt-provisional-table.data-table tbody td.rt-provisional-table__status {
    text-align: left;
    white-space: normal;
    vertical-align: middle;
    line-height: 1.35;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}


@media (max-width: 640px) {
    .rt-prov-auto {
        flex-direction: column;
        align-items: stretch;
    }

    .rt-prov-auto__controls .btn,
    .rt-prov-auto > .btn {
        width: 100%;
        justify-content: center;
    }

    .rt-prov-auto__mode select {
        width: 100%;
    }
}

.rt-provisional__scroll-hint {
    display: none;
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
}

@media (max-width: 1200px) {
    .data-table__hide-lg {
        display: none;
    }

    .rt-provisional__scroll-hint {
        display: block;
    }
}

@media (max-width: 900px) {
    .data-table__hide-md {
        display: none;
    }

    .rt-provisional__filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .rt-provisional__filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .rt-provisional__filter-form {
        grid-template-columns: 1fr;
    }

    .rt-provisional__filter-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

.mess-cols-form__label {
    display: block;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.15rem;
}

.print-room-cols {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.35rem 1.25rem;
    margin-top: 0.65rem;
}

.print-room-cols__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.2rem 0;
    color: var(--admin-ink);
    font-size: 0.95rem;
    line-height: 1.35;
    cursor: pointer;
}

.print-room-cols__item input {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--navy);
}

.print-room-cols__item:hover span {
    color: var(--navy);
}

.filter-bar .rt-security-cols-group {
    flex: 0 1 13rem;
    min-width: 11rem;
    max-width: 16rem;
}

.filter-bar .rt-security-cols-group .mess-cols-dropdown {
    max-width: none;
}

.filter-bar .rt-security-cols-group .mess-cols-dropdown__toggle {
    min-height: 2.35rem;
    padding: 0.45rem 0.7rem;
}

.mess-cols-dropdown {
    position: relative;
    max-width: 28rem;
}

.mess-cols-dropdown__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.mess-cols-dropdown__toggle:hover,
.mess-cols-dropdown.is-open .mess-cols-dropdown__toggle {
    border-color: var(--primary);
}

.mess-cols-dropdown__caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--muted);
    flex-shrink: 0;
}

.mess-cols-dropdown.is-open .mess-cols-dropdown__caret {
    transform: rotate(180deg);
}

.mess-cols-dropdown__panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 0.65rem;
}

.mess-cols-dropdown__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    max-height: 16rem;
    overflow-y: auto;
}

.mess-cols-dropdown__option {
    margin: 0;
}

.mess-cols-dropdown__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 700px) {
    .mess-cols-dropdown {
        max-width: 100%;
    }

    .mess-cols-dropdown__options {
        grid-template-columns: 1fr;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th { background: #eef2f8; color: var(--navy); }
tbody tr:nth-child(even) { background: #fafbfd; }

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.permission-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafafa;
}

.permission-item input { width: auto; margin-top: 0.2rem; }

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.page-header h1 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.page-header .actions {
    flex: 0 1 auto;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: #e5e7eb;
}

.badge-system { background: #dbeafe; color: #1e40af; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-queue { background: #dbeafe; color: #1e40af; }
.badge-released { background: #fee2e2; color: #991b1b; }
.badge-closed { background: #e5e7eb; color: #374151; }
.badge-existing { background: #e0e7ff; color: #3730a3; }
.badge-new { background: #ecfdf5; color: #047857; }

body.page-admin .page-header .actions.page-header__actions--stacked {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

body.page-admin .page-header .actions.page-header__actions--stacked > .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.rt-list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0.15rem;
}

.rt-list-filters__cohort {
    margin-left: auto;
    flex: 0 0 auto;
}

.rt-list-filters > .applicant-rec__gender-switch:not(.rt-list-filters__cohort) {
    display: flex;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.rt-list-filters > .applicant-rec__gender-switch:not(.rt-list-filters__cohort)::-webkit-scrollbar {
    height: 10px;
}

.rt-list-filters > .applicant-rec__gender-switch:not(.rt-list-filters__cohort)::-webkit-scrollbar-track {
    background: var(--admin-wash, #eef2f7);
    border-radius: 8px;
}

.rt-list-filters > .applicant-rec__gender-switch:not(.rt-list-filters__cohort)::-webkit-scrollbar-thumb {
    background: var(--navy, #0d2c54);
    border-radius: 8px;
}

.rt-list-filters > .applicant-rec__gender-switch:not(.rt-list-filters__cohort) .applicant-rec__gender-switch-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* UET-style full-width hero banner */
.hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 16rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 34, 66, 0.82) 0%, rgba(6, 34, 66, 0.78) 100%),
        url("/static/img/uet-hero.png");
    background-size: cover;
    background-position: center;
}

.hero-body {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: clamp(1.25rem, 3.5vh, 2.75rem) 3rem;
    box-sizing: border-box;
}

/* Small uppercase kicker above the headline - a common device on polished
   institutional sites for editorial-feeling hierarchy without needing the
   headline itself to be huge. */
.hero-eyebrow {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Constrained to a comfortable reading width (not the full container) and a
   restrained max size, in line with how genuinely well-regarded university
   sites treat hero typography - "less is more" and consistent branding
   consistently outrank oversized dominant type in real-world design
   research. A heading that fills the whole banner edge to edge reads as
   oversized regardless of the exact font-size number; wrapping it into 2
   shorter lines within a defined width is what makes it look designed
   rather than stretched. */
.hero-body h1 {
    color: #fff;
    font-size: clamp(2rem, 2.9vw, 2.85rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.9rem;
    max-width: none;
    white-space: nowrap;
    text-shadow: 0 0 22px rgba(255, 255, 255, 0.3), 0 2px 14px rgba(0, 0, 0, 0.3);
}

.hero-lead {
    color: #e6edf6;
    max-width: 640px;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.6;
    margin-bottom: 1.35rem;
}

@media (max-width: 767px) {
    .hero-body {
        text-align: center;
    }

    .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-body .actions {
        justify-content: center;
    }

    /* Long words like "Accommodation" must be free to wrap on narrow screens. */
    .hero-body h1 {
        white-space: normal;
        overflow-wrap: break-word;
        hyphens: none;
    }
}

/* Application notice is disabled on all screen sizes. */
.login-alert--info {
    display: none !important;
}

.hero-body .actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    border-color: #fff;
}

/* Home — Important Dates timeline (between banner and footer) */
.dates-timeline {
    width: 100%;
    max-width: 100%;
    background:
        linear-gradient(180deg, #f7f9fc 0%, #eef3f9 45%, #f7f9fc 100%);
    border-top: 1px solid #d9e2ef;
    border-bottom: 1px solid #d9e2ef;
    padding: 1.5rem var(--page-pad-x) 1.75rem;
    box-sizing: border-box;
    overflow-x: clip;
}

.dates-timeline__inner {
    width: min(640px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

.dates-timeline__header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.dates-timeline__header h2 {
    margin: 0 0 0.45rem;
    color: var(--navy);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
}

.dates-timeline__rule {
    display: block;
    width: 2.5rem;
    height: 3px;
    margin: 0 auto 0.65rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--navy), var(--accent));
}

.dates-timeline__header p {
    margin: 0 auto;
    max-width: 32rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0 0.25rem;
}

.dates-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.25rem;
    position: relative;
}

.dates-timeline__list::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(13, 44, 84, 0.2),
        rgba(232, 118, 15, 0.45),
        rgba(13, 44, 84, 0.2)
    );
    border-radius: 999px;
}

.dates-timeline__item {
    position: relative;
    padding: 0 0 1rem 1.9rem;
    min-width: 0;
}

.dates-timeline__item:last-child {
    padding-bottom: 0;
}

.dates-timeline__dot {
    position: absolute;
    left: 0.15rem;
    top: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--navy);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--navy), 0 3px 8px rgba(13, 44, 84, 0.18);
    z-index: 1;
    box-sizing: border-box;
}

.dates-timeline__item:nth-child(even) .dates-timeline__dot {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 3px 8px rgba(232, 118, 15, 0.22);
}

.dates-timeline__date {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dates-timeline__item:nth-child(even) .dates-timeline__date {
    background: var(--accent);
}

.dates-timeline__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid var(--navy);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 6px 16px rgba(13, 44, 84, 0.06);
    box-sizing: border-box;
    min-width: 0;
}

.dates-timeline__item:nth-child(even) .dates-timeline__card {
    border-bottom-color: var(--accent);
}

.dates-timeline__card h3 {
    margin: 0 0 0.3rem;
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.dates-timeline__card p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.45;
}

.homepage-process {
    padding: 3.5rem var(--page-pad-x);
    background: #fff;
}

.homepage-process__inner {
    display: grid;
    grid-template-columns: minmax(13rem, 0.75fr) minmax(0, 1.25fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: center;
    width: min(1080px, 100%);
    margin: 0 auto;
}

.homepage-process__visual {
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--navy), #1c5289);
    box-shadow: 0 16px 36px rgba(13, 44, 84, 0.16);
}

.homepage-process__visual img {
    display: block;
    width: 100%;
    max-height: 33rem;
    object-fit: cover;
}

.homepage-process__content {
    min-width: 0;
}

.homepage-process__content .page-kicker {
    margin: 0 0 0.4rem;
}

.homepage-process__content h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.15;
}

.homepage-process__intro {
    margin: 0.85rem 0 1.35rem;
    color: #526277;
    line-height: 1.65;
    white-space: pre-line;
}

.homepage-process__steps {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.homepage-process__step {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.homepage-process__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(13, 44, 84, 0.18);
}

.homepage-process__step:nth-child(even) .homepage-process__number {
    background: var(--accent);
}

.homepage-process__step h3 {
    margin: 0.08rem 0 0.18rem;
    color: var(--navy);
    font-size: 1rem;
    line-height: 1.3;
}

.homepage-process__step p {
    margin: 0;
    color: #63738a;
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-line;
}

.homepage-process-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 0.6fr);
    gap: 1.25rem;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.homepage-editor-card {
    min-width: 0;
    padding: 1.35rem;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(13, 44, 84, 0.06);
}

.homepage-editor-card--steps,
.homepage-editor-actions {
    grid-column: 1 / -1;
}

.homepage-editor-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid #e6edf5;
}

.homepage-editor-card__head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.homepage-editor-card__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.45;
}

.homepage-editor-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: #edf4fb;
    color: var(--navy);
    font-size: 0.84rem;
    white-space: nowrap;
}

.homepage-editor-toggle input,
.homepage-editor-remove input {
    width: auto;
    margin: 0;
}

.homepage-editor-hint {
    display: block;
    margin-top: 0.32rem;
    color: #7b899b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.homepage-process-editor input[type="text"],
.homepage-process-editor textarea {
    box-sizing: border-box;
    max-width: 100%;
}

.homepage-editor-card--details textarea {
    min-height: 7.5rem;
    max-height: 14rem;
}

.homepage-editor-image {
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #f4f7fb;
}

.homepage-editor-image img {
    display: block;
    width: 100%;
    max-height: 13rem;
    object-fit: contain;
}

.homepage-editor-upload input[type="file"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem;
    border: 1px dashed #b9c8d9;
    border-radius: 8px;
    background: #f8fafc;
}

.homepage-editor-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: #8a3b2c;
    font-size: 0.85rem;
}

.homepage-editor-badge {
    flex: 0 0 auto;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #fff2e7;
    color: #a44919;
    font-size: 0.76rem;
    font-weight: 700;
}

.homepage-process-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.homepage-process-form__step {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #f9fbfd;
}

.homepage-process-form__step legend {
    padding: 0 0.4rem;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 700;
}

.homepage-process-form__step legend span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin-right: 0.3rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 0.75rem;
}

.homepage-process-form__step .form-group:last-child {
    margin-bottom: 0;
}

.homepage-process-form__step textarea {
    min-height: 5.5rem;
    max-height: 11rem;
}

.homepage-editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f7f9fc;
}

.homepage-editor-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.homepage-editor-actions .actions {
    flex: 0 0 auto;
}

.room-map-upload-card {
    margin-top: 1rem;
}

.room-map-upload-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.room-map-upload-card__head h3 {
    margin: 0 0 0.25rem;
}

.room-map-upload-card__head p,
.room-map-upload-card__hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
}

.room-map-upload-card__form {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.room-map-upload-card__form .form-group {
    flex: 1 1 22rem;
    margin: 0;
}

.room-map-upload-card__form input[type="file"] {
    max-width: 100%;
}

@media (max-width: 900px) {
    .homepage-process-editor {
        grid-template-columns: 1fr;
    }

    .homepage-editor-card--steps,
    .homepage-editor-actions {
        grid-column: auto;
    }

    .room-map-upload-card__head {
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .homepage-process-form__grid {
        grid-template-columns: 1fr;
    }

    .homepage-editor-card__head,
    .homepage-editor-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .homepage-editor-toggle {
        white-space: normal;
    }

    .homepage-editor-actions .actions {
        width: 100%;
    }

    .homepage-editor-actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

.undertaking-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
    gap: 1.25rem;
    width: min(960px, 100%);
    margin: 0 auto;
}

.undertaking-editor .homepage-editor-actions {
    grid-column: 1 / -1;
}

.undertaking-editor__badge {
    flex: 0 0 auto;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.undertaking-editor__badge--fallback {
    background: #edf4fb;
    color: var(--navy);
}

.undertaking-editor__badge--missing {
    background: #fff2e7;
    color: #a44919;
}

.undertaking-file {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid #dfe7f0;
    border-radius: 12px;
    background: #f7fafc;
}

.undertaking-file__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 8px;
    background: #d62828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.undertaking-file__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.undertaking-file__meta strong {
    color: var(--navy);
    word-break: break-word;
}

.undertaking-file__meta span {
    color: var(--muted);
    font-size: 0.82rem;
}

.undertaking-note {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: #edf4fb;
    color: var(--navy);
    font-size: 0.9rem;
    line-height: 1.45;
}

.undertaking-note--warn {
    background: #fff6ee;
    color: #8a3b2c;
}

.undertaking-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 12.5rem;
    padding: 1.4rem 1rem;
    border: 1.5px dashed #b9c8d9;
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.undertaking-dropzone:hover,
.undertaking-dropzone.is-dragover {
    border-color: var(--navy);
    background: #eef4fb;
    box-shadow: inset 0 0 0 1px rgba(13, 44, 84, 0.06);
}

.undertaking-dropzone.has-file {
    border-style: solid;
    border-color: #8fb59a;
    background: #f3faf5;
}

.undertaking-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.undertaking-dropzone {
    position: relative;
}

.undertaking-dropzone__icon {
    display: inline-flex;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.undertaking-dropzone__title {
    color: var(--navy);
    font-weight: 700;
}

.undertaking-dropzone__hint,
.undertaking-dropzone__file {
    color: var(--muted);
    font-size: 0.82rem;
}

.undertaking-dropzone.has-file .undertaking-dropzone__file {
    color: #1f6b3a;
    font-weight: 600;
}

.undertaking-editor .homepage-editor-remove {
    margin-top: 0.95rem;
}

@media (max-width: 800px) {
    .undertaking-editor {
        grid-template-columns: 1fr;
    }

    .undertaking-file {
        flex-wrap: wrap;
    }

    .undertaking-file .btn {
        width: 100%;
        text-align: center;
    }
}

@media (min-width: 901px) {
    .dates-timeline {
        padding: 1.25rem var(--page-pad-x) 1.5rem;
    }

    .dates-timeline__header {
        margin-bottom: 1.1rem;
    }

    .dates-timeline__header h2 {
        font-size: 1.6rem;
    }

    .dates-timeline__header p {
        font-size: 0.88rem;
    }

    .dates-timeline__card h3 {
        font-size: 0.92rem;
    }

    .dates-timeline__card p {
        font-size: 0.84rem;
    }
}

@media (max-width: 900px) {
    .dates-timeline {
        padding: 1.35rem var(--page-pad-x) 1.5rem;
    }

    .dates-timeline__inner {
        width: min(640px, 100%);
    }

    .dates-timeline__header {
        margin-bottom: 1.1rem;
    }

    .dates-timeline__header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 700px) {
    .homepage-process {
        padding: 2.25rem 1rem;
    }

    .homepage-process__inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .homepage-process__visual {
        max-width: 28rem;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .dates-timeline {
        padding: 1.15rem 0.75rem 1.25rem;
    }

    .dates-timeline__header {
        margin-bottom: 0.9rem;
    }

    .dates-timeline__header h2 {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
        padding: 0;
    }

    .dates-timeline__rule {
        width: 2.25rem;
        height: 3px;
        margin-bottom: 0.55rem;
    }

    .dates-timeline__header p {
        font-size: 0.85rem;
        line-height: 1.45;
        padding: 0;
    }

    .dates-timeline__list {
        padding-left: 0.1rem;
    }

    .dates-timeline__list::before {
        left: 0.35rem;
        top: 0.25rem;
        bottom: 0.25rem;
    }

    .dates-timeline__item {
        padding-left: 1.4rem;
        padding-bottom: 0.7rem;
    }

    .dates-timeline__item:last-child {
        padding-bottom: 0;
    }

    .dates-timeline__dot {
        left: 0.08rem;
        top: 0.28rem;
        width: 0.7rem;
        height: 0.7rem;
        border-width: 2px;
    }

    .dates-timeline__date {
        display: inline-block;
        max-width: 100%;
        font-size: 0.68rem;
        padding: 0.2rem 0.5rem;
        margin-bottom: 0.3rem;
        border-radius: 6px;
        line-height: 1.3;
        letter-spacing: 0;
    }

    .dates-timeline__card {
        padding: 0.65rem 0.75rem;
        border-radius: 8px;
        border-bottom-width: 2px;
        box-shadow: 0 4px 12px rgba(13, 44, 84, 0.06);
    }

    .dates-timeline__card h3 {
        font-size: 0.9rem;
        margin: 0 0 0.2rem;
        line-height: 1.25;
    }

    .dates-timeline__card p {
        font-size: 0.82rem;
        line-height: 1.4;
    }
}

@media (max-width: 400px) {
    .dates-timeline {
        padding: 1rem 0.65rem 1.1rem;
    }

    .dates-timeline__header h2 {
        font-size: 1.25rem;
    }

    .dates-timeline__item {
        padding-left: 1.3rem;
        padding-bottom: 0.6rem;
    }

    .dates-timeline__date {
        font-size: 0.65rem;
        padding: 0.18rem 0.45rem;
    }

    .dates-timeline__card {
        padding: 0.55rem 0.65rem;
    }

    .dates-timeline__card h3 {
        font-size: 0.86rem;
    }

    .dates-timeline__card p {
        font-size: 0.8rem;
    }
}

/* —— Desktop / laptop: compact navbar; slightly taller banner —— */
@media (min-width: 1101px) {
    :root {
        --brand-logo-h: 56px;
    }

    .site-header {
        padding: 0.55rem 0;
    }

    .brand {
        gap: 0.75rem;
    }

    .brand-text {
        font-size: 1.05rem;
        line-height: 1.2;
        max-width: 18rem;
    }

    .nav-links {
        gap: 0.85rem;
        flex-wrap: nowrap;
    }

    .nav-links a,
    .nav-links .nav-dropdown__toggle {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .btn-sm {
        font-size: 0.88rem;
        padding: 0.4rem 0.9rem;
    }

    .hero {
        min-height: min(74vh, 760px);
    }

    .hero-body {
        padding-top: clamp(1.85rem, 3.5vh, 2.5rem);
        padding-bottom: clamp(1.85rem, 3.5vh, 2.5rem);
        padding-left: 4.75rem;
    }
}

/* —— Tablet (and below) —— */
@media (max-width: 900px) {
    .topbar {
        font-size: 0.8rem;
    }

    .topbar .inner {
        flex-wrap: nowrap;
        padding: 0.5rem 1rem;
        padding-right: 1.15rem; /* clear orange accent strip */
        gap: 0.75rem;
    }

    .topbar-contact,
    .topbar-links {
        gap: 0.9rem;
        flex-wrap: nowrap;
    }

    .topbar-accent {
        width: 8px;
    }

    .site-header {
        padding: 0.65rem 0;
    }

    .site-header .inner {
        padding: 0 1rem;
        padding-right: 1rem;
    }

    .hero {
        align-items: flex-end;
        background:
            linear-gradient(90deg, rgba(6, 34, 66, 0.82) 0%, rgba(6, 34, 66, 0.78) 100%),
            url("/static/img/uet-hero.png");
        background-size: cover;
        background-position: center 28%;
    }

    .hero-body {
        padding: 2rem 1.25rem 2.35rem;
    }

    .hero-body h1 {
        font-size: clamp(1.9rem, 4.5vw, 2.4rem);
        margin-bottom: 0.7rem;
        max-width: none;
    }

    .hero-lead {
        font-size: 1.15rem;
        line-height: 1.55;
        margin-bottom: 1.2rem;
        max-width: 36rem;
    }

    .auth-shell {
        padding: 2rem 1rem;
        align-content: center;
    }
}

/* —— Large phone / small tablet —— */
@media (max-width: 640px) {
    .topbar .inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0.85rem;
        padding-right: 1rem;
        gap: 0.75rem;
        row-gap: 0;
    }

    .topbar-contact {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
        gap: 0.75rem;
        font-size: 0.72rem;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .topbar-links {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 0.75rem;
        font-size: 0.72rem;
    }

    .topbar-social {
        gap: 0.5rem;
    }

    .topbar-social svg {
        width: 14px;
        height: 14px;
    }

    .brand {
        gap: 0.65rem;
    }

    .brand-text {
        font-size: clamp(0.9rem, 3.8vw, 1.05rem);
    }

    .site-header {
        padding: 0.5rem 0;
    }

    .site-header .inner {
        padding: 0 0.85rem;
    }

    .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
        min-height: 0;
    }

    .page-header {
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .page-header h1 {
        margin-bottom: 0.25rem;
    }

    .page-header .muted {
        margin: 0;
    }

    .hero {
        min-height: 380px;
    }

    .hero-body {
        padding: 1.85rem var(--page-pad-x) 2.15rem;
    }

    .hero-body h1 {
        font-size: clamp(1.55rem, 7vw, 1.95rem);
        max-width: none;
        margin-bottom: 0.55rem;
    }

    .hero-lead {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .hero-body .actions {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .hero-body .actions .btn {
        width: auto;
        min-width: 11rem;
        max-width: 100%;
    }

    .auth-shell {
        padding: 1.85rem 1rem;
    }

    .auth-card {
        width: min(420px, 100%);
        padding: 1.4rem;
    }

    .deadline-alert {
        font-size: 0.82rem;
        padding: 0.45rem 0;
    }
}

/* —— Phone —— */
@media (max-width: 480px) {
    .topbar-accent {
        width: 6px;
    }

    :root { --brand-logo-h: 44px; }

    .brand-text {
        display: none;
    }

    .hero-body h1 {
        font-size: 1.7rem;
        line-height: 1.2;
        max-width: none;
    }

    .hero-lead {
        font-size: 1rem;
        margin-bottom: 0.9rem;
    }

    .hero-body .actions .btn {
        max-width: none;
    }
}

/* Full-width auth background — fills leftover space in .page-frame */
.auth-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 16rem;
    display: grid;
    place-items: center;
    padding: 2.75rem 1.15rem;
    margin: 0;
    background:
        linear-gradient(135deg, rgba(13, 44, 84, 0.92), rgba(16, 60, 115, 0.82)),
        url("/static/img/uet-hero.png");
    background-size: cover;
    background-position: center;
    border-radius: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.auth-card {
    width: min(420px, 100%);
    border-top: 4px solid var(--accent);
    box-sizing: border-box;
    padding: clamp(1.35rem, 3.5vw, 1.9rem);
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    color: var(--navy);
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    line-height: 1.2;
    font-weight: 800;
}

.auth-card > .muted {
    margin: 0 0 1.15rem;
    font-size: clamp(0.88rem, 2.8vw, 1rem);
    line-height: 1.45;
}

.auth-card .form-group {
    margin-bottom: 0.95rem;
}

.auth-card .form-group label {
    font-size: clamp(0.88rem, 2.6vw, 0.98rem);
    margin-bottom: 0.35rem;
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input:not([type]) {
    font-size: clamp(0.95rem, 2.8vw, 1rem);
    min-height: 2.65rem;
}

.auth-card .btn {
    width: 100%;
    min-height: 2.75rem;
    font-size: clamp(0.95rem, 2.8vw, 1.05rem);
}

.auth-card .auth-alt-links,
.auth-card > .muted:last-child {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

.challan-lookup-result {
    margin-top: 1.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.challan-lookup-result__name {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
}

.challan-lookup-result__row {
    margin: 0 0 1rem;
    display: grid;
    gap: 0.2rem;
}

.challan-lookup-result__row dt {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b7c8f;
}

.challan-lookup-result__row dd {
    margin: 0;
    font-size: clamp(1.35rem, 4.2vw, 1.65rem);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: 0.03em;
    word-break: break-all;
    line-height: 1.2;
}

.allocation-lookup-result {
    margin: 0;
    gap: 0.55rem 0.75rem;
}

.allocation-lookup-result dt {
    margin-top: 0.35rem;
}

.allocation-lookup-result dt:first-child {
    margin-top: 0;
}

.allocation-lookup-result dd {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    word-break: break-word;
}

.allocation-modal__panel {
    width: min(32rem, 100%);
}

.allocation-modal__actions {
    flex-wrap: wrap;
    margin-top: 0.35rem;
    gap: 0.5rem;
}

.allocation-modal__actions .btn {
    min-width: 0;
}

.allocation-modal__print-form {
    margin: 0;
    display: inline-flex;
}

.allocation-modal__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0.15rem 0 0.25rem;
}

.allocation-modal__row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.allocation-modal__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a97a8;
}

.allocation-modal__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.35;
    word-break: break-word;
}

.allocation-modal__value--mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.auth-card .auth-alt-links {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
}

@media (min-width: 901px) {
    .auth-shell {
        min-height: 0;
        padding: 1.85rem 1.5rem;
    }

    .auth-card {
        width: min(360px, 100%);
        padding: 1.45rem 1.55rem;
    }

    .auth-card h1 {
        font-size: 1.35rem;
        margin-bottom: 0.35rem;
    }

    .auth-card > .muted {
        font-size: 0.88rem;
        margin-bottom: 0.85rem;
    }

    .auth-card .form-group {
        margin-bottom: 0.75rem;
    }

    .auth-card input[type="text"],
    .auth-card input[type="email"],
    .auth-card input[type="password"],
    .auth-card input:not([type]) {
        min-height: 2.35rem;
    }

    .auth-card .btn {
        min-height: 2.35rem;
    }
}

.auth-shell--student {
    align-content: center;
}

.login-alerts--float {
    position: fixed !important;
    top: calc(2.6rem + var(--brand-logo-h) + 1.7rem) !important;
    right: 1.25rem !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 10050 !important;
    width: min(300px, calc(100vw - 1.5rem)) !important;
    max-height: calc(100vh - 2.6rem - var(--brand-logo-h) - 3rem);
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    pointer-events: auto;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Centered eligibility notice on Mess Security Challan public page */
body.eligibility-modal-open {
    overflow: hidden;
}

/* Author `display: grid` on .eligibility-modal overrides the UA [hidden] rule,
   so a dismissed modal can stay as a full-screen overlay and swallow clicks.
   Force hide + ignore pointer events whenever [hidden] is set. */
.eligibility-modal[hidden],
.eligibility-modal[hidden] * {
    display: none !important;
    pointer-events: none !important;
}

.eligibility-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: grid;
    place-items: center;
    padding: 1rem;
    animation: eligibility-modal-in 0.22s ease-out both;
}

.eligibility-modal.is-closing {
    animation: eligibility-modal-out 0.18s ease-in both;
}

.eligibility-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 33, 67, 0.55);
    cursor: pointer;
}

.eligibility-modal__panel {
    position: relative;
    z-index: 1;
    width: min(28rem, 100%);
    background: #fff;
    border-radius: 12px;
    border: 1px solid #d7e0ec;
    box-shadow: 0 18px 48px rgba(9, 29, 61, 0.28);
    padding: 1.35rem 1.35rem 1.2rem;
    overflow: hidden;
}

.eligibility-modal__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--accent));
}

.eligibility-modal__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--navy);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    display: grid;
    place-items: center;
    padding: 0;
}

.eligibility-modal__close:hover,
.eligibility-modal__close:focus-visible {
    opacity: 1;
    background: rgba(13, 44, 84, 0.08);
    outline: none;
}

.eligibility-modal__title {
    margin: 0.15rem 1.5rem 0.65rem 0;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.eligibility-modal__body {
    margin: 0 0 1.15rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.eligibility-modal__body > p {
    margin: 0 0 0.75rem;
}

.eligibility-modal__body > p:last-child {
    margin-bottom: 0;
}

.eligibility-modal__list {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.eligibility-modal__list li {
    margin: 0.2rem 0;
}

.eligibility-modal__body a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.eligibility-modal__body a:hover,
.eligibility-modal__body a:focus-visible {
    color: var(--accent);
}

.eligibility-modal__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.eligibility-modal__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    min-height: 2.5rem;
    padding: 0.55rem 1.05rem;
    line-height: 1.2;
    box-sizing: border-box;
    text-align: center;
}

@keyframes eligibility-modal-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes eligibility-modal-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eligibility-modal {
        animation: none;
    }
}

.login-alerts--float .login-alert {
    pointer-events: auto;
    margin: 0;
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(9, 29, 61, 0.18);
}

.login-alert {
    position: relative;
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    padding: 0.7rem 1.85rem 0.7rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    background: #fff;
    box-shadow: 0 8px 24px rgba(9, 29, 61, 0.14);
    animation: login-alert-in 0.45s ease-out both;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.login-alert.is-closing {
    opacity: 0;
    transform: translateY(-6px);
}

.login-alert__close {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 1.5rem;
    height: 1.5rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    display: grid;
    place-items: center;
    padding: 0;
}

.login-alert__close:hover,
.login-alert__close:focus-visible {
    opacity: 1;
    background: rgba(15, 23, 42, 0.08);
    outline: none;
}

.login-alert--warning {
    animation-delay: 0.12s;
}

@keyframes login-alert-in {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-alert--info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    border-left-color: #2563eb;
    color: #1e3a8a;
}

.login-alert--warning {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
    border-left-color: var(--accent, #ea580c);
    color: #9a3412;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.16);
}

.login-alert__icon {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-top: 0.05rem;
    animation: login-alert-glow 2.2s ease-in-out infinite;
}

.login-alert__icon svg {
    width: 14px;
    height: 14px;
}

.login-alert--info .login-alert__icon {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
}

.login-alert--warning .login-alert__icon {
    background: var(--accent, #ea580c);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45);
}

@keyframes login-alert-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
    }
}

.login-alert--info .login-alert__icon {
    animation-name: login-alert-glow-info;
}

.login-alert--warning .login-alert__icon {
    animation-name: login-alert-glow-warn;
}

@keyframes login-alert-glow-info {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

@keyframes login-alert-glow-warn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); }
}

.login-alert__content {
    min-width: 0;
    flex: 1 1 auto;
}

.login-alert__title {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 800;
}

.login-alert__content p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .login-alert,
    .login-alert__icon {
        animation: none;
    }
}

@media (max-width: 767px) {
    .auth-alt-links .auth-link-home {
        display: none;
    }

    .login-alerts--float {
        top: calc(2.6rem + var(--brand-logo-h) + 1.2rem) !important;
        bottom: auto !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto !important;
        max-height: min(50vh, 320px) !important;
        overflow-y: auto;
        pointer-events: auto;
    }

    .login-alert {
        padding: 0.65rem 1.7rem 0.65rem 0.7rem;
    }

    .login-alert__content p {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}

@media (max-width: 640px) {
    .auth-shell--student {
        padding: 1rem 0.85rem 1.5rem;
        align-content: start;
    }
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    background: #e7eef7;
    color: var(--navy);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.recommended-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
}

.recommended-mark input {
    width: auto;
    margin: 0;
}

.audit-json {
    margin: 0;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.status-paid,
.status-select-paid {
    color: #065f46;
    font-weight: 700;
}
.status-unpaid,
.status-select-unpaid {
    color: #b91c1c;
    font-weight: 700;
}
.status-select-paid,
.status-select-unpaid {
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
    background: #fff;
}

.rules-page .rules-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.rules-page .rules-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.25rem;
}

.rules-box {
    max-height: 46vh;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfe;
    line-height: 1.75;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #1f2937;
    font-size: 0.98rem;
}

.ack-block {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #fff8f1;
}

.ack-block input[type="checkbox"] {
    width: auto;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    cursor: pointer;
}

.ack-block .ack-label {
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

.ack-hint { margin-top: 0.75rem; }

.btn:disabled,
.btn[disabled],
button.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.provisional-banner {
    padding: 1.1rem 1.25rem;
    border-radius: 10px;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-weight: 600;
}

.staff-notify-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.staff-notify {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    border-radius: 10px;
    background: #fff8f0;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, #f0d4b8);
    border-left: 4px solid var(--accent);
    color: #5c3a12;
}

.staff-notify__body {
    min-width: 0;
    flex: 1;
}

.staff-notify__message {
    margin: 0 0 0.35rem;
    font-weight: 600;
    line-height: 1.4;
}

.staff-notify__link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.staff-notify__link:hover {
    color: var(--accent);
}

.staff-notify__dismiss {
    flex-shrink: 0;
}

.staff-notify__dismiss .btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .staff-notify {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-notify__dismiss .btn {
        width: 100%;
    }
}

/* Staff navbar notification bell + dropdown */
.nav-notify {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-notify__bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--navy) 18%, #fff);
    border-radius: 8px;
    background: #f4f7fb;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-notify__bell:hover,
.nav-notify__bell:focus-visible {
    background: #eef2f8;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--navy));
    color: var(--accent-dark);
    outline: none;
}

.nav-notify.is-open .nav-notify__bell {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.nav-notify__icon {
    width: 1.15rem;
    height: 1.15rem;
}

.nav-notify__badge {
    position: absolute;
    top: -0.3rem;
    right: -0.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.nav-notify__panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 60;
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(70vh, 26rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(9, 29, 61, 0.2);
}

.nav-notify__panel[hidden] {
    display: none !important;
}

.nav-notify__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.95rem;
    border-bottom: 1px solid #e4ebf4;
    background: linear-gradient(180deg, #f7f9fc, #fff);
}

.nav-notify__head strong {
    color: var(--navy);
    font-size: 0.95rem;
}

.nav-notify__mark-all {
    margin: 0;
}

.nav-notify__mark-all-btn {
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nav-notify__mark-all-btn:hover {
    color: var(--navy);
}

.nav-notify__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    max-height: min(58vh, 21rem);
}

.nav-notify__item {
    padding: 0.8rem 0.95rem;
    border-bottom: 1px solid #eef2f8;
}

.nav-notify__item:last-child {
    border-bottom: 0;
}

.nav-notify__item.is-unread {
    background: #fff8f0;
    border-left: 3px solid var(--accent);
}

.nav-notify__message {
    margin: 0 0 0.4rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.nav-notify__item:not(.is-unread) .nav-notify__message {
    font-weight: 500;
    color: #445468;
}

.nav-notify__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    font-size: 0.78rem;
    color: #6a7a8f;
}

.nav-notify__link {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nav-notify__link:hover {
    color: var(--accent);
}

.nav-notify__dismiss {
    margin: 0;
    margin-left: auto;
}

.nav-notify__dismiss-btn {
    border: 0;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
}

.nav-notify__dismiss-btn:hover {
    color: var(--accent-dark);
    opacity: 1;
}

.nav-notify__empty {
    margin: 0;
    padding: 1.25rem 0.95rem;
    color: #6a7a8f;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .nav-notify {
        width: 100%;
        padding: 0.65rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-notify__panel {
        position: static;
        width: 100%;
        margin-top: 0.55rem;
        max-height: none;
        box-shadow: none;
    }

    .nav-notify__list {
        max-height: 14rem;
    }
}

/* Staff navbar account / logout dropdown */
.nav-account {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Public / student navbar Challan dropdown */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-dropdown__caret {
    display: inline-block;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    opacity: 0.9;
    transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown__caret {
    transform: rotate(180deg);
}

.nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    z-index: 60;
    min-width: 11.5rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(9, 29, 61, 0.2);
}

.nav-dropdown__menu[hidden] {
    display: none !important;
}

.nav-dropdown__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border-radius: 7px;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown--end .nav-dropdown__menu {
    left: auto;
    right: 0;
}

.nav-dropdown__item.is-current {
    background: #fff4e8;
    color: var(--accent-dark);
}

.nav-dropdown__item:hover,
.nav-dropdown__item:focus-visible {
    background: #fff4e8;
    color: var(--accent-dark);
    outline: none;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown__toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    .nav-dropdown__menu {
        position: static;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0.35rem;
        box-shadow: none;
        border: none;
        padding: 0 0 0.35rem 0.85rem;
        background: transparent;
    }

    .nav-dropdown--end .nav-dropdown__menu {
        left: auto;
        right: auto;
    }
}

.nav-account__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-account__caret {
    display: inline-block;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    color: currentColor;
    opacity: 0.95;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.nav-account.is-open .nav-account__caret {
    transform: rotate(180deg);
}

.nav-account__menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 60;
    min-width: 11.5rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(9, 29, 61, 0.2);
}

.nav-account__menu[hidden] {
    display: none !important;
}

.nav-account__logout-form {
    margin: 0;
    display: block;
}

.nav-account__menu-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.nav-account__menu-item:hover,
.nav-account__menu-item:focus-visible {
    background: #fff4e8;
    color: var(--accent-dark);
    outline: none;
    text-decoration: none;
}

.nav-account__logout {
    color: var(--accent-dark);
}

.nav-account__logout:hover,
.nav-account__logout:focus-visible {
    background: color-mix(in srgb, var(--accent) 16%, #fff);
    color: var(--accent-dark);
}

@media (max-width: 1100px) {
    .nav-account {
        width: 100%;
        margin-top: 0.75rem;
    }

    .nav-account__toggle {
        width: 100%;
        justify-content: center;
    }

    .nav-account__menu {
        position: static;
        width: 100%;
        margin-top: 0.45rem;
        box-shadow: none;
    }
}

.deadline-alert {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background: #fff4e8;
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    padding: 0.55rem 0;
    color: #7a3e00;
    font-weight: 600;
    line-height: 1.45;
    box-sizing: border-box;
}

.deadline-alert__track {
    display: inline-block;
    padding: 0 1.25rem;
    white-space: nowrap;
    --deadline-shift: 0px;
    --deadline-duration: 5s;
    animation: deadline-bounce var(--deadline-duration) ease-in-out infinite alternate;
}

@keyframes deadline-bounce {
    from { transform: translateX(0); }
    to { transform: translateX(var(--deadline-shift)); }
}

@media (prefers-reduced-motion: reduce) {
    .deadline-alert {
        white-space: normal;
        text-align: center;
        padding: 0.55rem 1.25rem;
    }
    .deadline-alert__track {
        display: inline;
        padding: 0;
        animation: none !important;
    }
}

.challan-sheet {
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.challan-sheet header {
    background: var(--navy);
    color: #fff;
    padding: 1.25rem 1.5rem;
}

.challan-rows { width: 100%; border-collapse: collapse; }
.challan-rows th,
.challan-rows td {
    text-align: left;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.challan-rows th { width: 45%; color: var(--muted); font-weight: 500; }

/* Student — Application Status */
.app-status {
    max-width: 760px;
    margin: 0 auto;
}

.app-status .page-header h1 {
    margin-bottom: 0.3rem;
}

.app-status .page-header {
    align-items: center;
}

.app-status .page-header .actions {
    flex: 0 0 auto;
}

.app-status__header-admit-locked {
    min-height: 2.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #c5d0de;
    background: #e8eef5;
    color: #7a8796;
    cursor: not-allowed;
}

.app-status__banner {
    margin-bottom: 1rem;
    padding: 0.75rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.4;
    background: linear-gradient(180deg, #f3f7fc 0%, #e8eef6 100%);
    border: 1px solid #c5d3e4;
    border-left: 4px solid var(--navy);
    color: var(--navy);
}

.app-status__banner--success {
    background: linear-gradient(180deg, #f3faf6 0%, #e8f5ee 100%);
    border-color: #b7dcc8;
    border-left-color: #1f7a4d;
    color: #14553a;
}

.app-status__banner--transfer {
    background: linear-gradient(180deg, #eef6ff 0%, #e2edfa 100%);
    border-color: #b7cce4;
    border-left-color: #1d4ed8;
    color: #1e3a8a;
}

.app-status__banner-detail {
    display: block;
    margin-top: 0.2rem;
    font-weight: 500;
    font-size: 0.88rem;
    opacity: 0.9;
}

.app-status__panel {
    background: var(--surface);
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04), 0 8px 24px rgba(13, 44, 84, 0.06);
    overflow: hidden;
}

.app-status__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid #d7e0ec;
    border-left: 4px solid var(--navy);
    background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}

.app-status__kicker {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.app-status__head h2 {
    margin: 0 0 0.3rem;
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 800;
}

.app-status__head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 34rem;
}

.app-status__badge {
    font-size: 0.88rem !important;
    padding: 0.4rem 0.85rem !important;
    align-self: center;
}

.app-status__dl {
    margin: 0;
    padding: 0.35rem 1.35rem 0.5rem;
}

.app-status__dl > div {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f7;
}

.app-status__dl > div:last-child {
    border-bottom: none;
}

.app-status__dl dt {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 500;
}

.app-status__dl dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
}

.app-status__mono {
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.app-status__hint {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--muted);
}

.app-status__mess-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
    margin: 0 1.35rem 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid #c5d3e4;
    border-left: 4px solid var(--navy);
    border-radius: 8px;
    background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}

.app-status__mess-callout-main {
    min-width: 0;
    flex: 1 1 16rem;
}

.app-status__mess-callout-kicker {
    margin: 0 0 0.25rem;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-status__mess-callout-text {
    margin: 0;
    color: var(--navy);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.45;
}

.app-status__mess-callout-fee {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    margin: 0;
    padding: 0.5rem 0.8rem;
    border: 1px solid #d0dceb;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.app-status__mess-callout-fee span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-status__mess-callout-fee strong {
    color: var(--navy);
    font-size: 1.12rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
}

.app-status__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.35rem 1.2rem;
    border-top: 1px solid #d7e0ec;
    background: linear-gradient(180deg, #fbfcfe 0%, #f3f7fb 100%);
}

.app-status__actions-label {
    margin: 0;
    flex: 0 0 auto;
}

.app-status__actions-btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-left: auto;
}

.app-status__print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11.5rem;
    min-height: 2.55rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

a.app-status__print-btn.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    box-shadow: 0 1px 0 rgba(13, 44, 84, 0.12);
}

a.app-status__print-btn.btn-primary:hover {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(13, 44, 84, 0.18);
}

a.app-status__print-btn.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-status__print-btn--locked {
    background: #f4f7fb;
    border-color: #c9d6e6;
    color: #6b7f99;
    cursor: not-allowed;
    opacity: 1;
    filter: none;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.app-status__print-btn--locked:hover {
    transform: none;
    background: #f4f7fb;
    color: #6b7f99;
}

.app-status__footnote {
    margin-top: 1rem;
    padding-top: 0.15rem;
    font-size: 0.86rem;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .app-status__head {
        padding: 1rem 1.05rem;
    }

    .app-status__dl {
        padding: 0.2rem 1.05rem 0.35rem;
    }

    .app-status__dl > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.65rem 0;
    }

    .app-status__mess-callout {
        margin: 0 1.05rem 0.9rem;
        align-items: stretch;
        flex-direction: column;
    }

    .app-status__mess-callout-fee {
        align-items: center;
        text-align: center;
        align-self: stretch;
    }

    .app-status__actions {
        align-items: stretch;
        flex-direction: column;
        padding: 0.95rem 1.05rem 1.1rem;
    }

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

    .app-status__print-btn {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }
}

.mess-pay {
    max-width: 960px;
    margin: 0 auto;
}

.mess-pay .page-header h1 {
    margin-bottom: 0.35rem;
}

.mess-pay .page-header .muted {
    max-width: 40rem;
    line-height: 1.5;
}

.mess-pay__panel {
    background: var(--surface);
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04), 0 8px 24px rgba(13, 44, 84, 0.06);
    overflow: hidden;
    margin-bottom: 1.15rem;
}

.mess-pay__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid #d7e0ec;
    background:
        linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
    border-left: 4px solid var(--navy);
}

.mess-pay__panel-head--form {
    border-left-color: var(--accent);
}

.mess-pay__kicker {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.mess-pay__panel-head h2 {
    margin: 0 0 0.25rem;
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
}

.mess-pay__panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 34rem;
    line-height: 1.45;
}

.mess-pay__amount {
    min-width: 11.5rem;
    padding: 0.7rem 0.95rem;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    text-align: right;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mess-pay__amount-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.78;
    font-weight: 600;
}

.mess-pay__amount-value {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    line-height: 1.2;
}

.mess-pay__currency {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.85;
    margin-right: 0.15rem;
}

.mess-pay__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
}

.mess-pay__block {
    padding: 1.2rem 1.35rem 1.35rem;
}

.mess-pay__block + .mess-pay__block {
    border-left: 1px solid #e3eaf2;
    background: #fbfcfe;
}

.mess-pay__block h3 {
    margin: 0 0 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #e3eaf2;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.mess-pay__dl {
    margin: 0;
    display: grid;
    gap: 0;
}

.mess-pay__dl > div {
    display: grid;
    grid-template-columns: 8.75rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: baseline;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef2f7;
}

.mess-pay__dl > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mess-pay__dl > div:first-child {
    padding-top: 0;
}

.mess-pay__dl dt {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.mess-pay__dl dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
    font-size: 0.95rem;
}

.mess-pay__dl--bank > div:first-child dd {
    color: var(--navy);
    font-weight: 800;
}

.mess-pay__mono {
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.mess-pay__note {
    margin: 0;
    padding: 0.85rem 1.35rem;
    border-top: 1px solid #f0d9b8;
    background: #fffaf3;
    color: #7a4a12;
    font-size: 0.88rem;
    line-height: 1.45;
}

.mess-pay__note strong {
    color: #9a3412;
    font-weight: 700;
}

.mess-pay__form {
    padding: 1.2rem 1.35rem 1.35rem;
}

.mess-pay__form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem 1.15rem;
    margin-bottom: 0.35rem;
}

.mess-pay__form-span {
    grid-column: 1 / -1;
}

.mess-pay__form-actions {
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
}

@media (max-width: 860px) {
    .mess-pay {
        max-width: 100%;
    }

    .mess-pay .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .mess-pay .page-header .btn {
        width: 100%;
        text-align: center;
    }

    .mess-pay__panel-head {
        flex-direction: column;
        padding: 1rem 1.05rem;
        gap: 0.85rem;
    }

    .mess-pay__panel-head h2 {
        font-size: 1.1rem;
    }

    .mess-pay__panel-head p {
        font-size: 0.88rem;
    }

    .mess-pay__amount {
        text-align: left;
        width: 100%;
        min-width: 0;
    }

    .mess-pay__amount-value {
        font-size: 1.25rem;
    }

    .mess-pay__grid {
        grid-template-columns: 1fr;
    }

    .mess-pay__block {
        padding: 1.05rem 1.05rem 1.15rem;
    }

    .mess-pay__block + .mess-pay__block {
        border-left: none;
        border-top: 1px solid #e3eaf2;
    }

    .mess-pay__dl > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.5rem 0;
    }

    .mess-pay__mono {
        font-size: 0.86rem;
        overflow-wrap: anywhere;
    }

    .mess-pay__note {
        padding: 0.8rem 1.05rem;
        font-size: 0.85rem;
    }

    .mess-pay__form {
        padding: 1.05rem 1.05rem 1.2rem;
    }

    .mess-pay__form-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .mess-pay__form-actions {
        justify-content: stretch;
    }

    .mess-pay__form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mess-pay .page-header h1 {
        font-size: 1.45rem;
    }

    .mess-pay__amount-value {
        font-size: 1.2rem;
    }
}

@media print {
    .site-header, .site-footer, .topbar, .flash-stack, .no-print { display: none !important; }
    .challan-sheet { border: none; }
    .mess-pay__panel { box-shadow: none; }
    main.container { padding: 0; margin: 0; }
}

.card:has(> table),
.card:has(> .table-scroll),
.card:has(> form > table),
.table-scroll,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.card:has(> table) > table,
.table-scroll > table,
.table-responsive > table {
    min-width: 640px;
}

.card > form.actions,
form.actions {
    row-gap: 0.75rem;
}

@media (max-width: 900px) {
    .card {
        padding: 1.15rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
    }

    .page-header .actions {
        width: 100%;
    }

    .page-header .actions .btn {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .deadline-alert {
        padding: 0.65rem 0;
        font-size: 0.9rem;
    }

    .deadline-alert__track {
        padding: 0 var(--page-pad-x);
    }

    .provisional-banner {
        padding: 0.95rem 1rem;
        font-size: 0.95rem;
    }

    .tag-list {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="file"],
    select,
    textarea {
        font-size: 16px;
    }

    .topbar-contact span:nth-child(2) {
        display: none;
    }

    .topbar-links > a:not(:first-child) {
        display: none;
    }

    .brand {
        gap: 0.65rem;
    }

    .container {
        min-height: auto;
    }

    .card {
        padding: 1rem;
        border-radius: 10px;
    }

    .card:has(> table) > table,
    .table-scroll > table,
    .table-responsive > table {
        min-width: 560px;
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.55rem 0.6rem;
    }

    .actions {
        width: 100%;
    }

    .actions .btn {
        flex: 1 1 calc(50% - 0.35rem);
        text-align: center;
        justify-content: center;
    }

    .actions form {
        flex: 1 1 auto;
    }

    .actions form .btn {
        width: 100%;
    }

    .btn {
        min-height: 2.5rem;
    }

    .btn-sm {
        min-height: 2rem;
        padding: 0.4rem 0.65rem;
    }

    .card > form.actions {
        flex-direction: column;
        align-items: stretch;
    }

    .card > form.actions .form-group {
        width: 100%;
        min-width: 0 !important;
        flex: 1 1 auto;
    }

    .card > form.actions .btn {
        width: 100%;
        flex: 1 1 auto;
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .print-room-cols {
        grid-template-columns: 1fr;
    }

    .rules-box {
        max-height: none;
        padding: 1rem;
        font-size: 0.95rem;
    }

    .ack-block {
        padding: 0.85rem;
    }

    .challan-sheet {
        max-width: 100%;
        border-radius: 8px;
    }

    .challan-rows th,
    .challan-rows td {
        display: block;
        width: 100%;
        padding: 0.45rem 1rem;
    }

    .challan-rows th {
        padding-bottom: 0.15rem;
        border-bottom: none;
    }

    .challan-rows td {
        padding-top: 0;
        padding-bottom: 0.75rem;
    }

    .auth-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
        padding: 1.15rem 0.95rem;
    }

    .auth-card h1 {
        font-size: clamp(1.25rem, 6vw, 1.55rem);
        margin-bottom: 0.4rem;
    }

    .auth-card > .muted {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .auth-card .form-group label {
        font-size: 0.9rem;
    }

    .flash-stack {
        left: 0.65rem;
        right: 0.65rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .topbar-links > a:not(:first-child) {
        display: none;
    }

    .page-header .actions .btn {
        flex: 1 1 100%;
    }

    .actions .btn {
        flex: 1 1 100%;
    }

    td.actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        min-width: 7.5rem;
    }

    td.actions .btn,
    td.actions form {
        width: 100%;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    body.page-home .page-frame,
    body.page-auth .page-frame {
        min-height: 0;
    }

    .hero,
    .auth-shell {
        min-height: 0;
        flex: 0 0 auto;
    }

    .hero-body {
        padding: 1rem var(--page-pad-x);
    }

    .hero-body h1 {
        font-size: clamp(1.3rem, 4.5vh, 1.9rem);
        margin-bottom: 0.4rem;
        max-width: 20ch;
    }

    .hero-lead {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .hero-body .actions .btn {
        min-height: 2.25rem;
    }

    .auth-shell {
        padding: 1.25rem 1rem;
    }

    .auth-card h1 {
        font-size: 1.3rem;
    }

    .auth-card > .muted {
        font-size: 0.88rem;
    }
}

/* —— Super Admin student import —— */
.imp-method {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.imp-method__select {
    width: 100%;
    max-width: 18rem;
}

.imp-panel {
    padding-top: 0.25rem;
}

.imp-panel__intro {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.imp-file-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.imp-file-head label {
    margin: 0;
}

.imp-file-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
}

.imp-columns-note {
    margin: 0 0 1rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    line-height: 1.5;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.imp-columns-note strong {
    color: var(--navy);
}

.imp-form-row {
    max-width: 22rem;
}

.imp-form--api .form-group {
    margin-bottom: 0;
}

.imp-api-grid {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1rem;
}

.imp-api-campaign input {
    width: 100%;
}

.imp-api-cnics {
    min-width: 0;
}

.imp-textarea {
    min-height: 7.5rem;
    font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.45;
    resize: vertical;
}

.imp-textarea--fixed {
    width: 100%;
    height: 10.5rem;
    min-height: 10.5rem;
    max-height: 10.5rem;
    resize: none;
}

.imp-form__actions {
    display: flex;
    justify-content: flex-end;
}

.imp-input--locked {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

.imp-checkbox--locked {
    cursor: not-allowed;
    accent-color: var(--navy);
}

.imp-form {
    margin: 0;
}

.imp-form .form-group {
    margin-bottom: 1rem;
}

.imp-form .btn-primary {
    margin-top: 0.15rem;
}

.imp-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
}

.imp-input,
.imp-textarea {
    width: 100%;
    max-width: 100%;
}

.imp-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.imp-form__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.imp-form__footer--end {
    justify-content: flex-end;
}

.imp-form__footer-note {
    margin: 0;
    flex: 1 1 12rem;
    max-width: 26rem;
}

.imp-form__footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.imp-template-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}

.imp-template-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.imp-cols {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e8eef5;
    border-radius: 8px;
}

.imp-cols summary {
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--navy);
    user-select: none;
}

.imp-cols summary:hover {
    color: var(--accent);
}

.imp-cols__code {
    display: block;
    margin-top: 0.55rem;
    padding: 0.55rem 0.65rem;
    background: #fff;
    border: 1px solid #e4ebf3;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.5;
    word-break: break-word;
    color: #334155;
}

.imp-alert {
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.86rem;
    line-height: 1.45;
}

.imp-alert code {
    font-size: 0.82rem;
}

.imp-footnote {
    margin-top: 1.15rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #f0f4f9;
    border-left: 3px solid var(--accent);
    font-size: 0.86rem;
    line-height: 1.5;
    color: #475569;
}

.imp-footnote strong {
    color: var(--navy);
}

/* API preview table */
.imp tr.is-skipped td,
.import-hub tr.is-skipped td {
    opacity: 0.72;
}

.imp-notes {
    font-size: 0.84rem;
    max-width: 14rem;
    word-break: break-word;
}

@media (max-width: 640px) {
    .imp-api-grid {
        grid-template-columns: 1fr;
    }

    .imp-form__actions {
        justify-content: stretch;
    }

    .imp-form__actions .btn {
        width: 100%;
        text-align: center;
    }

    .imp-file-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .imp-form__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .imp-form__footer .btn,
    .imp-form__footer-actions .btn {
        width: 100%;
        text-align: center;
    }

    .imp-form__footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .imp-template-link {
        text-align: center;
    }
}

/* —— Admin / RT My Hostels (formal panel layout) —— */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mh {
    max-width: 960px;
    margin: 0 auto;
}

.mh__eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.mh .page-header {
    margin-bottom: 0.75rem;
}

.mh .page-header h1 {
    margin-bottom: 0.2rem;
    color: var(--navy);
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
}

.mh .page-header .muted {
    font-size: 0.88rem;
    margin: 0;
}

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

.mh__summary-item {
    background: var(--surface);
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    box-shadow: none;
}

.mh__summary-item--accent {
    border-color: rgba(232, 118, 15, 0.35);
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
}

.mh__summary-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.mh__summary-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.15;
}

.mh__toolbar {
    background: var(--surface);
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.85rem;
    box-shadow: none;
}

.mh__filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem 0.75rem;
}

.mh__filter .form-group {
    margin: 0;
    flex: 1 1 11rem;
    min-width: 0;
}

.mh__filter label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.mh__filter select {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.mh__filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mh__filter-actions .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    min-height: 2rem;
}

.mh__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mh-panel {
    background: var(--surface);
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04);
}

.mh-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.85rem;
    padding: 0.7rem 0.95rem;
    border-bottom: 1px solid #d7e0ec;
    border-left: 3px solid var(--navy);
    background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}

.mh-panel__kicker {
    margin: 0 0 0.15rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.mh-panel__identity h2 {
    margin: 0 0 0.2rem;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.mh-panel__meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.mh-panel__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #94a3b8;
}

.mh-panel__method {
    font-weight: 600;
    font-size: 0.78rem;
}

.mh-panel__method--auto { color: #1e40af; }
.mh-panel__method--manual { color: #92400e; }

.mh-panel__head .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    min-height: 2rem;
}

.mh-panel__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid #d7e0ec;
}

.mh-stat {
    padding: 0.55rem 0.85rem;
    border-right: 1px solid #e8eef5;
}

.mh-stat:last-child { border-right: none; }

.mh-stat--highlight {
    background: #f8fafc;
}

.mh-stat__label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.mh-stat__value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
}

.mh-panel__occupancy {
    padding: 0.55rem 0.95rem 0.7rem;
}

.mh-panel__occupancy-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.mh-panel__bar {
    height: 5px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
}

.mh-panel__bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--navy) 0%, #1d4f91 55%, var(--accent) 100%);
    min-width: 0;
    transition: width 0.35s ease;
}

.mh-panel__foot {
    padding: 0.65rem 0.95rem 0.75rem;
    border-top: 1px solid #d7e0ec;
    background: #fbfcfe;
}

.mh-panel__method-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    margin: 0;
}

.mh-panel__method-field {
    flex: 1 1 14rem;
    min-width: 0;
}

.mh-panel__method-field label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.mh-panel__method-field select {
    width: 100%;
    max-width: 18rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.88rem;
}

.mh-panel__method-form .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    min-height: 2rem;
}

.mh-empty {
    background: var(--surface);
    border: 1px dashed #c5d0de;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
}

.mh-empty__title {
    margin: 0 0 0.35rem;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 800;
}

.mh-empty p {
    margin: 0 auto;
    max-width: 34rem;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.9rem;
}

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

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

    .mh-stat:nth-child(2n) {
        border-right: none;
    }

    .mh-stat:nth-child(-n + 2) {
        border-bottom: 1px solid #e8eef5;
    }
}

@media (max-width: 560px) {
    .mh-panel__head .btn {
        width: 100%;
        justify-content: center;
    }

    .mh-panel__method-form .btn {
        width: 100%;
    }

    .mh-panel__method-field select {
        max-width: none;
    }
}

/* legacy class hooks kept harmless if referenced elsewhere */
.my-hostels-filters,
.my-hostels-table {
    /* superseded by .mh layout */
}

/* ═══════════════════════════════════════════
   Admin portal shell (body.page-admin)
   Direction: "Campus Command Surface" —
   Canva/Glazey-inspired light SaaS workspace
   with UET navy structure + orange CTAs.
   Soft slate wash, crisp white panels,
   IBM Plex display / Source Sans UI.
   ═══════════════════════════════════════════ */

body.page-admin {
    background-color: #dce6f1;
    background-image:
        radial-gradient(ellipse 90% 48% at 8% -8%, rgba(13, 44, 84, 0.14), transparent 55%),
        radial-gradient(ellipse 70% 40% at 96% 4%, rgba(232, 118, 15, 0.07), transparent 50%),
        linear-gradient(180deg, #d5e0ed 0%, #e4ecf5 12rem, #edf2f8 100%),
        repeating-linear-gradient(
            -16deg,
            transparent 0,
            transparent 11px,
            rgba(13, 44, 84, 0.018) 11px,
            rgba(13, 44, 84, 0.018) 12px
        );
    background-attachment: fixed;
}

body.page-admin .topbar {
    background: linear-gradient(90deg, var(--navy-dark) 0%, var(--navy) 55%, #143a66 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.page-admin .topbar-accent {
    background: linear-gradient(90deg, var(--accent) 0%, #f0a04a 55%, transparent 100%);
    opacity: 0.95;
}

/* Clearer chrome / content separation */
body.page-admin .site-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: none;
    box-shadow:
        0 1px 0 var(--admin-line),
        0 12px 32px rgba(13, 44, 84, 0.08);
    position: relative;
    z-index: 40;
    overflow: visible;
}

body.page-admin .site-header .inner {
    max-width: 1600px;
    overflow: visible;
}

body.page-admin .site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--navy) 0%,
        var(--navy) 72%,
        var(--accent) 72%,
        #f0a04a 100%
    );
}

body.page-admin .brand-text {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--navy);
}

body.page-admin .nav-links > a:not(.btn),
body.page-admin .nav-links .nav-dropdown__toggle {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.93rem;
    color: #334155;
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    margin: 0 0.05rem;
    transition: color 0.15s ease, background 0.15s ease;
}

body.page-admin .nav-links > a:not(.btn):hover,
body.page-admin .nav-links .nav-dropdown__toggle:hover,
body.page-admin .nav-links .nav-dropdown.is-open .nav-dropdown__toggle,
body.page-admin .nav-links > a.is-current,
body.page-admin .nav-dropdown.is-current .nav-dropdown__toggle {
    color: var(--navy);
    background: var(--admin-wash);
    border-bottom-color: transparent;
    text-decoration: none;
}

body.page-admin .nav-links > .btn.btn-accent {
    box-shadow: 0 1px 0 rgba(13, 44, 84, 0.08);
}

body.page-admin > .container {
    padding-top: clamp(1.65rem, 3.2vw, 2.55rem);
    padding-bottom: clamp(2.5rem, 5vw, 3.6rem);
    max-width: 1360px;
}

body.page-admin .site-footer {
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Page headers */
body.page-admin .page-header {
    align-items: flex-end;
    margin-bottom: var(--admin-space);
    padding: 0 0 1.15rem;
    border-bottom: 1px solid var(--admin-line);
    gap: 1rem 1.35rem;
}

body.page-admin .page-kicker,
body.page-admin .mh__eyebrow {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

body.page-admin .page-header h1 {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    color: var(--navy);
}

body.page-admin .page-header .muted {
    margin: 0;
    max-width: 46rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
}

body.page-admin .page-header .actions {
    gap: 0.55rem;
    align-items: center;
}

body.page-admin .page-header > .btn,
body.page-admin .page-header > a.btn {
    align-self: flex-end;
    flex-shrink: 0;
}

/* Keep header action forms/buttons as one aligned control cluster */
body.page-admin .page-header .actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    border: 0;
}

body.page-admin .page-header .actions .btn,
body.page-admin .page-header .actions a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
}

body.page-admin .page-header .actions .btn-primary {
    border-color: var(--navy);
}

body.page-admin .page-header .actions .btn-secondary {
    border-color: var(--admin-line);
    background: #eef3f9;
    color: var(--navy);
}

body.page-admin .page-header .actions .btn-secondary:hover {
    background: #e0e8f2;
    border-color: #b7c6da;
    color: var(--navy-dark);
    text-decoration: none;
}

body.page-admin .page-header .actions .btn-danger-outline {
    background: #fff8f8;
    color: #9b1c1c;
    border-color: #e7b6b6;
}

body.page-admin .page-header .actions .btn-danger-outline:hover:not(:disabled) {
    background: #feecec;
    border-color: #c53030;
    color: #7f1d1d;
}

body.page-admin .page-header--rt-actions {
    align-items: flex-start;
    margin-bottom: 1.15rem;
    padding-bottom: 0.95rem;
}

body.page-admin .page-header--rt-actions .muted {
    max-width: 40rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

body.page-admin .page-header--rt-actions .page-header__actions {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

body.page-admin .page-header__lead {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

body.page-admin .page-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    width: 100%;
}

body.page-admin .page-header__title-row h1 {
    margin: 0;
}

body.page-admin .page-header__title-row .actions {
    margin: 0 0 0 auto;
    justify-content: flex-end;
}

/* Dashboard student lookup */
.dash-lookup__empty {
    margin: 0.15rem 0 0;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--admin-line);
    border-left: 3px solid var(--navy);
    border-radius: 10px;
    background: var(--admin-wash);
    color: var(--navy);
    font-size: 0.92rem;
}

.dash-lookup-modal__panel {
    width: min(36rem, 100%);
    padding: 1.1rem 1.2rem 1rem;
}

.dash-lookup-modal__panel .eligibility-modal__title {
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
}

.dash-lookup-modal__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1.35rem;
    margin: 0.1rem 0 0.45rem;
}

.dash-lookup-modal__row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-lookup-modal__row--wide {
    grid-column: 1 / -1;
}

.dash-lookup-modal__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a97a8;
    line-height: 1.3;
}

.dash-lookup-modal__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    word-break: break-word;
}

.dash-lookup-modal__value--mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.dash-lookup-modal__value .badge {
    width: fit-content;
}

@media (max-width: 560px) {
    .dash-lookup-modal__list {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
}

/* Dashboard workflow sections */
.admin-section {
    margin-top: 2.15rem;
}

.admin-section:first-of-type {
    margin-top: 0.65rem;
}

.admin-section__head {
    display: flex;
    gap: 0.9rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-line);
}

.admin-section__head::before {
    content: "";
    width: 3px;
    flex-shrink: 0;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--navy) 0%, #1a4a7a 100%);
    min-height: 2.6rem;
}

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

.admin-section__head h2 {
    margin: 0 0 0.25rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--navy);
    line-height: 1.25;
}

.admin-section__head .muted {
    margin: 0;
    font-size: 0.9rem;
    max-width: 44rem;
    line-height: 1.45;
}

body.page-admin .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 1.05rem;
}

body.page-admin .card-link {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 7.25rem;
    padding: 1.2rem 2.5rem 1.2rem 1.2rem;
    background: var(--admin-panel);
    border: 1px solid var(--admin-line);
    border-left: 3px solid var(--navy);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.045);
    transition:
        border-color 0.18s ease,
        border-left-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

body.page-admin .card-link::after {
    content: "→";
    position: absolute;
    right: 1.1rem;
    top: 1.2rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    color: var(--navy);
    opacity: 0.26;
    transition: transform 0.18s ease, opacity 0.18s ease, color 0.18s ease;
}

body.page-admin .card-link:hover {
    border-color: #b4c4d8;
    border-left-color: var(--accent);
    box-shadow: 0 10px 26px rgba(13, 44, 84, 0.11);
    transform: translateY(-2px);
    text-decoration: none;
}

body.page-admin .card-link:hover::after {
    opacity: 1;
    color: var(--accent);
    transform: translateX(4px);
}

body.page-admin .card-link:focus-visible {
    outline-offset: 3px;
}

body.page-admin .card-link h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
    padding-right: 0.25rem;
    color: var(--navy);
}

body.page-admin .card-link p.muted {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    flex: 1;
    color: var(--muted);
}

/* Filter / toolbar bar used on list pages */
.filter-bar,
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.8rem 1rem;
    margin: 0;
}

.filter-bar .form-group,
.admin-toolbar .form-group {
    margin: 0;
    min-width: 9.5rem;
    flex: 1 1 9.5rem;
}

.filter-bar .form-group--grow,
.admin-toolbar .form-group--grow {
    flex: 2 1 14rem;
    min-width: 12rem;
}

.filter-bar label,
.admin-toolbar label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 0.38rem;
}

.filter-bar input,
.filter-bar select,
.admin-toolbar input,
.admin-toolbar select {
    padding: 0.58rem 0.72rem;
    font-size: 0.92rem;
    border-radius: 7px;
    border-color: #c0cedf;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-bar input:focus,
.filter-bar select:focus,
.admin-toolbar input:focus,
.admin-toolbar select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(13, 44, 84, 0.12);
    outline: none;
}

.filter-bar__actions,
.admin-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

body.page-admin .btn-secondary {
    background: #e8eef6;
    color: var(--navy);
    border: 1px solid transparent;
}

body.page-admin .btn-secondary:hover {
    background: #d9e4f0;
    color: var(--navy-dark);
}

body.page-admin .btn-primary {
    letter-spacing: 0.01em;
}

body.page-admin .card {
    border-color: var(--admin-line);
    border-radius: 10px;
    background: var(--admin-panel);
    box-shadow: 0 1px 3px rgba(13, 44, 84, 0.05);
}

body.page-admin .card + .card,
body.page-admin .filter-card + .table-card,
body.page-admin .card + form > .card,
body.page-admin .filter-card + .card {
    margin-top: 1.15rem;
}

body.page-admin .filter-card + .rt-security-move {
    margin-top: 0;
}

.filter-card {
    margin-bottom: 1.15rem;
    padding: 1.1rem 1.25rem;
    background: var(--admin-panel);
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04);
}

body.page-admin .settings-panel .card,
body.page-admin .form-card,
body.page-admin form.card {
    padding: 1.25rem 1.35rem;
}

/* Admin list tables — denser, readable */
body.page-admin table:not(.data-table) th,
body.page-admin .data-table thead th {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0.75rem 0.8rem;
    background: var(--admin-wash);
    color: var(--navy);
    border-bottom: 1px solid var(--admin-line);
}

body.page-admin table:not(.data-table) td {
    padding: 0.68rem 0.8rem;
    font-size: 0.92rem;
    vertical-align: middle;
    border-bottom-color: #e2eaf3;
}

body.page-admin table:not(.data-table) tbody tr {
    transition: background 0.12s ease;
}

body.page-admin table:not(.data-table) tbody tr:hover {
    background: #f1f6fb;
}

body.page-admin .table-card,
body.page-admin .card.table-scroll,
body.page-admin .card:has(> table),
body.page-admin .card:has(> .data-table-wrap) {
    padding: 0;
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(70vh, calc(2.55rem + (12 * 2.65rem)));
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--admin-line);
    background: var(--admin-panel);
    border-radius: 10px;
}

body.page-admin .table-card thead th,
body.page-admin .card.table-scroll thead th,
body.page-admin .card:has(> table) thead th,
body.page-admin .card:has(> .data-table-wrap) thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--admin-line, #e3eaf2);
}

body.page-admin .card.table-scroll.table-scroll--rows-10 {
    max-height: calc(2.55rem + (10 * 2.65rem));
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.page-admin .card.table-scroll.table-scroll--rows-10 thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--admin-line, #e3eaf2);
}

body.page-admin .table-card > .data-table-wrap,
body.page-admin .card > .data-table-wrap {
    border: none;
    border-radius: 0;
}

body.page-admin .table-card > table,
body.page-admin .card > table,
body.page-admin .card.table-scroll > table {
    margin: 0;
}

body.page-admin .table-card thead th:first-child,
body.page-admin .card > table thead th:first-child,
body.page-admin .card.table-scroll thead th:first-child {
    padding-left: 1.2rem;
}

body.page-admin .table-card tbody td:first-child,
body.page-admin .card > table tbody td:first-child,
body.page-admin .card.table-scroll tbody td:first-child {
    padding-left: 1.2rem;
}

body.page-admin .table-card thead th:last-child,
body.page-admin .card > table thead th:last-child,
body.page-admin .card.table-scroll thead th:last-child {
    padding-right: 1.2rem;
}

body.page-admin .table-card tbody td:last-child,
body.page-admin .card > table tbody td:last-child,
body.page-admin .card.table-scroll tbody td:last-child {
    padding-right: 1.2rem;
}

body.page-admin .data-table--compact thead th {
    background: var(--admin-wash);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.05em;
}

body.page-admin .data-table--compact tbody tr:hover td {
    background: #eef4fb;
}

body.page-admin td.actions,
body.page-admin .actions.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    vertical-align: middle;
}

body.page-admin td.actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    border: 0;
    align-items: center;
}

body.page-admin td.actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    box-sizing: border-box;
}

/* Room Types — Add form: input + button on one row; hint under field only */
.room-type-add-form {
    margin: 0;
}

.room-type-add-form__field {
    margin: 0;
}

.room-type-add-form__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.room-type-add-form__input {
    flex: 1 1 16rem;
    min-width: 0;
    width: auto;
    margin: 0;
}

.room-type-add-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.65rem;
    padding: 0.65rem 1.05rem;
    line-height: 1.2;
    box-sizing: border-box;
    white-space: nowrap;
}

.room-type-add-form__hint {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    max-width: 36rem;
}

@media (max-width: 640px) {
    .room-type-add-form__row {
        flex-direction: column;
        align-items: stretch;
    }

    .room-type-add-form__input {
        flex: 1 1 auto;
        width: 100%;
    }

    .room-type-add-form__submit {
        width: 100%;
    }
}

body.page-admin .list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.9rem 1.15rem;
    margin-top: 1.2rem;
    padding: 1.1rem 1.25rem;
    background: var(--admin-panel);
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04);
}

body.page-admin .badge {
    font-family: var(--font-ui);
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.01em;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
    max-width: none;
}

body.page-admin .tag {
    background: var(--admin-wash);
    color: var(--navy);
    border: 1px solid #d0dce9;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

body.page-admin .flash {
    border-radius: 8px;
}

.applicant-rec__table tbody tr.is-other-campus > td {
    color: #991b1b;
    background: #fee2e2;
}

.applicant-rec__table tbody tr.is-other-campus > td.data-table__sticky {
    background: #fee2e2;
    color: #991b1b;
}

.applicant-rec__table tbody tr.is-challan-paid > td {
    color: #14532d;
    background: #dcfce7;
}

.applicant-rec__table tbody tr.is-challan-paid > td.data-table__sticky,
body.page-admin .applicant-rec__table tbody tr.is-challan-paid:nth-child(even) .applicant-rec__col-name.data-table__sticky,
body.page-admin .applicant-rec__table tbody tr.is-challan-paid:hover .applicant-rec__col-name.data-table__sticky {
    background: #dcfce7;
    color: #14532d;
}

.applicant-rec__table tbody tr.is-sync-campus-queue > td {
    color: #854d0e;
    background: #fef08a;
}

.applicant-rec__table tbody tr.is-sync-campus-queue > td.data-table__sticky,
body.page-admin .applicant-rec__table tbody tr.is-sync-campus-queue:nth-child(even) .applicant-rec__col-name.data-table__sticky,
body.page-admin .applicant-rec__table tbody tr.is-sync-campus-queue:hover .applicant-rec__col-name.data-table__sticky {
    background: #fef08a;
    color: #854d0e;
}

/* ── Applicant recommendation list ── */
.applicant-rec__table-card {
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(70vh, calc(2.55rem + (12 * 2.65rem)));
    -webkit-overflow-scrolling: touch;
}

.applicant-rec__table-card thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.applicant-rec__table-card > .data-table-wrap {
    border: none;
    border-radius: 0;
}

.applicant-rec__table {
    min-width: 72rem;
    table-layout: auto;
}

/*
 * Even horizontal spacing: admin .table-card first/last-child rules bump
 * Name (1.2rem left) and Select (1.2rem right) while middle cells stay at
 * ~0.7–0.8rem, and thead uses a different horizontal pad than tbody.
 * Normalize to one gutter; Select stays slightly tighter for checkboxes.
 */
.applicant-rec__table.data-table--compact > thead > tr > th,
.applicant-rec__table.data-table--compact > tbody > tr > td {
    padding: 0.55rem 0.75rem;
}

body.page-admin .applicant-rec__table.data-table thead th {
    padding: 0.65rem 0.75rem;
}

body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table thead th:first-child,
body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table tbody td:first-child,
body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table thead th:last-child,
body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table tbody td:last-child {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.applicant-rec__table .applicant-rec__col-select,
body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table thead th.applicant-rec__col-select,
body.page-admin .applicant-rec__table-card.table-card .applicant-rec__table tbody td.applicant-rec__col-select {
    width: 3.25rem;
    min-width: 3.25rem;
    max-width: 3.5rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    text-align: center;
    vertical-align: middle;
}

.applicant-rec__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.applicant-rec__check input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

.applicant-rec__check input[type="checkbox"]:disabled {
    cursor: default;
    opacity: 0.85;
}

.applicant-rec__col-name {
    min-width: 10.5rem;
    max-width: 13.5rem;
    white-space: normal !important;
    vertical-align: top;
    line-height: 1.35;
}

.applicant-rec__col-name.data-table__sticky {
    /* Soft fade instead of a hard vertical cut line while scrolling */
    box-shadow: 4px 0 10px -6px rgba(15, 35, 60, 0.12);
}

body.page-admin .applicant-rec__table thead .applicant-rec__col-name.data-table__sticky {
    background: var(--admin-wash);
}

body.page-admin .applicant-rec__table tbody tr:nth-child(even) .applicant-rec__col-name.data-table__sticky {
    background: #fafbfd;
}

body.page-admin .applicant-rec__table tbody tr:hover .applicant-rec__col-name.data-table__sticky {
    background: #eef4fb;
}

.applicant-rec__name {
    display: block;
    font-weight: 500;
    color: var(--navy);
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.applicant-rec__name a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

.applicant-rec__name a:hover {
    color: var(--accent);
}

/* Sensible floors so short labels aren’t cramped next to wider text columns */
.applicant-rec__table th:nth-child(2),
.applicant-rec__table td:nth-child(2) {
    min-width: 8.25rem; /* CNIC */
}

.applicant-rec__table th:nth-child(3),
.applicant-rec__table td:nth-child(3) {
    min-width: 9.5rem; /* Admission Fee Challan */
}

.applicant-rec__table th:nth-child(4),
.applicant-rec__table td:nth-child(4),
.applicant-rec__table th:nth-child(5),
.applicant-rec__table td:nth-child(5) {
    min-width: 5.5rem; /* Campus / Gender */
}

.applicant-rec__table th:nth-child(6),
.applicant-rec__table td:nth-child(6),
.applicant-rec__table th:nth-child(7),
.applicant-rec__table td:nth-child(7) {
    min-width: 7.5rem; /* Department / Program */
}

.applicant-rec__table th.num,
.applicant-rec__table td.num {
    min-width: 5.75rem; /* Aggregate / FSC Marks */
}

.applicant-rec__table th:nth-child(11),
.applicant-rec__table td:nth-child(11) {
    min-width: 8.5rem; /* Assigned Hostel */
}

.applicant-rec__col-status {
    min-width: 10.5rem;
    white-space: normal !important;
}

.applicant-rec__col-status .badge {
    display: inline-block;
    white-space: nowrap;
    padding: 0.28rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    line-height: 1.25;
}

.applicant-rec__showing {
    margin: 0.55rem 0 0;
    padding: 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.applicant-rec__filter-drop {
    padding: 0.9rem 1rem;
}

.applicant-rec__filter-drop-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid #c0cedf;
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    text-align: left;
    cursor: pointer;
}

.applicant-rec__filter-drop-toggle:hover,
.applicant-rec__filter-drop.is-open .applicant-rec__filter-drop-toggle {
    background: #e8eef6;
    border-color: #a8b9d0;
    color: var(--navy-dark);
}

.applicant-rec__filter-drop.is-open .applicant-rec__transfer-caret {
    transform: rotate(180deg);
}

.applicant-rec__filter-drop-panel {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--admin-line);
}

.applicant-rec__filter-drop-panel[hidden] {
    display: none;
}

.resident-roster__summary {
    margin: 0 0 0.85rem;
}

.resident-roster__section {
    margin-bottom: 1.35rem;
    scroll-margin-top: 5.5rem;
}

.resident-roster__heading {
    margin: 0 0 0.2rem;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--navy);
}

.resident-roster__meta {
    margin: 0 0 0.55rem;
    font-size: 0.84rem;
}

.applicant-rec__gender-switch {
    display: inline-flex;
    margin-top: 0.85rem;
    border: 1px solid var(--admin-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(13, 44, 84, 0.04);
}

.applicant-rec__gender-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.45rem 1.1rem;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--navy);
    background: #fff;
    text-decoration: none;
    border-right: 1px solid var(--admin-line);
    transition: background 0.15s ease, color 0.15s ease;
}

.applicant-rec__gender-switch-btn:last-child {
    border-right: none;
}

.applicant-rec__gender-switch-btn:hover {
    background: var(--admin-wash);
    color: var(--navy);
    text-decoration: none;
}

.applicant-rec__gender-switch-btn.is-active {
    background: var(--navy);
    color: #fff;
}

.applicant-rec__gender-switch-btn.is-active:hover {
    background: var(--navy-dark);
    color: #fff;
}

.applicant-rec__gender-switch-btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -2px;
    z-index: 1;
}

.applicant-rec__footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin: 0 0 0.4rem;
}

.applicant-rec__footer-count {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

.applicant-rec__footer-count--over {
    color: #991b1b;
}

.applicant-rec__footer {
    align-items: stretch;
}

.applicant-rec__assign {
    flex: 1 1 100%;
    min-width: 0;
    margin: 0;
}

.applicant-rec__transfer {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border, #d7dee8);
}

.applicant-rec__transfer-toggle.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 7px;
    box-sizing: border-box;
}

body.page-admin .applicant-rec__transfer-toggle {
    background: #fff;
    color: var(--navy);
    border: 1px solid #c0cedf;
}

body.page-admin .applicant-rec__transfer-toggle:hover,
body.page-admin .applicant-rec__transfer.is-open .applicant-rec__transfer-toggle {
    background: #e8eef6;
    border-color: #a8b9d0;
    color: var(--navy-dark);
    transform: none;
}

.applicant-rec__transfer-caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.15rem;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    flex-shrink: 0;
    opacity: 0.7;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.applicant-rec__transfer.is-open .applicant-rec__transfer-caret {
    transform: rotate(180deg);
}

.applicant-rec__transfer-panel {
    margin-top: 0.75rem;
}

.applicant-rec__assign > label,
.applicant-rec__footer-top > label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
}

.applicant-rec__assign > label {
    margin: 0 0 0.4rem;
}

.applicant-rec__footer-top > label {
    margin: 0;
}

.applicant-rec__assign-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.applicant-rec__hostel-select {
    flex: 1 1 16rem;
    max-width: 28rem;
    min-width: 14rem;
    width: auto;
    margin: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.92rem;
    line-height: 1.25;
    border-radius: 7px;
    border-color: #c0cedf;
    height: 2.5rem;
    box-sizing: border-box;
}

.applicant-rec__auto-select,
.applicant-rec__submit {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0 1.15rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 7px;
    box-sizing: border-box;
}

body.page-admin .applicant-rec__auto-select {
    background: #fff;
    color: var(--navy);
    border: 1px solid #c0cedf;
}

body.page-admin .applicant-rec__auto-select:hover {
    background: #e8eef6;
    border-color: #a8b9d0;
    color: var(--navy-dark);
    transform: none;
}

body.page-admin .applicant-rec__auto-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.applicant-rec__submit:hover {
    transform: none;
}

.applicant-rec__hint {
    margin: 0.55rem 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
    max-width: 40rem;
}

.applicant-rec__capacity-warn {
    margin: 0.45rem 0 0;
    font-size: 0.88rem;
    line-height: 1.4;
    max-width: 40rem;
    color: #991b1b;
    font-weight: 600;
}

/* ── Recommendation summary report ── */
.rec-summary__stats {
    margin-bottom: 1.2rem;
}

.rec-summary__stat {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.2rem;
    border-left: 3px solid var(--navy);
    border-radius: 10px;
}

.rec-summary__stat--total {
    border-left-color: var(--accent);
}

.rec-summary__stat-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.35;
}

.rec-summary__stat-value {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--navy);
}

.rec-summary__table-card {
    max-width: 32rem;
}

.rec-summary__table-card .badge {
    white-space: nowrap;
}

.rec-summary__total-row th {
    background: var(--admin-wash);
    font-weight: 700;
    color: var(--navy);
}

body.page-admin .pagination-bar,
body.page-admin .list-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0.95rem 1.15rem;
    border-top: 1px solid var(--admin-line);
    background: #f7fafc;
}

@media (max-width: 640px) {
    .applicant-rec__assign-row {
        flex-direction: column;
        align-items: stretch;
    }

    .applicant-rec__hostel-select,
    .applicant-rec__auto-select,
    .applicant-rec__submit,
    .applicant-rec__transfer-toggle {
        max-width: none;
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 900px) {
    body.page-admin .page-header {
        align-items: stretch;
    }

    body.page-admin .page-header .actions,
    body.page-admin .page-header > .btn,
    body.page-admin .page-header > a.btn {
        width: 100%;
        align-self: stretch;
    }

    body.page-admin .page-header .actions .btn,
    body.page-admin .page-header .actions form {
        flex: 1 1 auto;
    }

    body.page-admin .page-header .actions form .btn {
        width: 100%;
    }

    .existing-alloc-clear {
        width: auto;
    }

    .existing-alloc-clear .btn {
        flex: 0 0 auto;
    }

    .filter-bar__actions,
    .admin-toolbar__actions {
        margin-left: 0;
        width: 100%;
    }

    .filter-bar__actions .btn,
    .admin-toolbar__actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }

    body.page-admin .card-grid {
        grid-template-columns: 1fr;
    }

    .admin-section {
        margin-top: 1.55rem;
    }
}

@media (max-width: 640px) {
    body.page-admin {
        background-attachment: scroll;
    }

    body.page-admin > .container {
        padding-top: 1.15rem;
    }

    body.page-admin .card-link {
        min-height: 0;
        padding-right: 2.25rem;
    }

    body.page-admin .page-header h1 {
        font-size: 1.4rem;
    }

    body.page-admin .nav-links > a:not(.btn) {
        margin: 0;
        border-radius: 0;
    }
}

/* Add Room form: one clean grid row of equal-height controls */
.room-add-card {
    padding: 0;
    overflow: hidden;
}

.room-panel-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 1rem 1.2rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.room-panel-toggle:hover {
    background: #f7fafc;
}

.room-panel-toggle__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.room-panel-toggle__text strong {
    color: var(--navy);
    font-size: 1.05rem;
}

.room-panel-toggle__chevron {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #6b7c8f;
    border-bottom: 2px solid #6b7c8f;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}

.room-add-card.is-open .room-panel-toggle__chevron {
    transform: rotate(-135deg);
}

.room-panel-body {
    padding: 0 1.2rem 1.15rem;
    border-top: 1px solid #e6edf5;
}

.room-add-form {
    display: grid;
    grid-template-columns:
        minmax(6.5rem, 8.5rem)
        minmax(11rem, 1.35fr)
        minmax(5.25rem, 6.25rem)
        minmax(7.25rem, 8.75rem)
        auto;
    gap: 0.75rem 1.35rem;
    align-items: end;
    padding-top: 1rem;
}

.room-add-form__field--capacity {
    margin-right: 0.35rem;
}

.room-add-form__field--status {
    margin-left: 0.35rem;
}

.room-add-form .form-group {
    margin: 0;
}

.room-add-form__field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
}

.room-add-form__field label {
    margin-bottom: 0.35rem;
    line-height: 1.2;
    white-space: nowrap;
}

.room-add-form__control,
.room-add-form__field input,
.room-add-form__field select {
    width: 100%;
    min-height: 2.65rem;
    height: 2.65rem;
    box-sizing: border-box;
    margin: 0;
}

.room-add-form__field--capacity .room-add-form__control,
.room-add-form__field--capacity input {
    max-width: 100%;
    text-align: left;
}

.room-add-form__submit {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-height: 2.65rem;
}

.room-add-form__submit .btn {
    min-height: 2.65rem;
    height: 2.65rem;
    white-space: nowrap;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

@media (max-width: 900px) {
    .room-add-form {
        grid-template-columns: 1fr 1fr;
    }

    .room-add-form__field--type {
        grid-column: 1 / -1;
    }

    .room-add-form__field--capacity,
    .room-add-form__field--status {
        margin-left: 0;
        margin-right: 0;
    }

    .room-add-form__submit {
        grid-column: 1 / -1;
    }

    .room-add-form__submit .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .room-add-form {
        grid-template-columns: 1fr;
    }

    .room-add-form__field--type,
    .room-add-form__submit {
        grid-column: auto;
    }
}
