/* Aqlmetr — "o'lchov asbobi" uslubi: millimetrli qog'oz, chizg'ich shkalasi, elektr ko'k aksent */
:root {
  --bg: #f4f6fa; --grid: #e4e8f0; --surface: #ffffff; --surface-2: #eef2f8;
  --ink: #111a2e; --muted: #5a6680; --line: #d6dce8;
  --accent: #2b59e8; --accent-ink: #ffffff; --accent-soft: #e2e9fd;
  --ok: #1d8a4e; --ok-soft: #e1f3e8; --bad: #c33a31; --bad-soft: #fbe5e3; --warn: #b5781c; --warn-soft: #fbf0dc;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1320; --grid: #172034; --surface: #141c2d; --surface-2: #1a2438;
    --ink: #e7ecf5; --muted: #95a2bb; --line: #28344d;
    --accent: #6f93ff; --accent-ink: #0d1320; --accent-soft: #1c2950;
    --ok: #4ec386; --ok-soft: #12301f; --bad: #ff7d73; --bad-soft: #3a1b1a; --warn: #e3ab4f; --warn-soft: #3a2c12;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; line-height: 1.18; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.85rem); }
h3 { font-size: 1.02rem; }
p { margin: 0; max-width: 65ch; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 720px; }
.eyebrow { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.logo-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--ink); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 7px 5px 6px; background:
  linear-gradient(var(--accent),var(--accent)) 0 100%/3px 40% no-repeat,
  linear-gradient(var(--accent),var(--accent)) 33% 100%/3px 70% no-repeat,
  linear-gradient(var(--accent),var(--accent)) 66% 100%/3px 100% no-repeat,
  linear-gradient(var(--accent),var(--accent)) 100% 100%/3px 55% no-repeat; }
