/* Схема 2.0 — «частный банк». Тёплая бумага, графит, одно золото. Зелёный/красный — только знак денег и статусы. */
:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #16150f;
  --ink2: #2b2a24;
  --muted: #6f6d64;
  --dim: #a3a199;
  --line: #e8e6de;
  --soft: #efede6;
  --soft2: #faf9f6;
  --gold: #b8923a;
  --gold-soft: #f6f0de;
  --gold-ink: #7d6220;
  --gold-hi: #d2b062;     /* золото на тёмной поверхности */
  --pos: #1e7f4b;
  --pos-soft: #e7f2ea;
  --pos-line: #cfe5d6;
  --neg: #b9382f;
  --neg-soft: #f9e9e6;
  --neg-line: #efcfca;
  --t1: #16150f;          /* тона дележа: графит → серый, золото — команде */
  --t2: #6f6d64;
  --t3: #b4b2a9;
  --strong: #16150f;      /* тёмные «сильные» поверхности: баланс, итог дележа */
  --strong-line: #16150f;
  --strong-sep: rgba(255,255,255,.09);
  --on-strong: #f5f3ec;
  --on-strong-muted: #9d9b92;
  --btn: #16150f;
  --on-btn: #ffffff;
  --btn-hover: #000000;
  --focus: rgba(22,21,15,.08);
  --shadow: rgba(22,21,15,.12);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #11100d;
  --card: #191813;
  --ink: #efede6;
  --ink2: #cfccc3;
  --muted: #918f86;
  --dim: #605e57;
  --line: #29271f;
  --soft: #22201a;
  --soft2: #1d1b16;
  --gold: #cfab5c;
  --gold-soft: #2a2415;
  --gold-ink: #dbbb72;
  --gold-hi: #d2b062;
  --pos: #55b985;
  --pos-soft: #15261c;
  --pos-line: #21402f;
  --neg: #e0685f;
  --neg-soft: #2c1815;
  --neg-line: #482622;
  --t1: #efede6;
  --t2: #918f86;
  --t3: #55534c;
  --strong: #211f18;
  --strong-line: #322f25;
  --strong-sep: rgba(255,255,255,.08);
  --on-strong: #f5f3ec;
  --on-strong-muted: #9d9b92;
  --btn: #efede6;
  --on-btn: #16150f;
  --btn-hover: #ffffff;
  --focus: rgba(239,237,230,.10);
  --shadow: rgba(0,0,0,.5);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11100d;
  --card: #191813;
  --ink: #efede6;
  --ink2: #cfccc3;
  --muted: #918f86;
  --dim: #605e57;
  --line: #29271f;
  --soft: #22201a;
  --soft2: #1d1b16;
  --gold: #cfab5c;
  --gold-soft: #2a2415;
  --gold-ink: #dbbb72;
  --gold-hi: #d2b062;
  --pos: #55b985;
  --pos-soft: #15261c;
  --pos-line: #21402f;
  --neg: #e0685f;
  --neg-soft: #2c1815;
  --neg-line: #482622;
  --t1: #efede6;
  --t2: #918f86;
  --t3: #55534c;
  --strong: #211f18;
  --strong-line: #322f25;
  --strong-sep: rgba(255,255,255,.08);
  --on-strong: #f5f3ec;
  --on-strong-muted: #9d9b92;
  --btn: #efede6;
  --on-btn: #16150f;
  --btn-hover: #ffffff;
  --focus: rgba(239,237,230,.10);
  --shadow: rgba(0,0,0,.5);
  color-scheme: dark;
}
/* иконка переключателя темы */
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: block; }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14.5px/1.5 "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 15.5px; margin: 0 0 16px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 .r { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); }
h2 .ic { color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 28px; }
.ic { width: 18px; height: 18px; flex: none; }
/* табличные цифры у Onest дают разрядку («$1 9.00») — оставляем пропорциональные */

