:root {
  --bg: #0B0A08; --bg2: #110F0C; --surface: #17150F; --surface2: #1F1C15; --surface3: #28241B;
  --line: #2D2920; --line2: #3F392B;
  --gold: #D4AF5A; --gold2: #E8C877; --gold-deep: #9C7C33; --gold-ink: #1A1508; --gold-wash: #2A2415;
  --text: #F4EEE1; --muted: #B6AE9B; --dim: #8E8776;
  --ok: #7ED3A1; --ok-bg: #16281D; --warn: #F0C75E; --warn-bg: #2E2612; --bad: #F08C7C; --bad-bg: #2E1714; --info: #8EB8F2; --info-bg: #15202F;
  --r: 16px; --r-sm: 12px;
  --font: 'Tajawal', 'Noto Sans Arabic', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
html[lang="ur"] body { line-height: 1.8; }
a { color: var(--gold); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.ic { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 560px) { body { background: #070605; } #app { border-inline: 1px solid var(--line); } }

/* ---------- boot ---------- */
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot img { width: 120px; animation: breathe 1.6s ease-in-out infinite; }
.boot-err { min-height: 80dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: var(--muted); }
@keyframes breathe { 0%,100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11,10,8,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; max-width: 1200px; margin: 0 auto; }
.top-nav, .desk, .foot { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: 1; min-width: 0; }
.brand img { width: 50px; height: 38px; object-fit: contain; }
.brand span { display: flex; flex-direction: column; min-width: 0; }
.brand strong { color: var(--gold); font-size: 19px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line2); background: var(--surface); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lang { display: flex; background: var(--surface); border: 1px solid var(--line2); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 9px; border-radius: 999px; min-height: 32px; }
.lang button.on { background: var(--gold); color: var(--gold-ink); }

/* ---------- layout ---------- */
.page { padding: 16px 16px 110px; }
.sec { font-size: 19px; font-weight: 800; margin: 28px 2px 12px; }
.sec.sm { font-size: 15px; margin: 20px 0 10px; color: var(--muted); font-weight: 700; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.empty { color: var(--dim); background: var(--surface); border: 1px dashed var(--line2); border-radius: var(--r); padding: 18px; text-align: center; font-size: 14px; margin: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent; font-weight: 700; font-size: 15px; white-space: nowrap; transition: transform .12s ease, background .15s ease, border-color .15s; }
.btn:active { transform: scale(.98); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold2); }
.btn-ghost { background: transparent; border-color: var(--gold-deep); color: var(--gold); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-soft { background: var(--gold-wash); color: var(--gold2); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 58px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; }
.link { background: none; border: 0; color: var(--gold); font-weight: 700; font-size: 14px; padding: 8px; }
.chip { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.actions { margin-top: 20px; }
.actions.two { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 22px 0 12px; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; margin-top: 6px; padding: 24px 20px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line2); }
.hero-mark { position: absolute; inset-inline-end: -30px; top: -14px; width: 190px; opacity: .10; pointer-events: none; }
html[dir="rtl"] .hero-mark { transform: scaleX(1); }
.hero h1 { position: relative; margin: 0 0 8px; font-size: 27px; line-height: 1.35; font-weight: 800; max-width: 17ch; }
.hero p { position: relative; margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.hero-cta { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trust { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trust li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.4; }
.trust li .ic { color: var(--gold); }

.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.svc { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .12s; }
.svc:hover { border-color: var(--gold-deep); }
.svc:active { transform: scale(.98); }
.svc-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--gold-wash); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.svc-ic.sm { width: 42px; height: 42px; margin: 0; }
.svc strong { font-size: 15px; font-weight: 800; line-height: 1.35; }
.svc small { color: var(--muted); font-size: 12px; line-height: 1.5; flex: 1; }
.svc em { font-style: normal; display: inline-flex; align-items: center; gap: 4px; color: var(--gold2); font-size: 12px; font-weight: 600; }

.renew { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 6px 0 10px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid #5B4A1C; }
.renew.urgent { background: var(--bad-bg); border-color: #6A2E26; }
.renew-ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(240,199,94,.14); color: var(--warn); display: flex; align-items: center; justify-content: center; flex-shrink: 0; animation: ring 2.4s ease-in-out infinite; }
.renew.urgent .renew-ic { color: var(--bad); background: rgba(240,140,124,.14); }
.renew-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.renew-body strong { font-size: 14px; }
.renew-body span { font-size: 12px; color: var(--muted); }
@keyframes ring { 0%,90%,100% { transform: rotate(0); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(12deg); } }

.req-list { display: flex; flex-direction: column; gap: 8px; }
.req { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.req-main { display: flex; flex-direction: column; min-width: 0; }
.req-main strong { font-size: 15px; }
.req-main small { color: var(--muted); font-size: 12px; text-align: start; }

.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface3); color: var(--muted); white-space: nowrap; }
.badge.lg { font-size: 13px; padding: 6px 14px; }
.st-new { background: var(--info-bg); color: var(--info); }
.st-review { background: var(--gold-wash); color: var(--gold2); }
.st-missing { background: var(--bad-bg); color: var(--bad); }
.st-in_progress { background: var(--warn-bg); color: var(--warn); }
.st-completed { background: var(--ok-bg); color: var(--ok); }
.st-cancelled { background: var(--surface3); color: var(--dim); }

.contact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.contact a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 600; }
.contact a .ic { color: var(--gold); }
.addr { color: var(--dim); font-size: 13px; text-align: center; margin: 12px 0 0; }
.install { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--gold-deep); font-size: 14px; }
.install span { display: flex; align-items: center; gap: 8px; }

.bnav { position: fixed; bottom: 0; inset-inline: 0; max-width: 520px; margin: 0 auto; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(17,15,12,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.bnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; min-height: 52px; color: var(--dim); font-size: 11px; font-weight: 700; border-radius: 12px; }
.bnav a.on { color: var(--gold); }

/* ---------- wizard ---------- */
.wiz-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.wiz-head h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.wiz-head small { color: var(--muted); font-size: 13px; }
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stepper li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--dim); font-weight: 700; }
.stepper i { height: 4px; border-radius: 2px; background: var(--line2); transition: background .3s; }
.stepper li.on { color: var(--gold); }
.stepper li.on i { background: var(--gold); }

.scan-card { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 16px; margin-bottom: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--gold-deep); position: relative; overflow: hidden; }
.scan-card::after { content: ''; position: absolute; inset-inline: 0; height: 2px; top: 0; background: var(--gold); opacity: .8; animation: scanline 2.8s ease-in-out infinite; }
@keyframes scanline { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .8; } 85% { opacity: .8; } 100% { transform: translateY(170px); opacity: 0; } }
.scan-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--gold-wash); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.scan-card strong { display: block; font-size: 15px; line-height: 1.45; }
.scan-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.scan-card .btn { grid-column: 1 / -1; }
.scan-msg { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.scan-msg.ok { background: var(--ok-bg); color: var(--ok); }
.scan-msg.warn { background: var(--warn-bg); color: var(--warn); }
.scan-msg.bad { background: var(--bad-bg); color: var(--bad); }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: #D3CBB8; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font-size: 16px; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,90,.18); }
input[dir="ltr"] { text-align: start; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }
input::placeholder, textarea::placeholder { color: #7D7666; }
input[type="date"] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; margin: 4px 0 0; min-height: 1px; }
.err:empty { display: none; }
.hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; margin: 14px 2px; }
.hint .ic { color: var(--gold); margin-top: 2px; }
.hint.center { justify-content: center; text-align: center; }

