/* ==========================================================================    DXB System — web shell styled 1:1 after the Android app (Compose "Vault" theme).    Order: tokens → fonts/base → utilities → boot/offline/login → shell → primitives    → overlays → screens (robot, chart, rating, admin, connect, results, profile)    → responsive. Dark theme only.    ========================================================================== */  /* ---------- Tokens (ui/theme/Color.kt — object Vault) ---------- */
:root { color-scheme: dark; --bg: #131722; --bg-deep: #0d1117; --bg-outer: #0b0e14; --s1: #1e222d; --s2: #2a2e39; --s3: #363a45; --line: #2a2e39; --line-2: #434651; --text-1: #d1d4dc; --text-2: #b2b5be; --text-3: #787b86; --primary: #2962ff; --primary-hi: #5b8def; --primary-lo: #1e53e5; --primary-wash: rgba(41, 98, 255, 0.12); --primary-edge: rgba(41, 98, 255, 0.4); --brand-gold: #f0b90b; --up: #089981; --up-wash: rgba(8, 153, 129, 0.14); --down: #f23645; --down-wash: rgba(242, 54, 69, 0.14); --warn: #ff9800; --warn-wash: rgba(255, 152, 0, 0.14); --info: #2962ff; --info-wash: rgba(41, 98, 255, 0.12); --muted-wash: #2a2e39; --gold: var(--primary); --gold-wash: var(--primary-wash); --silver: #b2b5be; --bronze: #b8742a; /* chart (read by js/chart/xad-chart.js) */ --chart-bg: #131722; --chart-text: #787b86; --chart-grid: rgba(120, 123, 134, 0.12); --zone-demand: #089981; --zone-supply: #f23645; /* layout */ --col: 520px; --pad: 16px; --tabbar: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --ease: cubic-bezier(0.2, 0.8, 0.2, 1); }

/* ---------- Fonts ---------- */
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg-outer); color: var(--text-1); font-family: var(--font); font-size: 15px; line-height: 1.45; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
img, svg { display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 26px; height: 26px; }
:focus-visible { outline: 2px solid var(--primary-hi); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--primary-wash); }
.noscript { padding: 24px; text-align: center; color: var(--text-2); }

/* ---------- Utilities ---------- */
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 12px; line-height: 17px; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.warn { color: var(--warn) !important; }
.gold, .primary { color: var(--primary-hi) !important; }
.small { font-size: 12px; line-height: 17px; color: var(--text-3); }
.pad { padding: 0 var(--pad); }
.stack > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.body-text { color: var(--text-2); font-size: 13px; line-height: 19px; }
.hint-text { color: var(--text-3); font-size: 12px; line-height: 17px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; flex: none; }
.spinner--lg { width: 22px; height: 22px; border-width: 2.5px; }
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Brand mark ---------- */
.brand-mark { width: 84px; height: 84px; border-radius: 22%; }
.brand-mark--64 { width: 64px; height: 64px; }
.brand-mark--76 { width: 76px; height: 76px; }

/* ---------- Boot / offline ---------- */
.boot, .offline-screen { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; z-index: 5; }
body[data-access='granted'] .boot, body[data-access='locked'] .boot, body[data-access='offline'] .boot { display: none; }
.offline-screen .empty { padding-top: 0; }

/* ---------- Login (LoginScreen) ---------- */
.access { min-height: 100vh; min-height: 100dvh; background: var(--bg); display: flex; justify-content: center; }
.access__inner { width: 100%; max-width: var(--col); padding: calc(72px + var(--safe-t)) 24px 32px; display: flex; flex-direction: column; align-items: center; }
.access__title { margin-top: 16px; font-size: 25px; line-height: 30px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-1); }
.access__sub { font-size: 13px; line-height: 19px; color: var(--text-3); }
.access__lead { margin-top: 16px; width: 100%; font-size: 13px; line-height: 19px; color: var(--warn); text-align: center; }
.access__mode { margin-top: 40px; }
.access__form { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.access__hint { margin: 0; }
.access__error { margin-top: 4px; }
.access__form .btn--primary { margin-top: 8px; }
.access__risk { margin-top: 20px; text-align: center; font-size: 12px; line-height: 17px; color: var(--text-3); }
.access__help { margin-top: 16px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.access__help a { color: var(--primary-hi); }
.access__foot { margin-top: 28px; display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 15px; color: var(--text-3); text-align: left; }
.local-dot { flex: none; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--warn); }

/* ---------- Shell: one phone column, bottom tabs ---------- */
.app { display: flex; flex-direction: column; width: 100%; max-width: var(--col); min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 521px) {
  .app {
    box-shadow: 0 0 0 1px var(--line);
  }
}
.screens { flex: 1; display: flex; flex-direction: column; min-height: 0; outline: none; padding-bottom: calc(var(--tabbar) + var(--safe-b)); }
.view { flex: 1; display: flex; flex-direction: column; min-height: calc(100vh - var(--tabbar) - var(--safe-b)); min-height: calc(100dvh - var(--tabbar) - var(--safe-b)); }
body.has-overlay .screens { display: none; }
body.has-overlay .tabbar { display: none; }
.overlays { flex: 1; display: flex; flex-direction: column; }
.overlay { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.screen-body { flex: 1; display: flex; flex-direction: column; }
.screen-body--pad { padding: 14px var(--pad) 32px; }

/* Bottom tab bar (NavigationBar) */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--col); height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--bg-deep); border-top: 1px solid var(--line); display: flex; align-items: stretch; z-index: 20; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none !important; position: relative; min-width: 0; }
.tab__icon { width: 56px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: background 0.2s var(--ease); }
.tab .icon { width: 22px; height: 22px; }
.tab[aria-current='page'] { color: var(--primary-hi); }
.tab[aria-current='page'] .tab__icon { background: var(--primary-wash); }
.tab[aria-current='page'] .icon { fill: var(--primary-wash); stroke-width: 2; }
.tab__badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }
.tab__badge--late { background: var(--warn); }

