:root {
    --brand: #0f43c4;
    --brand-dark: #092e8c;
    --accent: #f7bb2e;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e9f2;
    --canvas: #f4f7fb;
    --surface: #ffffff;
    --success: #12805c;
    --danger: #c4323b;
    --warning: #9a6700;
    --radius: 16px;
    --shadow: 0 14px 44px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--canvas);
    font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
a { color: var(--brand); }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.1fr);
}
.auth-story {
    position: relative;
    overflow: hidden;
    padding: clamp(36px, 7vw, 86px);
    color: white;
    background: linear-gradient(145deg, #071f61, var(--brand) 62%, #2365e8);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.auth-story::before, .auth-story::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.auth-story::before { width: 420px; height: 420px; right: -210px; top: -160px; }
.auth-story::after { width: 280px; height: 280px; left: -110px; bottom: -130px; }
.auth-brand, .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-weight: 800;
    font-size: 19px;
}
.auth-brand img, .brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: white;
    padding: 4px;
}
.auth-copy { position: relative; z-index: 1; max-width: 560px; }
.auth-copy h1 { margin: 0 0 18px; font-size: clamp(36px, 5vw, 66px); line-height: 1.04; letter-spacing: -.045em; }
.auth-copy p { max-width: 480px; margin: 0; color: rgba(255,255,255,.82); font-size: 17px; }
.auth-points { display: grid; gap: 12px; margin-top: 34px; }
.auth-point { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.auth-point::before { content: "✓"; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #082b83; background: var(--accent); }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 6vw, 76px); }
.auth-card { width: min(100%, 560px); }
.auth-card h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 30px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #344054; font-size: 13px; font-weight: 720; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select, .inline-field {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--ink);
    background: white;
    border: 1px solid #d7deea;
    border-radius: 10px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 116px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus, .inline-field:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15,67,196,.12);
}
.field small, .form-hint { color: var(--muted); font-size: 12px; }
.checkbox-line { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.checkbox-line input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 760;
    transition: transform .18s, background .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { color: white; background: var(--brand); box-shadow: 0 7px 18px rgba(15,67,196,.22); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { color: var(--ink); background: white; border-color: var(--line); }
.btn-danger { color: white; background: var(--danger); }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.text-button { padding: 0; color: var(--brand); background: none; border: 0; cursor: pointer; font-weight: 700; }
.auth-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.recovery-steps { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: recovery; }
.recovery-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; counter-increment: recovery; }
.recovery-steps li::before { content: counter(recovery); grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 800; }
.recovery-steps span { color: var(--muted); font-size: 13px; }

.message { display: none; margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.message.show { display: block; }
.message.error { color: #7d1f28; background: #fff0f1; border: 1px solid #ffd3d7; }
.message.success { color: #075f43; background: #eafaf4; border: 1px solid #bcebdc; }
.message.info { color: #163d92; background: #edf3ff; border: 1px solid #cbdcff; }

.app-header {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px clamp(18px, 4vw, 54px);
    color: white;
    background: #0b1f4e;
    box-shadow: 0 8px 28px rgba(11,31,78,.16);
}
.brand { margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.app-nav { display: flex; align-items: center; gap: 7px; }
.nav-button {
    min-height: 40px;
    padding: 8px 12px;
    color: rgba(255,255,255,.72);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 720;
}
.nav-button:hover, .nav-button.active { color: white; background: rgba(255,255,255,.11); }
.header-user { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #0b1f4e; background: var(--accent); font-weight: 850; }
.user-meta { line-height: 1.2; }
.user-meta strong, .user-meta small { display: block; }
.user-meta strong { white-space: nowrap; }
.user-meta small { color: rgba(255,255,255,.62); font-size: 11px; margin-top: 3px; }
.admin-app .app-header { gap: 14px; padding-inline: 28px; }
.admin-app .brand { flex: 0 0 auto; margin-right: 0; }
.admin-app .admin-search { flex: 1 1 360px; width: auto; min-width: 240px; max-width: 430px; }
.admin-app .app-nav { flex: 0 0 auto; }
.admin-app .app-nav .nav-button { padding-inline: 9px; font-size: 13px; white-space: nowrap; }
.admin-app .header-user { flex: 0 0 auto; }
.admin-app .stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.portal-app .app-header { gap: 14px; padding-inline: 28px; }
.portal-app .brand { flex: 0 0 auto; margin-right: auto; }
.portal-app .app-nav { flex: 0 0 auto; }
.portal-app .app-nav .nav-button { padding-inline: 8px; font-size: 13px; }
.portal-app .header-user { flex: 0 0 auto; }

.app-main { width: min(1500px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 52px); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.page-head h1 { margin: 4px 0 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.04em; line-height: 1.05; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.view { display: none; }
.view.active { display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.stat-card, .panel {
    background: white;
    border: 1px solid #e7ebf3;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.stat-card { min-height: 142px; padding: 22px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -22px; bottom: -34px; width: 90px; height: 90px; border-radius: 50%; background: rgba(15,67,196,.07); }
.stat-card small { color: var(--muted); font-weight: 650; }
.stat-card strong { display: block; margin-top: 17px; font-size: 34px; line-height: 1; }
.stat-card em { display: block; width: 40px; height: 4px; margin-top: 18px; border-radius: 8px; background: var(--accent); }
.panel { padding: 24px; margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 20px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr); gap: 20px; }
.upload-guidance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-guidance .panel { margin-top: 0; }
.document-toolbar { grid-template-columns: minmax(220px, 360px); }
.quick-list { display: grid; gap: 11px; }
.quick-row { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.quick-row .record-main { min-width: 0; flex: 1; }

.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, .28fr)); gap: 10px; margin-bottom: 17px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-account-table { min-width: 1020px; }
.customer-account-table { min-width: 1770px; }
.customer-account-table th:nth-child(1), .customer-account-table td:nth-child(1) { min-width: 190px; }
.customer-account-table th:nth-child(2), .customer-account-table td:nth-child(2) { min-width: 330px; }
.customer-account-table th:nth-child(3), .customer-account-table td:nth-child(3) { min-width: 270px; }
.customer-account-table th:nth-child(4), .customer-account-table td:nth-child(4) { min-width: 145px; white-space: nowrap; }
.customer-account-table th:nth-child(5), .customer-account-table td:nth-child(5) { min-width: 220px; }
.customer-account-table th:nth-child(6), .customer-account-table td:nth-child(6) { min-width: 140px; }
.customer-account-table th:nth-child(7), .customer-account-table td:nth-child(7) { min-width: 220px; }
.customer-account-table th:nth-child(9), .customer-account-table td:nth-child(9) { min-width: 250px; }
.account-table td:first-child, .account-table td:nth-child(3), .account-table td:last-child { white-space: nowrap; }
.account-table td:last-child { min-width: 190px; }
th, td { padding: 14px 15px; text-align: left; border-bottom: 1px solid #edf0f5; vertical-align: top; }
th { color: #566176; background: #f8faff; font-size: 12px; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.record-ref { color: var(--brand); font-weight: 820; white-space: nowrap; }
.record-title { max-width: 360px; font-weight: 720; }
.record-title small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.record-actions-cell { min-width: 235px; }
.record-row-actions, .drawer-status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.record-row-actions .btn { white-space: nowrap; }
.record-action-note { display: block; max-width: 190px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.badge-missing { color: #795200; background: #fff7df; }
.badge-missing::before { background: #e6a900; }
.drawer-status-actions { margin: 0 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8faff; }
.drawer-status-actions.is-disabled { opacity: .8; }
.drawer-action-hint { flex: 1 1 220px; color: var(--muted); font-size: 12px; }
.admin-cancel-note-field { margin-top: 18px; }
.admin-cancel-note-field textarea { width: 100%; resize: vertical; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #4d586b; background: #eef1f6; font-size: 12px; font-weight: 760; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8b95a7; }
.badge-pending, .badge-documents_required, .badge-payment_review { color: #795200; background: #fff7df; }
.badge-pending::before, .badge-documents_required::before, .badge-payment_review::before { background: #e6a900; }
.badge-under_review, .badge-approved, .badge-processing { color: #173c93; background: #edf3ff; }
.badge-under_review::before, .badge-approved::before, .badge-processing::before { background: #3974df; }
.badge-completed, .badge-file-approved { color: #075f43; background: #e8f9f2; }
.badge-completed::before, .badge-file-approved::before { background: #10a36f; }
.badge-rejected, .badge-cancelled, .badge-file-rejected { color: #8a2630; background: #fff0f1; }
.badge-rejected::before, .badge-cancelled::before, .badge-file-rejected::before { background: #d4414d; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 17px; }

.timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline-item { position: relative; padding: 0 0 24px 32px; }
.timeline-item::before { content: ""; position: absolute; left: 8px; top: 17px; bottom: -2px; width: 2px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-item::after { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border: 3px solid white; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #bdd0ff; }
.timeline-item strong { display: block; }
.timeline-item time { color: var(--muted); font-size: 12px; }
.timeline-item p { margin: 5px 0 0; color: #4d586b; }
.file-list { display: grid; gap: 10px; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.file-row strong, .file-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row small { color: var(--muted); }
.enquiry-table { min-width: 1120px; }
.enquiry-table td small { display: block; margin-top: 3px; color: var(--muted); }
.enquiry-attachments { display: grid; min-width: 210px; gap: 8px; }
.enquiry-file { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.enquiry-file:hover span { color: var(--brand); }
.enquiry-thumb, .enquiry-file-icon { flex: 0 0 52px; width: 52px; height: 42px; border: 1px solid var(--line); border-radius: 7px; background: #f3f6fc; object-fit: cover; }
.enquiry-file-icon { display: grid; place-items: center; color: #b32635; font-size: 11px; font-weight: 820; }
.enquiry-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enquiry-file small { display: block; color: var(--muted); }
.muted { color: var(--muted); }

.drawer-backdrop { position: fixed; z-index: 50; inset: 0; display: none; overflow-x: hidden; overflow-y: auto; background: rgba(5,18,47,.44); backdrop-filter: blur(3px); overscroll-behavior: contain; }
.drawer-backdrop.open { display: block; }
.drawer { position: absolute; right: 0; top: 0; width: min(720px, 100%); min-height: 100%; padding: 28px; background: var(--canvas); box-shadow: -20px 0 60px rgba(11,31,78,.18); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.drawer-head h2 { margin: 5px 0; font-size: 28px; }
.drawer-status-actions { margin-top: 8px; }
.drawer-upload-lock { margin: 0 0 20px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; cursor: pointer; font-size: 22px; }
.upload-box { padding: 18px; border: 1px dashed #aebfe8; border-radius: 12px; background: #f7faff; }
.upload-grid { display: grid; grid-template-columns: minmax(160px, .6fr) minmax(200px, 1fr) auto; align-items: end; gap: 10px; }
.receipt-guidance { margin-bottom: 18px; }
.receipt-panel { border-color: #bdcdf3; box-shadow: 0 16px 36px rgba(19,65,171,.09); }
.receipt-upload-form { display: grid; gap: 14px; }
.receipt-dropzone { position: relative; display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 20px; border: 2px dashed #8ba9e9; border-radius: 13px; color: var(--ink); background: white; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.receipt-dropzone:hover, .receipt-dropzone:focus-within { border-color: var(--brand); background: #f2f6ff; transform: translateY(-1px); }
.receipt-dropzone strong, .receipt-dropzone small { display: block; }
.receipt-dropzone strong { margin-bottom: 4px; color: var(--brand); font-size: 17px; }
.receipt-dropzone small { color: var(--muted); }
.receipt-upload-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-size: 25px; font-weight: 800; }
.receipt-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.receipt-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.receipt-file-name { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.document-panel { border-color: #c7dfd4; box-shadow: 0 16px 36px rgba(9,112,76,.08); }
.document-upload-form { display: grid; gap: 14px; }
.document-upload-fields { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1fr); align-items: stretch; gap: 12px; }
.document-upload-fields .field { align-self: center; }
.document-dropzone { min-height: 106px; border-color: #90c9b4; }
.document-dropzone:hover, .document-dropzone:focus-within { border-color: #0a9163; background: #f0fbf7; }
.document-dropzone strong { color: #087653; }
.document-upload-icon { background: #0a9163; }

.admin-search { position: relative; width: min(480px, 42vw); }
.admin-search input { width: 100%; min-height: 42px; padding: 9px 15px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; outline: none; }
.admin-search input::placeholder { color: rgba(255,255,255,.55); }
.search-results { position: absolute; z-index: 40; left: 0; right: 0; top: 49px; display: none; max-height: 420px; overflow: auto; padding: 8px; color: var(--ink); background: white; border-radius: 12px; box-shadow: 0 18px 50px rgba(8,27,73,.25); }
.search-results.open { display: block; }
.search-result { display: block; width: 100%; padding: 10px; text-align: left; color: inherit; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.search-result:hover { background: #f1f5ff; }
.search-result small { display: block; color: var(--muted); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; background: #eef3ff; border: 1px solid #d6e2ff; border-radius: 11px; }
.bulk-bar .inline-field { width: auto; min-width: 170px; min-height: 40px; }
.metric-bars { display: grid; gap: 14px; }
.metric-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 12px; align-items: center; }
.metric-track { height: 9px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.metric-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #5d8df0); }
.audit-detail { max-width: 380px; color: var(--muted); font-size: 12px; word-break: break-word; }
.admin-form { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4, 20, 54, .62); opacity: 0; visibility: hidden; transition: .2s ease; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal-card { width: min(100%, 520px); padding: 28px; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(3, 17, 47, .35); transform: translateY(12px); transition: .2s ease; }
.modal-backdrop.open .modal-card { transform: translateY(0); }
.modal-card h2 { margin: 5px 0 8px; }
.modal-card > p { margin: 0 0 22px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.cancel-record-card { border-top: 5px solid var(--danger); }
.cancel-record-warning { padding: 13px 14px; color: #7d1f28; background: #fff0f1; border: 1px solid #ffd3d7; border-radius: 10px; font-size: 13px; font-weight: 650; }
.upload-form-locked { pointer-events: none; opacity: .48; filter: grayscale(.25); }
.modal-card-wide { width: min(100%, 780px); max-height: calc(100vh - 40px); overflow-y: auto; }
.scholarship-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.scholarship-active-field { grid-column: 1 / -1; margin-top: 2px; }
.scholarship-admin-table { min-width: 1250px; }
.scholarship-admin-table td:first-child { min-width: 210px; }
.scholarship-admin-table td:nth-child(2) { min-width: 190px; }
.scholarship-admin-table td:nth-child(7) { min-width: 170px; }
.scholarship-admin-table td:last-child { min-width: 190px; white-space: nowrap; }
.scholarship-admin-table td small { display: block; margin-top: 4px; color: var(--muted); }
.btn-danger-soft { color: #8a2630; border: 1px solid #f0c6cb; background: #fff0f1; }
.btn-danger-soft:hover { background: #ffe4e7; }
.document-requirements-table { min-width: 920px; }
.document-requirements-table td:first-child { min-width: 220px; }
.document-requirements-table td:last-child { min-width: 190px; white-space: nowrap; }
.document-requirements-table td small { display: block; margin-top: 4px; color: var(--muted); }
.requirement-check { color: #087653; font-size: 19px; font-weight: 900; }
.degree-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.degree-checkboxes legend { padding: 0 8px; color: var(--ink); font-weight: 800; }

.scholarship-picker { gap: 18px; padding: 22px; border: 1px solid #dbe5fb; border-radius: 16px; background: linear-gradient(180deg, #f8faff, #fff); }
.scholarship-picker-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.scholarship-picker-head h2 { margin: 3px 0 6px; color: var(--brand); font-size: 25px; }
.scholarship-picker-head p { margin: 0; color: var(--muted); }
.scholarship-filters { display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; }
.scholarship-reset { white-space: nowrap; }
.selected-scholarship { padding: 16px 18px; border: 1px solid #a8d9c8; border-radius: 13px; background: #ebfaf4; }
.selected-scholarship-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.selected-scholarship h3 { margin: 0 0 4px; color: #075f43; font-size: 18px; }
.selected-scholarship p { margin: 0; color: #285f50; font-size: 13px; }
.scholarship-table-wrap { max-height: 540px; }
.scholarship-table { min-width: 940px; }
.scholarship-table th:last-child, .scholarship-table td:last-child { text-align: right; }
.scholarship-table td { vertical-align: middle; }
.scholarship-program-name { display: block; color: var(--ink); }
.scholarship-program-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.scholarship-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.scholarship-pagination > div { display: flex; gap: 7px; }
.scholarship-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scholarship-detail { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f9fbff; }
.scholarship-detail span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.scholarship-detail strong { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }

.toast-stack { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { padding: 13px 15px; color: white; background: #1d2939; border-radius: 11px; box-shadow: 0 14px 34px rgba(0,0,0,.2); animation: toast-in .22s ease-out; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

.loading { position: relative; pointer-events: none; opacity: .68; }
.loading::after { content: ""; position: absolute; width: 18px; height: 18px; top: 50%; left: 50%; margin: -9px; border: 2px solid rgba(255,255,255,.45); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.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; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-app .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .two-col { grid-template-columns: 1fr; }
    .admin-form { grid-template-columns: repeat(3, 1fr); }
    .scholarship-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .scholarship-search { grid-column: span 2; }
}
@media (max-width: 820px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { min-height: 360px; }
    .auth-copy h1 { font-size: 42px; }
    .app-header { align-items: flex-start; flex-wrap: wrap; gap: 9px 14px; }
    .brand { width: calc(100% - 160px); }
    .app-nav { order: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 4px; }
    .app-nav .nav-button { padding: 7px 5px; font-size: 12px; line-height: 1.25; white-space: normal; }
    .header-user { position: absolute; right: 18px; top: 14px; }
    .user-meta { display: none; }
    .admin-search { order: 3; width: 100%; }
    .admin-app .app-header { padding-inline: 18px; }
    .admin-app .admin-search { order: 3; width: 100%; max-width: none; }
    .admin-app .app-nav .nav-button { padding: 7px 5px; font-size: 12px; white-space: normal; }
    .portal-app .app-header { padding-inline: 18px; }
    .portal-app .app-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .admin-app .app-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .portal-app .app-nav .nav-button { padding: 7px 3px; font-size: 11px; white-space: normal; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-guidance { grid-template-columns: 1fr; }
    .toolbar { grid-template-columns: 1fr 1fr; }
    .toolbar > :first-child { grid-column: 1 / -1; }
    .upload-grid { grid-template-columns: 1fr; }
    .document-upload-fields { grid-template-columns: 1fr; }
    .scholarship-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .auth-main, .auth-story { padding: 28px 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .auth-links { flex-direction: column; }
    .app-main { padding: 24px 14px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .stat-grid { grid-template-columns: 1fr; }
    .admin-app .stat-grid { grid-template-columns: 1fr; }
    .panel { padding: 17px; }
    .toolbar { grid-template-columns: 1fr; }
    .toolbar > :first-child { grid-column: auto; }
    .file-row { grid-template-columns: 1fr; }
    .drawer { padding: 20px 14px; }
    .record-actions-cell { min-width: 190px; }
    .record-row-actions { align-items: stretch; flex-direction: column; }
    .record-row-actions .btn { width: 100%; }
    #cancelRecordDialog { align-items: end; padding: 12px; }
    .cancel-record-card { width: 100%; padding: 23px 18px; border-radius: 18px 18px 12px 12px; }
    .cancel-record-card .modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .cancel-record-card .modal-actions .btn { width: 100%; }
    .admin-cancel-record-card { width: 100%; padding: 23px 18px; border-radius: 18px 18px 12px 12px; }
    .admin-cancel-record-card .modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .admin-cancel-record-card .modal-actions .btn { width: 100%; }
    .receipt-upload-actions { align-items: stretch; flex-direction: column; }
    .receipt-upload-actions .btn { width: 100%; }
    .admin-form { grid-template-columns: 1fr; }
    .scholarship-form-grid { grid-template-columns: 1fr; }
    .scholarship-active-field { grid-column: auto; }
    .metric-row { grid-template-columns: 105px 1fr 34px; }
    .scholarship-picker { padding: 15px; }
    .scholarship-picker-head, .selected-scholarship-head, .scholarship-pagination { align-items: stretch; flex-direction: column; }
    .scholarship-filters { grid-template-columns: 1fr; }
    .scholarship-search { grid-column: auto; }
    .scholarship-detail-grid { grid-template-columns: 1fr; }
}

/* InksConsult public authentication theme. Keep these overrides scoped to
   auth-shell so the customer portal and administration dashboard retain their
   existing interface colours and typography. */
body.auth-shell {
    --brand: #1b5f88;
    --brand-dark: #173b5e;
    --primary: #1b5f88;
    --accent: #c9a45c;
    --ink: #12253d;
    --muted: #5f6f7e;
    --line: #d9e2e8;
    --canvas: #f3f6f8;
    --surface: #ffffff;
    color: #12253d;
    background: #f3f6f8;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

.auth-shell .auth-story {
    background:
        radial-gradient(circle at 88% 12%, rgba(201, 164, 92, .22) 0 120px, transparent 121px),
        linear-gradient(145deg, #12253d 0%, #173b5e 58%, #1b5f88 100%);
}
.auth-shell .auth-story::before {
    background: rgba(201, 164, 92, .12);
    border: 1px solid rgba(201, 164, 92, .2);
}
.auth-shell .auth-story::after { background: rgba(255, 255, 255, .06); }
.auth-shell .auth-brand {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: .01em;
}
.auth-shell .auth-copy h1,
.auth-shell .auth-card h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -.025em;
}
.auth-shell .auth-copy p { color: rgba(255, 255, 255, .84); }
.auth-shell .auth-point::before {
    content: "\2713";
    color: #12253d;
    background: #c9a45c;
    box-shadow: 0 4px 12px rgba(8, 21, 36, .2);
}

.auth-shell .auth-main {
    background: linear-gradient(160deg, #ffffff 0%, #f3f6f8 100%);
}
.auth-shell .auth-card {
    position: relative;
    padding: clamp(28px, 4vw, 44px);
    background: #ffffff;
    border: 1px solid #d9e2e8;
    border-radius: 20px;
    box-shadow: 0 20px 54px rgba(18, 37, 61, .11);
}
.auth-shell .auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #c9a45c, #1b5f88);
}
.auth-shell .auth-card h2 { color: #12253d; }
.auth-shell .field label { color: #173b5e; }
.auth-shell .field input,
.auth-shell .field select,
.auth-shell .field textarea {
    border-color: #cfd9e1;
}
.auth-shell .field input:focus,
.auth-shell .field select:focus,
.auth-shell .field textarea:focus {
    border-color: #c9a45c;
    box-shadow: 0 0 0 3px rgba(201, 164, 92, .18);
}
.auth-shell .checkbox-line input { accent-color: #1b5f88; }
.auth-shell a,
.auth-shell .text-button { color: #1b5f88; }
.auth-shell a:hover,
.auth-shell .text-button:hover { color: #12253d; }
.auth-shell .btn-primary {
    color: #ffffff;
    background: #1b5f88;
    border-color: #1b5f88;
    box-shadow: 0 8px 20px rgba(27, 95, 136, .24);
}
.auth-shell .btn-primary:hover {
    color: #ffffff;
    background: #173b5e;
    border-color: #173b5e;
}
.auth-shell .recovery-steps li { border-color: #d9e2e8; }
.auth-shell .recovery-steps li::before {
    color: #12253d;
    background: #c9a45c;
}

@media (max-width: 560px) {
    .auth-shell .auth-card {
        padding: 25px 20px;
        border-radius: 16px;
    }
    .auth-shell .auth-card::before { border-radius: 16px 16px 0 0; }
}