/* ---------- каркас: боковое меню ---------- */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; padding: 2px 10px 22px; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--strong); color: var(--gold-hi); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.2; }
/* меню прокручивается само, низ (имя, тема, выход) всегда на экране */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; margin: 0 -4px; padding: 1px 4px 10px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14.5px; white-space: nowrap; flex: none; }
.nav a .ic { width: 18px; height: 18px; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.nav a .n { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.nav a .n.hot { background: var(--neg-soft); color: var(--neg); }
.nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 14px 12px 6px; font-weight: 500; flex: none; }
.side-foot { flex: none; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.foot-acts { display: flex; justify-content: space-between; gap: 4px; }
.out { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 14px; }
.out:hover { color: var(--neg); }
.out .ic { width: 18px; height: 18px; }
.theme { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; box-shadow: none; }
.theme:hover { background: transparent; color: var(--ink); }
.theme .ic { width: 18px; height: 18px; }
.theme .moon { display: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 12px; }
.me .who { min-width: 0; }
.me .who b { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--muted); }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
main { padding: 36px 44px 80px; max-width: 1180px; width: 100%; min-width: 0; }
.top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.top .sub { margin: 0; }
.top .right { margin-left: auto; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); gap: 6px; }
  .brand { padding: 0 8px 0 0; }
  .brand small { display: none; }
  .side { overflow: visible; }
  .nav { flex-direction: row; order: 3; width: 100%; flex: none; overflow-x: auto; overflow-y: hidden; margin: 0; padding: 1px; }
  .nav .group { display: none; }
  .nav a { padding: 7px 11px; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; padding: 0; border: 0; }
  .foot-acts .t { display: none; }
  .theme, .out { padding: 6px; }
  .me { padding: 4px; }
  .me .who { display: none; }
  main { padding: 22px 16px 60px; }
}

