/* Copyright 2026. All rights reserved. */
/* pkweb SPA — тёмный минимальный стиль покер-админки. Без внешних шрифтов/ассетов. */

:root {
  --bg: #0f1419;
  --panel: #1a212b;
  --panel2: #222b37;
  --border: #2c3846;
  --text: #dfe6ee;
  --muted: #8a97a6;
  --accent: #2f9e6e;
  --accent-h: #38b47f;
  --danger: #c1483f;
  --danger-h: #d75950;
  --pos: #4bcf8a;
  --neg: #e0685f;
  --pill: #37455a;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 3px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.err { color: var(--neg); margin: 6px 0 0; }

/* ── layout ── */
.screen { padding: 16px; max-width: 1280px; margin: 0 auto; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
/* Стол (компактный) + Бот (широкий, 2 филдсета в ряд) на одной линии. */
.session-cfg { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.7fr); gap: 16px; align-items: start; }
.session-cfg > .card { margin-bottom: 16px; }
@media (max-width: 900px) { .grid2, .grid3, .session-cfg { grid-template-columns: 1fr; } }

/* ── topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.brand { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── buttons ── */
.btn, button {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 8px 14px; font-size: 13px; cursor: pointer; font-weight: 500;
}
.btn:hover, button:hover { background: var(--accent-h); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--border); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: var(--danger-h); }
.btn.xs { padding: 4px 9px; font-size: 12px; }
/* icon-кнопка: квадратная, только глиф (текст в title — нативный тултип при наведении) */
.btn.icon { padding: 0; width: 26px; height: 26px; font-size: 14px; line-height: 26px; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; }
.btn.icon .ic { width: 15px; height: 15px; display: block; }
a.btn { text-decoration: none; display: inline-block; }
/* span-кнопка (вложенный button в button невалиден — «Руки» на карточке аккаунта) */
span.btn { display: inline-block; user-select: none; }

/* ── forms ── */
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; margin-top: 3px; padding: 7px 9px; background: var(--panel2);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 13px;
}
input[type=file] { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
input[type=checkbox] { accent-color: var(--accent); }
select { cursor: pointer; }

.login-card { width: 320px; }
.cfg-form .cfg-row { display: flex; gap: 10px; }
.cfg-form .cfg-row label { flex: 1; }
.cfg-checks { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 12px; }
.cfg-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.cfg-fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px 12px; margin: 0 0 12px; }
.cfg-fieldset legend { padding: 0 6px; }
/* autoSwitch + stake-ladder в одну линию; на узком экране — перенос (flex-wrap). */
.cfg-fieldsets-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cfg-fieldsets-row .cfg-fieldset { flex: 1 1 260px; }

