:root {
    --navy: #061a34;
    --blue: #0b5ed7;
    --blue-2: #2475e8;
    --gold: #f2b134;
    --green: #0f9d6a;
    --red: #c93c4b;
    --ink: #182337;
    --muted: #66758b;
    --line: #dfe7f0;
    --paper: #ffffff;
    --soft: #f4f7fb;
    --shadow: 0 18px 45px rgba(7, 31, 62, .12);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--soft);
    line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 26, 52, .95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 48px; height: 48px; display: grid; place-items: center;
    border-radius: 14px; font-weight: 900; letter-spacing: .5px;
    color: var(--navy); background: linear-gradient(135deg, #ffcf6b, var(--gold));
    box-shadow: 0 10px 25px rgba(242,177,52,.28);
}
.brand strong { display:block; font-size: 1.04rem; }
.brand small { display:block; color: #bfd0e6; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display:flex; align-items:center; gap: 20px; }
.main-nav a { color:#eef5ff; font-weight:700; font-size:.93rem; }
.nav-toggle { display:none; background:transparent; border:0; color:white; font-size:1.6rem; }
.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    color: white;
    display:flex;
    align-items:center;
    background:
        radial-gradient(circle at 82% 18%, rgba(36,117,232,.55), transparent 30%),
        radial-gradient(circle at 15% 88%, rgba(242,177,52,.20), transparent 30%),
        linear-gradient(135deg, #031327 0%, #082d58 56%, #0b5ed7 130%);
}
.hero::before,
.hero::after {
    content:""; position:absolute; border-radius:50%; border:1px solid rgba(255,255,255,.10);
}
.hero::before { width:520px; height:520px; right:-130px; top:-150px; }
.hero::after { width:360px; height:360px; right:70px; top:60px; }
.hero-grid { position:relative; z-index:2; display:grid; grid-template-columns:1.08fr .92fr; gap:58px; align-items:center; padding:88px 0; }
.eyebrow { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; font-weight:800; font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.18); }
.hero h1 { font-size:clamp(2.6rem, 6vw, 5.5rem); line-height:.98; margin:20px 0 24px; letter-spacing:-.055em; }
.hero h1 span { color: var(--gold); }
.hero p { color:#d5e2f3; font-size:1.1rem; max-width:690px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-top:30px; }
.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-height:46px; padding:0 18px; border:0; border-radius:12px;
    font:inherit; font-weight:800; cursor:pointer; text-decoration:none;
    transition:.18s transform, .18s box-shadow, .18s opacity;
}
.btn:hover { transform:translateY(-1px); text-decoration:none; }
.btn-primary { color:white; background:linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow:0 11px 25px rgba(11,94,215,.22); }
.btn-gold { color:var(--navy); background:linear-gradient(135deg,#ffd976,var(--gold)); box-shadow:0 11px 25px rgba(242,177,52,.20); }
.btn-light { color:var(--navy); background:white; }
.btn-outline { color:inherit; background:transparent; border:1px solid currentColor; }
.btn-danger { color:white; background:var(--red); }
.btn-success { color:white; background:var(--green); }
.btn-sm { min-height:36px; padding:0 12px; font-size:.84rem; border-radius:9px; }
.hero-card {
    background:rgba(255,255,255,.96); color:var(--ink); border-radius:28px; padding:30px;
    box-shadow:0 40px 90px rgba(0,0,0,.24); border:1px solid rgba(255,255,255,.5);
}
.hero-card h3 { margin-top:0; font-size:1.35rem; }
.bank-detail { display:grid; grid-template-columns:1fr auto; gap:14px; align-items:center; padding:16px 0; border-bottom:1px solid var(--line); }
.bank-detail:last-child { border-bottom:0; }
.bank-detail span { color:var(--muted); display:block; font-size:.82rem; }
.bank-detail strong { font-size:1rem; }
.section { padding:80px 0; }
.section-head { max-width:720px; margin-bottom:34px; }
.section-head h2 { font-size:clamp(2rem,4vw,3.4rem); margin:8px 0 12px; letter-spacing:-.035em; line-height:1.08; }
.section-head p { color:var(--muted); }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); }
.card h3 { margin:0 0 10px; }
.icon-box { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; color:white; background:linear-gradient(135deg,var(--blue),var(--blue-2)); font-weight:900; margin-bottom:18px; }
.stat-card { background:white; border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:0 8px 30px rgba(7,31,62,.08); }
.stat-card span { color:var(--muted); display:block; font-size:.85rem; font-weight:700; }
.stat-card strong { display:block; margin-top:8px; font-size:1.7rem; letter-spacing:-.03em; }
.page-hero { background:linear-gradient(135deg,#061a34,#0b5ed7); color:white; padding:58px 0; }
.page-hero h1 { margin:0 0 8px; font-size:clamp(2rem,5vw,3.8rem); letter-spacing:-.04em; }
.page-hero p { color:#d7e5f7; max-width:760px; }
.form-shell { max-width:920px; margin:42px auto 80px; }
.form-card { background:white; border:1px solid var(--line); border-radius:22px; padding:30px; box-shadow:var(--shadow); }
.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.form-group { display:flex; flex-direction:column; gap:7px; }
.form-group.full { grid-column:1/-1; }
label { font-weight:800; font-size:.9rem; }
input, select, textarea {
    width:100%; min-height:48px; padding:11px 13px; border:1px solid #cfd9e6;
    border-radius:11px; background:white; color:var(--ink); font:inherit; outline:none;
}
textarea { min-height:115px; resize:vertical; }
input:focus, select:focus, textarea:focus { border-color:var(--blue); box-shadow:0 0 0 4px rgba(11,94,215,.10); }
.help { color:var(--muted); font-size:.82rem; }
.check-row { display:flex; align-items:flex-start; gap:10px; }
.check-row input { width:auto; min-height:0; margin-top:5px; }
.alert { margin-top:18px; border-radius:12px; padding:13px 15px; font-weight:700; border:1px solid; }
.alert.success { color:#075d3c; background:#eaf9f3; border-color:#a5dfca; }
.alert.error { color:#8b1d2c; background:#fff0f2; border-color:#f0b3bc; }
.alert.info { color:#174d88; background:#edf5ff; border-color:#b7d4f6; }
.alert.warning { color:#7a5300; background:#fff7df; border-color:#ecd48c; }
.table-wrap { overflow:auto; background:white; border:1px solid var(--line); border-radius:16px; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th, td { padding:14px 15px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f8fafc; color:#4c5b70; font-size:.78rem; letter-spacing:.06em; text-transform:uppercase; }
tr:last-child td { border-bottom:0; }
.badge { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:.74rem; font-weight:900; text-transform:capitalize; }
.badge.pending, .badge.approved { background:#fff3d5; color:#805600; }
.badge.active, .badge.completed, .badge.verified { background:#dcf7ec; color:#086444; }
.badge.blocked, .badge.rejected, .badge.defaulted { background:#ffe4e8; color:#922235; }
.badge.disbursed, .badge.repaying { background:#e5efff; color:#174f9b; }
.dashboard { padding:36px 0 78px; }
.dashboard-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.dashboard-head h1 { margin:0; letter-spacing:-.035em; }
.profile-summary { display:grid; grid-template-columns:120px 1fr; gap:20px; align-items:center; }
.passport { width:120px; height:140px; border-radius:16px; object-fit:cover; border:3px solid white; box-shadow:0 8px 28px rgba(7,31,62,.16); background:#e8edf4; }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.detail-item { padding:13px; border-radius:12px; background:#f7f9fc; }
.detail-item span { display:block; color:var(--muted); font-size:.78rem; }
.detail-item strong { display:block; margin-top:3px; }
.progress { height:10px; border-radius:999px; overflow:hidden; background:#e6ecf3; }
.progress > span { display:block; height:100%; background:linear-gradient(90deg,var(--blue),var(--green)); }
.actions { display:flex; gap:8px; flex-wrap:wrap; }
.ad-card { display:grid; grid-template-columns:90px 1fr; gap:16px; align-items:center; }
.ad-card img { width:90px; height:70px; object-fit:cover; border-radius:11px; }
.terms { counter-reset:item; }
.terms section { margin-bottom:24px; }
.terms h3 { margin-bottom:8px; }
.photo-preview { width:180px; height:210px; object-fit:cover; border-radius:14px; border:1px solid var(--line); background:#eef2f7; display:none; }
.photo-checks { display:grid; gap:8px; margin-top:12px; }
.photo-check { padding:9px 11px; border-radius:9px; background:#f6f8fb; color:var(--muted); font-size:.84rem; }
.site-footer { background:var(--navy); color:#d8e4f2; padding:48px 0 22px; }
.footer-grid { display:grid; grid-template-columns:1.2fr 1fr 1fr 1.15fr; gap:28px; }
.site-footer a { color:#ffd66a; }
.footer-contact { line-height:1.9; overflow-wrap:anywhere; }
.footer-contact span { color:#d8e4f2; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.1); margin-top:28px; padding-top:18px; color:#9db0c7; font-size:.84rem; }
.empty { padding:34px; text-align:center; color:var(--muted); background:white; border:1px dashed #cbd5e1; border-radius:16px; }
.split { display:grid; grid-template-columns:1.15fr .85fr; gap:24px; }
.sticky-card { position:sticky; top:100px; align-self:start; }
.kpi-positive { color:var(--green); }
.kpi-negative { color:var(--red); }
code { background:#edf2f7; padding:2px 6px; border-radius:6px; }
@media (max-width: 960px) {
    .hero-grid, .split { grid-template-columns:1fr; }
    .hero { min-height:auto; }
    .grid-4 { grid-template-columns:repeat(2,1fr); }
    .grid-3 { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
    .nav-toggle { display:block; }
    .main-nav { display:none; position:absolute; top:76px; left:16px; right:16px; flex-direction:column; align-items:stretch; background:#0a2445; padding:18px; border-radius:14px; box-shadow:var(--shadow); }
    .main-nav.open { display:flex; }
    .form-grid, .detail-grid, .grid-4 { grid-template-columns:1fr; }
    .form-group.full { grid-column:auto; }
    .profile-summary { grid-template-columns:1fr; }
    .dashboard-head { align-items:flex-start; flex-direction:column; }
    .hero-grid { padding:64px 0; }
    .hero-card { padding:22px; }
    .form-card { padding:20px; }
}


.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: .48;
    cursor: not-allowed;
    filter: grayscale(.35);
    box-shadow: none;
}

.terms-record { padding: 34px; }
.terms-record-header { display:flex; justify-content:space-between; gap:28px; align-items:flex-start; padding-bottom:24px; border-bottom:1px solid var(--line); }
.terms-passport-box { width:210px; flex:0 0 210px; text-align:center; }
.terms-passport-box img { display:block; width:180px; height:180px; margin:0 auto 10px; object-fit:cover; border:4px solid #fff; border-radius:14px; box-shadow:0 8px 24px rgba(15,23,42,.16); }
.terms-audit-grid { margin:24px 0; }
.accepted-declarations { margin:28px 0; padding:22px; border:1px solid var(--line); border-radius:16px; background:#f8fafc; }
.accepted-row { display:grid; grid-template-columns:34px 1fr auto; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }
.accepted-row:last-child { border-bottom:0; }
.accepted-mark { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; font-weight:900; }
.accepted-row.is-accepted .accepted-mark { background:#dcfce7; color:#166534; }
.accepted-row.not-accepted .accepted-mark { background:#fee2e2; color:#991b1b; }
.accepted-row.is-accepted strong { color:#166534; }
.accepted-row.not-accepted strong { color:#991b1b; }
.terms-copy { margin-top:34px; padding-top:26px; border-top:2px solid var(--line); }
.terms-signoff { margin-top:32px; padding-top:22px; border-top:1px solid var(--line); }
.signature-grid { display:grid; grid-template-columns:1fr 1fr .7fr; gap:26px; margin-top:48px; }
.signature-grid div { border-top:1px solid #111827; padding-top:8px; text-align:center; }
.break-word { overflow-wrap:anywhere; }

@media (max-width: 720px) {
    .terms-record-header { flex-direction:column-reverse; }
    .terms-passport-box { width:100%; }
    .accepted-row { grid-template-columns:34px 1fr; }
    .accepted-row strong { grid-column:2; }
    .signature-grid { grid-template-columns:1fr; }
}

@media print {
    .site-header, .site-footer, .no-print { display:none !important; }
    body { background:#fff; color:#000; font-size:11pt; }
    main, .dashboard, .container { width:100%; max-width:none; margin:0; padding:0; }
    .terms-record { border:0; box-shadow:none; padding:0; }
    .terms-record-header { break-inside:avoid; }
    .terms-copy section, .accepted-declarations { break-inside:avoid; }
    .terms-passport-box img { box-shadow:none; border:1px solid #111; }
    a { color:#000; text-decoration:none; }
}

/* Terms acceptance signature record */
.formal-signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-top: 30px;
}
.formal-signature-card {
    min-height: 280px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    break-inside: avoid;
}
.formal-signature-card h3 {
    margin: 0 0 18px;
}
.stored-signature-box {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    background: #f8fafc;
}
.stored-signature-box img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.signature-placeholder {
    color: #64748b;
    font-size: .92rem;
}
.formal-signature-line {
    width: 88%;
    margin: 24px auto 8px;
    border-top: 1px solid #111827;
}
.formal-signature-card > strong,
.formal-signature-card > span {
    display: block;
}
.formal-signature-card > span {
    margin-top: 4px;
    color: #64748b;
}
.formal-signature-card p {
    margin: 14px 0 0;
}
@media (max-width: 760px) {
    .formal-signature-grid {
        grid-template-columns: 1fr;
    }
}
@media print {
    .formal-signature-card {
        border: 1px solid #111;
        box-shadow: none;
    }
    .stored-signature-box {
        background: #fff;
    }
}