/* ---------- карточки ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g-hero { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 900px) { .g-hero { grid-template-columns: 1fr; } }
.mt { margin-top: 16px; }
main > .card + .card { margin-top: 16px; }
.grid > * { margin-top: 0 !important; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.card.flat { background: var(--soft2); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat .label .ic { width: 15px; height: 15px; }
.stat .val { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.stat .foot { font-size: 12.5px; color: var(--muted); }
a.card:hover { border-color: var(--dim); }

/* тёмная карточка-герой: главная цифра слева, две тихие справа, действия снизу */
.hero { background: var(--strong); border-color: var(--strong-line); color: var(--on-strong); padding: 30px 32px; }
.hero-top { display: flex; gap: 28px 40px; align-items: flex-end; flex-wrap: wrap; }
.hero-main { flex: 1 1 280px; }
.hero .label { color: var(--on-strong-muted); font-size: 13px; }
.hero .total { font-size: 54px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; margin: 8px 0 12px; }
.hero .total .c { font-size: 26px; color: var(--on-strong-muted); font-weight: 500; letter-spacing: -0.01em; }
.hero .delta { font-size: 14px; font-weight: 500; color: #7fcf9f; }
.hero .delta span { color: var(--on-strong-muted); font-weight: 400; }
.hero .dim { color: var(--on-strong-muted); }
.split2 { display: flex; }
.mini { padding: 2px 0 2px 28px; margin-left: 28px; border-left: 1px solid var(--strong-sep); min-width: 170px; }
.mini:first-child { padding-left: 0; margin-left: 0; border-left: 0; }
.mini .label { font-size: 13px; color: var(--on-strong-muted); }
.mini .val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.mini .foot { font-size: 12.5px; color: var(--on-strong-muted); margin-top: 4px; }
.mini.g .val { color: var(--gold-hi); }
.mini.bad .val { color: #f0948b; }
.hero-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--strong-sep); }
.hero-acts label { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--on-strong); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: box-shadow .15s, background .15s; }
.hero-acts label:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.34); }
.hero-acts label .ic { width: 16px; height: 16px; }
.hero-acts label.p { background: var(--gold-hi); color: #16150f; box-shadow: none; font-weight: 600; }
.hero-acts label.p:hover { background: #dcbc72; box-shadow: none; }
.hero-acts label.end { margin-left: auto; color: var(--on-strong-muted); box-shadow: none; }
.hero-acts label.end:hover { color: var(--on-strong); box-shadow: none; }
.acts > input { display: none; }
.acts > .panes > .pane { display: none; margin-top: 12px; max-width: 560px; }
#a1:checked ~ .panes .p1, #a2:checked ~ .panes .p2, #a3:checked ~ .panes .p3, #a4:checked ~ .panes .p4 { display: block; }
#a1:checked ~ .hero label[for="a1"], #a2:checked ~ .hero label[for="a2"], #a3:checked ~ .hero label[for="a3"], #a4:checked ~ .hero label[for="a4"] { box-shadow: inset 0 0 0 1.5px var(--on-strong); color: var(--on-strong); }
#a1:checked ~ .hero label.p[for="a1"] { box-shadow: 0 0 0 2px rgba(210,176,98,.35); color: #16150f; }
@media (max-width: 640px) {
  .hero { padding: 24px 20px; } .hero .total { font-size: 42px; }
  .split2 { width: 100%; } .mini { min-width: 0; flex: 1; padding-left: 18px; margin-left: 18px; }
  .hero-acts label.end { margin-left: 0; }
}

/* чипы и бейджи */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 500; background: var(--pos-soft); color: var(--pos); white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip.neg { background: var(--neg-soft); color: var(--neg); }
.chip.dim { background: var(--soft); color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--pos-soft); color: var(--pos); }
.badge.warn { background: var(--gold-soft); color: var(--gold-ink); }
.badge.bad { background: var(--neg-soft); color: var(--neg); }
.badge.info { background: var(--soft); color: var(--ink2); }
.pos { color: var(--pos); } .neg { color: var(--neg); } .gold { color: var(--gold-ink); }
.dim { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }

/* мини-карточка трейдера */
.tr { display: flex; align-items: center; gap: 14px; }
.tr .ph { width: 46px; height: 46px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 17px; flex: none; }
.tr b { font-size: 15.5px; font-weight: 600; }
.tr span { display: block; color: var(--muted); font-size: 13px; }
.tr .chip { margin-left: auto; }

/* шаги */
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); border: 1px solid var(--line); flex: none; }
.step.on .dot { background: var(--card); color: var(--ink); border-color: var(--ink); }
.step.done .dot { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.step b { display: block; font-size: 14px; font-weight: 600; }
.step span { font-size: 13px; color: var(--muted); }

/* лента операций */
.feed .it { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.feed .it:first-child { border-top: 0; }
.feed .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; flex: none; color: var(--ink2); }
.feed b { font-size: 14px; font-weight: 500; }
.feed span { display: block; font-size: 12.5px; color: var(--muted); }
.feed .v { margin-left: auto; font-weight: 500; font-size: 14.5px; white-space: nowrap; text-align: right; }
.feed .empty { padding: 26px 0; }

/* графики */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .bar-pos { fill: var(--t3); }
.chart .bar-neg { fill: var(--neg); }
.chart .bar-zero { fill: var(--soft); }
.chart .last { fill: var(--gold); }
.chart.signed .bar-pos { fill: var(--pos); opacity: .8; }
.chart.signed .bar-neg { opacity: .8; }
.chart rect:hover { opacity: .85; }
.chart .lbl { fill: var(--dim); font-size: 15px; }
.chart .val { fill: var(--ink2); font-size: 15px; font-weight: 500; }
.chart-empty { color: var(--dim); padding: 40px 0; text-align: center; }
.spark { width: 100%; height: 44px; display: block; }
.spark .ln { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.spark.up .ln { stroke: var(--ink2); } .spark.up .area { fill: none; }
.spark.down .ln { stroke: var(--neg); } .spark.down .area { fill: none; }

/* котлы-карточки */
.pot { display: flex; flex-direction: column; gap: 12px; }
.pot .head { display: flex; align-items: center; gap: 10px; }
.pot .head b { font-size: 15.5px; font-weight: 600; }
.pot .head .chip { margin-left: auto; }
.pot .who { font-size: 13px; color: var(--muted); margin-top: -8px; }
.pot .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pot .row3 div { font-size: 12.5px; color: var(--muted); }
.pot .row3 b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.cap { height: 5px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.cap i { display: block; height: 100%; background: var(--ink2); border-radius: 3px; }
.cap-l { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: -6px; }
.pool-h { display: flex; align-items: center; gap: 10px; margin: 34px 0 12px; font-weight: 600; font-size: 15.5px; flex-wrap: wrap; }

/* расчёт недели: поток и доли */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.flow .node { background: var(--soft2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.flow .node .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.flow .node .val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.flow .node.hl { background: var(--strong); border-color: var(--strong-line); color: var(--on-strong); }
.flow .node.hl .label { color: var(--on-strong-muted); }
.flow .node.hl .val { color: var(--gold-hi); }
.flow .arr { display: grid; place-items: center; color: var(--dim); }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } .flow .arr { transform: rotate(90deg); } }
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
@media (max-width: 760px) { .parts { grid-template-columns: 1fr 1fr; } }
.part { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); border-top: 2px solid var(--c, var(--line)); }
.part .pct { font-size: 12px; font-weight: 600; color: var(--muted); }
.part .val { font-size: 18px; font-weight: 600; margin-top: 2px; }
.part .label { font-size: 12.5px; color: var(--muted); }
.part.inv { --c: var(--t1); } .part.tr { --c: var(--t2); } .part.ref { --c: var(--t3); } .part.team { --c: var(--gold); }
.splitbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 16px; gap: 2px; }
.splitbar i { display: block; }
.c-inv { background: var(--t1); } .c-tr { background: var(--t2); } .c-ref { background: var(--t3); } .c-team { background: var(--gold); }

/* таблицы */
.tw { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--dim); font-weight: 400; font-size: 12.5px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.empty { color: var(--dim); padding: 22px 0; text-align: center; }

/* формы */
form.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
td form.row { align-items: center; }
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input, select {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-width: 0; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--dim); }
input:focus, select:focus { outline: none; border-color: var(--ink2); box-shadow: 0 0 0 3px var(--focus); }
input:disabled, select:disabled { background: var(--soft2); color: var(--dim); }
.field { flex: 1 1 150px; }
button, .btn {
  font: inherit; font-weight: 500; border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  background: var(--btn); color: var(--on-btn); white-space: nowrap; transition: background .15s, box-shadow .15s;
}
button:hover, .btn:hover { background: var(--btn-hover); }
button.ghost, .btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
button.ghost:hover, .btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); background: var(--card); }
button.green { background: var(--pos); color: #fff; } button.green:hover { filter: brightness(.92); background: var(--pos); }
button.red { background: var(--neg-soft); color: var(--neg); } button.red:hover { filter: brightness(.96); background: var(--neg-soft); }
button:disabled { opacity: .35; cursor: not-allowed; }
button.small, .btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink2); margin: 12px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.note { padding: 12px 16px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.note.bad { background: var(--neg-soft); color: var(--neg); }
.note.gold { background: var(--gold-soft); color: var(--gold-ink); }

/* вкладки */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs > input { display: none; }
.tabs > label { margin: 0; padding: 9px 2px; margin-right: 22px; cursor: pointer; font-size: 14.5px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; }
.tabs > label:hover { color: var(--ink); }
.tabs > input:checked + label { color: var(--ink); border-bottom-color: var(--ink); }
.tabs > .panes { border-top: 1px solid var(--line); margin-top: -1px; padding-top: 20px; }
.pane { display: none; }
#t1:checked ~ .panes > .p1, #t2:checked ~ .panes > .p2, #t3:checked ~ .panes > .p3, #t4:checked ~ .panes > .p4 { display: block; }
.panes { width: 100%; }
.pane > .card + .card, .pane > .card + .grid, .pane > .grid + .card { margin-top: 16px; }
.periods { display: flex; gap: 4px; flex-wrap: wrap; }

/* уведомления */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; background: var(--pos-soft); color: var(--pos); }
.flash.err { background: var(--neg-soft); color: var(--neg); }