/* ── tables ── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
td.actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* ── pills / badges ── */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 11px;
  background: var(--pill); color: var(--text);
}
.pill.st-running { background: #1f6b48; }
.pill.st-registered { background: #4a4030; }
.pill.st-stopped { background: #4a2c2a; }
.pill.st-reconnecting { background: #4a4030; }
.pill.st-offline { background: #33373d; }

.badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 10px;
  margin-left: 4px; background: var(--panel2); color: var(--muted);
}
.badge.hero { background: #2f6b9e; color: #fff; }
.badge.friend { background: #7a4fb0; color: #fff; }
.badge.in { background: #2f9e6e; color: #fff; }
.badge.pause { background: #b0603a; color: #fff; }
.badge.cap { background: #8a6d2f; color: #fff; }
.badge.sw { background: #2f6b9e; color: #fff; }

/* ── metrics ── */
.metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.metric {
  flex: 1; min-width: 150px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
}
.mlabel { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.mval { font-size: 18px; font-weight: 600; }

/* ── seats ── */
.table-meta { font-size: 12px; margin-bottom: 8px; }
.seats { list-style: none; padding: 0; margin: 0; }
/* Фикс-треки грида: стек/бет-колонки стабильны при любом статусе (бейджи/бет
   появляются/исчезают внутри своей ячейки → числа НЕ прыгают). tabular-nums —
   моноширинные цифры, ширина числа не меняется при смене значения. */
.seat {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 92px 92px;
  align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px;
  border: 1px solid transparent;
}
.seat:nth-child(odd) { background: var(--panel2); }
.seat.hero { border-color: #2f6b9e; }
.seat.folded { opacity: 0.5; }
.seat .place { color: var(--muted); font-size: 12px; }
/* Ник — отдельной строкой во всю ширину ячейки, бейджи под ним → имя не рвётся о бейджи. */
.seat .smid { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.seat .sname {
  max-width: 100%; min-width: 0; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seat .badges { display: flex; flex-wrap: wrap; }
.seat .badges .badge:first-child { margin-left: 0; }
.seat .sstack { text-align: right; font-variant-numeric: tabular-nums; }
.seat .sbet {
  text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}

/* ── hand / decision ── */
.hand-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.hand-row .mlabel { width: 90px; flex-shrink: 0; }
/* Разделитель между live-шапкой руки и блоком решения бота в объединённой карточке. */
.decision-head {
  margin: 10px 0 2px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.act { font-weight: 600; font-size: 15px; }
.cards { display: inline-flex; gap: 4px; }
.pcard {
  display: inline-block; background: #eef1f4; color: #111; border-radius: 4px;
  padding: 2px 6px; font-weight: 700; font-size: 13px; min-width: 24px; text-align: center;
}
.pcard.red { color: #c1483f; }
.pcard.blk { color: #1a1a1a; }
.breakdown {
  background: #0b0f14; border: 1px solid var(--border); border-radius: 6px;
  padding: 10px; margin: 10px 0 0; font-family: ui-monospace, Menlo, monospace;
  font-size: 11px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto;
}

/* ── feed ── */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 3px 0; font-size: 12px; }

/* ── accounts screen (W-D): approval-колонка слева + карточки справа ── */
.accounts-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .accounts-layout { grid-template-columns: 1fr; } }
/* appr-aside — колонка-обёртка (не card): дочерние .card стекаются в столбик через
   собственный margin-bottom. Статична (не sticky) — скроллится вместе со страницей. */
.appr-aside { position: static; }
.appr-col + .appr-col { margin-top: 16px; }

/* ── состояние системы (диск/ЦПУ/логи/БД) ── */
.sys-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.sys-row .mlabel { width: 46px; flex-shrink: 0; }
.sys-val { flex: 1; font-size: 13px; font-variant-numeric: tabular-nums; }

.import-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-form { margin-top: 12px; }
.import-form input[type=file] { margin: 0; }

/* Строки аккаунтов (две секции). Клик по строке → сессия; ячейка «действия» @click.stop.
   Табличная вёрстка + детерминированный сорт = строки не «прыгают» между 3с-снапшотами. */
.accts tr.arow { cursor: pointer; }
.accts tr.arow:hover td { background: var(--panel2); }
.accts td { vertical-align: middle; }
/* actions: НЕ flex (глобальный td.actions) — flex-td не тянется на высоту 2-строчной
   строки, кнопки липнут к верху и net/chips «разъезжаются». Обычная middle-ячейка тянется
   на всю строку → инлайновые кнопки центрируются по вертикали. nowrap держит их в линию. */
.accts td.actions { display: table-cell; white-space: nowrap; text-align: right; }
.accts td.actions .btn { vertical-align: middle; margin-left: 5px; }
.accts td.actions .btn:first-child { margin-left: 0; }
/* фишки: ряд1 кошелёк (chips), ряд2 стек + net(chips) + net(bb). Правое выравнивание. */
.accts td.chips-cell { text-align: right; vertical-align: middle; }
.chips-cell .chips-wallet { font-weight: 600; }
.chips-cell .chips-line { font-size: 11px; margin-top: 2px; display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.chips-cell .chips-bb { font-size: 11px; white-space: nowrap; }
.accts .acct-nick { font-weight: 600; }
.accts .acct-sub { display: flex; gap: 8px; margin-top: 2px; font-size: 11px; flex-wrap: wrap; }
/* on/off-чип свитча/байинов; unknown (нет сохранённых настроек) — нейтральный. */
.chip {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px;
  background: var(--pill); color: var(--muted);
}
.chip.on { background: #1f6b48; color: #fff; }
.chip.off { background: #3a2c2a; color: var(--muted); }
.chip.off-unknown { background: var(--pill); color: var(--muted); }

/* ── sliders (W-D: тир/байин/autoSwitch/stake-ladder) ──
   Слайдер — на ОТДЕЛЬНОЙ строке под «label (value)», всегда во всю ширину контейнера:
   ряды одинаковой длины И дорожка НЕ дёргает размер при смене value (значение живёт на
   строке выше, ширину слайдера не трогает). `order` кладёт value за label БЕЗ правки DOM
   (разметка: label, range, val); range спанит обе колонки (`grid-column: 1 / -1`). */
.slider-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 3px 8px; margin-bottom: 12px; }
.slider-row > label { order: 1; margin: 0; white-space: nowrap; }
.slider-row .slider-val { order: 2; font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; color: var(--text); white-space: nowrap; }
.slider-row input[type=range] { order: 3; grid-column: 1 / -1; width: 100%; accent-color: var(--accent); cursor: pointer; }
.slider-row input[type=range]:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── table-cfg locked при running ── */
.table-cfg.locked { opacity: 0.6; }
.table-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ── approvals (W-C: Telegram-доступ) ── */
.appr-col h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--muted); }
.appr-list { list-style: none; padding: 0; margin: 0; }
.appr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.appr-row:last-child { border-bottom: none; }
.appr-actions { display: flex; gap: 6px; }

/* ── аналитика рана (runAnalytics): кривая / бары / betKind-чипы ── */
/* интерактивные линии-графики (net-баланс + cooldown-таймлайн) */
.curve-wrap { margin: 6px 0 14px; }
.chart-block { margin-bottom: 10px; }
.chart-head { margin-bottom: 3px; }
.chart-head .mlabel { display: inline; }
/* контейнер площадки: SVG + оверлеи (кроссхэйр/точка/тултип) позиционируются относительно него */
.chart { position: relative; width: 100%; height: 120px; }
.chart.short { height: 80px; }
svg.curve { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.curve-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.curve-line.pos { stroke: var(--pos); }
.curve-line.neg { stroke: var(--neg); }
.curve-line.cd { stroke: #d0872f; }
.curve-zero { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
/* лёгкая area-заливка под линией (замкнута на zero-уровень) */
.curve-area { stroke: none; opacity: 0.10; }
.curve-area.pos { fill: var(--pos); }
.curve-area.neg { fill: var(--neg); }
.curve-area.cd { fill: #d0872f; }
/* прозрачный оверлей ловит mousemove/mouseleave (дети под ним — pointer-events:none) */
.chart-overlay { position: absolute; inset: 0; cursor: crosshair; z-index: 3; }
.chart-crosshair {
  position: absolute; top: 0; bottom: 0; width: 1px; margin-left: -0.5px;
  background: var(--muted); opacity: 0.55; pointer-events: none; z-index: 2;
}
.chart-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 2;
  background: var(--muted); border: 2px solid var(--panel);
}
.chart-dot.pos { background: var(--pos); }
.chart-dot.neg { background: var(--neg); }
.chart-dot.cd { background: #d0872f; }
/* тултип графика/баров: маленький, поверх, не ловит мышь */
.chart-tip, .bar-tip {
  position: absolute; z-index: 4; pointer-events: none; white-space: nowrap;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 8px; font-size: 11px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.chart-tip-h { color: var(--muted); margin-right: 6px; }
.chart-tip-v { font-weight: 600; font-variant-numeric: tabular-nums; }
/* топ выигрыши/проигрыши в grid2 без нижнего отступа карточек-обёрток */
.top-hands { margin-bottom: 0; }

/* actionsByStreet — горизонтальные stacked-bars по улицам */
.street-bars { position: relative; display: flex; flex-direction: column; gap: 8px; }
.sbar-row { display: grid; grid-template-columns: 80px 1fr 48px; gap: 10px; align-items: center; }
.sbar-label { font-size: 12px; color: var(--muted); }
.sbar-track { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: var(--panel2); }
.sbar-seg { height: 100%; cursor: crosshair; }
.sbar-seg.fold { background: var(--neg); }
.sbar-seg.check { background: var(--pill); }
.sbar-seg.call { background: #2f6b9e; }
.sbar-seg.raise { background: var(--accent); }
.sbar-total { font-size: 11px; }
.sbar-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.sbar-legend .lg::before {
  content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 4px; vertical-align: middle;
}
.sbar-legend .lg.fold::before { background: var(--neg); }
.sbar-legend .lg.check::before { background: var(--pill); }
.sbar-legend .lg.call::before { background: #2f6b9e; }
.sbar-legend .lg.raise::before { background: var(--accent); }

/* betKind-чипы (наблюдательная разметка агрессии) */
.betkind-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bk-chip {
  padding: 3px 10px; border-radius: 11px; font-size: 12px;
  background: var(--panel2); border: 1px solid var(--border);
}
.bk-chip b { margin-left: 5px; font-variant-numeric: tabular-nums; }
.bk-chip.value { border-color: var(--accent); }
.bk-chip.thin { border-color: #8a6d2f; }
.bk-chip.semi { border-color: #2f6b9e; }
.bk-chip.bluff { border-color: var(--danger); }

/* ── ws dot ── */
.ws-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ws-dot.on { background: var(--pos); box-shadow: 0 0 5px var(--pos); }
.ws-dot.off { background: var(--neg); }

/* ── toast ── */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 6px; font-size: 13px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5); z-index: 100; max-width: 90vw;
}
.toast.t-ok { background: #1f6b48; color: #fff; }
.toast.t-err { background: var(--danger); color: #fff; }
.toast.t-info { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }

/* ── история рук: кликабельные строки + модалка детали раздачи ── */
.hands tr.hrow { cursor: pointer; }
.hands tr.hrow:hover td { background: var(--panel2); }
.hands tr.hrow-hero td { background: rgba(47, 107, 158, 0.18); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 90;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.modal { width: min(760px, 100%); max-height: 85vh; overflow-y: auto; margin: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-head h2 { margin: 0; }
.modal-sub { font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--muted); }
.street-block h4 {
  margin: 8px 0 2px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ══════════ ГЛОБАЛЬНАЯ АНАЛИТИКА (screen==='analytics') ══════════ */
/* ── фильтры ── */
.ga-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.ga-filter { display: flex; flex-direction: column; gap: 5px; }
.ga-filter .mlabel { margin: 0; }
/* select/date в фильтрах — auto-ширина (переопределяют глобальный width:100%/margin) */
.ga-sel { width: auto; margin-top: 0; min-width: 130px; }
.ga-metric-sel { display: inline-block; margin-left: 8px; vertical-align: middle; min-width: 120px; }
.ga-date {
  width: auto; margin-top: 0; padding: 6px 8px; background: var(--panel2);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text);
  font-size: 13px; color-scheme: dark;
}

/* ── сегмент-контрол (стиль / тумблеры разбивки и дневного режима) ── */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.seg-inline { margin-left: 8px; vertical-align: middle; }
.seg-btn {
  background: var(--panel2); color: var(--muted); border: none; border-radius: 0;
  padding: 5px 12px; font-size: 12px; font-weight: 500; cursor: pointer;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn:hover { background: var(--border); color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }
.seg-btn.active:hover { background: var(--accent-h); }

/* ── мультивыбор аккаунтов (дропдаун с чекбоксами) ── */
.ga-accts-dd { position: relative; }
.ga-accts-btn { margin-top: 0; }
.ga-accts-panel {
  position: absolute; top: 100%; left: 0; z-index: 20; margin-top: 4px;
  min-width: 240px; max-height: 300px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.ga-acc-row {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 6px;
  border-radius: 4px; cursor: pointer; color: var(--text); font-size: 12px;
}
.ga-acc-row:hover { background: var(--panel2); }
.ga-acc-row input { width: auto; margin: 0; }
.ga-acc-nick { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

/* ── таблица разбивки (широкая → горизонтальный скролл; клик по колонке = сорт) ── */
.ga-table-wrap { overflow-x: auto; }
.ga-table th, .ga-table td { white-space: nowrap; }
.ga-table th.sortable { cursor: pointer; user-select: none; }
.ga-table th.sortable:hover { color: var(--text); }
tr.ga-dim { opacity: 0.45; }

/* ── бар-графики (тренд + дневной): плот-область с нулевой осью ── */
.ga-bars {
  position: relative; display: flex; align-items: stretch; gap: 2px;
  height: 160px; margin: 8px 0 4px; overflow: visible;
}
.ga-days { height: 180px; }
.ga-zero { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); z-index: 0; pointer-events: none; }
.ga-bar-slot { position: relative; flex: 1 1 0; min-width: 2px; cursor: crosshair; }
.ga-bar-fill { position: absolute; left: 12%; right: 12%; min-height: 1px; border-radius: 2px; z-index: 1; }
.ga-bar-fill.pos { background: var(--pos); }
.ga-bar-fill.neg { background: var(--neg); }
.ga-bar-slot:hover .ga-bar-fill { filter: brightness(1.15); }
/* дневной: fill = flex-колонка сегментов (стек одного знака); solid при mixed/одном сегменте */
.ga-day-fill {
  position: absolute; left: 10%; right: 10%; min-height: 1px; z-index: 1;
  display: flex; flex-direction: column; border-radius: 2px; overflow: hidden;
}
.ga-day-fill.pos { background: var(--pos); }
.ga-day-fill.neg { background: var(--neg); }
.ga-day-seg { flex-grow: 1; flex-basis: 0; min-height: 0; }
.ga-day-seg.alt { filter: brightness(0.8); }
.ga-day-seg + .ga-day-seg { box-shadow: inset 0 1px 0 rgba(15, 20, 25, 0.55); }
.ga-bar-slot:hover .ga-day-fill { filter: brightness(1.12); }

/* ── тултипы бар-графиков (px от контейнера, над курсором) ── */
.ga-tip, .ga-daytip {
  position: absolute; z-index: 6; pointer-events: none; white-space: nowrap;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.ga-daytip { min-width: 180px; white-space: normal; }
.ga-daytip-h { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.ga-daytip-rows { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.ga-daytip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.ga-daytip-lbl { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* ── легенда win/lose (переиспользует .sbar-legend swatch-механизм) ── */
.ga-legend { margin-top: 10px; }
.sbar-legend .lg.pos-lg::before { background: var(--pos); }
.sbar-legend .lg.neg-lg::before { background: var(--neg); }
