/* ═══════════════════════════════════════════════════════════════════
   SRMC — MBBS Applicant Portal
   Self-contained: auth pages (register / login) + the student dashboard
   shell. Does not depend on style.css, so the two can never fight.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --navy:       #1a3a6b;
    --navy-dark:  #142d54;
    --navy-light: #e8eefc;
    --gold:       #f5a623;
    --ink:        #0f172a;
    --body:       #475569;
    --muted:      #94a3b8;
    --line:       #e2e8f0;
    --bg:         #eef1f6;
    --ok:         #15803d;
    --warn:       #b45309;
    --err:        #dc2626;
    --radius:     12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { color: var(--ink); line-height: 1.25; }

/* ───────────────────────── Auth pages ───────────────────────── */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background: linear-gradient(135deg, var(--navy) 0%, #2b5296 100%);
}

.auth-card {
    width: 100%;
    max-width: 980px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(8, 20, 45, .28);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-aside {
    background: linear-gradient(160deg, var(--navy-dark), var(--navy));
    color: #fff;
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-aside img { width: 78px; height: 78px; object-fit: contain; margin-bottom: 20px; }
.auth-aside h2 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; }
.auth-aside p { color: rgba(255, 255, 255, .78); font-size: .92rem; }
.auth-aside ul { list-style: none; margin-top: 26px; display: grid; gap: 13px; }
.auth-aside li { display: flex; gap: 12px; align-items: flex-start; font-size: .89rem; color: rgba(255, 255, 255, .88); }
.auth-aside li i { color: var(--gold); margin-top: 3px; flex-shrink: 0; }

.auth-body { padding: 40px 38px; overflow-y: auto; max-height: 96vh; }
.auth-body h1 { font-size: 1.55rem; margin-bottom: 6px; }
.auth-body .sub { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }

.auth-switch {
    display: block;
    text-align: center;
    padding: 13px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: 24px;
    background: var(--navy-light);
    color: var(--navy);
    border: 1.5px solid #cddcf7;
}
.auth-switch:hover { background: #dbe6fb; text-decoration: none; }

.auth-foot { text-align: center; margin-top: 22px; font-size: .88rem; color: var(--muted); }

/* ───────────────────────── Notices ───────────────────────── */

.notice {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 13px 16px;
    border-radius: 10px;
    font-size: .88rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.notice i { margin-top: 2px; flex-shrink: 0; }
.notice ul { margin: 6px 0 0 18px; }
.notice-error   { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.notice-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.notice-info    { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.notice-warn    { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ───────────────────────── Forms ───────────────────────── */

.field { margin-bottom: 14px; }
.field > label {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.field .req { color: var(--err); }
.field .hint { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }

.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=date],
.field input[type=number],
.field input[type=password],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    font-size: .93rem;
    font-family: inherit;
    color: var(--ink);
    background: #f8fafc;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26, 58, 107, .10);
    background: #fff;
}
.field input:disabled, .field input[readonly] {
    background: #eef2f7;
    color: #64748b;
    cursor: not-allowed;
}
.field .err-text { color: var(--err); font-size: .8rem; margin-top: 5px; display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.col-span-2 { grid-column: 1 / -1; }

.check-row {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: .9rem;
    color: var(--body);
    cursor: pointer;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--navy); }

/* A value the applicant cannot change. Shown as a plain read-only line rather
   than a disabled input, which looks like a field they failed to fill in and
   silently truncates long text. */
.static-value {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    background: #f1f5f9;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    font-size: .9rem;
    color: #475569;
    font-weight: 500;
    min-height: 43px;
    word-break: break-word;
}
.static-value i { color: var(--navy); flex-shrink: 0; }
.static-value .sv-lock { margin-left: auto; color: var(--muted); font-size: .78rem; flex-shrink: 0; }

/* Honeypot — off-screen, never shown to a real applicant */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────────────────────── Buttons ───────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    border: none;
    border-radius: 9px;
    font-size: .92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s, opacity .18s, transform .06s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: .97rem; }
.btn-sm { padding: 7px 13px; font-size: .82rem; }

.btn-primary { background: var(--navy);  color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-success { background: var(--ok);    color: #fff; }
.btn-success:hover { background: #126c33; }
.btn-gold    { background: var(--gold);  color: #40260a; }
.btn-gold:hover { background: #e0940c; }
.btn-light   { background: #eef2f7; color: #334155; }
.btn-light:hover { background: #e2e8f0; }
.btn-danger  { background: var(--err); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--navy); background: var(--navy-light); }

/* ───────────────────────── Portal shell ───────────────────────── */

.mb-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 62px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 40;
}
.mb-header .h-left { display: flex; align-items: center; gap: 13px; }
.mb-header .brand { display: flex; align-items: center; gap: 11px; color: var(--navy); font-weight: 700; }
.mb-header .brand img { width: 34px; height: 34px; object-fit: contain; }
.mb-header .brand span { font-size: .98rem; }
.mb-header .brand small { display: block; font-size: .7rem; color: var(--muted); font-weight: 500; }
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--navy);
    cursor: pointer;
    padding: 6px;
}
.mb-header .h-right { display: flex; align-items: center; gap: 14px; }
.mb-user { display: flex; align-items: center; gap: 10px; }
.mb-user .u-name { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.mb-user .u-meta { display: block; font-size: .72rem; color: var(--muted); }
.mb-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
    overflow: hidden;
}
.mb-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mb-sidebar {
    position: fixed;
    top: 62px; bottom: 0; left: 0;
    width: 244px;
    background: var(--navy);
    padding: 20px 0;
    overflow-y: auto;
    z-index: 35;
    transition: transform .22s;
}
.mb-sidebar .s-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .42);
    padding: 0 22px 10px;
    font-weight: 700;
}
.mb-sidebar a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 22px;
    color: rgba(255, 255, 255, .80);
    font-size: .91rem;
    border-left: 3px solid transparent;
    transition: background .16s, color .16s;
}
.mb-sidebar a:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.mb-sidebar a.active {
    background: rgba(255, 255, 255, .11);
    color: #fff;
    border-left-color: var(--gold);
    font-weight: 600;
}
.mb-sidebar a i { width: 19px; text-align: center; }
.mb-sidebar .s-sep { height: 1px; background: rgba(255, 255, 255, .11); margin: 14px 22px; }

.mb-main {
    margin-left: 244px;
    margin-top: 62px;
    padding: 26px 28px 60px;
    min-height: calc(100vh - 62px);
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head h1 { font-size: 1.42rem; display: flex; align-items: center; gap: 11px; }
.page-head p { color: var(--muted); font-size: .89rem; margin-top: 3px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ───────────────────────── Cards ───────────────────────── */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-head {
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-head h3 { font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.card-head h3 i { color: var(--navy); }
.card-body { padding: 20px; }

.card.accent-left { border-left: 4px solid var(--navy); }
.card.accent-green { border-left: 4px solid var(--ok); }
.card.accent-gold  { border-left: 4px solid var(--gold); }

/* Welcome banner */
.welcome {
    background: linear-gradient(135deg, var(--navy-dark), #2b5296);
    color: #fff;
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.welcome .w-avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .28);
}
.welcome .w-avatar img { width: 100%; height: 100%; object-fit: cover; }
.welcome h2 { color: #fff; font-size: 1.4rem; }
.welcome p { color: rgba(255, 255, 255, .8); font-size: .9rem; margin-top: 4px; }
.welcome .w-tags { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.welcome .w-tag {
    background: rgba(255, 255, 255, .17);
    border-radius: 7px;
    padding: 5px 11px;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.welcome .w-tag.gold { background: var(--gold); color: #40260a; font-weight: 600; }

/* Definition list used for the profile read-out */
.dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 22px;
}
.dl > div { min-width: 0; }
.dl dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 3px;
}
.dl dd { font-size: .93rem; color: var(--ink); font-weight: 500; word-break: break-word; }
.dl dd.empty { color: #cbd5e1; font-weight: 400; }

/* Badges / pills */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 600;
    background: #eef2f7;
    color: #475569;
}

/* Aggregate highlight */
.agg-box {
    background: linear-gradient(135deg, #0f766e, #15803d);
    color: #fff;
    border-radius: 10px;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.agg-box .agg-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.agg-box .agg-lbl { font-size: .76rem; text-transform: uppercase; letter-spacing: .6px; opacity: .85; }
.agg-box .agg-break { font-size: .8rem; opacity: .9; text-align: right; }

/* ─────────────── Student profile — compact layout ─────────────── */

/* One header band instead of a welcome banner + two status cards */
.profile-head {
    background: linear-gradient(135deg, var(--navy-dark), #2b5296);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.profile-head .ph-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    border: 2px solid rgba(255, 255, 255, .28);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}
.profile-head .ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-head .ph-id { flex: 1 1 260px; min-width: 0; }
.profile-head h2 { color: #fff; font-size: 1.25rem; line-height: 1.3; }
.profile-head .ph-sub { color: rgba(255, 255, 255, .8); font-size: .85rem; margin-top: 3px; }
.profile-head .ph-tags { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.profile-head .ph-tag {
    background: rgba(255, 255, 255, .16);
    border-radius: 6px;
    padding: 3px 9px;
    font-size: .76rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.profile-head .ph-tag.gold { background: var(--gold); color: #40260a; font-weight: 600; }

/* Key figures as a compact strip rather than their own cards */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.stat-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px 16px;
}
.stat-tile .st-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 4px;
}
.stat-tile .st-value { font-size: 1.18rem; font-weight: 700; color: var(--ink); line-height: 1.25; word-break: break-word; }
.stat-tile .st-value.ref {
    font-family: 'Courier New', monospace;
    font-size: .88rem;
    letter-spacing: 0;
    white-space: nowrap;  /* a reference number must never be split across lines */
}
.stat-tile .st-note { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.stat-tile.is-merit { background: linear-gradient(135deg, #0f766e, #15803d); border-color: transparent; }
.stat-tile.is-merit .st-label { color: rgba(255, 255, 255, .82); }
.stat-tile.is-merit .st-value,
.stat-tile.is-merit .st-note { color: #fff; }

/* Details side by side instead of stacked */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.two-col > .card { margin-bottom: 0; }

/* Denser definition list inside the narrower columns */
.dl.dl-tight { grid-template-columns: 1fr; gap: 0; }
.dl.dl-tight > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef2f7;
}
.dl.dl-tight > div:last-child { border-bottom: 0; }
.dl.dl-tight dt { margin-bottom: 0; flex-shrink: 0; padding-top: 2px; }
.dl.dl-tight dd { text-align: right; font-size: .88rem; }

/* Documents as rows, not tiles */
.doc-list { display: grid; gap: 8px; }
.doc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    flex-wrap: wrap;
}
.doc-row.is-missing { background: #fffdf5; border-color: #fde68a; }
.doc-row .dr-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--navy-light);
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: .82rem;
}
.doc-row.is-missing .dr-icon { background: #fef3c7; color: #92400e; }
.doc-row .dr-main { flex: 1 1 180px; min-width: 0; }
.doc-row .dr-name { font-size: .88rem; font-weight: 600; color: var(--ink); }
.doc-row .dr-file { font-size: .76rem; color: var(--muted); word-break: break-all; }
.doc-row .dr-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
    .dl.dl-tight > div { flex-direction: column; gap: 2px; }
    .dl.dl-tight dd { text-align: left; }
}

/* ───────────────────────── Step wizard ───────────────────────── */

.steps-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}
.steps-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff;
    border: 1.5px solid var(--line);
    color: #64748b;
    font-weight: 600;
    font-size: .9rem;
    text-align: center;
}
.steps-nav a:hover { border-color: var(--navy); text-decoration: none; }
.steps-nav a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.steps-nav a.done { border-color: #bbf7d0; background: #f0fdf4; color: var(--ok); }
.steps-nav a.active.done { background: var(--navy); border-color: var(--navy); color: #fff; }
.steps-nav .s-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #eef2f7;
    color: #64748b;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .78rem;
    flex-shrink: 0;
}
.steps-nav a.active .s-num { background: rgba(255, 255, 255, .22); color: #fff; }
.steps-nav a.done .s-num { background: var(--ok); color: #fff; }

.progress-wrap { margin-bottom: 22px; }
.progress-bar {
    height: 9px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--navy), #2b5296);
    border-radius: 20px;
    transition: width .35s;
}
.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--muted);
    margin-top: 7px;
}

.form-section { margin-bottom: 22px; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}
.form-section-title h3 { font-size: 1rem; }
.form-section-title .fs-num {
    width: 27px; height: 27px;
    border-radius: 8px;
    background: var(--navy-light);
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* Photo picker */
.photo-pick { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.photo-box {
    width: 96px; height: 112px;
    border: 2px dashed var(--line);
    border-radius: 10px;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 1.8rem;
}
.photo-box img { width: 100%; height: 100%; object-fit: cover; }

/* Inline marksheet uploader shown inside an Education section */
.inline-doc {
    border: 1.5px dashed var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    background: #f8fafc;
    margin-top: 4px;
}
.inline-doc.has-file { border-style: solid; border-color: #bbf7d0; background: #f6fefa; }
.inline-doc .id-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.inline-doc .id-label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.inline-doc .id-label i { color: var(--navy); margin-right: 4px; }
.inline-doc .id-file { font-size: .8rem; color: var(--muted); margin-bottom: 9px; word-break: break-all; }
.inline-doc .id-remark { font-size: .82rem; color: var(--err); margin-bottom: 9px; }
.inline-doc input[type=file] { font-size: .82rem; width: 100%; }

/* ───────────────────────── Documents ───────────────────────── */

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.doc-card {
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}
.doc-card.has-file { border-color: #bbf7d0; background: #f6fefa; }
.doc-card.is-required:not(.has-file) { border-color: #fde68a; background: #fffdf5; }
.doc-card h4 { font-size: .9rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.doc-card .d-meta { font-size: .77rem; color: var(--muted); margin-bottom: 11px; word-break: break-all; }
.doc-card .d-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-card input[type=file] { font-size: .8rem; width: 100%; margin-bottom: 9px; }

/* A file chosen but not yet sent — it lives in the browser until the applicant
   presses the button at the bottom of the page. */
.doc-card.is-staged { border-color: #93c5fd; background: #f5f9ff; }
.doc-card.is-toobig { border-color: #fca5a5; background: #fef6f6; }
.doc-card .staged-note {
    font-size: .8rem;
    line-height: 1.45;
    margin-top: 4px;
    color: #1d4ed8;
    word-break: break-word;
}
.doc-card.is-toobig .staged-note { color: var(--err); }

/* ───────────────────────── Timeline ───────────────────────── */

.timeline { list-style: none; position: relative; padding-left: 26px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 5px; bottom: 5px;
    width: 2px;
    background: var(--line);
}
.timeline li { position: relative; padding-bottom: 17px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: '';
    position: absolute;
    left: -25px; top: 5px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--navy);
}
.timeline .t-title { font-size: .9rem; font-weight: 600; color: var(--ink); }
.timeline .t-time { font-size: .77rem; color: var(--muted); }
.timeline .t-note { font-size: .84rem; margin-top: 3px; }

/* ───────────────────────── Misc ───────────────────────── */

.muted { color: var(--muted); }
.text-center { text-align: center; }
.small { font-size: .83rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack { display: grid; gap: 12px; }

.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state i { font-size: 2.4rem; display: block; margin-bottom: 13px; color: #cbd5e1; }

.ref-box {
    background: var(--navy-light);
    border: 1.5px dashed #b6c9ee;
    border-radius: 10px;
    padding: 15px 18px;
    text-align: center;
}
.ref-box .r-lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); font-weight: 700; }
.ref-box .r-num { font-size: 1.24rem; font-weight: 700; color: var(--navy-dark); letter-spacing: 1px; margin-top: 4px; font-family: 'Courier New', monospace; }

.backdrop {
    display: none;
    position: fixed;
    inset: 62px 0 0 0;
    background: rgba(15, 23, 42, .45);
    z-index: 34;
}
.backdrop.show { display: block; }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 900px) {
    .auth-card { grid-template-columns: 1fr; max-width: 520px; }
    .auth-aside { display: none; }
    .auth-body { max-height: none; padding: 32px 26px; }
}

@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .mb-sidebar { transform: translateX(-100%); }
    .mb-sidebar.open { transform: translateX(0); }
    .mb-main { margin-left: 0; padding: 20px 16px 50px; }
    .dl { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .steps-nav { grid-template-columns: 1fr; }
    .mb-user .u-name, .mb-user .u-meta { display: none; }
    .mb-header .brand small { display: none; }
    .welcome { padding: 20px; }
    .agg-box .agg-break { text-align: left; }
}

/* Phones: keep the fixed-height header on one line and stop the
   progress meta from crowding itself. */
@media (max-width: 560px) {
    .mb-header { padding: 0 12px; }
    .mb-header .h-left { min-width: 0; flex: 1 1 auto; }
    .mb-header .brand { min-width: 0; gap: 8px; }
    .mb-header .brand img { width: 28px; height: 28px; }
    .mb-header .brand span {
        font-size: .82rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mb-header .h-right { flex-shrink: 0; gap: 8px; }
    .mb-header .h-right .btn { padding: 7px 11px; font-size: .8rem; }

    .progress-meta { flex-direction: column; gap: 3px; }

    .page-head h1 { font-size: 1.24rem; }
    .welcome .w-avatar { width: 68px; height: 68px; font-size: 1.6rem; }
    .welcome h2 { font-size: 1.2rem; }
}

@media print {
    .mb-header, .mb-sidebar, .page-head .actions, .form-actions, .steps-nav { display: none !important; }
    .mb-main { margin: 0; padding: 0; }
    body { background: #fff; }
    .card { break-inside: avoid; border-color: #ccc; }
}
