:root {
    --icl-primary: #d93b35;
    --icl-primary-soft: #fbefee;
    --icl-primary-border: #efc5c2;
    --icl-text: #22262b;
    --icl-muted: #727981;
    --icl-border: #e5e8ec;
    --icl-surface: #ffffff;
    --icl-page: #f5f6f8;
    --icl-success: #23845b;
    --icl-warning: #a96d00;
}

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

.onboarding-topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(18px, 4vw, 64px);
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--icl-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.onboarding-logo img { height: 54px; width: 180px; object-fit: contain; }
.onboarding-topbar-actions { display: flex; align-items: center; gap: 14px; color: var(--icl-muted); font-size: .9rem; }

.onboarding-main { padding: clamp(18px, 4vw, 48px); }
.onboarding-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.onboarding-progress {
    position: sticky;
    top: 104px;
    background: var(--icl-surface);
    border: 1px solid var(--icl-border);
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 8px 28px rgba(24, 33, 43, .05);
}
.progress-heading .eyebrow, .page-eyebrow {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--icl-primary);
}
.progress-heading h2 { margin: 8px 0 6px; font-size: 1.35rem; }
.progress-heading p { margin: 0; color: var(--icl-muted); font-size: .9rem; line-height: 1.5; }
.step-list { list-style: none; padding: 0; margin: 28px 0; }
.step-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; color: #969ca3; font-size: .92rem; font-weight: 600; }
.step-item:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; height: 28px; width: 1px; background: #e3e6e9; }
.step-dot { width: 31px; height: 31px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dfe2e5; background: #fafbfc; font-size: .78rem; flex: 0 0 auto; }
.step-item.active { color: var(--icl-text); }
.step-item.active .step-dot { background: var(--icl-primary); border-color: var(--icl-primary); color: #fff; box-shadow: 0 0 0 5px var(--icl-primary-soft); }
.step-item.completed { color: #556069; }
.step-item.completed .step-dot { color: var(--icl-success); background: #edf8f3; border-color: #cce8da; }
.privacy-note { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: #f8f9fa; color: var(--icl-muted); font-size: .79rem; line-height: 1.45; }
.privacy-note i { font-size: 1.1rem; color: var(--icl-primary); }
.privacy-note strong, .privacy-note span { display: block; }
.privacy-note strong { color: var(--icl-text); margin-bottom: 2px; }

.onboarding-content { min-width: 0; }
.onboarding-card {
    background: var(--icl-surface);
    border: 1px solid var(--icl-border);
    border-radius: 18px;
    padding: clamp(22px, 4vw, 42px);
    box-shadow: 0 8px 28px rgba(24, 33, 43, .05);
}
.page-title { margin: 6px 0 8px; font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 750; letter-spacing: -.025em; }
.page-intro { margin: 0 0 28px; color: var(--icl-muted); max-width: 720px; line-height: 1.65; }
.section-title { font-size: 1.03rem; font-weight: 750; margin: 0 0 15px; }
.section-subtitle { margin: -8px 0 18px; color: var(--icl-muted); font-size: .88rem; }
.form-section + .form-section { border-top: 1px solid var(--icl-border); margin-top: 30px; padding-top: 28px; }
.form-label { font-weight: 650; font-size: .88rem; color: #3b4248; }
.form-control, .form-select { min-height: 46px; border-color: #dfe3e7; border-radius: 10px; }
textarea.form-control { min-height: 105px; }
.form-control:focus, .form-select:focus {
    border-color: rgba(217,59,53,.65);
    box-shadow: 0 0 0 .22rem rgba(217,59,53,.12);
}
.form-text { color: var(--icl-muted); }
.btn-primary { --bs-btn-bg: var(--icl-primary); --bs-btn-border-color: var(--icl-primary); --bs-btn-hover-bg: #c8322d; --bs-btn-hover-border-color: #c8322d; --bs-btn-active-bg: #b92f2a; --bs-btn-active-border-color: #b92f2a; }
.btn-soft-primary { background: var(--icl-primary-soft); color: var(--icl-primary); border: 1px solid var(--icl-primary-border); }
.btn-soft-primary:hover { background: #f8e2e0; color: #b92f2a; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 30px; }
.form-actions .btn { min-width: 128px; min-height: 44px; }

.alert-list { margin-bottom: 22px; }
.alert-list .alert { margin-bottom: 8px; }

.info-panel { border: 1px solid var(--icl-border); border-radius: 14px; padding: 18px; background: #fafbfc; }
.info-panel.primary { background: var(--icl-primary-soft); border-color: var(--icl-primary-border); }
.info-row { display: flex; justify-content: space-between; gap: 18px; padding: 8px 0; border-bottom: 1px dashed #e5e7e9; }
.info-row:last-child { border-bottom: 0; }
.info-row span:first-child { color: var(--icl-muted); }
.info-row strong { text-align: right; font-weight: 650; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.upload-card { border: 1px dashed #ccd1d6; border-radius: 14px; padding: 18px; background: #fcfcfd; }
.upload-card.has-file { border-style: solid; border-color: #b9ddcc; background: #f3faf7; }
.upload-card .upload-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--icl-primary-soft); color: var(--icl-primary); margin-bottom: 12px; }
.document-preview { display: block; width: 100%; aspect-ratio: 1.58/1; object-fit: cover; border-radius: 10px; border: 1px solid var(--icl-border); margin-top: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 750; padding: 6px 9px; border-radius: 999px; background: #f0f2f4; color: #596169; }
.status-pill.success { background: #eaf7f1; color: #207250; }
.status-pill.warning { background: #fff6df; color: #8d6300; }
.status-pill.muted { background: #f2f3f5; color: #697078; }

.camera-shell { background: #151719; border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 4/3; max-width: 620px; margin: 0 auto; }
.camera-shell video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #cbd0d5; text-align: center; padding: 24px; }
.capture-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.capture-step { border: 1px solid var(--icl-border); border-radius: 12px; padding: 14px; background: #fff; text-align: center; }
.capture-step.complete { border-color: #b9ddcc; background: #f3faf7; }
.capture-step strong { display: block; font-size: .88rem; margin-bottom: 4px; }
.capture-step span { color: var(--icl-muted); font-size: .78rem; }

.fund-choice { border: 1px solid var(--icl-border); border-radius: 15px; overflow: hidden; margin-bottom: 14px; background: #fff; }
.fund-choice-header { padding: 16px 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; background: #fafbfc; }
.fund-choice-header input { width: 19px; height: 19px; accent-color: var(--icl-primary); }
.fund-choice-header strong { flex: 1; }
.fund-fields { display: none; padding: 22px 18px; border-top: 1px solid var(--icl-border); }
.fund-choice.selected .fund-fields { display: block; }
.subsection-label { display: flex; align-items: center; gap: 8px; color: var(--icl-text); font-weight: 750; font-size: .9rem; margin-bottom: 15px; }
.subsection-label i { color: var(--icl-primary); }
.guardian-fields { display: none; }
.guardian-fields.visible { display: block; }

.review-section { border: 1px solid var(--icl-border); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.review-section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-section-header h3 { margin: 0; font-size: 1rem; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.review-item span { display: block; color: var(--icl-muted); font-size: .78rem; margin-bottom: 3px; }
.review-item strong { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.document-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.document-thumb { border: 1px solid var(--icl-border); border-radius: 11px; overflow: hidden; background: #fafbfc; }
.document-thumb img { width: 100%; height: 110px; object-fit: cover; }
.document-thumb span { display: block; padding: 8px; font-size: .75rem; font-weight: 650; }

.success-mark { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; background: #eaf7f1; color: var(--icl-success); font-size: 2rem; }
.status-card { max-width: 670px; margin: 0 auto; text-align: center; }
.status-timeline { text-align: left; max-width: 470px; margin: 28px auto; }
.status-line { display: flex; gap: 12px; padding: 10px 0; }
.status-line i { color: var(--icl-success); }
.status-line.pending i { color: var(--icl-warning); }

.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

@media (max-width: 900px) {
    .onboarding-main { padding: 18px; }
    .onboarding-shell { grid-template-columns: 1fr; gap: 16px; }
    .onboarding-progress { position: static; padding: 17px; overflow-x: auto; }
    .progress-heading, .privacy-note { display: none; }
    .step-list { display: flex; margin: 0; min-width: 570px; }
    .step-item { min-height: auto; flex: 1; flex-direction: column; gap: 6px; text-align: center; font-size: .72rem; }
    .step-item:not(:last-child)::after { left: calc(50% + 18px); top: 15px; width: calc(100% - 36px); height: 1px; }
    .step-dot { z-index: 1; }
}
@media (max-width: 640px) {
    .onboarding-topbar { min-height: 66px; padding: 8px 15px; }
    .onboarding-logo img { height: 45px; width: 130px; }
    .onboarding-main { padding: 12px; }
    .onboarding-card { border-radius: 14px; padding: 22px 17px; }
    .upload-grid, .review-grid { grid-template-columns: 1fr; }
    .capture-steps { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .info-row { flex-direction: column; gap: 2px; }
    .info-row strong { text-align: left; }
}
