:root {
    --primary: #6c4cf1;
    --primary-dark: #5637dc;
    --ink: #1b1d29;
    --muted: #70758a;
    --line: #e5e7ef;
    --soft: #f5f6fb;
    --white: #fff;
    --danger: #bd2538;
    --success: #16764a;
    --progress: 180deg;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; font-family: Inter, Arial, sans-serif; color: var(--ink); background: #f1f3f8; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-page { background: #eef0f7; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 46%) 1fr; }
.auth-visual { position: relative; overflow: hidden; padding: 48px 56px; background: linear-gradient(145deg, #2b1c75 0%, #6c4cf1 55%, #9b85ff 100%); color: #fff; }
.brand-mark { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 14px; background: #fff; color: var(--primary); font-weight: 800; box-shadow: 0 12px 28px rgba(0,0,0,.15); }
.brand-name { font-weight: 700; font-size: 21px; margin-left: 10px; vertical-align: middle; }
.visual-copy { position: relative; z-index: 2; max-width: 580px; margin-top: 24vh; }
.eyebrow { display: inline-block; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: #e4ddff; }
.visual-copy h1 { margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.06; letter-spacing: -.045em; }
.visual-copy p { max-width: 520px; margin: 24px 0 0; font-size: 17px; line-height: 1.75; color: #ebe7ff; }
.visual-orb { position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); }
.orb-one { width: 280px; height: 280px; right: -100px; top: 12%; }
.orb-two { width: 190px; height: 190px; left: 10%; bottom: -80px; }
.auth-panel { display: grid; place-items: center; padding: 48px 28px; background: #fbfbfe; }
.auth-card { width: min(100%, 450px); }
.auth-card h2 { margin: 0 0 8px; font-size: 35px; letter-spacing: -.04em; }
.muted { color: var(--muted); margin: 0 0 30px; }
.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 36px; font-weight: 700; font-size: 20px; }
.mobile-brand .brand-mark { width: 40px; height: 40px; }
.form-stack { display: grid; gap: 20px; }
.form-stack label > span:first-child, .age-field > span { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.form-stack input, .age-field input { width: 100%; height: 54px; border: 1px solid #d7d9e3; border-radius: 12px; padding: 0 15px; background: #fff; outline: none; transition: .2s ease; }
.form-stack input:focus, .age-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108,76,241,.12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 72px; }
.password-toggle { position: absolute; right: 8px; top: 8px; height: 38px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--primary); background: #f0edff; font-weight: 700; font-size: 12px; }
.primary-btn, .secondary-btn { min-height: 52px; border-radius: 12px; padding: 0 20px; font-weight: 700; border: 0; transition: .2s ease; }
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--primary), #8a6dff); box-shadow: 0 13px 28px rgba(108,76,241,.25); }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 17px 34px rgba(108,76,241,.32); }
.primary-btn:disabled { cursor: not-allowed; transform: none; color: #a7a8b0; background: #e2e2e7; box-shadow: none; }
.secondary-btn { color: #4b4f61; background: #f1f2f6; border: 1px solid #e1e3eb; text-decoration: none; display: inline-grid; place-items: center; }
.auth-switch { margin-top: 27px; text-align: center; color: var(--muted); }
.auth-switch a { color: var(--primary); font-weight: 700; text-decoration: none; }
.alert { border-radius: 12px; padding: 13px 15px; margin-bottom: 20px; line-height: 1.5; font-size: 14px; }
.alert-error { color: #8d182b; background: #fff0f2; border: 1px solid #ffd0d7; }
.alert-success { color: #11643f; background: #ebfff5; border: 1px solid #bdebd4; }

.topbar { height: 72px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; padding: 0 28px; background: #fff; border-bottom: 1px solid #dcdfe7; box-shadow: 0 1px 4px rgba(20,25,40,.06); }
.menu-btn { width: 38px; height: 38px; border: 0; background: transparent; font-size: 23px; margin-right: 10px; }
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; box-shadow: none; font-size: 14px; }
.topbar-user { margin-left: auto; font-size: 13px; color: #444857; }
.app-layout { min-height: calc(100vh - 118px); display: grid; grid-template-columns: 242px 1fr; }
.sidebar { padding: 34px 22px; background: linear-gradient(180deg, #e9f2ff 0%, #f5f8fd 100%); border-right: 1px solid #dce3ee; }
.nav-label { margin: 0 0 14px 3px; color: #8590a2; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.account-label { margin-top: 36px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; margin-bottom: 4px; border-radius: 12px; color: #5b6373; text-decoration: none; font-size: 14px; }
.nav-link span { width: 26px; text-align: center; }
.nav-link.active { color: #5538e6; background: linear-gradient(90deg, #bbd8f5, #95c5ee); }
.nav-link.disabled { opacity: .65; pointer-events: none; }
.verify-card { margin-top: 32px; padding: 18px; border-radius: 12px; border: 1px solid #dce1eb; background: #fff; color: #414757; font-size: 13px; line-height: 1.65; }
.verify-card strong { display: block; margin-bottom: 8px; }
.verify-card p { margin: 0; }
.content-area { padding: 54px clamp(24px, 5vw, 78px) 80px; background: #eef1f5; }
.welcome-card, .question-card { max-width: 1030px; margin: 0 auto; border: 1px solid #e2e4ea; border-radius: 10px; background: #fff; box-shadow: 0 2px 3px rgba(22,28,45,.15); }
.welcome-card { min-height: 124px; display: flex; align-items: center; justify-content: space-between; padding: 24px; }
.eyebrow.dark { color: var(--primary); margin-bottom: 7px; }
.welcome-card h1 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -.03em; }
.welcome-card p { margin: 10px 0 0; color: #444a59; }
.progress-ring { width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) var(--progress), #e9e9ef 0); position: relative; }
.progress-ring::after { content: ''; width: 48px; height: 48px; position: absolute; border-radius: 50%; background: #fff; }
.progress-ring span { position: relative; z-index: 1; color: var(--primary); font-size: 12px; font-weight: 700; }
.question-card { margin-top: 12px; padding: 30px 24px 24px; min-height: 320px; }
.question-step { display: none; animation: slideIn .35s ease; }
.question-step.active { display: block; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.question-number { margin: 0 0 8px; color: var(--primary); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
.question-step h2 { margin: 0; font-size: 24px; font-weight: 500; }
.question-help { margin: 9px 0 26px; color: var(--muted); font-size: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice-card { min-height: 112px; position: relative; display: flex; align-items: center; gap: 13px; padding: 18px; border: 1px solid #dadde6; border-radius: 13px; background: #fff; cursor: pointer; transition: .2s ease; }
.choice-card:hover { border-color: #b5a9f7; transform: translateY(-2px); }
.choice-card:has(input:checked) { border-color: var(--primary); background: #f5f2ff; box-shadow: 0 0 0 3px rgba(108,76,241,.11); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #eeeaff; color: var(--primary); font-size: 23px; }
.radio-ui { width: 18px; height: 18px; margin-left: auto; border: 2px solid #b6bac6; border-radius: 50%; }
.choice-card input:checked ~ .radio-ui { border: 5px solid var(--primary); }
.question-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
.question-actions.end-only { justify-content: flex-end; }
.compact { min-width: 120px; }
.age-field { display: block; max-width: 100%; }
.age-field input { height: 58px; font-size: 16px; }
.field-error { min-height: 20px; margin: 8px 0 0; color: var(--danger); font-size: 13px; }
.input-error { border-color: var(--danger) !important; box-shadow: 0 0 0 4px rgba(189,37,56,.1) !important; }
.onboarding-alert { max-width: 1030px; margin: 12px auto 0; }
.app-footer { height: 46px; display: grid; place-items: center; background: #fff; color: #555b68; border-top: 1px solid #e1e3e9; font-size: 13px; }

.dashboard-page { background: #f5f6fb; }
.dashboard-header { height: 72px; display: flex; align-items: center; padding: 0 clamp(22px, 5vw, 70px); background: #fff; border-bottom: 1px solid #e1e3eb; }
.dashboard-header .secondary-btn { margin-left: auto; }
.secondary-btn.mini { min-height: 40px; padding: 0 17px; }
.dashboard-main { max-width: 1100px; margin: 0 auto; padding: 70px 24px; }
.dashboard-hero { padding: clamp(28px, 5vw, 54px); border-radius: 24px; color: #fff; background: linear-gradient(135deg, #34248c, #6c4cf1 60%, #9a84ff); box-shadow: 0 25px 50px rgba(80,57,184,.24); }
.dashboard-hero .eyebrow { color: #ded7ff; }
.dashboard-hero h1 { margin: 0; font-size: clamp(36px, 6vw, 60px); letter-spacing: -.05em; }
.dashboard-hero p { max-width: 620px; margin: 14px 0 0; color: #e7e2ff; font-size: 16px; line-height: 1.7; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.summary-card { min-height: 130px; padding: 22px; border: 1px solid #e4e6ed; border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(24,29,48,.06); }
.summary-card span { display: block; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.summary-card strong { word-break: break-word; font-size: 18px; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .mobile-brand { display: flex; }
    .auth-panel { min-height: 100vh; }
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .content-area { padding: 28px 16px 60px; }
    .choice-grid, .summary-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .auth-panel { padding: 30px 18px; }
    .auth-card h2 { font-size: 30px; }
    .topbar { padding: 0 12px; }
    .topbar-user { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .welcome-card { align-items: flex-start; gap: 16px; }
    .welcome-card h1 { font-size: 29px; }
    .welcome-card p { font-size: 14px; line-height: 1.55; }
    .progress-ring { width: 54px; height: 54px; }
    .progress-ring::after { width: 42px; height: 42px; }
    .question-card { padding: 24px 18px; }
    .choice-grid, .summary-grid { grid-template-columns: 1fr; }
    .choice-card { min-height: 82px; }
    .question-actions { flex-direction: column-reverse; }
    .question-actions button { width: 100%; }
}
.question-code { display:flex; justify-content:space-between; gap:12px; margin:0 0 5px; color:#4e145f; font-weight:700; font-size:14px; text-transform:uppercase; }
.question-code span { color:#999; font-size:12px; font-weight:400; text-transform:none; }
.employment-search { position:relative; margin:8px 0 20px; border-bottom:1px solid #5c176a; }
.employment-search input { width:100%; height:48px; padding:0 42px 0 0; border:0; outline:0; font:inherit; font-size:16px; }
.employment-search span { position:absolute; right:5px; top:11px; color:#5c176a; font-size:24px; }
.select-all-row, .employment-option { display:flex; align-items:center; gap:12px; cursor:pointer; }
.select-all-row { min-height:54px; padding:8px 12px; border-bottom:1px solid #d9d9d9; font-size:14px; }
.employment-list { max-height:330px; overflow-y:auto; padding:4px 5px 4px 12px; scrollbar-width:thin; }
.employment-option { min-height:48px; color:#403746; font-size:14px; }
.employment-option input, .select-all-row input { width:17px; height:17px; accent-color:#5c176a; flex:0 0 auto; }
.employment-option[hidden] { display:none; }
@media (max-width:600px){ .question-code{font-size:12px}.employment-list{max-height:300px} }