/* Top bar (XadTopBar) */
.topbar { display: flex; align-items: center; gap: 4px; min-height: 64px; padding: calc(8px + var(--safe-t)) 8px 8px var(--pad); background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar--back { padding-left: 4px; }
.topbar__titles { flex: 1; min-width: 0; }
.topbar__title { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__sub { font-size: 12px; line-height: 17px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; align-items: center; gap: 2px; }

/* ---------- Primitives ---------- */
.panel { background: var(--s1); border-radius: var(--r-md); padding: 16px; }
.panel--tight { padding: 12px 14px; }
.panel--border-warn { box-shadow: inset 0 0 0 1px rgba(255, 152, 0, 0.5); }
.panel--border-line { box-shadow: inset 0 0 0 1px var(--line); }
.panel--border-gold { box-shadow: inset 0 0 0 1px rgba(240, 185, 11, 0.4); }
.panel--s2 { background: var(--s2); }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-head__title { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.panel-head__sub { font-size: 12px; line-height: 17px; color: var(--text-3); margin-top: 2px; }

.section-title { display: flex; align-items: center; gap: 8px; padding: 18px var(--pad) 6px; }
.section-title__text { flex: 1; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.section-title__trail { display: flex; align-items: center; gap: 6px; }
.eyebrow { display: block; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }

.value-row { display: flex; align-items: center; gap: 12px; padding: 11px var(--pad); position: relative; }
.value-row::after, .list-row::after { content: ''; position: absolute; left: var(--pad); right: 0; bottom: 0; height: 1px; background: var(--line); }
.value-row.no-divider::after, .list-row.no-divider::after { display: none; }
.value-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.value-row__label { font-size: 15px; line-height: 22px; color: var(--text-2); }
.value-row__sub, .list-row__sub { font-size: 12px; line-height: 17px; color: var(--text-3); }
.value-row__value { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text-1); text-align: right; }
.value-row__value.is-bold { font-weight: 700; }

.list-row { display: flex; align-items: center; gap: 4px; width: 100%; padding: 13px var(--pad); text-align: left; color: var(--text-1); position: relative; text-decoration: none !important; min-height: 48px; }
.list-row.has-icon::after { left: 50px; }
button.list-row:not(:disabled):hover, a.list-row:hover { background: rgba(255, 255, 255, 0.02); }
.list-row__icon { width: 20px; height: 20px; color: var(--text-3); margin-right: 10px; }
.list-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row__title { font-size: 15px; line-height: 22px; color: var(--text-1); }
.list-row__sub { margin-top: 1px; }
.list-row__value { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text-1); margin-left: 8px; white-space: nowrap; }
.list-row__chevron { width: 20px; height: 20px; color: var(--text-3); }
.list-row.is-disabled .list-row__title, .list-row.is-disabled .list-row__value { color: var(--text-3); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot--6 { width: 6px; height: 6px; }
.dot--8 { width: 8px; height: 8px; }
.dot--up { background: var(--up); }
.dot--down { background: var(--down); }
.dot--warn { background: var(--warn); }
.dot--gold, .dot--info, .dot--primary { background: var(--primary); }
.dot--pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--r-xs); background: var(--muted-wash); color: var(--text-3); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; max-width: 100%; }
.status-chip__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-chip--up { background: var(--up-wash); color: var(--up); }
.status-chip--down { background: var(--down-wash); color: var(--down); }
.status-chip--warn { background: var(--warn-wash); color: var(--warn); }
.status-chip--gold, .status-chip--info, .status-chip--primary { background: var(--primary-wash); color: var(--primary); }
.status-chip--gold .dot, .status-chip--info .dot { background: var(--primary); }

.tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; background: rgba(120, 123, 134, 0.14); color: var(--text-3); white-space: nowrap; }
.tag--up { background: var(--up-wash); color: var(--up); }
.tag--down { background: var(--down-wash); color: var(--down); }
.tag--warn { background: var(--warn-wash); color: var(--warn); }
.tag--info, .tag--gold, .tag--primary { background: var(--primary-wash); color: var(--primary-hi); }
.tag--brand { background: rgba(240, 185, 11, 0.14); color: var(--brand-gold); }

.initial { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(41, 98, 255, 0.18); color: var(--primary); font-size: 15px; font-weight: 700; flex: none; }
.initial--up { background: rgba(8, 153, 129, 0.18); color: var(--up); }
.initial--34 { width: 34px; height: 34px; font-size: 13px; }
.initial--38 { width: 38px; height: 38px; font-size: 14px; }
.initial--50 { width: 50px; height: 50px; font-size: 20px; }
.initial--52 { width: 52px; height: 52px; font-size: 20px; }