.count { font-size: 13px; font-weight: 700; color: var(--warn); }
.count.done { color: var(--ok); }
.docs { display: flex; flex-direction: column; gap: 10px; }
.doc { padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line2); transition: border-color .2s; }
.doc.has { border: 1px solid var(--gold-deep); }
.doc-row { display: flex; align-items: center; gap: 12px; }
.doc-thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--gold-wash); color: var(--gold); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.doc-main strong { font-size: 15px; line-height: 1.4; }
.doc-main strong em { font-style: normal; font-size: 11px; color: var(--dim); font-weight: 600; border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; margin-inline-start: 4px; }
.doc-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.doc-exp { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.doc-exp label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #D3CBB8; flex-wrap: wrap; }
.doc-exp label .ic { color: var(--gold); }
.doc-exp label small { color: var(--dim); font-size: 11px; width: 100%; }
.doc-exp input { min-height: 42px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font-size: 14px; max-width: 170px; }

.card { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-h h2 { margin: 0; font-size: 17px; }
.h-card { margin: 0; font-size: 22px; font-weight: 800; }
.card-sub { color: var(--muted); font-size: 13px; margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.kv { margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; background: var(--surface3); font-size: 12px; }
.tag .ic { color: var(--ok); }

.choice { display: flex; flex-direction: column; gap: 10px; }
.opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); text-align: start; }
.opt.on { border-color: var(--gold); }
.opt-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--gold-wash); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.opt-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-t strong { font-size: 16px; }
.opt-t small { color: var(--muted); font-size: 12px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex-shrink: 0; transition: border .15s; }
.opt.on .radio { border: 7px solid var(--gold); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 2px 0; font-size: 14px; color: #D3CBB8; line-height: 1.6; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); flex-shrink: 0; }

/* ---------- overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8,7,5,.9); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.overlay p { margin: 0; font-size: 17px; font-weight: 700; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--line2); border-top-color: var(--gold); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { width: min(280px, 80%); height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); transition: width .3s; }

/* ---------- done ---------- */
.page.done { text-align: center; padding-top: 36px; }
.done-mark { width: 104px; height: 104px; margin: 0 auto 16px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h1 { margin: 0 0 8px; font-size: 28px; color: var(--gold); font-weight: 800; }
.done > p { margin: 0 auto; color: var(--muted); max-width: 36ch; }
.code-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); }
html[dir="rtl"] .code-pill { padding: 8px 16px 8px 8px; }
.code-pill span { color: var(--muted); font-size: 14px; }
.code-pill strong { font-size: 20px; color: var(--gold2); letter-spacing: .5px; }
.done .actions.two { grid-template-columns: 1fr 1fr; }