.nav { display: flex; gap: 18px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.on { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.lang button { background: none; border: 0; padding: 5px 9px; font: 600 .78rem var(--body); color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .nav { display: none; } .top-in { justify-content: space-between; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .98rem var(--body); padding: 12px 20px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-tight { padding: 18px; gap: 10px; }

main { flex: 1; padding-block: 36px 64px; outline: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero-copy p { font-size: 1.08rem; color: var(--muted); }
.hero-meta { font-size: .88rem; color: var(--muted); font-family: var(--mono); }
.specimen { background: var(--ink); color: #e9eefb; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 18px 40px -22px rgba(17,26,46,.55); min-width: 0; }
.specimen .eyebrow { color: #93a3c6; }
.specimen-seq { font-family: var(--mono); font-size: clamp(1.25rem, 3vw, 1.6rem); letter-spacing: .03em; }
.specimen-seq b { color: #8fabff; animation: blink 1.4s steps(2) infinite; }
.specimen-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.specimen-opts span { border: 1px solid #33415f; border-radius: 7px; padding: 8px; text-align: center; font-family: var(--mono); }
.specimen-opts span.hit { border-color: #8fabff; background: #1f2d52; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .specimen-seq b { animation: none; } * { transition: none !important; } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* Scale (ruler) */
.scale { position: relative; padding-top: 30px; }
.scale-bar { display: grid; grid-template-columns: 10fr 10fr 20fr 10fr 10fr 15fr; height: 12px; border-radius: 6px; overflow: hidden; }
.scale-bar i:nth-child(1) { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.scale-bar i:nth-child(2) { background: color-mix(in srgb, var(--accent) 26%, var(--surface-2)); }
.scale-bar i:nth-child(3) { background: color-mix(in srgb, var(--accent) 40%, var(--surface-2)); }
.scale-bar i:nth-child(4) { background: color-mix(in srgb, var(--accent) 58%, var(--surface-2)); }
.scale-bar i:nth-child(5) { background: color-mix(in srgb, var(--accent) 76%, var(--surface-2)); }
.scale-bar i:nth-child(6) { background: var(--accent); }
.scale-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 6px; }
.scale-mark { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--mono); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.scale-mark::after { content: ""; width: 2px; height: 20px; background: var(--ink); }
.scale-range { position: absolute; top: 28px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; }
.specimen .scale-ticks { color: #93a3c6; }

/* Sections */
.section { margin-top: 72px; display: flex; flex-direction: column; gap: 24px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border-top: 2px solid var(--ink); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.step-n { font-family: var(--mono); color: var(--accent); font-size: .85rem; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-ico { flex: 0 0 38px; height: 38px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-weight: 600; }
.feature div { min-width: 0; }
@media (max-width: 720px) { .steps, .features { grid-template-columns: 1fr; } }

.price { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.price-main { padding: 28px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); }
.price-num { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1; }
.price-num small { font-size: 1rem; font-family: var(--body); color: var(--muted); margin-left: 6px; }
.price-list { padding: 28px; display: flex; flex-direction: column; gap: 10px; margin: 0; list-style: none; }
.price-list li { display: flex; gap: 10px; }
.price-list li::before { content: "✓"; color: var(--ok); font-weight: 700; }
@media (max-width: 720px) { .price { grid-template-columns: 1fr; } .price-main { border-right: 0; border-bottom: 1px solid var(--line); } }

details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-top: 8px; color: var(--muted); }

.note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--warn); padding: 2px 0 2px 12px; }

/* Test runner */
.runner { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; }
.runner-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.runner-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timer { font-family: var(--mono); font-size: 1.15rem; padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); border-color: var(--bad); }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 4px; }
.q-text { font-size: 1.14rem; font-weight: 500; }
.q-seq { font-family: var(--mono); font-size: clamp(1.15rem, 3.2vw, 1.5rem); letter-spacing: .03em; overflow-x: auto; font-variant-numeric: tabular-nums; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; font: 500 1rem var(--body); cursor: pointer; min-width: 0; }
.opt:hover { border-color: var(--accent); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt kbd { font-family: var(--mono); font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.opt span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .opts { grid-template-columns: 1fr; } }
.runner-nav { display: flex; justify-content: space-between; gap: 10px; }
.qmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qmap button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: 500 .78rem var(--mono); cursor: pointer; }
.qmap button.ans { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.qmap button.cur { border-color: var(--ink); color: var(--ink); }
@media (max-width: 860px) { .runner { grid-template-columns: 1fr; } .runner-side { order: 2; } .qmap { grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); } }
.dots { display: grid; grid-template-columns: repeat(3, 62px); gap: 6px; }
.dots .cell { width: 62px; height: 62px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; padding: 7px; background: var(--surface); }
.dots .cell i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.dots .cell.qm { font-family: var(--display); color: var(--accent); font-size: 1.3rem; border-style: dashed; }

/* Kognitiv bo'limlar: matritsa, polimino, xotira, tezlik */
.fmatrix { display: grid; grid-template-columns: repeat(3, 76px); gap: 6px; }
.fmatrix .cell { width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--ink); }
.fmatrix .cell.qm { font-family: var(--display); color: var(--accent); font-size: 1.5rem; border-style: dashed; }
.fig { display: block; color: var(--ink); }
.poly rect { fill: var(--accent); stroke: var(--surface); stroke-width: 1; }
.poly-src { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; align-self: flex-start; }
.opts-fig .opt { justify-content: flex-start; min-height: 84px; }
.opts-fig .opt span { display: grid; place-items: center; flex: 1; }
.opts.locked .opt { opacity: .55; cursor: not-allowed; }
.flash { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; padding: 18px; }
.flash p { margin: 0; }
.flash-item { font-family: var(--mono); font-size: clamp(3rem, 14vw, 4.5rem); font-weight: 500; min-height: 1.2em; line-height: 1.2; color: var(--muted); }
.flash-item.on { color: var(--accent); }
.code-key { display: flex; flex-direction: column; gap: 6px; }
.code-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.code-grid div { display: flex; flex-direction: column; align-items: center; min-width: 44px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.code-grid b { font-size: 1.25rem; padding: 4px 0; line-height: 1.2; }
.code-grid span { font-family: var(--mono); background: var(--surface-2); width: 100%; text-align: center; padding: 2px 0; font-weight: 600; }
.code-ask { font-size: clamp(1.6rem, 6vw, 2.1rem); letter-spacing: .25em; }
.qtimer { font-family: var(--mono); font-weight: 600; color: var(--accent); min-height: 1.4em; }
.qtimer.low { color: var(--bad); }
.rv-fig { display: inline-block; }
.rv-ans .fig, .rv-ans .poly { display: inline-block; vertical-align: middle; width: 40px; height: 40px; }
@media (max-width: 520px) { .opts.opts-fig { grid-template-columns: 1fr 1fr; } .opts-fig .opt { min-height: 76px; padding: 10px; } }
@media (max-width: 420px) { .fmatrix { grid-template-columns: repeat(3, 64px); } .fmatrix .cell { width: 64px; height: 64px; } .fmatrix .fig { width: 48px; height: 48px; } }

/* Results */
.res-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
@media (max-width: 760px) { .res-head { grid-template-columns: 1fr; } }
.big { font-family: var(--display); font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kv div { border-top: 2px solid var(--ink); padding-top: 8px; min-width: 0; }
.kv b { display: block; font-family: var(--mono); font-size: 1.15rem; }
.kv span { font-size: .82rem; color: var(--muted); }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr 1fr; } }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar { display: grid; grid-template-columns: 170px 1fr 52px; gap: 12px; align-items: center; font-size: .93rem; }
.bar .track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar > span:last-child { text-align: right; font-family: var(--mono); }
@media (max-width: 520px) { .bar { grid-template-columns: 1fr 52px; } .bar .track { grid-column: 1 / -1; grid-row: 2; } }
.lock { background: var(--ink); color: #e9eefb; border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.lock p { color: #b9c5de; }
.rec { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.rec:first-child { border-top: 0; padding-top: 0; }
.rec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pill { font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.pill.ok, .pill.strong { color: var(--ok); background: var(--ok-soft); }
.pill.bad, .pill.weak { color: var(--bad); background: var(--bad-soft); }
.pill.mid, .pill.empty { color: var(--warn); background: var(--warn-soft); }
.review { display: flex; flex-direction: column; gap: 10px; }
.rv { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; font-size: .92rem; display: flex; flex-direction: column; gap: 4px; }
.rv.ok { border-color: var(--ok); } .rv.bad { border-color: var(--bad); } .rv.empty { border-color: var(--warn); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; font-size: .92rem; }
.field input { font: 1rem var(--body); padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field small { color: var(--muted); }
.err { color: var(--bad); font-size: .9rem; }
.auth { max-width: 420px; margin: 0 auto; }

/* QR to'lov */
.pay-qr { display: block; width: min(260px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pay-detail { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.pay-detail .row { justify-content: space-between; flex-wrap: nowrap; }
.pay-detail b.mono { font-size: 1.05rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.pay-steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.field input[type=file] { padding: 8px; }
.pay-receipt { max-height: 220px; width: auto; align-self: flex-start; border: 1px solid var(--line); border-radius: 8px; }

/* To'lov holati ekranlari: kutilmoqda / tasdiqlandi / rad etildi */
.pay-status { align-items: center; text-align: center; gap: 14px; padding-top: 32px; padding-bottom: 28px; }
.pay-status h2 { margin: 0; }
.pay-status > p { margin: 0; max-width: 46ch; }
.status-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 700; line-height: 1; }
.status-icon.wait { background: var(--accent-soft); color: var(--accent); }
.status-icon.ok { background: var(--ok-soft); color: var(--ok); animation: pop .35s ease-out; }
.status-icon.bad { background: var(--bad-soft); color: var(--bad); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.spinner { width: 1em; height: 1em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .9s linear infinite; flex: none; }
.status-icon .spinner { width: 32px; height: 32px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { list-style: none; margin: 4px 0; padding: 0; width: 100%; max-width: 360px; text-align: left; }
.timeline li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 0 0 14px 30px; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); box-sizing: border-box; }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 21px; bottom: 1px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { border-color: var(--ok); background: var(--ok); }
.timeline li.done::after { background: var(--ok); }
.timeline li.now { color: var(--ink); font-weight: 600; }
.timeline li.now::before { border-color: var(--accent); background: var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }
.timeline time { font-family: var(--mono); font-size: .85rem; color: var(--muted); font-weight: 400; }
.timeline .live { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.status-actions { justify-content: center; }
.reason-box { width: 100%; max-width: 420px; text-align: left; background: var(--bad-soft); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.reason-box b { color: var(--bad); }
.reason-box p { margin: 0; font-size: .92rem; }

/* Kabinetdagi to'lov holati qatori */
.pay-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid; }
.pay-banner > span:nth-child(2) { flex: 1; }
.pay-banner.wait { background: var(--accent-soft); border-color: var(--accent); }
.pay-banner.wait .spinner { color: var(--accent); }
.pay-banner.bad { background: var(--bad-soft); border-color: var(--bad); }
.pay-banner.bad > span:first-child { color: var(--bad); font-weight: 700; }

/* Navigatsiyadagi "kutilmoqda" belgisi */
.nav-cab { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-cab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse-warn 1.6s ease-in-out infinite; }
@keyframes pulse-warn { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Bildirishnoma (boshqa sahifadaligida to'lov natijasi) */
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: transform .25s, opacity .25s;
  z-index: 60; width: min(480px, calc(100% - 32px)); display: flex; align-items: flex-start; gap: 8px; padding: 14px 14px 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(8, 12, 22, .18); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { border-color: var(--ok); } .toast.bad { border-color: var(--bad); }
.toast-body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.toast-body b { flex-basis: 100%; }
.toast-body span { flex-basis: 100%; color: var(--muted); font-size: .92rem; }
.toast-x { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .spinner, .status-icon, .timeline li.now::before, .nav-cab .dot { animation: none; } .toast { transition: none; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }
.stat b { font-family: var(--display); font-size: 1.5rem; display: block; }
.stat span { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.num { font-family: var(--mono); text-align: right; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 70px; }
.spark i { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 3px; opacity: .85; }
.spark i.empty { background: var(--line); }

.mem-digits { font-family: var(--mono); font-size: clamp(2rem, 8vw, 3rem); letter-spacing: .3em; text-align: center; padding: 18px 0; }

.legal { display: flex; flex-direction: column; gap: 14px; }
.legal h2 { margin-top: 8px; font-size: 1.1rem; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(8, 12, 22, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--surface); border-radius: 12px; padding: 24px; max-width: 420px; width: 100%; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left)); display: flex; gap: 16px 24px; flex-wrap: wrap; align-items: center; font-size: .88rem; color: var(--muted); }
.foot-links { display: flex; gap: 16px; }
.foot-links a { color: var(--muted); }
.foot-note { flex-basis: 100%; font-size: .8rem; }
.center { text-align: center; align-items: center; }
th.num { text-align: right; }
