/* ARAY Risk Manager on the phone: the desktop app's dark palette and its purple. */
:root {
  --bg: #0C0912;
  --surface: #140F1C;
  --surface2: #1B1526;
  --surface3: #241C31;
  --line: #221A2E;
  --line-strong: #352A44;
  --ink: #F4EFF8;
  --muted: #A396B3;
  --faint: #6E6279;
  --accent: #C45BEA;
  --accent-soft: #2B1A3A;
  --positive: #3DD68C;
  --positive-soft: #13301F;
  --negative: #FF5D7A;
  --negative-soft: #3A1824;
  --warning: #F5B942;
  --warning-soft: #3A2B10;
  --long: #4F8DF5;
  --short: #E0782E;
  --book-a: #1AA3BF;
  --book-b: #B457DB;
  --hero-stroke: #D9A4F2;
  --radius: 14px;
  --radius-small: 9px;
  --tabbar: 64px;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.num {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pos { color: var(--positive); }
.neg { color: var(--negative); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

/* ---------- the frame ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--top) + 10px) 16px 10px;
  background: linear-gradient(var(--bg) 70%, rgba(12, 9, 18, 0.85));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .mark { width: 22px; height: 42px; object-fit: contain; }
.top .title { flex: 1; min-width: 0; }
.top .title b { display: block; font-size: 16px; letter-spacing: 0.2px; }
.top .title span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--positive-soft);
  color: var(--positive);
  white-space: nowrap;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.off { background: var(--negative-soft); color: var(--negative); }
.live.wait { background: var(--warning-soft); color: var(--warning); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
  flex: none;
}

main {
  padding: 14px 14px calc(var(--tabbar) + var(--bottom) + 18px);
  max-width: 720px;
  margin: 0 auto;
}

.tabs {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar) + var(--bottom));
  padding-bottom: var(--bottom);
  background: rgba(16, 12, 23, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.tabs button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 11.5px;
}
.tabs button svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--ink); }
.tabs button.on svg { stroke: var(--accent); }
.tabs .badge {
  position: absolute;
  top: 7px;
  inset-inline-start: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--negative);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.card .sub { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2, .card.flush > .sub { padding-inline: 14px; }
.card.flush > h2 { padding-top: 14px; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(176, 79, 214, 0.42), transparent 60%),
    linear-gradient(160deg, #2A1438, #1A1124 55%, #140F1C);
  border-color: #3B2550;
}
.hero .label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  color: var(--muted);
}
.hero .big { margin: 8px 0 2px; font-size: 44px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.1; }
.hero .why { font-size: 12.5px; color: var(--faint); margin: 0 0 12px; }
.hero .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero .row div > span { display: block; font-size: 11.5px; color: var(--faint); }
.hero .row div > b { display: block; font-size: 15px; font-weight: 600; }
.spark { display: block; width: 100%; height: 64px; margin-top: 12px; direction: ltr; }
.spark .line { fill: none; stroke: var(--hero-stroke); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark .fill { fill: url(#sparkfill); stroke: none; }
.spark .zero { stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
}
.kpi > span { display: block; font-size: 12px; color: var(--muted); }
.kpi > b { display: block; margin-top: 4px; font-size: 20px; font-weight: 600; }
.kpi > small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--faint); }
.kpi.alert { border-color: #5A2232; background: linear-gradient(var(--negative-soft), var(--surface)); }

/* where the B-Book clients lean: short to the left, long to the right, as on the desktop */
.lean { list-style: none; margin: 0; padding: 0; }
.lean li { display: grid; grid-template-columns: 82px 1fr 74px; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); direction: ltr; }
.lean li:first-child { border-top: 0; }
.lean .sym { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lean .track { position: relative; height: 10px; }
.lean .track::before { content: ""; position: absolute; inset-block: -3px; left: 50%; width: 1px; background: var(--line-strong); }
.lean .bar { position: absolute; top: 0; height: 10px; border-radius: 4px; }
.lean .bar.long { left: 50%; background: var(--long); }
.lean .bar.short { right: 50%; background: var(--short); }
.lean .val { text-align: right; font-size: 12.5px; }
.lean .val > small { display: block; font-size: 11px; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin: -4px 0 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.row-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: none;
  text-align: start;
}
.row-button:active { background: var(--surface2); }
.row-button .main { flex: 1; min-width: 0; }
.row-button .main > b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-button .main > span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-button .end { text-align: end; flex: none; }
.row-button .end > b { display: block; font-size: 14.5px; font-weight: 600; }
.row-button .end > span { display: block; font-size: 12px; color: var(--muted); }
.empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }

.status { display: inline-block; padding: 1px 7px; border-radius: 7px; font-size: 11px; margin-inline-start: 4px; }
.status.MarginCall { background: var(--warning-soft); color: var(--warning); }
.status.StopOutRisk { background: var(--negative-soft); color: var(--negative); }
.book { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 11px; color: #fff; }
.book.A { background: var(--book-a); }
.book.B { background: var(--book-b); }

/* ---------- controls ---------- */
.segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: #100C17;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.segment button { border: 0; border-radius: 9px; padding: 8px 4px; background: none; color: var(--muted); font-size: 13.5px; }
.segment button.on { background: var(--accent-soft); color: var(--ink); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface2);
  color: var(--ink);
  font-size: 16px;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 88px; resize: vertical; direction: ltr; text-align: left; }
.search { position: sticky; top: calc(var(--top) + 66px); z-index: 4; margin: -14px -14px 12px; padding: 12px 14px; background: var(--bg); }
.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.button {
  display: block;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
}
.button:disabled { opacity: 0.55; }
.button.quiet { background: var(--surface2); color: var(--ink); border: 1px solid var(--line-strong); }
.button.danger { background: var(--negative-soft); color: var(--negative); }
.button + .button { margin-top: 10px; }
.link { border: 0; background: none; color: var(--accent); padding: 0; font-size: 14px; }

.message { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13.5px; }
.message.bad { background: var(--negative-soft); color: #FFB3C1; }
.message.good { background: var(--positive-soft); color: #A8F0CB; }
.message.note { background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- the first screens ---------- */
.gate {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--top) + 28px) 22px calc(var(--bottom) + 28px);
  max-width: 460px;
  margin: 0 auto;
  background: radial-gradient(90% 50% at 50% 0%, rgba(176, 79, 214, 0.22), transparent 70%);
}
.gate .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.gate .logo img { width: 30px; height: 56px; object-fit: contain; }
.gate .logo b { display: block; font-size: 22px; letter-spacing: 0.3px; }
.gate .logo span { display: block; font-size: 13.5px; color: var(--muted); }
.gate h1 { font-size: 21px; margin: 0 0 6px; }
.gate p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.gate .foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------- a page over the others (an account, the settings) ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--bg);
  animation: rise 0.18s ease-out;
}
@keyframes rise { from { transform: translateY(18px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(var(--top) + 8px) 8px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.sheet .bar b { flex: 1; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; display: grid; place-items: center; }
.back svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .back svg { transform: scaleX(-1); }
.sheet .body { padding: 14px 14px calc(var(--bottom) + 24px); max-width: 720px; margin: 0 auto; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); }
.facts div { background: var(--surface); padding: 10px 12px; min-width: 0; }
.facts div > span { display: block; font-size: 11.5px; color: var(--faint); }
.facts div > b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { margin-bottom: 12px; }
.who h1 { margin: 0; font-size: 20px; }
.who p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { padding: 2px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--hero-stroke); font-size: 12px; }
.note { white-space: pre-wrap; font-size: 14px; }

/* ---------- tables, as the desktop's grids ---------- */
.grid-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.card .grid-wrap { border: 0; border-radius: 0; margin: 0; border-top: 1px solid var(--line); }
.grid-wrap.tall { max-height: max(340px, calc(100dvh - var(--top) - var(--bottom) - 190px)); }
.grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: start; vertical-align: middle; background: var(--surface); }
.grid th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface2);
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
.grid th.s { cursor: pointer; }
.grid th.on { color: var(--ink); }
.grid th .arrow { font-style: normal; color: var(--accent); margin-inline-start: 4px; }
.grid th:first-child, .grid td:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  box-shadow: inset -1px 0 0 var(--line);
}
[dir="rtl"] .grid th:first-child, [dir="rtl"] .grid td:first-child { box-shadow: inset 1px 0 0 var(--line); }
.grid th:first-child { z-index: 3; }
.grid .n { text-align: end; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tr[data-login], .grid tr[data-node], .grid tr[data-atype] { cursor: pointer; }
.grid tr[data-login]:active td, .grid tr[data-node]:active td, .grid tr[data-atype]:active td { background: var(--surface2); }
.grid tr.risk td:first-child { box-shadow: inset 3px 0 0 var(--negative); }
[dir="rtl"] .grid tr.risk td:first-child { box-shadow: inset -3px 0 0 var(--negative); }
.grid tr.group td { font-weight: 600; }
.grid tr.group.lv0 td { background: var(--surface2); }
.grid tr.trade td { font-size: 12.5px; }
.grid tr.total td { font-weight: 700; background: var(--accent-soft); }
.grid tr.picked td { background: #2A1D3A; }
.grid tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .grid tr.picked td:first-child { box-shadow: inset -3px 0 0 var(--accent); }
.who-cell { display: block; max-width: 168px; }
.who-cell b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.who-cell .num { font-size: 11.5px; }
.note-cell { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; color: var(--accent); }
.strong { font-weight: 600; }
.accent-text { color: var(--accent); font-weight: 600; }
.long-text { color: var(--long); }
.short-text { color: var(--short); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; background: var(--positive-soft); color: var(--positive); }
.pill.MarginCall { background: var(--warning-soft); color: var(--warning); }
.pill.StopOutRisk { background: var(--negative-soft); color: var(--negative); }
.ml { display: inline-flex; align-items: center; gap: 8px; }
.ml .bar { position: relative; width: 46px; height: 5px; border-radius: 3px; background: var(--line-strong); overflow: hidden; }
.ml .bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; background: var(--positive); }
.ml .bar i.MarginCall { background: var(--warning); }
.ml .bar i.StopOutRisk { background: var(--negative); }
.side { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; margin-inline-end: 6px; }
.side.Buy { background: rgba(79, 141, 245, 0.18); color: var(--long); }
.side.Sell { background: rgba(224, 120, 46, 0.18); color: var(--short); }
.link, button.acct { color: var(--accent); }
button.acct { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.tree { display: inline-flex; align-items: center; gap: 6px; }
.tree .chev { width: 0; height: 0; border-block: 5px solid transparent; border-inline-start: 6px solid var(--muted); transition: transform 0.15s; }
.tree .chev.open { transform: rotate(90deg); border-inline-start-color: var(--accent); }
[dir="rtl"] .tree .chev.open { transform: rotate(-90deg); }
.tree .cnt { padding: 0 7px; border-radius: 8px; background: var(--line-strong); color: var(--muted); font-size: 11px; font-weight: 500; }

/* ---------- the Accounts and Exposure pages ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -2px 0 10px; }
.toolbar .count, p.count { margin: 0 0 8px; font-size: 12px; color: var(--faint); }
.toolbar .count { margin: 0 0 0 auto; }
[dir="rtl"] .toolbar .count { margin: 0 auto 0 0; }
.chip-button {
  border: 1px solid var(--line-strong);
  background: var(--surface2);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
}
.chip-button:active { background: var(--surface3); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-inline-end: auto; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.viewbar { display: flex; gap: 8px; margin-bottom: 10px; }
.viewbar .select { flex: 1; min-width: 0; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 34px 10px 12px;
  font-size: 15px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
[dir="rtl"] .select { padding: 10px 12px 10px 34px; background-position: 12px 50%, 17px 50%; }
.select.narrow { width: auto; display: inline-block; }
.dirty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 600; }
.kpis.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
.xsum { padding: 12px; }
.xsum p { margin: 0; }
.xsum-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.xsum-row span { display: block; font-size: 11.5px; color: var(--muted); }
.xsum-row b { display: block; font-size: 16px; font-weight: 600; }
.ls-line { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; direction: ltr; }
.ls-line .num { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 5px; }
.dot.long { background: var(--long); }
.dot.short { background: var(--short); }
.ls { display: flex; height: 8px; gap: 2px; margin: 0 0 8px; direction: ltr; }
.ls i { display: block; border-radius: 4px; }
.ls .l { background: var(--long); }
.ls .s { flex: 1; background: var(--short); }
.gross { background: var(--surface2); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.gross span { display: block; font-size: 12px; color: var(--muted); }
.gross b { display: block; font-size: 20px; font-weight: 600; }
.gross small { display: block; font-size: 11.5px; color: var(--faint); }
.markets { list-style: none; margin: 0; padding: 0; }
.markets li { display: grid; grid-template-columns: 70px 1fr 90px; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); direction: ltr; }
.markets li:first-child { border-top: 0; }
.markets li > .num { text-align: right; font-size: 13px; }
.markets .track { grid-column: 1 / -1; position: relative; height: 5px; }
.markets .track::before { content: ""; position: absolute; inset-block: -2px; left: 50%; width: 1px; background: var(--line-strong); }
.markets .bar { position: absolute; top: 0; height: 5px; border-radius: 3px; }
.markets .bar.long { left: 50%; background: var(--long); }
.markets .bar.short { right: 50%; background: var(--short); }

.levels { list-style: none; margin: 0 0 10px; padding: 0; }
.levels .level { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.levels .level b { flex: 1; }
.levels .idx { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; }
.mini { width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.06); color: var(--ink); font-size: 15px; }
.checks li { padding: 0; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; font-size: 14px; }
.check-row input { width: 19px; height: 19px; accent-color: var(--accent); flex: none; }

/* ---------- one account ---------- */
.name-line { display: flex; align-items: center; gap: 6px; }
.id-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.id-line > .num { font-weight: 600; color: var(--ink); }
.copy { width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.copy svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy.done { color: var(--positive); background: var(--positive-soft); }
.tags .warn { background: var(--warning-soft); color: var(--warning); font-weight: 600; }
.tags .ea { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tags .plain { background: var(--line-strong); color: var(--muted); }
.tags:empty { display: none; }
.team-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.team-note[data-note] { cursor: pointer; }
.team-note small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--faint); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.facts.money { grid-template-columns: repeat(2, 1fr); }
.tab-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  margin: 0 -14px 12px;
  padding-inline: 14px;
  scrollbar-width: none;
  position: sticky;
  top: calc(var(--top) + 57px);
  z-index: 3;
  background: var(--bg);
}
.tab-strip::-webkit-scrollbar { display: none; }
.tab-strip button { flex: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; background: var(--surface); color: var(--muted); font-size: 13.5px; }
.tab-strip button.on { background: var(--accent-soft); border-color: #4A2D61; color: var(--ink); }
.history-note { margin: -4px 0 10px; font-size: 12.5px; color: var(--warning); }
.period { margin-bottom: 10px; }
.dates { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.dates .input { padding: 9px 8px; font-size: 14px; min-width: 0; }
.summary { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.summary span:not(:last-child)::after { content: "|"; margin: 0 8px; color: var(--line-strong); }
.loading-line { height: 2px; margin: -6px 0 8px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: slide 1s linear infinite; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .loading-line { animation: none; background: var(--accent); opacity: 0.4; } }
.inline-field { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.input.narrow { width: 82px; padding: 8px 10px; font-size: 15px; text-align: center; }
.segment.small-seg button { font-size: 13px; padding: 7px 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips button { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); color: var(--muted); font-size: 13px; }
.chips button.on { background: var(--accent-soft); border-color: #4A2D61; color: var(--ink); }
.chips .n { opacity: 0.65; margin-inline-start: 4px; }
.info { list-style: none; margin: 0; padding: 0; }
.info li { display: grid; grid-template-columns: minmax(110px, 40%) 1fr auto; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
[dir="rtl"] .info li { padding: 8px 14px 8px 8px; }
.info li:first-child { border-top: 0; }
.info li > span { color: var(--muted); }
.info li > b { font-weight: 600; overflow-wrap: anywhere; }
.stat dl { margin: 0; }
.stat dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.stat dl > div:first-child { border-top: 0; }
.stat dt { font-size: 13.5px; color: var(--muted); }
.stat dt small { display: block; font-size: 11.5px; color: var(--faint); }
.stat dd { margin: 0; font-size: 14px; font-weight: 600; text-align: end; }
.stat dd.nw { white-space: nowrap; }
.note-input { direction: inherit; text-align: start; min-height: 150px; font-size: 15px; margin-bottom: 12px; }

.trade { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.trade:first-child { border-top: 0; }
.trade small { color: var(--muted); font-size: 12px; }

/* ---------- notifications ---------- */
.event { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; }
.event .dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--warning); }
.event .dot.Critical { background: var(--negative); }
.event .dot.Info { background: var(--long); }
.event .text { flex: 1; min-width: 0; }
.event .text > b { display: block; font-size: 14px; }
.event .text p { margin: 2px 0; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.event .text > small { font-size: 12px; color: var(--faint); }
.event.new { background: linear-gradient(90deg, rgba(196, 91, 234, 0.08), transparent); }
.event button.acct { border: 0; background: none; color: var(--accent); padding: 0; font-size: 12.5px; }

.install {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #4A2D61;
  font-size: 13.5px;
}
.install img { width: 36px; height: 36px; border-radius: 8px; flex: none; }
.install p { margin: 0 0 6px; }
.install .close { margin-inline-start: auto; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 4px; }

.offline {
  position: fixed;
  inset-inline: 14px;
  bottom: calc(var(--tabbar) + var(--bottom) + 10px);
  z-index: 7;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 13px;
  text-align: center;
  border: 1px solid #5A4416;
}

.spinner { width: 22px; height: 22px; margin: 26px auto; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

@media (min-width: 560px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .hero .big { font-size: 52px; }
}