/* ---------- track ---------- */
.track .svc-line { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
.fee { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; font-size: 14px; }
.timeline { list-style: none; margin: 0 0 18px; padding: 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); background: var(--bg); flex-shrink: 0; display: flex; align-items: center; justify-content: center; z-index: 1; }
.timeline li.done i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.timeline li.done::before { background: var(--gold-deep); }
.timeline li.now i { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(212,175,90,.18); animation: pulse 1.8s ease-in-out infinite; }
.timeline li.warn.now i { border-color: var(--bad); box-shadow: 0 0 0 5px rgba(240,140,124,.18); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(212,175,90,0); } }
.timeline div { display: flex; flex-direction: column; }
.timeline strong { font-size: 15px; }
.timeline li:not(.done):not(.now) strong { color: var(--dim); font-weight: 500; }
.timeline small { color: var(--muted); font-size: 12px; }
.exp-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.exp-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); font-size: 14px; }
.exp-list .warn { color: var(--warn); font-weight: 700; }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 14px; inset-inline: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 440px; padding: 12px 16px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line2); color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; transform: translateY(-8px); transition: all .25s; }
.toast.in { opacity: 1; transform: none; }
.toast-ok { border-color: var(--gold-deep); }
.toast-bad { border-color: #6A2E26; color: var(--bad); }

@media (max-width: 420px) {
  .top-in { gap: 8px; padding: 10px 12px; }
  .brand img { width: 42px; height: 32px; }
  .brand strong { font-size: 17px; }
  .lang button { padding: 6px 8px; font-size: 11px; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 23px; }
  .hero-cta { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .lang button { padding: 6px 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* ---------- EID scan & extra documents ---------- */
.scan-mini { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--gold-deep); background: transparent; color: var(--gold); text-align: start; }
.scan-mini span { display: flex; flex-direction: column; }
.scan-mini strong { font-size: 14px; color: var(--text); }
.scan-mini small { font-size: 12px; color: var(--muted); }
.doc .scan-msg { margin: 8px 0 0; }
.missing-box { margin: 16px 0 4px; padding: 16px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 10px; }
.missing-box.urgent { background: var(--bad-bg); border-color: #6A2E26; }
.missing-box h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.missing-box.urgent h2 { color: var(--bad); }
.missing-box p { margin: 0; font-size: 14px; }
.missing-note { padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25); line-height: 1.7; }
.missing-box .doc-actions { margin-top: 0; }
.missing-box.busy { opacity: .6; pointer-events: none; }
.extra-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.extra-files li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--surface); font-size: 13px; }
.extra-files li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.extra-files .chip { width: 30px; height: 30px; }

/* ================= desktop ================= */
@media (min-width: 980px) {
  body { background: var(--bg); }
  #app { max-width: none; border: 0; }
  .bnav { display: none; }
  .page { max-width: 1200px; margin: 0 auto; padding: 28px 32px 60px; }
  .top-in { padding: 14px 32px; gap: 28px; }
  .brand { flex: 0 0 auto; }
  .brand strong { font-size: 22px; }
  .brand img { width: 60px; height: 44px; }
  .top-nav { display: flex; align-items: center; gap: 6px; flex: 1; }
  .top-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 15px; }
  .top-nav a:hover { color: var(--text); background: var(--surface); }
  .top-nav a.on { color: var(--gold); }
  .top-nav a:nth-child(3) { margin-inline-start: auto; }
  .lang button { padding: 7px 12px; font-size: 13px; }

  .desk { display: block; }
  .hero-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
  .hero { padding: 48px 44px 40px; border-radius: 28px; display: flex; flex-direction: column; justify-content: center; margin-top: 0; }
  .hero h1 { font-size: 46px; line-height: 1.25; max-width: 14ch; }
  .hero p { font-size: 18px; max-width: 46ch; margin-bottom: 28px; }
  .hero-cta { grid-template-columns: auto auto; justify-content: start; }
  .hero-cta .btn { min-height: 54px; padding: 0 26px; font-size: 16px; }
  .hero-mark { width: 360px; inset-inline-end: -40px; top: auto; bottom: -40px; opacity: .08; }
  .how { padding: 32px 28px; border-radius: 28px; background: var(--bg2); border: 1px solid var(--line); }
  .how h2 { margin: 0 0 20px; font-size: 20px; font-weight: 800; }
  .how ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
  .how li { display: flex; gap: 14px; align-items: flex-start; }
  .how b { width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .how span { display: flex; flex-direction: column; gap: 2px; }
  .how strong { font-size: 16px; }
  .how small { color: var(--muted); font-size: 14px; }
  .trust { margin-top: 20px; gap: 14px; }
  .trust li { flex-direction: row; justify-content: center; gap: 10px; padding: 18px; font-size: 15px; }
  .sec { font-size: 24px; margin: 44px 2px 16px; }
  .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .svc { padding: 22px; gap: 8px; border-radius: 20px; transition: border-color .15s, transform .15s; }
  .svc:hover { transform: translateY(-2px); }
  .svc strong { font-size: 18px; }
  .svc small { font-size: 14px; }
  .svc-ic { width: 52px; height: 52px; border-radius: 15px; }
  .home-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
  .renew { max-width: 1200px; }

  /* wizard */
  .wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .wiz-main { min-width: 0; max-width: 720px; }
  .wiz-head h1 { font-size: 30px; }
  .wiz-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
  .side-card { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
  .side-card h2 { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
  .side-card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
  .side-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  .side-docs li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
  .side-docs i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .side-docs li.ok { color: var(--text); }
  .side-docs li.ok i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
  .side-docs em { font-style: normal; font-size: 11px; color: var(--dim); }
  .side-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px !important; }
  .side-note .ic { color: var(--gold); margin-top: 2px; }
  .docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row2 { gap: 14px; }
  .actions.two { max-width: 480px; }
  .scan-card { grid-template-columns: auto 1fr auto; }
  .scan-card .btn { grid-column: auto; }
  .choice { flex-direction: row; }
  .choice .opt { flex: 1; }

  /* done & track */
  .page.done { max-width: 620px; padding-top: 64px; }
  .track-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
  .track-page:not(:has(.track-side)) { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .track-side .sec { margin-top: 0; }

  /* footer */
  .foot { display: block; border-top: 1px solid var(--line); background: var(--bg2); margin-top: 40px; }
  .foot-in { max-width: 1200px; margin: 0 auto; padding: 28px 32px; display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: center; }
  .foot-brand { display: flex; align-items: center; gap: 10px; }
  .foot-brand img { width: 46px; height: 34px; object-fit: contain; }
  .foot-brand span { display: flex; flex-direction: column; }
  .foot-brand strong { color: var(--gold); font-size: 17px; }
  .foot-brand small { color: var(--dim); font-size: 12px; }
  .foot-info { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; color: var(--muted); font-size: 14px; }
  .foot-info span { display: inline-flex; align-items: center; gap: 6px; }
  .foot-info .ic { color: var(--gold); }
  .foot-copy { grid-column: 1 / -1; color: var(--dim); font-size: 12px; }
}
@media (min-width: 1240px) { .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* service browser: search + category chips */
.svc-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.svc-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line2); border-radius: 999px; padding: 0 16px; color: var(--muted); }
.svc-search:focus-within { border-color: var(--gold); }
.svc-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; padding: 12px 0; }
.svc-search input::placeholder { color: var(--dim); }
.svc-search input::-webkit-search-cancel-button { filter: invert(.7); }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 4px; scroll-padding-inline: 16px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.cat-chip b { font-size: 11px; font-weight: 700; background: var(--surface3); color: var(--muted); border-radius: 999px; padding: 1px 7px; }
.cat-chip:hover { border-color: var(--gold-deep); color: var(--text); }
.cat-chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.cat-chip.on b { background: rgba(0,0,0,.14); color: var(--gold-ink); }
.svc-empty { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; }
@media (min-width: 980px) {
  .svc-tools { flex-direction: row; align-items: center; gap: 16px; margin-bottom: 18px; }
  .svc-search { width: 340px; flex-shrink: 0; }
  .cat-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
}

/* ======================= wizard stepper ======================= */
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: flex; align-items: flex-start; }
.steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.steps li::before { content: ''; position: absolute; top: 16px; inset-inline-end: calc(50% + 20px); inset-inline-start: calc(-50% + 20px); height: 2px; border-radius: 1px; background: var(--line2); }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--gold); }
.st-dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; border: 2px solid var(--line2); color: var(--dim); background: var(--bg); position: relative; z-index: 1; transition: all .3s; }
.steps li.done .st-dot { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.steps li.now .st-dot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 5px rgba(212,175,90,.16); animation: stepIn .4s cubic-bezier(.2,.9,.3,1.3); }
@keyframes stepIn { from { transform: scale(.6); } to { transform: scale(1); } }
.st-l { font-size: 12.5px; font-weight: 700; color: var(--dim); }
.steps li.now .st-l { color: var(--gold2); }
.steps li.done .st-l { color: var(--muted); }
.wiz-main > .form, .wiz-main > .docs, .wiz-main > section, .wiz-main > .card { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ======================= who is this for ======================= */
.who-for { margin-bottom: 16px; }
.who-for h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.people { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 4px; }
.people::-webkit-scrollbar { display: none; }
.person { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 9px; padding: 8px 12px 8px 30px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font: inherit; text-align: start; max-width: 230px; }
html[dir="rtl"] .person { padding: 8px 12px 8px 30px; }
html[dir="ltr"] .person { padding: 8px 30px 8px 12px; }
.person.new { padding: 8px 14px; border-style: dashed; }
.person.on { border-color: var(--gold); background: var(--gold-wash); box-shadow: 0 0 0 1px var(--gold) inset; }
.p-av { width: 32px; height: 32px; border-radius: 10px; background: var(--surface3); color: var(--gold2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.person.on .p-av { background: var(--gold); color: var(--gold-ink); }
.p-t { display: flex; flex-direction: column; min-width: 0; }
.p-t b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-t small { font-size: 11.5px; color: var(--muted); }
.p-x { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.p-x:hover { color: var(--bad); background: var(--bad-bg); }
.p-note { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; color: var(--dim); }

/* ======================= photo guidance + quality ======================= */
.guide { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg2); }
.guide svg { flex-shrink: 0; }
.guide p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.q-ok { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--ok); font-weight: 600; }
.q-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13px; line-height: 1.6; }
.q-warn > span { flex: 1 1 160px; }
.q-warn .btn { flex-shrink: 0; }
.doc.has:has(.q-warn) { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* ======================= done screen ======================= */
.page.done { position: relative; }
.confetti { position: absolute; inset: 0 0 auto; height: 320px; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; background: var(--c); opacity: 0; transform: rotate(var(--r)) scale(var(--s)); animation: fall 1.9s cubic-bezier(.25,.6,.4,1) var(--d) forwards; }
.confetti i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(var(--r)) scale(var(--s)); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(300px) rotate(calc(var(--r) + 540deg)) scale(var(--s)); } }
.done-mark { animation: pop .5s cubic-bezier(.2,.9,.3,1.4) both; background: var(--gold-wash); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-mark .tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tick .45s .35s ease-out forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.done-card { margin: 22px auto 16px; max-width: 520px; text-align: start; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line2); animation: fadeUp .4s .3s ease both; }
.done-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--muted); }
.done-card dl { margin: 0; display: grid; gap: 8px; }
.done-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.done-card dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.done-card dt .ic { color: var(--gold); }
.done-card dd { margin: 0; font-weight: 700; font-size: 14px; }
.next-step { display: flex; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--gold-wash); color: var(--text); font-size: 13.5px; line-height: 1.7; }
.next-step .ic { color: var(--gold); margin-top: 3px; }
.next-step b { display: block; color: var(--gold2); }

/* ======================= tracking ======================= */
.eta-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.eta-box > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.eta-box > div > .ic { color: var(--gold); margin-top: 2px; }
.eta-box span { display: flex; flex-direction: column; }
.eta-box small { font-size: 12px; color: var(--muted); }
.eta-box b { font-size: 15px; }
.eta-box em { font-style: normal; font-size: 12px; color: var(--dim); }
.eta-box .late { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.late-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }
.contact-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 8px; }