.stat-grid { display: flex; gap: 8px; }
.stat-grid + .stat-grid { margin-top: 8px; }
.stat-tile { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 14px; border-radius: 10px; background: var(--s1); }
.stat-tile--grow { flex: 1.3; }
.stat-tile__label { font-size: 12px; line-height: 17px; color: var(--text-3); }
.stat-tile__value { margin-top: 4px; font-size: 17px; line-height: 22px; font-weight: 700; color: var(--text-1); white-space: nowrap; }
.stat-tile__value.is-long { font-size: 15px; }
.stat-tile__sub { margin-top: 2px; font-size: 12px; line-height: 17px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-wash); color: var(--text-2); font-size: 13px; line-height: 19px; }
.notice__bar { flex: none; width: 3px; min-height: 18px; border-radius: 2px; background: var(--info); align-self: center; }
.notice__body { flex: 1; min-width: 0; }
.notice__body p + p { margin-top: 6px; }
.notice__title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--info); }
.notice--warn { background: var(--warn-wash); }
.notice--warn .notice__bar { background: var(--warn); }
.notice--warn .notice__title { color: var(--warn); }
.notice--down { background: var(--down-wash); }
.notice--down .notice__bar { background: var(--down); }
.notice--down .notice__title { color: var(--down); }
.notice--up { background: var(--up-wash); }
.notice--up .notice__bar { background: var(--up); }
.notice--up .notice__title { color: var(--up); }
.notice--muted { background: var(--s2); }
.notice--muted .notice__bar { background: var(--text-3); }
.notice--muted .notice__title { color: var(--text-1); }
.notice--gold .notice__bar { background: var(--primary); }
.notice--gold .notice__title { color: var(--primary-hi); }
.notice strong { color: var(--text-1); font-weight: 600; }

.error-banner { display: flex; align-items: center; gap: 8px; padding: 8px var(--pad); background: var(--warn-wash); }
.error-banner__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.error-banner__title { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--warn); }
.error-banner__msg { font-size: 12px; line-height: 17px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 10px; font-size: 14px; line-height: 18px; font-weight: 600; letter-spacing: 0.01em; border: 1px solid transparent; transition: background 0.15s, color 0.15s, opacity 0.15s; white-space: nowrap; text-decoration: none !important; }
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--primary); color: #fff; font-weight: 700; min-height: 50px; }
.btn--primary:hover:not(:disabled) { background: var(--primary-lo); }
.btn--primary:disabled { background: var(--s2); color: var(--text-3); }
.btn--ghost { border-color: var(--line-2); color: var(--text-1); }
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.03); }
.btn--ghost:disabled { color: var(--text-3); }
.btn--danger { border-color: rgba(242, 54, 69, 0.6); color: var(--down); }
.btn--danger:hover:not(:disabled) { background: var(--down-wash); }
.btn--danger:disabled { color: var(--text-3); border-color: var(--line-2); }
.btn--solid-danger { background: var(--down); color: #fff; font-weight: 700; }
.btn--solid-danger:disabled { background: var(--s2); color: var(--text-3); }
.btn--link, .btn--text-primary, .btn--text-danger, .btn--text-muted, .btn--text-warn { min-height: 40px; padding: 0 10px; color: var(--primary-hi); border-radius: var(--r-sm); }
.btn--text-primary { color: var(--primary-hi); font-weight: 700; }
.btn--text-danger { color: var(--down); font-weight: 700; }
.btn--text-warn { color: var(--warn); }
.btn--text-muted { color: var(--text-3); }
.btn--link:hover, .btn--text-primary:hover, .btn--text-danger:hover, .btn--text-muted:hover, .btn--text-warn:hover { background: rgba(255, 255, 255, 0.04); }
.btn.is-counting, .btn--text-primary:disabled, .btn--text-danger:disabled { color: var(--text-3); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 52px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--w220 { width: 220px; max-width: 100%; }
.btn .spinner { width: 18px; height: 18px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > .btn { flex: 1; min-width: 0; }
.btn-row--wrap { flex-wrap: wrap; }
.btn-row--wrap > .btn { flex: none; }
.btn-row--primary-wide > .btn--primary { flex: 1.4; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.05); }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn[aria-pressed='true'] { color: var(--primary-hi); }
.icon-btn .icon { width: 22px; height: 22px; }

/* Segmented control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--s1); }
.segmented--block { display: flex; width: 100%; }
.segmented > button { flex: 1; min-width: 0; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.15s, color 0.15s; }
.segmented > button[aria-pressed='true'] { background: var(--primary); color: #fff; }
.segmented--plain > button[aria-pressed='true'] { background: var(--s3); color: var(--text-1); }
.segmented > button:disabled { opacity: 0.5; }

/* Chip row (timeframes) */
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 10px; border-radius: var(--r-xs); font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-3); white-space: nowrap; flex: none; }
.chip[aria-pressed='true'], .chip--active { background: var(--primary-wash); color: var(--primary-hi); }
.chip--count { background: var(--primary-wash); color: var(--primary-hi); font-size: 12px; letter-spacing: 0.04em; }

