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

:root {
  --brand: #1A2B4A;
  --brand2: #2C4270;
  --accent: #2E7CF6;
  --accent-soft: #EBF2FE;
  --success: #1D9E75;
  --success-soft: #E1F5EE;
  --success-dark: #085041;
  --warn: #BA7517;
  --warn-soft: #FAEEDA;
  --warn-dark: #633806;
  --err: #A32D2D;
  --err-soft: #FCEBEB;
  --err-dark: #501313;
  --surface: #ffffff;
  --surface2: #F8F8F7;
  --border: rgba(0,0,0,.1);
  --border2: rgba(0,0,0,.18);
  --text: #1a1a1a;
  --muted: #555;
  --hint: #888;
  --r: 10px;
}

body { font-family: system-ui, -apple-system, sans-serif; color: var(--text); background: #F0EEE8; }

/* ── Onboarding ─────────────────────────────────── */
.onboard-body { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 2rem 1rem; }
#app { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 2px 20px rgba(0,0,0,.1); overflow: hidden; }

.header { background: var(--brand); padding: 18px 28px; display: flex; align-items: center; gap: 14px; }
.logo-mark { width: 36px; height: 36px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-mark.sm { width: 30px; height: 30px; border-radius: 6px; }
.header-text h1 { font-size: 16px; font-weight: 600; color: #fff; }
.header-text p { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 2px; }

.progress-bar { background: var(--brand2); height: 3px; }
.progress-fill { height: 3px; background: var(--accent); transition: width .4s ease; }

.steps-nav { display: flex; border-bottom: 0.5px solid var(--border); padding: 20px 28px 0; gap: 0; }
.step-tab { flex: 1; text-align: center; padding: 8px 4px 12px; font-size: 11px; font-weight: 500; color: var(--hint); position: relative; }
.step-tab.active { color: var(--accent); }
.step-tab.done { color: var(--success); }
.step-tab.active::after { content: ''; position: absolute; bottom: -0.5px; left: 0; right: 0; height: 2px; background: var(--accent); }
.step-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; margin: 0 auto 4px; background: var(--surface); }
.step-tab.active .step-dot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.step-tab.done .step-dot { border-color: var(--success); background: var(--success-soft); color: var(--success); }

.body { padding: 24px 28px; }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.step-label { font-size: 12px; color: var(--hint); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .field select { height: 38px; padding: 0 12px; border: 0.5px solid var(--border2); border-radius: var(--r); font-size: 13px; background: var(--surface); color: var(--text); font-family: inherit; transition: border-color .15s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,124,246,.1); }
.field .hint { font-size: 11px; color: var(--hint); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field-row.full { grid-template-columns: 1fr; }
.field-row.thirds { grid-template-columns: 1fr 1fr 1fr; }

.sensitive { position: relative; }
.sensitive input { font-family: monospace; letter-spacing: .08em; }
.toggle-vis { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); font-size: 12px; padding: 2px 4px; }

hr.divider { border: none; border-top: 0.5px solid var(--border); margin: 20px 0; }

.info-box { background: var(--accent-soft); border: 0.5px solid #B5D4F4; border-radius: var(--r); padding: 12px 14px; font-size: 12px; color: #0C447C; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.warn-box { background: var(--warn-soft); border: 0.5px solid #FAC775; border-radius: var(--r); padding: 12px 14px; font-size: 12px; color: #633806; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }

.camera-box { background: var(--surface2); border: 1.5px dashed var(--border2); border-radius: var(--r); padding: 28px 20px; text-align: center; margin-bottom: 16px; }
.camera-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 0.5px solid var(--border2); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.camera-idle, .camera-active { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.camera-active { display: none; }

.consent-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.consent-check input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }
.consent-check label { font-size: 12px; color: var(--muted); line-height: 1.5; }

.review-block { background: var(--surface2); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.review-block h3 { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.review-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 0.5px solid var(--border); }
.review-row:last-child { border-bottom: none; }
.review-row .label { color: var(--muted); }
.review-row .val { font-weight: 500; }
.mono { font-family: monospace; letter-spacing: .05em; }

.char-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.char-card { background: var(--surface); border: 0.5px solid var(--border2); border-radius: var(--r); padding: 14px; cursor: pointer; transition: all .12s; }
.char-card:hover, .char-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.char-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.char-card p { font-size: 11px; color: var(--muted); }

.success-screen { text-align: center; padding: 32px 20px; }
.success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); border: 2px solid var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.tech-id { font-family: monospace; background: var(--surface2); border: 0.5px solid var(--border2); border-radius: var(--r); padding: 10px 16px; font-size: 15px; font-weight: 500; letter-spacing: .08em; display: inline-block; margin: 12px 0; }

.footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 0.5px solid var(--border); }

/* ── Buttons ─────────────────────────────────────── */
.btn { height: 38px; padding: 0 20px; border-radius: var(--r); font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: all .12s; display: inline-flex; align-items: center; gap: 6px; border: 0.5px solid var(--border2); background: var(--surface); color: var(--text); }
.btn:hover { background: var(--surface2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #1A63D6; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: transparent; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 12px; }
.btn-approve { background: var(--success-soft); border-color: #5DCAA5; color: var(--success-dark); }
.btn-approve:hover { background: #9FE1CB; }
.btn-reject { background: var(--err-soft); border-color: #F09595; color: var(--err-dark); }
.btn-reject:hover { background: #F7C1C1; }

/* ── Alerts ──────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--r); font-size: 13px; margin-bottom: 14px; }
.alert-warn { background: var(--warn-soft); color: var(--warn-dark); border: 0.5px solid #FAC775; }
.alert-err { background: var(--err-soft); color: var(--err-dark); border: 0.5px solid #F09595; }

/* ── Status badges ───────────────────────────────── */
.s-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 500; }
.s-pending  { background: var(--warn-soft);    color: var(--warn-dark); }
.s-approved { background: var(--success-soft); color: var(--success-dark); }
.s-rejected { background: var(--err-soft);     color: var(--err-dark); }
.dot { width: 6px; height: 6px; border-radius: 50%; }
.dot-amber { background: var(--warn); }
.dot-green { background: var(--success); }
.dot-red   { background: var(--err); }
.dot-blue  { background: var(--accent); }

/* ── Login ───────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 400px; padding: 1rem; }
.login-card { background: var(--surface); border-radius: 14px; padding: 32px 28px; box-shadow: 0 2px 20px rgba(0,0,0,.1); }
