/* =====================================================
   Loan Portal - main stylesheet
   Professional corporate theme
   ===================================================== */

/* ---------- Base ---------- */
:root {
    --navy: #0A2239;
    --navy-dark: #061726;
    --navy-soft: #16395a;
    --gold: #b98a2f;
    --gold-dark: #a1761f;
    --ink: #232a35;
    --muted: #5f6b7c;
    --line: #dfe4ec;
    --bg: #f5f7fa;
    --ok: #1e7e46;
    --ok-bg: #eff8f2;
    --bad: #b23b3b;
    --bad-bg: #fdf1f1;
    --warn: #8a6d1f;
    --warn-bg: #fef8ec;
    --radius: 8px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background: #fff;
}

img, svg { vertical-align: middle; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 0.92em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.break-all { word-break: break-all; }
.mt { margin-top: 22px !important; }

/* Office section heading inside the Secure Links settings card */
.office-link-sub {
    margin: 20px 0 10px;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--navy);
    padding: 7px 12px;
    background: #f2f5f9;
    border-left: 3px solid var(--navy);
    border-radius: 4px;
}

/* Page shell with sticky footer */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.site-main { flex: 1 0 auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    border: 1px solid var(--navy);
    padding: 11px 22px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.4;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); text-decoration: none; color: #fff; }

.btn-accent { background: var(--gold); border-color: var(--gold); }
.btn-accent:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