/* Option pills (brokers, lot presets) */
.pills { display: flex; gap: 8px; }
.pill { flex: 1; min-width: 0; min-height: 40px; padding: 0 8px; border-radius: var(--r-sm); background: var(--s2); color: var(--text-2); font-size: 14px; font-weight: 600; text-align: center; white-space: nowrap; }
.pill[aria-pressed='true'] { background: var(--primary-wash); color: var(--primary-hi); }
.pill--solid[aria-pressed='true'] { background: var(--primary); color: #fff; }
.pill--tall { min-height: 44px; border-radius: 10px; }
.pill:disabled { opacity: 0.5; }

/* Inputs (OutlinedTextField on s2) */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 16px; }
.field__label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); }
.field__hint { font-size: 12px; line-height: 17px; color: var(--text-3); }
.field__hint.is-strong { color: var(--text-2); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--s2); color: var(--text-1); font-size: 15px; line-height: 22px; outline: none; transition: border-color 0.15s; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.input[aria-invalid='true'], .select[aria-invalid='true'] { border-color: var(--down); }
.input:disabled, .select:disabled { color: var(--text-3); }
.input--key { text-transform: uppercase; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.input--num { font-variant-numeric: tabular-nums; }
.input--center { text-align: center; font-size: 17px; font-weight: 600; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.textarea { resize: vertical; min-height: 80px; }
.input-action { position: relative; }
.input-action .input { padding-right: 48px; }
.input-action .icon-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.check { display: flex; align-items: flex-start; gap: 12px; color: var(--text-2); font-size: 13px; line-height: 19px; cursor: pointer; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 4px; border: 2px solid var(--line-2); background: transparent; position: relative; cursor: pointer; }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.choice-list { display: flex; flex-direction: column; }
.choice { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); cursor: pointer; }
.choice input { appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border-radius: 50%; border: 2px solid var(--line-2); position: relative; }
.choice input:checked { border-color: var(--primary); }
.choice input:checked::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.choice__body { display: flex; flex-direction: column; }
.choice__title { font-size: 13px; line-height: 19px; color: var(--text-1); }
.choice__text { font-size: 12px; line-height: 17px; color: var(--text-3); }
.form-error { color: var(--down); font-size: 13px; line-height: 19px; min-height: 0; }
.form-error:empty { display: none; }
.form-grid--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid--2 .field + .field { margin-top: 0; }

/* Server picker (dropdown row on s2) */
.server-picker { border-radius: 10px; background: var(--s2); padding: 12px 14px; min-height: 48px; }
.server-picker::after { display: none; }
.server-picker .list-row__value { color: var(--text-3); font-weight: 400; }
.server-picker[aria-invalid='true'] { box-shadow: inset 0 0 0 1px var(--down); }

/* Stepper (lot) */
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper__btn { width: 46px; height: 46px; border-radius: var(--r-sm); background: var(--s2); color: var(--text-1); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.stepper__btn:disabled { color: var(--text-3); }
.stepper .input { text-align: center; font-size: 17px; line-height: 22px; font-weight: 600; min-height: 46px; }

/* Skeleton */
.skeleton { border-radius: var(--r-xs); background: var(--s2); animation: skeleton 0.8s ease-in-out infinite alternate; }
@keyframes skeleton {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 0.9;
  }
}
.skeleton-stack { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.skeleton-stack .skeleton + .skeleton--gap { margin-top: 6px; }

/* EmptyState */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 24px; width: 100%; }
.empty--top { padding-top: 60px; }
.empty__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-wash); color: var(--primary-hi); display: flex; align-items: center; justify-content: center; }
.empty__title { margin-top: 14px; font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text-1); }
.empty__text { margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--text-3); }
.empty .btn, .empty .btn-row { margin-top: 16px; }

.thin-progress { height: 4px; border-radius: 2px; background: var(--s2); overflow: hidden; }
.thin-progress__bar { display: block; height: 100%; background: var(--primary); transition: width 0.5s var(--ease); }
.thin-progress__bar.is-warn { background: var(--warn); }
.thin-progress__bar.is-up { background: var(--up); }

.kv { margin: 0; display: flex; flex-direction: column; }
.kv__row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; }
.kv dt { flex: 1; color: var(--text-3); font-size: 13px; line-height: 19px; }
.kv dd { margin: 0; color: var(--text-1); font-size: 13px; line-height: 19px; font-weight: 600; text-align: right; }
.kv--box { padding: 10px 14px; border-radius: 10px; background: var(--s2); }
.kv dd.up { color: var(--up); }
.kv dd.down { color: var(--down); }

.bullets { margin: 0; padding: 0; list-style: none; }
.bullets li { display: flex; gap: 8px; padding: 3px 0; font-size: 13px; line-height: 19px; color: var(--text-2); }
.bullets li::before { content: '•'; color: var(--primary-hi); flex: none; }
.bullets--small li { font-size: 12px; line-height: 17px; }
.bullets--small li::before { color: var(--text-3); }

/* ---------- Dialog (AlertDialog) ---------- */
.dialog { margin: auto; width: min(calc(100% - 48px), 360px); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--s1); color: var(--text-2); overflow: hidden; display: none; flex-direction: column; }
.dialog[open] { display: flex; }
.dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.dialog > form { display: flex; flex-direction: column; min-height: 0; }
.dialog--wide { width: min(calc(100% - 32px), 480px); }
.dialog--image { width: min(calc(100% - 24px), 900px); background: var(--bg); }
.dialog__head { display: flex; align-items: flex-start; gap: 8px; padding: 24px 24px 0; }
.dialog__titles { flex: 1; min-width: 0; }
.dialog__title { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--text-1); }
.dialog__sub { margin-top: 4px; font-size: 13px; line-height: 19px; color: var(--text-3); }
.dialog__body { padding: 14px 24px 0; overflow: auto; font-size: 15px; line-height: 22px; color: var(--text-2); }
.dialog__body .field + .field { margin-top: 12px; }
.dialog__body > * + *, .dialog__body > div > * + * { margin-top: 8px; }
.dialog__body .small + .small { margin-top: 2px; }
.dialog__body .field + .field { margin-top: 12px; }
.dialog__foot { display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 18px 16px 14px; flex-wrap: wrap; }
.dialog__foot:empty { padding-top: 20px; }
.dialog__secret { font-size: 17px; line-height: 24px; font-weight: 600; font-stretch: 116%; color: var(--primary-hi); word-break: break-all; user-select: all; }
.lightbox-img { max-width: 100%; max-height: 70vh; border-radius: var(--r-sm); margin: 0 auto; }

/* ---------- Bottom sheet (ModalBottomSheet) ---------- */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: var(--col); max-height: 92vh; max-height: 92dvh; padding: 0; border: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--s1); color: var(--text-1); display: none; flex-direction: column; overflow: hidden; animation: sheet-in 0.26s var(--ease); }
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(0, 0, 0, 0.5); }
@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.sheet__handle { width: 100%; height: 22px; position: relative; flex: none; }
.sheet__handle::after { content: ''; position: absolute; left: 50%; top: 10px; width: 32px; height: 4px; border-radius: 2px; background: var(--line-2); transform: translateX(-50%); }
.sheet__head { display: flex; align-items: center; gap: 8px; padding: 0 20px 10px; }
.sheet__titles { flex: 1; min-width: 0; }
.sheet__title { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text-1); }
.sheet__sub { font-size: 12px; line-height: 17px; color: var(--text-3); }
.sheet__body { padding: 0 20px calc(28px + var(--safe-b)); overflow: auto; }
.sheet__body--flush { padding-left: 16px; padding-right: 16px; }
.sheet-label { display: block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); margin-bottom: 8px; }
.sheet-block + .sheet-block { margin-top: 18px; }
.sheet-list .list-row::after { left: 20px; }