/* партнёрка */
.lines { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
@media (max-width: 760px) { .lines { grid-template-columns: repeat(4, 1fr); } }
.line { border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center; background: var(--card); }
.line.open { border-color: var(--ink2); }
.line.off { opacity: .45; border-style: dashed; background: transparent; }
.line .n { font-size: 12px; color: var(--muted); }
.line .c { font-size: 24px; font-weight: 600; margin: 2px 0; }
.line .p { font-size: 12.5px; color: var(--gold-ink); font-weight: 600; }
.bar { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin: 14px 0 8px; }
.bar i { display: block; height: 100%; background: var(--ink2); border-radius: 3px; }
.bar.gold i { background: var(--gold); }
.bar.pos i { background: var(--pos); }

/* вход / регистрация */
.login { max-width: 760px; margin: 0 auto; padding: 12vh 16px 60px; }
.login .brand { margin-bottom: 30px; }
.login.center { max-width: 400px; text-align: center; }
.login.center .brand { justify-content: center; padding: 0; margin-bottom: 44px; }
.login.center .steps { text-align: left; }
.demo { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 10px 0 26px; }
.people button { width: 100%; text-align: left; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; font-weight: 600; justify-content: flex-start; gap: 12px; }
.people button:hover { box-shadow: inset 0 0 0 1px var(--ink); background: var(--card); }
.people small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.devnote { font-size: 13.5px; color: var(--gold-ink); background: var(--gold-soft); padding: 12px 16px; border-radius: 12px; }
.rights td.c { text-align: center; }
.yes { color: var(--ink); font-weight: 600; }

/* выпадашки */
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop > form, details.pop > .popbox {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 300px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px var(--shadow);
}
details.inline > summary { list-style: none; cursor: pointer; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 14px; }

/* MT5 */
.mt5box { border: 1px solid var(--line); background: var(--soft2); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.mt5box.bad { border-color: var(--neg-line); background: var(--neg-soft); }
.mt5h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt5h .ic { color: var(--muted); }
.mt5h .r { margin-left: auto; font-size: 12.5px; }
.mt5grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; margin-top: 12px; }
.mt5grid span { display: block; font-size: 12px; color: var(--muted); }
.mt5grid b { font-size: 14px; font-weight: 600; }
.mt5acc { display: flex; flex-direction: column; gap: 8px; }
.mt5acc .head { display: flex; align-items: center; gap: 10px; }
.mt5acc .head .chip { margin-left: auto; }
.mt5acc .who { font-size: 13px; color: var(--muted); }
.mt5acc .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mt5acc .row3 div { font-size: 12px; color: var(--muted); }
.mt5acc .row3 b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.mt5acc.off { opacity: .55; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,133,90,.45); } 70% { box-shadow: 0 0 0 6px rgba(22,133,90,0); } 100% { box-shadow: 0 0 0 0 rgba(22,133,90,0); } }
.from-mt5 { font-size: 11px; color: var(--pos); font-weight: 600; margin-left: 4px; }