.btn-outline { background: #fff; color: var(--navy); border-color: #c6cedd; }
.btn-outline:hover { background: #f2f5fa; border-color: var(--navy); color: var(--navy); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

.btn-ghost { background: transparent; border-color: transparent; color: #c9d2e4; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

.link-btn {
    background: none;
    border: none;
    color: var(--navy);
    font-size: 13.5px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
}
.link-btn:hover { color: var(--navy-dark); }
.link-btn:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* ---------- Alerts & pills ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; line-height: 1.7; }
.alert ul { margin: 8px 0 0 20px; }
.alert-err { background: var(--bad-bg); border: 1px solid #eec4c4; color: #8d2626; }
.alert-ok  { background: var(--ok-bg);  border: 1px solid #bfe2cb; color: #216939; }
.alert-warn{ background: var(--warn-bg);border: 1px solid #ecd9a8; color: var(--warn); }

.pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e8ecf3;
    color: #47536b;
    white-space: nowrap;
}
.pill-ok   { background: var(--ok-bg); color: var(--ok); }
.pill-bad  { background: var(--bad-bg); color: var(--bad); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-navy { background: #e3e9f3; color: var(--navy); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }

.topbar { background: var(--navy); color: #d7dfec; font-size: 12.5px; }
.topbar-in { display: flex; gap: 22px; align-items: center; min-height: 34px; flex-wrap: wrap; }
.topbar-item { color: #d7dfec; display: inline-flex; align-items: center; gap: 6px; }
.topbar-item:hover { color: #fff; }

.mainbar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 36px; height: 36px;
    background: var(--navy);
    color: var(--gold);
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-mark-lg { width: 44px; height: 44px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 0.2px; color: var(--navy); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav > a { color: #3d485c; font-weight: 600; font-size: 14.5px; }
.nav > a:hover { color: var(--navy); text-decoration: none; }
.nav > a.active { color: var(--navy); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.nav-cta { margin-left: 6px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px 0; }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #fff; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: center; padding: 72px 20px; }

.hero-eyebrow {
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.hero h1 { font-size: 40px; line-height: 1.15; font-weight: 700; margin-bottom: 16px; color: #fff; }
.hero-sub { color: #c3cde0; font-size: 16.5px; margin-bottom: 26px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; color: #c3cde0; font-size: 13.5px; }
.hero-points svg { color: var(--gold); }

.hero-card {
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius);
    padding: 24px 26px;
    box-shadow: 0 18px 44px rgba(6, 14, 30, 0.35);
    max-width: 380px;
    justify-self: end;
    width: 100%;
}
.hc-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #eef1f6; font-size: 14px; }
.hc-row.hc-title { font-weight: 700; color: var(--navy); font-size: 15px; border-bottom: 2px solid var(--gold); }
.hc-ok { color: var(--ok); }
.hc-wait { color: var(--warn); }
.hc-bar { height: 6px; background: #e8ecf3; border-radius: 999px; margin: 18px 0 10px; overflow: hidden; }
.hc-bar span { display: block; height: 100%; width: 62%; background: var(--gold); border-radius: 999px; }
.hc-note { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg); }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.section-head h2 { font-size: 28px; color: var(--navy); margin-bottom: 8px; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}

.step-card { position: relative; padding-top: 30px; }
.step-num {
    position: absolute;
    top: -16px; left: 26px;
    width: 40px; height: 40px;
    background: var(--navy);
    color: var(--gold);
    font-weight: 700;
    font-size: 17px;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 14px rgba(22, 41, 74, 0.25);
}
.step-card h3 { color: var(--navy); font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 14px; }

.feature { text-align: center; padding: 10px 8px; }
.feature-ico {
    width: 46px; height: 46px;
    margin: 0 auto 14px;
    background: #eef1f7;
    color: var(--navy);
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
}
.feature h3 { font-size: 15.5px; color: var(--navy); margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); }

.info-card h3 { color: var(--navy); margin-bottom: 14px; font-size: 17px; }
.check-list { list-style: none; }
.check-list li { padding: 8px 0 8px 26px; position: relative; color: #3d485c; font-size: 14.5px; }
.check-list li::before {
    content: "";
    position: absolute; left: 0; top: 13px;
    width: 14px; height: 14px;
    background: var(--ok-bg);
    border: 1px solid #bfe2cb;
    border-radius: 3px;
}
.check-list li::after {
    content: "";
    position: absolute; left: 4px; top: 17px;
    width: 5px; height: 3px;
    border-left: 2px solid var(--ok);
    border-bottom: 2px solid var(--ok);
    transform: rotate(-45deg);
}

.cta-band { background: var(--navy-dark); color: #fff; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 44px 20px; flex-wrap: wrap; }
.cta-in h2 { font-size: 24px; margin-bottom: 6px; }
.cta-in p { color: #b6c2d8; }

/* ---------- Page head ---------- */
.page-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 40px; padding-bottom: 40px; }
.page-head h1 { font-size: 30px; color: var(--navy); margin-bottom: 8px; }
.page-head p { color: var(--muted); max-width: 640px; }
.req { color: var(--bad); }
.optional { font-weight: 400; color: var(--muted); font-size: 0.85em; }

/* ---------- Forms ---------- */
.app-form .form-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 22px;
}
.form-title { font-size: 16.5px; color: var(--navy); margin-bottom: 6px; }
.form-title + .form-hint { margin-top: 0; }
.form-hint { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.form-note {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--warn);
    background: var(--warn-bg);
    border: 1px solid #ecd9a8;
    padding: 10px 14px;
    border-radius: 6px;
}
.form-actions { text-align: center; }

.field { margin-bottom: 16px; }
.field-full { grid-column: 1 / -1; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #46536b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #c6cedd;
    border-radius: 6px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus,
.filter-bar input:focus, .filter-bar select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(22, 41, 74, 0.12);
}
.field textarea { min-height: 44px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* Reference code selector */
.refcode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.refcode-option input { position: absolute; opacity: 0; }
.refcode-box {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.refcode-option input:checked + .refcode-box { border-color: var(--navy); background: #f2f5fb; }
.refcode-option input:focus-visible + .refcode-box { box-shadow: 0 0 0 3px rgba(22, 41, 74, 0.15); }
.refcode-num {
    width: 42px; height: 42px;
    background: var(--navy);
    color: var(--gold);
    font-size: 19px;
    font-weight: 700;
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.refcode-label { font-weight: 600; color: var(--navy); }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: #3d485c; cursor: pointer; }
.consent input { margin-top: 3px; width: 17px; height: 17px; flex-shrink: 0; }

/* Address autocomplete */
.autocomplete { position: relative; }
.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13.5px;
    border-bottom: 1px solid #eef1f6;
    color: #3d485c;
}
.suggestion-item:hover, .suggestion-item.active { background: #f2f5fb; }
.suggestion-item .sg-main { display: block; color: var(--ink); font-weight: 600; }
.suggestion-item .sg-sub { display: block; font-size: 12px; color: var(--muted); }
.autocomplete .sg-empty { padding: 10px 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- Track page ---------- */
.track-card, .track-status-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 22px;
}
.track-card h2 { font-size: 18px; color: var(--navy); margin-bottom: 18px; }

.sent-banner {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--ok-bg);
    border: 1px solid #bfe2cb;
    color: var(--ok);
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.otp-input {
    font-size: 24px !important;
    letter-spacing: 10px;
    text-align: center;
    font-weight: 700;
}
.resend-row { display: flex; gap: 18px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

.tsc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.tsc-name { font-size: 19px; color: var(--navy); }
.tsc-meta { color: var(--muted); font-size: 13px; margin-top: 3px; }

.steps-line { display: flex; list-style: none; margin: 0 0 24px; }
.steps-line li { flex: 1; text-align: center; position: relative; padding-top: 26px; }
.steps-line li::before {
    content: "";
    position: absolute;
    top: 9px; left: -50%;
    width: 100%; height: 2px;
    background: var(--line);
}
.steps-line li:first-child::before { display: none; }
.steps-line .dot {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #b9c2d4;
    z-index: 1;
}
.steps-line .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.steps-line li.done .dot { background: var(--ok); border-color: var(--ok); }
.steps-line li.done .lbl { color: var(--ok); }
.steps-line li.done::before { background: var(--ok); }
.steps-line li.active .dot { border-color: var(--gold); background: var(--gold); }
.steps-line li.active .lbl { color: var(--warn); }
.steps-line li.bad .dot { border-color: var(--bad); background: var(--bad); }
.steps-line li.bad .lbl { color: var(--bad); }

.review-box {
    background: var(--warn-bg);
    border: 1px solid #ecd9a8;
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: center;
}
.review-label { font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.review-timer { font-size: 26px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.review-sub { font-size: 13px; color: var(--muted); }

.decision-box { border-radius: var(--radius); padding: 20px 24px; }
.decision-ok { background: var(--ok-bg); border: 1px solid #bfe2cb; }
.decision-bad { background: var(--bad-bg); border: 1px solid #eec4c4; }
.decision-title { font-weight: 700; font-size: 15.5px; margin-bottom: 6px; }
.decision-ok .decision-title { color: var(--ok); }
.decision-bad .decision-title { color: var(--bad); }
.decision-note { font-size: 14px; color: #3d485c; }

.secured-box {
    margin-top: 20px;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}
.secured-info { flex: 1 1 260px; }
.secured-title { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.secured-sub { font-size: 13.5px; color: #3d485c; }
.secured-note { flex-basis: 100%; font-size: 12px; color: var(--muted); margin: 0; }

.awaiting-link {
    margin-top: 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: 13.5px;
    color: var(--muted);
}
.track-footer-links { text-align: center; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer {
    flex-shrink: 0;
    background: var(--navy-dark);
    color: #b6c2d8;
    margin-top: 70px;
}
.footer-cols {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding-top: 48px;
    padding-bottom: 40px;
}
.footer-brand { display: block; color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.footer-about p { font-size: 13px; line-height: 1.8; }
.footer-col h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; font-size: 13.5px; }
.footer-col a { color: #b6c2d8; }
.footer-col a:hover { color: #fff; }
.contact-list li span { display: inline-block; min-width: 70px; color: #7f8db0; }
.footer-bottom { border-top: 1px solid #24355c; }
.footer-bottom-in {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: 12.5px;
    color: #7f8db0;
}

/* =====================================================
   STAFF PANELS
   ===================================================== */
.panel-body { background: var(--bg); }

.panel-header { background: var(--navy); color: #fff; }
.panel-header-in { display: flex; align-items: center; gap: 22px; min-height: 62px; flex-wrap: wrap; }
.brand-panel .brand-name { color: #fff; font-size: 16px; }
.panel-tag {
    background: rgba(255,255,255,0.14);
    color: var(--gold);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
}
.brand-mark-panel { background: rgba(255,255,255,0.12); }

.panel-header .nav { margin-left: auto; gap: 20px; }
.panel-header .nav > a { color: #c3cde0; font-size: 13.5px; }
.panel-header .nav > a:hover, .panel-header .nav > a.active { color: #fff; }
.panel-header .nav > a.active { border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

.panel-user { display: flex; align-items: center; gap: 14px; }
.panel-user-name { color: #fff; font-weight: 600; font-size: 13.5px; }
.panel-user-role { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }

.panel-main { padding: 34px 0 40px; }
.panel-footer { background: var(--navy-dark); color: #7f8db0; font-size: 12px; padding: 14px 0; flex-shrink: 0; }

.panel-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; background: none; border: none; }
.panel-page-head h1 { font-size: 24px; }
.panel-page-head p { font-size: 13.5px; }
.head-actions { display: flex; align-items: center; gap: 12px; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; min-height: 40px; padding: 8px 12px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; }

/* Tables */
.table-card { padding: 0; overflow: hidden; margin-bottom: 24px; }
.card-title { font-size: 16px; color: var(--navy); padding: 18px 22px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
    text-align: left;
    background: #f7f9fc;
    color: #46536b;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.data-table tbody tr:hover { background: #f9fafd; }
.data-table-sm th, .data-table-sm td { padding: 9px 12px; }
.row-muted { opacity: 0.55; }
.actions-cell { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }

.pw-reset { position: relative; }
.pw-reset summary { list-style: none; display: inline-block; }
.pw-reset summary::-webkit-details-marker { display: none; }
.pw-reset-form {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    gap: 8px;
    z-index: 30;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.14);
    min-width: 300px;
}
.pw-reset-form input { flex: 1; padding: 8px 10px; border: 1px solid #c6cedd; border-radius: 6px; font-size: 13px; min-height: 38px; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* Detail cards */
.app-grid { margin-bottom: 22px; }
.detail-card h3 {
    font-size: 14px;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}
.detail-card h3 + h3, .detail-card dl + h3 { margin-top: 20px; }
.detail-list { list-style: none; }
.detail-list > div { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px dashed #edf0f5; font-size: 13.5px; }
.detail-list dt { flex: 0 0 130px; color: var(--muted); }
.detail-list dd { flex: 1; color: var(--ink); word-break: break-word; }
.detail-list-mono dd { font-weight: 600; letter-spacing: 0.3px; }
.bank-card { border-top: 3px solid var(--gold); }
.bank-note { margin-top: 14px; font-size: 11.5px; color: var(--muted); }
.span-2 { grid-column: span 2; }

.notes-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    max-height: 180px;
    overflow-y: auto;
    white-space: normal;
}
.inline-form { margin-top: 18px; }
.inline-form .btn { margin-bottom: 8px; }
.inline-form .form-hint { margin: 0; }
.form-card { align-self: start; }

.activity-list { list-style: none; }
.activity-list li { padding: 10px 0; border-bottom: 1px dashed #edf0f5; font-size: 13px; }
.activity-list .act-action { display: block; font-weight: 700; color: var(--navy); text-transform: capitalize; }
.activity-list .act-detail { display: block; color: #3d485c; }
.activity-list .act-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Secured settings card */
.secured-card { border-top: 3px solid var(--gold); }
.current-link-box {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.current-link-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 700; }
.current-link-time { font-size: 12px; color: var(--muted); }

/* ---------- Login ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 36px 34px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px rgba(4, 10, 22, 0.45);
}
.login-head { text-align: center; margin-bottom: 24px; }
.login-head .brand-mark { margin-bottom: 12px; }
.login-head h1 { font-size: 20px; color: var(--navy); }
.login-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.login-note { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- Autocomplete dropdown ---------- */
#address-suggestions:not(:empty) {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.14);
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
}
.field { position: relative; }
.field .autocomplete { position: static; }

/* ---------- Scrollbar styling ---------- */
#address-suggestions::-webkit-scrollbar { width: 10px; }
.table-scroll::-webkit-scrollbar, .notes-box::-webkit-scrollbar { height: 10px; width: 10px; }
.table-scroll::-webkit-scrollbar-track, .notes-box::-webkit-scrollbar-track { background: #f1f3f8; }
.table-scroll::-webkit-scrollbar-thumb, .notes-box::-webkit-scrollbar-thumb { background: #c2cbdb; border-radius: 6px; }
.table-scroll::-webkit-scrollbar-thumb:hover, .notes-box::-webkit-scrollbar-thumb:hover { background: #a8b4c9; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-in { grid-template-columns: 1fr; gap: 36px; padding: 52px 20px; }
    .hero-card { justify-self: start; }
    .hero h1 { font-size: 33px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; order: 3; margin-left: auto; }
    .nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 20px 16px;
        box-shadow: 0 16px 30px rgba(16, 24, 40, 0.12);
        z-index: 60;
    }
    .mainbar-in, .panel-header-in { position: relative; }
    .panel-header .nav {
        background: var(--navy-dark);
        border-bottom: none;
        margin-left: 0;
    }
    .nav.nav-open { display: flex; }
    .nav > a { padding: 11px 0; border-bottom: 1px solid #eef1f6; }
    .panel-header .nav > a { border-bottom-color: #24355c; }
    .nav .nav-cta { margin: 12px 0 0; text-align: center; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .refcode-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 28px; }
    .section { padding: 44px 0; }
    .footer-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .panel-user { margin-left: auto; }
    .panel-user-name, .panel-user-role { display: none; }
    .tsc-head { flex-direction: column; }
    .page-head .wrap { padding-top: 30px; padding-bottom: 30px; }
    .page-head h1 { font-size: 24px; }
    .detail-list dt { flex-basis: 110px; }
    .steps-line .lbl { font-size: 11px; }
}

@media (max-width: 520px) {
    .footer-cols { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .filter-bar input, .filter-bar select { width: 100%; }
    .cta-in { flex-direction: column; align-items: flex-start; }
    .login-card { padding: 28px 22px; }
}

/* ---------- Secure link send blocks (staff panels) ---------- */
.link-send-block { margin-top: 18px; border-top: 1px dashed #dfe4ec; padding-top: 6px; }
.link-send-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed #eef1f6; flex-wrap: wrap; }
.link-send-info { display: flex; flex-direction: column; }
.link-send-info b { color: var(--navy); }
.link-send-form { margin: 0; }
.link-url { font-size: 11.5px; padding: 8px 0; }

/* ---------- Approval letter (agreement page) ---------- */
.letter { padding: 34px 36px; }
.letter-head { border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.letter-head .brand-mark { background: var(--navy); color: #fff; }
.letter-company { font-size: 19px; font-weight: 700; color: var(--navy); }
.letter-doc { margin-left: auto; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 700; }
.letter-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 18px; font-size: 13px; }
.letter-meta span { color: var(--muted); margin-right: 6px; }
.letter-meta b { color: var(--navy); }
.letter-line { font-size: 14px; color: #333e52; line-height: 1.75; margin: 0 0 14px; }
.terms-table { width: 100%; border-collapse: collapse; margin: 6px 0 20px; }
.terms-table th, .terms-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e4e8ef; font-size: 14px; }
.terms-table th { color: var(--muted); font-weight: 600; width: 55%; }
.terms-table td { text-align: right; font-weight: 700; color: var(--navy); }
.sign-box { background: #f2f5fb; border: 1px dashed #b9c4d8; border-radius: var(--radius); padding: 22px 24px; margin-top: 22px; }
.sign-box h3 { margin-bottom: 6px; }
.sign-consent { margin: 6px 0 16px; }
.sign-done { margin-top: 22px; }
.signed-banner { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe2cb; border-radius: 6px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; }
.signature-block { margin-top: 26px; }
.signature-script { font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-size: 30px; color: var(--navy); line-height: 1.3; }
.signature-rule { border-bottom: 2px solid var(--navy); max-width: 340px; margin: 6px 0 8px; }
.signature-caption { font-size: 12.5px; color: #3d485c; }
.letter-foot { display: flex; justify-content: space-between; border-top: 1px solid #e4e8ef; margin-top: 26px; padding-top: 12px; font-size: 12px; color: var(--muted); }
.letter-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- Tracking page: sign CTA ---------- */
.agreement-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #f2f5fb; border: 1px solid #c9d4e6; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }

/* ---------- Compact reference select on the application form ---------- */
.ref-select-row { max-width: 380px; }

/* ---------- Print (approval letter) ---------- */
@media print {
    .no-print, .site-header, .site-footer, .page-head, .alert { display: none !important; }
    body { background: #fff; }
    .site-main { padding: 0 !important; }
    .letter { border: none; box-shadow: none; padding: 0; }
}