/* ---------- Toasts (Snackbar) ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 12px); transform: translateX(-50%); width: min(calc(100% - 32px), 480px); display: flex; flex-direction: column; gap: 8px; z-index: 50; pointer-events: none; }
body.has-overlay .toasts, body[data-access='locked'] .toasts { bottom: calc(var(--safe-b) + 12px); }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: var(--r-sm); background: var(--s3); color: var(--text-1); font-size: 14px; line-height: 20px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); animation: toast-in 0.2s var(--ease); }
.toast--error { box-shadow: inset 3px 0 0 var(--down), 0 6px 24px rgba(0, 0, 0, 0.35); }
.toast--success { box-shadow: inset 3px 0 0 var(--up), 0 6px 24px rgba(0, 0, 0, 0.35); }
.toast--info { box-shadow: inset 3px 0 0 var(--primary), 0 6px 24px rgba(0, 0, 0, 0.35); }
.toast.is-leaving { opacity: 0; transition: opacity 0.2s; }
@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ==========================================================================    Robot screen    ========================================================================== */
.account-picker { display: flex; gap: 8px; padding: 12px var(--pad) 0; overflow-x: auto; scrollbar-width: none; }
.account-picker::-webkit-scrollbar { display: none; }
.account-picker__item { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--s1); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; }
.account-picker__item[aria-pressed='true'] { background: var(--primary-wash); color: var(--primary-hi); }

.hero { padding: 18px var(--pad) 6px; }
.hero__top { display: flex; align-items: center; gap: 8px; }
.hero__eyebrow { flex: 1; font-size: 13px; line-height: 19px; color: var(--text-3); }
.hero__money { display: flex; align-items: flex-end; gap: 10px; margin-top: 4px; }
.hero__value { font-size: 31px; line-height: 36px; font-weight: 700; font-stretch: 116%; letter-spacing: -0.01em; color: var(--text-1); white-space: nowrap; }
.hero__pct { padding-bottom: 5px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.hero__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.hero__hint { margin-top: 10px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.hero__hint.is-warn { color: var(--warn); }
.hero__hint-btn { color: inherit; text-align: left; font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }

/* TargetBar: one segment per cycle */
.target-bar { display: flex; gap: 4px; height: 8px; margin-top: 14px; }
.target-bar__seg { flex: 1; height: 8px; border-radius: 4px; background: rgba(42, 46, 57, 0.5); overflow: hidden; position: relative; }
.target-bar__seg.is-on { background: var(--s3); }
.target-bar__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--up); transition: width 0.5s var(--ease); }
.target-bar__fill.is-loss { background: var(--down); }