/* кривая equity */
.chart.curve .ln { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.chart.curve.up .ln { stroke: var(--ink2); } .chart.curve.up .area { fill: var(--soft2); }
.chart.curve.down .ln { stroke: var(--neg); } .chart.curve.down .area { fill: var(--neg-soft); }
.chart.curve .dot { fill: var(--card); stroke: var(--ink2); stroke-width: 1.8; vector-effect: non-scaling-stroke; }

/* рейтинг */
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--soft); font-weight: 600; font-size: 13px; }
.rank.r1 { background: var(--strong); color: var(--on-strong); }
.mixbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--soft); min-width: 90px; }
.mixbar i { display: block; }
.mixbar .m { background: var(--t2); } .mixbar .b { background: var(--t3); }
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.btn.red { background: var(--neg-soft); color: var(--neg); }
.btn.red:hover { filter: brightness(.96); background: var(--neg-soft); }

/* строка «ключ — значение» (трейдер у инвестора, линии партнёрки) */
.kv { display: flex; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-child { border-top: 0; padding-top: 0; }
.kv:last-child { padding-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { margin-left: auto; font-weight: 500; text-align: right; }
.kv.off { color: var(--dim); } .kv.off .k { color: var(--dim); }
.flags { color: var(--neg); font-size: 12.5px; }
#ops { scroll-margin-top: 20px; }
