:root {
    --navy: #19358a;
    --navy-dark: #10245f;
    --gold: #c9a227;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1c2434;
    --muted: #667085;
    --line: #e4e7ec;
    --success: #127c4c;
    --danger: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--navy-dark), var(--navy));
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
}
.brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 3px;
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: .06em; }
.brand p { margin: 4px 0 0; font-size: 12px; opacity: .75; }
.menu { list-style: none; margin: 16px 0 0; padding: 0; }
.menu a {
    display: block;
    color: #dbe4ff;
    padding: 10px 20px;
    font-size: 14px;
}
.menu a:hover, .menu a.active { background: rgba(255,255,255,.1); color: #fff; }
.main { flex: 1; display: flex; flex-direction: column; }
.topbar {
    background: var(--card);
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.topbar-left, .topbar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.topbar-user form { display: inline; margin: 0; }
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
}
.nav-backdrop { display: none; }
.content { padding: 24px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--navy); }
.btn {
    display: inline-block;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    background: var(--navy);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.btn.secondary { background: #e8edf8; color: var(--navy); }
.btn.danger { background: var(--danger); }
.btn.success { background: var(--success); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: var(--navy); color: #fff; text-align: left; padding: 10px; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.student { vertical-align: middle; }
.table tr:hover td { background: #f8fafc; }
.sort-link { color: #fff; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.active { text-decoration: underline; }
.sort-link span { font-size: 11px; margin-left: 4px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0 0; }
.filter-actions { display: flex; gap: 8px; align-items: end; align-self: end; }
.filter-actions .btn { width: auto; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.req { color: var(--danger); }
input, select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    background: #fff;
}
.ss-wrap { position: relative; width: 100%; }
.ss-wrap > select {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 1px !important;
    height: 1px !important;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}
.ss-toggle {
    width: 100%;
    text-align: left;
    padding: 8px 32px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    color: var(--text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23667085' d='M1.2 1.5 6 6.3l4.8-4.8'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
}
.ss-toggle.ss-placeholder { color: var(--muted); }
.ss-wrap.is-open .ss-toggle,
.ss-toggle:focus { border-color: var(--navy); outline: none; }
.ss-wrap.is-invalid .ss-toggle { border-color: var(--danger); }
.ss-wrap.is-disabled .ss-toggle { background-color: #f6f8fc; color: var(--muted); cursor: default; }
.ss-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(16, 36, 95, .12);
    z-index: 50;
    overflow: hidden;
}
.ss-search {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 8px 10px;
}
.ss-search:focus { outline: none; }
.ss-options { list-style: none; margin: 0; padding: 4px 0; max-height: 220px; overflow-y: auto; }
.ss-option { padding: 8px 10px; cursor: pointer; font-size: 14px; }
.ss-option:hover,
.ss-option.is-active { background: #eef2fb; color: var(--navy); }
.ss-option.is-selected { font-weight: 600; }
.ss-option.is-disabled { color: var(--muted); cursor: default; }
.ss-multi .ss-option { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.ss-multi .ss-check {
    width: 16px;
    height: 16px;
    border: 1px solid var(--line);
    border-radius: 3px;
    flex: 0 0 16px;
    background: #fff;
    position: relative;
}
.ss-multi .ss-option.is-selected .ss-check {
    border-color: var(--navy);
    background: var(--navy);
}
.ss-multi .ss-option.is-selected .ss-check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ss-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal.is-open,
.modal:not([hidden]) { display: flex; }
.modal[hidden] { display: none !important; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 20, 51, .45);
}
.modal-dialog {
    position: relative;
    width: min(560px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(16, 36, 95, .2);
}
.modal-dialog-wide {
    width: min(760px, 100%);
}
.modal-head, .modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.modal-body { padding: 16px 20px; }
.modal-actions { border-top: 1px solid var(--line); justify-content: flex-end; }
.modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.student-card { padding: 0; overflow: hidden; }
.student-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.student-profile { padding: 20px; }
.student-header { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.student-photo {
    width: 108px;
    height: 128px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fafc;
    flex-shrink: 0;
}
.student-header-main h2 { margin: 0 0 6px; font-size: 22px; }
.student-meta { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.student-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 12px;
    background: #eef2fb;
    color: var(--navy);
}
.student-section { margin-bottom: 18px; }
.student-section h3 {
    margin: 0;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--navy);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px 6px 0 0;
}
.dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.dl-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    min-height: 38px;
}
.dl-row:nth-child(odd) { border-right: 1px solid var(--line); }
.dl-row.wide { grid-column: 1 / -1; border-right: 0; }
.dl-row span {
    background: #f6f8fc;
    color: var(--muted);
    font-size: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}
.dl-row b {
    font-weight: 600;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}
.student-qual-table,
.student-batch-table { margin: 0; border: 1px solid var(--line); border-top: 0; }
.student-qual-table th:first-child,
.student-qual-table td:first-child { font-weight: 600; width: 140px; }
.student-batch-table th,
.student-batch-table td { white-space: nowrap; }
@media (max-width: 900px) {
    .dl { grid-template-columns: 1fr; }
    .dl-row { border-right: 0; }
    .student-header { align-items: flex-start; }
}
.card h3 { margin: 24px 0 12px; font-size: 16px; color: var(--navy); }
.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }
.alert.success { background: #e8f7ee; color: var(--success); }
.alert.error { background: #fdecec; color: var(--danger); }
.login-body { background: #071433; }
.login-wrap {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background:
        radial-gradient(ellipse at 12% 10%, rgba(201, 162, 39, .18), transparent 42%),
        radial-gradient(ellipse at 90% 90%, rgba(25, 53, 138, .55), transparent 46%),
        linear-gradient(160deg, #071433 0%, #10245f 52%, #19358a 100%);
    animation: login-bg 16s ease-in-out infinite alternate;
}
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
}
.login-orb-a {
    width: 220px;
    height: 220px;
    left: 8%;
    top: 12%;
    background: rgba(201, 162, 39, .16);
    animation: login-orb 12s ease-in-out infinite;
}
.login-orb-b {
    width: 280px;
    height: 280px;
    right: 6%;
    bottom: 8%;
    background: rgba(90, 140, 255, .16);
    animation: login-orb 14s ease-in-out infinite reverse;
}
.login-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    animation: login-rise .7s ease-out both;
}
.login-hero {
    position: relative;
    background:
        linear-gradient(180deg, rgba(7, 20, 51, .15), rgba(7, 20, 51, .55)),
        linear-gradient(160deg, #10245f, #19358a 70%, #0b1a4a);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.login-crest-glow {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 226, 164, .45), transparent 68%);
    animation: login-pulse 3.2s ease-in-out infinite;
}
.login-crest {
    position: relative;
    width: 132px;
    height: 132px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    margin-bottom: 22px;
    animation: login-crest .9s ease-out both, login-float 5s ease-in-out 1s infinite;
}
.login-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f3e2a4;
    line-height: 1.45;
    animation: login-fade-up .6s ease-out .2s both;
}
.login-hero h1 {
    margin: 0;
    font-size: 42px;
    letter-spacing: .08em;
    font-weight: 700;
    animation: login-fade-up .6s ease-out .32s both;
}
.login-tagline {
    margin: 14px 0 0;
    max-width: 280px;
    color: #d7e0f7;
    font-size: 14px;
    line-height: 1.5;
    animation: login-fade-up .6s ease-out .44s both;
}
.login-card { padding: 48px 40px; animation: login-fade-up .7s ease-out .2s both; }
.login-brand { margin-bottom: 22px; }
.login-brand h2 { margin: 0; font-size: 26px; color: var(--navy); }
.login-brand p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.login-card form p { margin: 0 0 16px; }
.login-card form p:nth-of-type(1) { animation: login-fade-up .5s ease-out .35s both; }
.login-card form p:nth-of-type(2) { animation: login-fade-up .5s ease-out .45s both; }
.login-card .remember { animation: login-fade-up .5s ease-out .55s both; }
.login-card input[type="text"],
.login-card input[type="password"],
.login-card input:not([type="checkbox"]) {
    padding: 12px 12px;
    border-radius: 8px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.login-card input:not([type="checkbox"]):focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(25, 53, 138, .12);
    outline: none;
}
.login-submit {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    margin-top: 18px;
    position: relative;
    overflow: hidden;
    animation: login-fade-up .5s ease-out .65s both;
    transition: transform .2s ease, box-shadow .2s ease;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(16, 36, 95, .25); }
.login-submit::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
    transform: translateX(-120%);
}
.login-submit:hover::after { animation: login-shimmer .7s ease; }
.login-foot {
    margin: 22px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    animation: login-fade-up .5s ease-out .75s both;
}
.remember { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 13px; }
.remember input { width: auto; }
@keyframes login-bg {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 40px -30px, -30px 40px, 0 0; }
}
@keyframes login-orb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .7; }
    50% { transform: translate(24px, -18px) scale(1.12); opacity: 1; }
}
@keyframes login-rise {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes login-crest {
    from { opacity: 0; transform: scale(.72); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
@keyframes login-pulse {
    0%, 100% { opacity: .35; transform: scale(.92); }
    50% { opacity: .8; transform: scale(1.08); }
}
@keyframes login-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes login-shimmer {
    to { transform: translateX(120%); }
}
@media (max-width: 760px) {
    .login-panel { grid-template-columns: 1fr; }
    .login-hero { padding: 36px 28px 28px; }
    .login-card { padding: 28px 24px 32px; }
    .login-hero h1 { font-size: 34px; }
    .login-crest { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) {
    .login-wrap,
    .login-orb,
    .login-panel,
    .login-crest,
    .login-crest-glow,
    .login-kicker,
    .login-hero h1,
    .login-tagline,
    .login-card,
    .login-card form p,
    .login-card .remember,
    .login-submit,
    .login-foot { animation: none !important; }
    .login-submit:hover { transform: none; }
}
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #e8edf8; }
.badge.paid { background: #e8f7ee; color: var(--success); }
.badge.unpaid { background: #fff4e5; color: #b54708; }
.table tr.row-paid td { background: #f0faf4; }
.table tr.row-unpaid td { background: #fff8f0; }
.table tr.row-paid:hover td { background: #e4f5eb; }
.table tr.row-unpaid:hover td { background: #ffefdf; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination { margin-top: 16px; }
.print-only { display: none; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; }
.pagination .page-link, .pagination a, .pagination span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; display: inline-block; }
.page-item.active .page-link, .pagination .active span { background: var(--navy); color: #fff; }
.module-switch { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid rgba(255,255,255,.12); }
.module-switch a { display: block; color: #dbe4ff; font-size: 13px; padding: 6px 0; }
.module-switch a:hover { color: #fff; }
.sidebar { display: flex; flex-direction: column; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.module-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
    color: inherit;
}
.module-card:hover { box-shadow: 0 12px 28px rgba(16, 36, 95, .12); border-color: #c5d0ef; }
.module-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 20px; }
.module-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.access-matrix-wrap { overflow-x: auto; }
.access-matrix { min-width: 720px; }
.access-matrix th.section,
.access-matrix td.section { text-align: left; white-space: nowrap; }
.access-matrix th { white-space: nowrap; }
.access-cell { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.access-cell label { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--text); font-size: 12px; }
.access-cell input { width: auto; }
.access-locked { color: var(--muted); font-size: 12px; }
.form-layout { max-width: 780px; margin-top: 18px; }
.form-section { margin-bottom: 20px; }
.form-section h3 {
    margin: 0 0 12px;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--navy);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.form-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.import-errors { margin: 8px 0 0; padding-left: 18px; }
.print-only { display: none; }
.print-body { background: #fff; padding: 24px; }
.print-toolbar { display: flex; gap: 8px; margin-bottom: 16px; }
.print-sheet h2 { margin: 0 0 6px; }
.print-meta { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.print-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.enrollment-card-sheet {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.enrollment-card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}
.enrollment-card-face {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.enrollment-card {
    width: 70mm;
    height: 110mm;
    max-width: 100%;
    border: 2px solid var(--navy);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.enrollment-card-header {
    background: linear-gradient(180deg, #f7f9ff, #eef2fb);
    color: var(--navy);
    padding: 8px 10px 7px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-bottom: 3px solid #c9a227;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.enrollment-card-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.enrollment-card-logo-sm {
    width: 38px;
    height: 38px;
}
.enrollment-card-header h1 {
    margin: 0;
    font-size: 15px;
    letter-spacing: .12em;
}
.enrollment-card-header p {
    margin: 2px 0 0;
    font-size: 8.5px;
    line-height: 1.25;
    color: #334155;
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
    max-width: 58mm;
}
.enrollment-card-header strong {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #127c4c;
}
.enrollment-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 6px;
    flex: 1;
    min-height: 0;
}
.enrollment-card-photo {
    width: 72px;
    height: 86px;
    object-fit: cover;
    border: 2px solid var(--navy);
    background: #f8fafc;
    flex-shrink: 0;
}
.enrollment-card-name {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: var(--navy);
}
.enrollment-card-no {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #127c4c;
    text-align: center;
}
.enrollment-card-fields {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 3px 8px;
    margin: 4px 0 0;
    text-align: left;
}
.enrollment-card-fields dt { color: var(--muted); font-size: 9px; }
.enrollment-card-fields dd { margin: 0; font-weight: 600; font-size: 10px; line-height: 1.25; }
.enrollment-card-footer {
    border-top: 1px solid var(--line);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 8px;
    color: var(--muted);
}
.enrollment-card-back-body {
    align-items: stretch;
    gap: 10px;
}
.enrollment-card-instructions {
    margin: 0;
    padding-left: 14px;
    font-size: 8.5px;
    line-height: 1.4;
    color: var(--text);
    text-align: left;
}
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 80;
        width: min(280px, 88vw);
        height: 100vh;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: none;
    }
    body.nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 16px 0 40px rgba(7, 20, 51, .28);
    }
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(7, 20, 51, .45);
        z-index: 70;
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
    }
    body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
    body.nav-open { overflow: hidden; }
    .topbar { padding: 10px 14px; position: sticky; top: 0; z-index: 40; }
    .topbar-name { max-width: 110px; }
    .content { padding: 14px; }
    .card { padding: 14px; overflow-x: auto; }
    .table { min-width: 620px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: 1fr; }
    .filter-actions { width: 100%; }
    .filter-actions .btn { flex: 1; }
    .form-grid { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: 1fr; }
    .student-toolbar { flex-wrap: wrap; }
    .student-toolbar .actions { width: 100%; }
    .pagination { flex-wrap: wrap; overflow-x: auto; }
}
@media (max-width: 700px) {
    .form-row { grid-template-columns: 1fr; }
    .dl-row { grid-template-columns: 1fr; }
    .dl-row span { border-bottom: 1px solid var(--line); }
    .student-header { flex-direction: column; }
    .student-photo { width: 96px; height: 114px; }
    .form-actions .btn { flex: 1; text-align: center; }
}
@media (max-width: 520px) {
    .stats { grid-template-columns: 1fr; }
    .stat .value { font-size: 22px; }
    .login-wrap { padding: 12px; }
    .login-hero { padding: 28px 20px 20px; }
    .login-card { padding: 22px 18px 24px; }
    .login-hero h1 { font-size: 28px; }
    .login-crest { width: 88px; height: 88px; }
    .login-kicker { font-size: 11px; }
    .module-card { padding: 20px; }
}
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .layout, .main, .content, .card, .print-body, .print-sheet { background: #fff; border: 0; padding: 0; margin: 0; }
    .print-only { display: block; }
    .print-table th, .print-table td { border: 1px solid #ccc; }
    .table tr:hover td { background: transparent; }
    .enrollment-card { border-color: #000; page-break-inside: avoid; }
    .enrollment-card-sheet { display: block; gap: 0; page-break-after: always; }
    .enrollment-card-sheet:last-of-type { page-break-after: auto; }
    .enrollment-card-group { display: block; gap: 0; }
    .enrollment-card-side { page-break-after: always; }
    .enrollment-card-group:last-child .enrollment-card-side:last-child { page-break-after: auto; }
}