/* RobotToggle: 64dp wide control */
.robot-toggle { display: flex; align-items: center; gap: 14px; width: 100%; height: 64px; margin-top: 16px; padding: 0 18px; border-radius: 14px; background: var(--s2); color: var(--text-3); text-align: left; transition: background 0.3s; position: relative; overflow: hidden; }
.robot-toggle__lead { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex: none; }
.robot-toggle__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.robot-toggle__title { font-size: 15px; line-height: 20px; font-weight: 700; }
.robot-toggle__sub { font-size: 12px; line-height: 17px; color: var(--text-3); }
.robot-toggle__pause { width: 36px; height: 36px; border-radius: 50%; background: rgba(242, 54, 69, 0.16); color: var(--down); display: flex; align-items: center; justify-content: center; flex: none; }
.robot-toggle__pause .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.robot-toggle--running, .robot-toggle--armed { background: var(--s1); color: var(--text-1); }
.robot-toggle--running::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 153, 129, 0.18), transparent); pointer-events: none; }
.robot-toggle--running > * { position: relative; }
.robot-toggle--armed .robot-toggle__lead { color: var(--primary-hi); }
.robot-toggle--paused { background: var(--primary); color: #fff; }
.robot-toggle--paused:hover:not(:disabled) { background: var(--primary-lo); }
.robot-toggle--paused .robot-toggle__sub { color: rgba(255, 255, 255, 0.8); }
.robot-toggle--paused .robot-toggle__lead .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.robot-toggle--pending, .robot-toggle--blocked { background: var(--s2); color: var(--text-3); cursor: default; }
.robot-toggle--pending .spinner { color: var(--primary-hi); width: 22px; height: 22px; border-width: 2.5px; }
.robot-toggle--blocked .robot-toggle__lead .icon { width: 24px; height: 24px; }
.robot-toggle:disabled:not(.robot-toggle--pending):not(.robot-toggle--blocked) { opacity: 0.6; }
/* Equalizer: three bars out of phase */
.equalizer { display: flex; align-items: flex-end; gap: 3px; width: 22px; height: 22px; }
.equalizer i { display: block; width: 5px; height: 22px; border-radius: 2px; background: var(--up); transform-origin: bottom; animation: eq 0.52s linear infinite alternate; }
.equalizer i:nth-child(2) { animation-duration: 0.68s; animation-direction: alternate-reverse; }
.equalizer i:nth-child(3) { animation-duration: 0.43s; animation-delay: 0.1s; }
@keyframes eq {
  from {
    transform: scaleY(0.3);
  }
  to {
    transform: scaleY(1);
  }
}

.robot-note { padding: 8px var(--pad); font-size: 12px; line-height: 17px; color: var(--text-3); }
.robot-notice { margin: 8px var(--pad); }
.risk-text { padding: 16px var(--pad) 24px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.robot-foot-rule { margin: 12px 0 0; }

/* Settings sheet */
.lot-presets { margin-top: 8px; }
.lot-presets .pill { min-height: 36px; }

/* ==========================================================================    Chart screen    ========================================================================== */
.view--chart { min-height: calc(100vh - var(--tabbar) - var(--safe-b)); min-height: calc(100dvh - var(--tabbar) - var(--safe-b)); height: calc(100vh - var(--tabbar) - var(--safe-b)); height: calc(100dvh - var(--tabbar) - var(--safe-b)); position: sticky; top: 0; }
.quote { width: 100%; padding: calc(10px + var(--safe-t)) var(--pad) 8px; text-align: left; color: inherit; border-bottom: 1px solid var(--line); flex: none; }
.quote__line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.quote__symbol { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--text-1); }
.quote__price { font-size: 17px; line-height: 22px; font-weight: 700; color: var(--text-1); transition: color 0.3s; }
.quote__price.is-tick-up { color: var(--up); }
.quote__price.is-tick-down { color: var(--down); }
.quote__change { font-size: 14px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.quote__status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }
.quote__status.up { color: var(--up); }
.quote__status.warn { color: var(--warn); }
.quote__status.down { color: var(--down); }
.quote__status.muted { color: var(--text-3); }
.quote__status.gold { color: var(--primary-hi); }
.quote__details { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.quote__stat { display: flex; flex-direction: column; }
.quote__stat dt { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-3); }
.quote__stat dd { margin: 0; font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-2); }
.chart-tools { display: flex; align-items: center; gap: 4px; padding: 6px 10px; flex: none; }
.chart-tools .chip-row { flex: 1; min-width: 0; }
.chart-tools .icon-btn { width: 36px; height: 36px; color: var(--text-3); }
.chart-tools .icon-btn[aria-pressed='true'] { color: var(--primary-hi); }
.chart-area { flex: 1; position: relative; min-height: 240px; background: var(--chart-bg); }
.chart-host { position: absolute; inset: 0; }
.chart-host > div { width: 100%; height: 100%; }
.chart-legend { position: absolute; left: 10px; top: 8px; display: flex; gap: 8px; padding: 5px 8px; border-radius: var(--r-xs); background: rgba(19, 23, 34, 0.85); font-size: 11px; line-height: 14px; color: var(--text-3); pointer-events: none; }
.chart-legend:empty { display: none; }
.chart-legend b { margin-left: 3px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-legend.up b { color: var(--up); }
.chart-legend.down b { color: var(--down); }
.chart-legend .tf { color: var(--primary-hi); font-weight: 700; }
.chart-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); font-size: 12px; pointer-events: none; }
.chart-notice { position: absolute; left: 12px; right: 12px; top: 12px; }
.chart-latest { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--s2); color: var(--primary-hi); display: flex; align-items: center; justify-content: center; }
.chart-latest .icon { width: 22px; height: 22px; }
.chart-selected { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.chart-selected .zone-card { background: rgba(30, 34, 45, 0.96); }

/* ZoneCard */
.zone-card { display: block; width: 100%; padding: 12px; border-radius: 10px; background: var(--s1); text-align: left; color: inherit; }
.zone-card[aria-pressed='true'] { background: var(--s2); }
.zone-card__row { display: flex; align-items: center; gap: 12px; }
.zone-card__bar { width: 4px; height: 36px; border-radius: 2px; background: var(--up); flex: none; }
.zone-card--supply .zone-card__bar, .zone-card--supply .zone-card__name { background: var(--down); color: var(--down); }
.zone-card--supply .zone-card__name { background: none; }
.zone-card__main { flex: 1; min-width: 0; }
.zone-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zone-card__name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--up); }
.zone-card__kind { font-size: 12px; line-height: 17px; color: var(--text-3); }
.zone-card__range { font-size: 13px; line-height: 19px; font-weight: 600; color: var(--text-1); }
.zone-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.zone-card__dist { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); white-space: nowrap; }
.zone-card__dist.is-inside { color: var(--up); }
.zone-card--supply .zone-card__dist.is-inside { color: var(--down); }
.zone-card__detail { margin-top: 8px; font-size: 12px; line-height: 17px; color: var(--text-2); }
.zone-card__detail span { display: block; margin-top: 2px; color: var(--text-3); }
.strength { display: inline-flex; align-items: flex-end; gap: 3px; }
.strength i { display: block; width: 5px; border-radius: 1px; background: currentColor; opacity: 0.25; }
.strength i:nth-child(1) { height: 10px; }
.strength i:nth-child(2) { height: 14px; }
.strength i:nth-child(3) { height: 18px; }
.strength[data-n='1'] i:nth-child(1), .strength[data-n='2'] i:nth-child(-n + 2), .strength[data-n='3'] i { opacity: 1; }
.zone-list { display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================================    Rating screen    ========================================================================== */
.rating-seg { padding: 10px var(--pad) 4px; }
.podium { display: flex; align-items: flex-end; gap: 8px; padding: 10px var(--pad) 4px; }
.podium__spacer { flex: 1; }
.podium-card { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 14px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.podium-card--first { padding-top: 18px; background: linear-gradient(180deg, #2a2510, var(--s1)); box-shadow: inset 0 0 0 1px rgba(240, 185, 11, 0.4); }
.podium-card__rank { font-size: 12px; line-height: 16px; font-weight: 800; color: var(--text-3); }
.podium-card--first .podium-card__rank { color: var(--brand-gold); }
.podium-card__avatar { margin-top: 6px; padding: 3px; border-radius: 50%; border: 2px solid var(--silver); }
.podium-card--first .podium-card__avatar { border-width: 3px; border-color: var(--brand-gold); }
.podium-card--third .podium-card__avatar { border-color: var(--bronze); }
.podium-card__name { margin-top: 8px; width: 100%; font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-card__profit { font-size: 15px; line-height: 20px; font-weight: 800; color: var(--up); white-space: nowrap; }
.podium-card--first .podium-card__profit { font-size: 17px; line-height: 22px; }
.percent-chip { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: var(--r-xs); background: var(--up-wash); color: var(--up); font-size: 11px; line-height: 14px; font-weight: 700; }
.deals-line { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; line-height: 14px; color: var(--text-3); white-space: nowrap; }
.deals-line .icon { width: 12px; height: 12px; }
.rating-list { padding: 6px var(--pad) 0; }
.rating-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rating-row--me { margin: 0 -8px; padding: 10px 8px; border-radius: 10px; background: var(--primary-wash); border-bottom: 0; }
.rating-row__rank { width: 20px; text-align: center; font-size: 14px; font-weight: 700; color: var(--text-3); flex: none; }
.rating-row__main { flex: 1; min-width: 0; }
.rating-row__name { font-size: 15px; line-height: 22px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-row--me .rating-row__name { color: var(--primary-hi); }
.rating-row__bar { height: 3px; margin-top: 5px; border-radius: 2px; background: var(--s2); overflow: hidden; }
.rating-row__bar i { display: block; height: 100%; border-radius: 2px; background: var(--up); }
.rating-row__side { display: flex; flex-direction: column; align-items: flex-end; }
.rating-row__profit { font-size: 15px; line-height: 20px; font-weight: 800; color: var(--up); white-space: nowrap; }
.rating-row__side .percent-chip { margin-top: 2px; }
.me-card { display: flex; align-items: center; gap: 12px; margin: 12px var(--pad) 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--s1); }
.me-card__main { flex: 1; min-width: 0; }
.me-card__title { font-size: 15px; line-height: 22px; color: var(--text-1); }
.me-card__sub { font-size: 12px; line-height: 17px; color: var(--text-3); }
.me-card__side { display: flex; flex-direction: column; align-items: flex-end; }
.me-card__profit { font-size: 15px; line-height: 20px; font-weight: 800; }
.me-card__pct { font-size: 11px; line-height: 14px; color: var(--text-3); }
.rating-foot { padding: 12px var(--pad) 28px; font-size: 12px; line-height: 17px; color: var(--text-3); }

/* ==========================================================================    Admin screen    ========================================================================== */
.admin-head { padding: 12px var(--pad) 0; }
.admin-head .segmented { margin-top: 12px; }
.admin-list { display: flex; flex-direction: column; gap: 8px; padding: 10px var(--pad) 24px; }
.acc-row { cursor: pointer; }
.acc-row__top { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit; }
.acc-row__avatar { position: relative; flex: none; }
.acc-row__dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--s1); display: flex; align-items: center; justify-content: center; }
.acc-row__dot .dot { width: 7px; height: 7px; }
.acc-row__main { flex: 1; min-width: 0; }
.acc-row__name { display: flex; align-items: center; gap: 6px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.acc-row__name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-row__sub { font-size: 12px; line-height: 17px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-row__side { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.acc-row__equity { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.acc-row__net { font-size: 12px; line-height: 17px; color: var(--text-3); }
.acc-row__more { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 17px; color: var(--text-3); overflow-wrap: anywhere; }
.acc-row__more .links-row { margin-top: 0; }
.acc-row__more .body-text { color: var(--text-2); }
.acc-row__more .btn-row { margin-top: 4px; }
.acc-row__more details summary { cursor: pointer; color: var(--text-3); }
.req-row__top { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: inherit; }
.req-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req-row__name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.req-row__line { font-size: 12px; line-height: 17px; color: var(--text-3); }
.req-row__line.is-warn { color: var(--warn); }
.links-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.links-row .btn { min-height: 36px; padding: 0 8px; font-size: 13px; }

/* ==========================================================================    Connect overlay (ConnectScreen)    ========================================================================== */
.connect-body { padding: 14px var(--pad) 32px; display: flex; flex-direction: column; gap: 12px; }
.request-card__top { display: flex; align-items: center; gap: 8px; }
.request-card__main { flex: 1; min-width: 0; }
.request-card__title { margin-top: 4px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.request-card__meta { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 17px; color: var(--text-3); flex-wrap: wrap; }
.request-card__hint { margin-top: 12px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.request-card__due { margin-top: 4px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.request-card .notice { margin-top: 10px; }
.request-card .btn-row { margin-top: 14px; gap: 10px; }
.failure-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--down-wash); }
.failure-box__title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--down); }
.failure-box__text { margin-top: 4px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.failure-box .bullets { margin-top: 6px; }
/* Timeline: Yuborildi → Tekshiruv → Ulandi */
.timeline { display: flex; align-items: flex-start; margin-top: 16px; }
.timeline__step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.timeline__dot { width: 24px; height: 24px; border-radius: 50%; background: var(--s2); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.timeline__dot .icon { width: 14px; height: 14px; stroke-width: 2.4; color: #fff; }
.timeline__step.is-done .timeline__dot { background: var(--up); color: #fff; }
.timeline__step.is-fail .timeline__dot { background: var(--down); color: #fff; }
.timeline__label { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); }
.timeline__step.is-done .timeline__label { color: var(--text-1); }
.timeline__line { flex: 1; height: 2px; margin: 11px 6px 0; background: var(--line-2); }
.timeline__line.is-done { background: var(--up); }
/* Wizard */
.wizard { padding: 0; }
.wizard__head { padding: 16px 16px 0; }
.wizard__title { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.wizard__steps { display: flex; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.wizard__step { flex: 1; display: flex; flex-direction: column; }
.wizard__step::before { content: ''; display: block; height: 3px; border-radius: 2px; background: var(--s2); }
.wizard__step.is-done::before, .wizard__step.is-current::before { background: var(--primary); }
.wizard__label { margin-top: 6px; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); }
.wizard__step.is-current .wizard__label { color: var(--text-1); }
.wizard__num { display: none; }
.wizard__subtitle { display: none; }
.wizard__pane { padding: 16px 16px 0; }
.wizard__pane .form-error { margin-top: 10px; }
.wizard__banner { margin: 12px 16px 0; }
.wizard__foot { display: flex; gap: 10px; padding: 16px; }
.wizard__foot .btn { flex: 1; min-width: 0; }
.wizard__foot .btn--primary { flex: 1.4; }
.wizard .form-error { padding: 0 16px; }
.wizard .field__hint.is-note { color: var(--text-3); }
.consent { margin-top: 16px; }
.consent__row { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.consent .check { padding-top: 2px; }
.terms { display: flex; flex-direction: column; gap: 8px; }
.terms h4 { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--primary-hi); margin-top: 12px; }
.terms p { font-size: 13px; line-height: 19px; color: var(--text-2); }
.help-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }

/* ==========================================================================    Results (Natijalar) + tables + reports    ========================================================================== */
.results-body { padding: 0 0 32px; }
.periods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px var(--pad) 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.table th, .table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.table th.r, .table td.r { text-align: right; }
.table td { font-variant-numeric: tabular-nums; color: var(--text-1); }
.table td.up { color: var(--up); }
.table td.down { color: var(--down); }
.deal-side { font-weight: 700; }
/* Phone card layout */
.table--cards thead { display: none; }
.table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; }
.table--cards tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.table--cards td { padding: 0; border: 0; white-space: normal; font-size: 13px; }
.table--cards td::before { content: attr(data-label); display: block; font-size: 10px; line-height: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.table--cards td.r { text-align: left; }
.table--cards td[data-slot='result'] { font-weight: 700; }
.deals-box { padding: 0 var(--pad); }
.deals-box .muted { padding: 8px 0; font-size: 13px; }
.reports { display: flex; flex-direction: column; gap: 10px; padding: 8px var(--pad) 0; }
.report { padding: 0; overflow: hidden; }
.report__image { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--s2); color: var(--text-3); display: flex; align-items: center; justify-content: center; padding: 0; }
.report__image img { width: 100%; height: 100%; object-fit: cover; }
.report__body { padding: 12px 14px 14px; }
.report__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.report__title { margin-top: 6px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.report__numbers { display: flex; gap: 16px; margin-top: 8px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.report__numbers > div > span { display: block; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.report__note { margin-top: 8px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.report__actions { margin-top: 10px; }
.upload-preview { max-width: 100%; border-radius: var(--r-sm); margin-top: 8px; }
.details { border-radius: 10px; }
.details summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--primary-hi); min-height: 40px; }
.details summary::-webkit-details-marker { display: none; }
.details[open] summary .icon { transform: rotate(180deg); }
.details__body { padding: 4px 0 8px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.details__body p + p { margin-top: 8px; }

/* ==========================================================================    Profile + guide    ========================================================================== */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 20px var(--pad) 8px; }
.profile-head__main { flex: 1; min-width: 0; }
.profile-head__name { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-head__role { font-size: 12px; line-height: 17px; color: var(--text-3); }
.profile-expiry { padding: 8px var(--pad); }
.profile-expiry__text { margin-top: 6px; font-size: 12px; line-height: 17px; color: var(--text-3); }
.profile-note { padding: 8px var(--pad); font-size: 12px; line-height: 17px; color: var(--text-3); }
.profile-logout { padding: 8px var(--pad) 32px; }
.credits { padding: 4px var(--pad) 8px; font-size: 11px; line-height: 15px; color: var(--text-3); }
.guide-body { padding: 14px var(--pad) 32px; display: flex; flex-direction: column; gap: 10px; }
.guide__item { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--s1); }
.guide__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-wash); color: var(--primary-hi); display: flex; align-items: center; justify-content: center; flex: none; }
.guide__item h3 { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text-1); }
.guide__item p { margin-top: 4px; font-size: 13px; line-height: 19px; color: var(--text-2); }
.glossary { margin: 0; display: flex; flex-direction: column; }
.glossary > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-size: 14px; font-weight: 600; color: var(--text-1); }
.glossary dd { margin: 2px 0 0; font-size: 13px; line-height: 19px; color: var(--text-2); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .dot--pulse,
  .equalizer i {
    animation: none;
  }
  .equalizer i {
    transform: scaleY(0.7);
  }
}

/* ---------- Narrow phones ---------- */
@media (max-width: 360px) {
  .hero__value {
    font-size: 27px;
    line-height: 32px;
  }
  .stat-grid {
    flex-wrap: wrap;
  }
  .stat-tile {
    flex-basis: calc(50% - 4px);
  }
}

.icon-btn.is-spinning .icon { animation: spin 0.9s linear infinite; }

.lot-presets + .hint-text { margin-top: 8px; }
.hint-text + .hint-text { margin-top: 4px; }
.field > .btn--link, .consent > .btn--link { align-self: flex-start; margin-left: -10px; }
.consent { display: flex; flex-direction: column; gap: 2px; }
.privacy-text { margin-top: 6px; }
.sheet-block .btn + .hint-text { margin-top: 8px; }

/* Lightweight Charts canvases sit at z-index 1-2: keep overlays above them. */
.chart-legend, .chart-overlay, .chart-notice, .chart-latest, .chart-selected { z-index: 3; }
