/* Панель ботов. Тёмная тема в духе AuthKit: почти чёрный синеватый фон,
   холодный светлый текст, тонкие полупрозрачные линии, мягкое свечение.
   У каждого бота свой цвет (--o): полоса у алерта, точка у вкладки,
   рамка у уведомления — чей алерт, видно не читая. */

:root {
  --bg: #05060F;
  --bg2: #080A14;
  --text: #E6ECF7;
  --text2: #B3BDD0;
  --muted: #7F889B;
  --faint: #5B6376;
  --line: rgba(186, 207, 247, 0.10);
  --line2: rgba(186, 207, 247, 0.16);
  --line3: rgba(186, 207, 247, 0.24);
  --panel: rgba(186, 214, 247, 0.035);
  --panel2: rgba(186, 214, 247, 0.025);
  --hi: rgba(186, 214, 247, 0.07);
  --accent: #BAD7F7;
  --buy: #4FD1A5;
  --sell: #FF7B72;
  --warn: #F5B455;
  --gold: #FFD27A;
  --primary: #DCE7F8;
  /* цвета ботов */
  --c-agregarot: #A78BFA;
  --c-spuffer: #5EB8FF;
  --c-stoploss: #9FB3CC;
  --c-nowostnik: #F2C14E;
  --c-arbitrage: #F472B6;
  --c-oi: #A3E635;
  --o: var(--accent);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --dot: 'Doto', 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}

.o-agregarot { --o: var(--c-agregarot); }
.o-spuffer { --o: var(--c-spuffer); }
.o-stoploss { --o: var(--c-stoploss); }
.o-nowostnik { --o: var(--c-nowostnik); }
.o-arbitrage { --o: var(--c-arbitrage); }
.o-oi { --o: var(--c-oi); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text2);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; color: var(--text); }
.mono { font-family: var(--mono); }
.buy { color: var(--buy); }
.sell { color: var(--sell); }
.warn { color: var(--warn); }
.ok { color: var(--buy); }
.muted { color: var(--muted); }
.strong { color: var(--text); }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(186, 207, 247, 0.12); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(186, 207, 247, 0.22); }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Фон: точечная сетка и мягкий луч сверху. Без анимации. */
.bg-dots, .bg-beam { position: fixed; left: 0; right: 0; top: 0; pointer-events: none; z-index: 0; }
.bg-dots {
  height: 520px;
  background-image: radial-gradient(rgba(186, 207, 247, 0.10) 1px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(60% 80% at 50% 0%, #000 0%, transparent 100%);
  mask-image: radial-gradient(60% 80% at 50% 0%, #000 0%, transparent 100%);
  opacity: 0.72;
}
.bg-beam {
  height: 640px;
  background:
    radial-gradient(45% 60% at 50% -10%, rgba(142, 187, 255, 0.12), transparent 70%),
    conic-gradient(at 50% -5%, transparent 45%, rgba(124, 145, 182, 0.11) 49%, rgba(124, 145, 182, 0.18) 50%, rgba(124, 145, 182, 0.11) 51%, transparent 55%);
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}

#app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

/* ---------- мелкие элементы ---------- */

.dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; display: inline-block; transition: background .3s, box-shadow .3s; }
.dot.run { background: var(--buy); box-shadow: 0 0 0 3px rgba(79, 209, 165, 0.12), 0 0 10px rgba(79, 209, 165, 0.55); }
.dot.stop { border: 1.5px solid var(--faint); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px rgba(245, 180, 85, 0.5); }
.dot.live { width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 8px rgba(186, 207, 247, 0.9); }
.dot.new { width: 5px; height: 5px; background: var(--accent); box-shadow: 0 0 8px rgba(186, 207, 247, 0.9); }
.tab-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--o); box-shadow: 0 0 8px color-mix(in srgb, var(--o) 60%, transparent); display: inline-block; }

.brand { flex-shrink: 0; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 14px rgba(186, 207, 247, 0.7); }
.caps { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); background: rgba(186, 214, 247, 0.05); color: var(--text); }

.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px; background: transparent; color: var(--text2);
  transition: background .15s, color .15s, transform .12s var(--ease), box-shadow .15s;
}
.icon-btn:hover { background: var(--hi); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on, .icon-btn[aria-pressed="true"] { background: rgba(186, 214, 247, 0.08); color: var(--text); box-shadow: inset 0 0 0 1px rgba(186, 207, 247, 0.14); }
.icon-btn.small { width: 36px; height: 36px; border-radius: 9px; }
.icon-btn.xs { width: 28px; height: 28px; border-radius: 7px; color: var(--muted); }
.icon-btn.xs:hover { color: var(--text); }

.btn {
  height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 1px solid var(--line2); background: rgba(186, 214, 247, 0.04);
  color: var(--text); font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .12s var(--ease), opacity .15s, box-shadow .15s;
}
.btn:hover { background: rgba(186, 214, 247, 0.08); border-color: var(--line3); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.small { height: 36px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 9px; border-radius: 7px; font-size: 12px; gap: 5px; }
.btn .muted { margin-left: 4px; font-size: 12px; }
.btn.primary {
  border: none; background: var(--primary); color: #05060F; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(186, 215, 247, 0.35), 0 0 18px rgba(186, 207, 247, 0.22);
}
.btn.primary:hover { background: #EAF1FC; }
.btn.primary:disabled { box-shadow: none; }
.btn.danger { color: var(--sell); border-color: rgba(255, 123, 114, 0.35); background: rgba(255, 123, 114, 0.06); }
.btn.danger:hover { background: rgba(255, 123, 114, 0.12); }
.btn.danger.confirm { background: var(--sell); color: #1A0605; border-color: var(--sell); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--hi); color: var(--text); }
.btn.amber { border: none; background: var(--warn); color: #1A1206; font-weight: 600; }
.btn.busy { cursor: progress; }

.spin { width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%; border: 2px solid rgba(186, 207, 247, 0.25); border-top-color: var(--text); display: inline-block; animation: spin .7s linear infinite; }
.spin.xs { width: 10px; height: 10px; border-width: 1.5px; margin: 0 6px 0 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.switch { flex-shrink: 0; width: 52px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; }
.switch .track { position: relative; display: block; width: 40px; height: 22px; border-radius: 999px; background: rgba(186, 207, 247, 0.10); box-shadow: inset 0 0 0 1px var(--line2); transition: background .22s var(--ease), box-shadow .22s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: left .22s var(--ease), background .22s, width .15s; }
.switch:active:not(:disabled) .knob { width: 20px; }
.switch[aria-pressed="true"] .track { background: var(--accent); box-shadow: 0 0 14px rgba(186, 207, 247, 0.45); }
.switch[aria-pressed="true"] .knob { left: 21px; background: #05060F; }
.switch[aria-pressed="true"]:active:not(:disabled) .knob { left: 17px; }
.switch:disabled { opacity: 0.4; cursor: default; }

.pill {
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(186, 214, 247, 0.04); font-size: 12px; color: var(--text); white-space: nowrap;
}

.chip {
  height: 30px; padding: 0 2px 0 10px; display: inline-flex; align-items: center; gap: 2px; border-radius: 8px;
  background: rgba(186, 214, 247, 0.06); border: 1px solid rgba(186, 207, 247, 0.12);
  font-family: var(--mono); font-size: 12px; color: var(--text);
  transition: opacity .2s, background .2s;
}
.chip.plain { padding: 0 10px; gap: 6px; font-family: var(--font); }
.chip.pending { opacity: .65; }
.chip button { width: 26px; height: 26px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 6px; background: transparent; color: var(--muted); transition: color .15s, background .15s; }
.chip button:hover { color: var(--text); background: var(--hi); }
.chip-add { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; border: 1px dashed rgba(186, 207, 247, 0.24); background: transparent; color: var(--text2); font-size: 12px; transition: border-color .15s, color .15s; }
.chip-add:hover { border-color: var(--line3); color: var(--text); }
.chip-input { height: 30px; width: 130px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line3); background: rgba(186, 214, 247, 0.04); font-family: var(--mono); font-size: 12px; color: var(--text); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.toggle-chip {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  border: 1px solid rgba(186, 207, 247, 0.14); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, transform .12s var(--ease);
}
.toggle-chip:hover { color: var(--text2); border-color: var(--line3); }
.toggle-chip:active { transform: scale(.96); }
.toggle-chip[aria-pressed="true"] { border-color: rgba(186, 215, 247, 0.45); background: rgba(186, 214, 247, 0.12); color: var(--text); }
.toggle-chip.sm { height: 30px; padding: 0 11px; font-size: 12px; gap: 5px; }
.toggle-chip .muted { font-size: 11px; }

/* Сегменты с «ездящей» подложкой: --i — номер выбранного, --n — сколько всего. */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 11px; background: rgba(186, 214, 247, 0.03); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; height: 36px; min-width: 0; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 8px; background: transparent; color: var(--text2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.seg button span { overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.seg:not(.slide) button[aria-pressed="true"] { background: rgba(186, 214, 247, 0.10); box-shadow: inset 0 0 0 1px rgba(186, 207, 247, 0.18); }
.seg.slide::before {
  content: ''; position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px - (var(--n) - 1) * 2px) / var(--n));
  transform: translateX(calc(var(--i) * (100% + 2px)));
  border-radius: 8px; background: rgba(186, 214, 247, 0.10); box-shadow: inset 0 0 0 1px rgba(186, 207, 247, 0.18);
  transition: transform .28s var(--ease);
}
.seg button .count { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }

.field { height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 6px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(186, 214, 247, 0.03); transition: border-color .15s, box-shadow .15s; }
.field input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); }
.field:focus-within { border-color: var(--line3); box-shadow: 0 0 0 3px rgba(186, 207, 247, 0.08); }
.field.sm { height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.field.sm input { font-family: var(--mono); font-size: 12.5px; }
.field input::placeholder { color: var(--faint); font-family: var(--font); }

.search { width: 260px; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; border: 1px solid rgba(186, 207, 247, 0.12); background: rgba(186, 214, 247, 0.03); color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--line3); }
.search input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font-size: 13px; }

.glass { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(186, 214, 247, 0.05); }

img.ex { flex-shrink: 0; display: inline-block; border-radius: 4px; vertical-align: -2px; object-fit: contain; }

/* ---------- верхняя полоса ---------- */

.topbar { position: relative; height: 60px; flex-shrink: 0; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.topbar .title { margin-left: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.topbar .crumb { margin-left: 12px; font-size: 15px; font-weight: 500; color: var(--text2); }
.topbar .crumb::before { content: '/'; margin-right: 12px; color: var(--faint); }
.topbar .summary { margin-left: 18px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.conn { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font-size: 12px; color: var(--warn); }

/* ---------- главная: колонки ---------- */

.home { position: relative; flex: 1; min-height: 0; padding: 16px 24px 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stack { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.col { position: relative; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--panel2); border: 1px solid rgba(186, 207, 247, 0.09); box-shadow: inset 0 1px 0 rgba(186, 214, 247, 0.05); }
.col.o-agregarot::before, .col.o-spuffer::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--o) 55%, transparent), transparent); opacity: .7; }
.stack .col.grow { flex: 1; }
.col-head { min-height: 60px; flex-shrink: 0; padding: 8px 6px 8px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(186, 207, 247, 0.08); }
.col-head .names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.col-head h2 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.col-head h2 a { color: inherit; text-decoration: none; }
.col-head h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.col-head .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head .head-tabs { flex: 1; min-width: 0; }
.head-tabs button .tab-dot { width: 6px; height: 6px; }
.tools-btn[aria-pressed="true"] { color: var(--o); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--o) 40%, transparent); background: color-mix(in srgb, var(--o) 10%, transparent); }
.col-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.notice { margin: 8px 8px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(245, 180, 85, 0.22); background: rgba(245, 180, 85, 0.05); font-size: 12px; color: var(--text2); }
.notice b { color: var(--text); font-weight: 600; }

/* меню действий колонки */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: 48px; right: 0; z-index: 30; min-width: 270px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  border-radius: 12px; background: rgba(14, 17, 30, 0.98); border: 1px solid var(--line2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 24px rgba(142, 187, 255, 0.08);
  transform-origin: top right;
}
.menu button, .menu .menu-link { width: 100%; min-height: 40px; padding: 8px 12px; display: flex; align-items: center; gap: 12px; border: none; border-radius: 8px; background: transparent; color: var(--text); text-align: left; text-decoration: none; font-size: 13.5px; transition: background .12s; }
.menu button:hover, .menu .menu-link:hover { background: var(--hi); }
.menu button.danger { color: var(--sell); }
.menu .item-sub { display: block; font-size: 12px; color: var(--muted); }
.menu .menu-note { display: block; padding: 6px 12px 8px; font-size: 12px; color: var(--muted); }
.menu-caption { padding: 8px 12px 6px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-custom { display: flex; align-items: center; gap: 6px; padding: 6px 6px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.menu-custom .field { flex: 1; }
.menu .menu-custom .btn { width: auto; min-height: 0; height: 32px; padding: 0 12px; justify-content: center; border: 1px solid var(--line2); background: rgba(186, 214, 247, 0.06); font-weight: 600; }
.menu .menu-custom .btn:hover { background: rgba(186, 214, 247, 0.12); }
.menu .menu-custom .btn.xs { height: 26px; padding: 0 8px; }

/* всплывающие окошки поверх всего (мьют, метка окна Tiger) */
#pop-root { position: relative; z-index: 70; }
#pop-root .pop { position: fixed; top: auto; right: auto; min-width: 0; }

/* ---------- карточки алертов ---------- */

.card {
  --o: var(--accent);
  position: relative; width: 100%; flex-shrink: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main side" "more more";
  border-radius: 12px; border: 1px solid rgba(186, 207, 247, 0.07); background: rgba(186, 214, 247, 0.03);
  color: var(--text2); overflow: hidden;
  transition: border-color .18s, background .18s, box-shadow .25s, opacity .25s;
}
.card.o-agregarot { --o: var(--c-agregarot); }
.card.o-spuffer { --o: var(--c-spuffer); }
.card.o-stoploss { --o: var(--c-stoploss); }
.card.o-nowostnik { --o: var(--c-nowostnik); }
.card.o-arbitrage { --o: var(--c-arbitrage); }
.card.o-oi { --o: var(--c-oi); }
.card .oi-hits .row { grid-template-columns: 110px minmax(0, 1fr) auto; }
.card::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--o); opacity: .85; box-shadow: 0 0 10px color-mix(in srgb, var(--o) 55%, transparent); transition: top .2s, bottom .2s; }
.card:hover { border-color: rgba(186, 207, 247, 0.15); background: rgba(186, 214, 247, 0.05); }
.card.dim { opacity: 0.5; }
.card.dim:hover { opacity: .8; }
.card.warn { border-color: rgba(245, 180, 85, 0.22); background: rgba(245, 180, 85, 0.05); }
.card.hot { border-color: color-mix(in srgb, var(--o) 45%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--o) 16%, transparent); }
.card.live { border-color: rgba(186, 207, 247, 0.12); }
.card-main { grid-area: main; min-width: 0; padding: 10px 6px 10px 14px; display: flex; flex-direction: column; gap: 4px; border: none; background: transparent; color: inherit; text-align: left; }
.card .l1, .card .l2 { width: 100%; min-width: 0; display: flex; gap: 7px; }
.card .l1 { align-items: center; }
.card .l2 { align-items: center; font-size: 12.5px; }
.card .coin { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.card .where { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .metric { flex-shrink: 0; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--text); border-radius: 5px; }
.card .metric.word { font-family: var(--font); font-size: 13px; }
.card .metric.buy { color: var(--buy); }
.card .metric.sell { color: var(--sell); }
.card .metric.warn { color: var(--warn); }
.card .what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .what b { color: var(--text); font-weight: 600; }
.card .when { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card .when.live { font-family: var(--mono); font-size: 11.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.card .when.soon { color: var(--c-nowostnik); font-variant-numeric: tabular-nums; }
.card .vol { display: inline-flex; align-items: center; gap: 3px; color: var(--text2); }
.card .vol svg { color: var(--muted); }
.card .dist { font-family: var(--mono); }
.card .vn { color: var(--text2); }

/* Суммы с весом: от $10k — жирно, от $50k — золотом. */
.amt { font-family: var(--mono); font-weight: 500; color: var(--text2); }
.amt.l { font-weight: 700; color: var(--text); }
.amt.xl { font-weight: 700; color: var(--gold); text-shadow: 0 0 12px rgba(255, 210, 122, 0.25); }
.metric .amt { font-size: 14px; }

.tag { flex-shrink: 0; height: 18px; padding: 0 6px; margin-right: 6px; display: inline-flex; align-items: center; gap: 3px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; background: rgba(186, 214, 247, 0.08); color: var(--text2); }
.tag.big { background: linear-gradient(135deg, rgba(255, 210, 122, 0.24), rgba(245, 180, 85, 0.14)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.35); }

/* значки вместо слов */
.arrow { flex-shrink: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.arrow.buy { color: var(--buy); background: rgba(79, 209, 165, 0.14); box-shadow: inset 0 0 0 1px rgba(79, 209, 165, 0.25); }
.arrow.sell { color: var(--sell); background: rgba(255, 123, 114, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 123, 114, 0.25); }
.spread { flex-shrink: 0; width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(186, 214, 247, 0.06); box-shadow: inset 0 0 0 1px rgba(186, 207, 247, 0.12); }
.spread.buy { color: var(--buy); }
.spread.sell { color: var(--sell); }
.glyph { flex-shrink: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--o); background: color-mix(in srgb, var(--o) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--o) 28%, transparent); }

/* кнопка «открыть в Tiger» — прямо в свёрнутой карточке */
.tiger-btn {
  grid-area: side; align-self: stretch; width: 44px; margin: 6px 6px 6px 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid rgba(186, 207, 247, 0.10); border-radius: 10px; background: rgba(186, 214, 247, 0.03); color: var(--text2);
  transition: background .15s, color .15s, border-color .15s, transform .12s var(--ease);
}
.tiger-btn:hover { background: rgba(186, 214, 247, 0.09); color: var(--text); border-color: var(--line3); }
.tiger-btn:active { transform: scale(.94); }
.tiger-btn .grp, .grp-chip { min-width: 16px; height: 14px; padding: 0 3px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; font-style: normal; line-height: 1; color: #05060F; background: var(--g, rgba(186, 214, 247, 0.2)); box-shadow: 0 0 8px color-mix(in srgb, var(--g, transparent) 50%, transparent); }
.tiger-btn.unset .grp { background: rgba(186, 214, 247, 0.12); color: var(--muted); box-shadow: none; }
.grp-chip { min-width: 22px; height: 20px; font-size: 11px; border-radius: 5px; }
.grp-chip.empty { background: rgba(186, 214, 247, 0.08); color: var(--muted); box-shadow: none; }

/* раскрытие: высота растёт плавно (grid 0fr -> 1fr) */
.card-more { grid-area: more; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .26s var(--ease), opacity .2s; }
.card.open .card-more { grid-template-rows: 1fr; opacity: 1; }
.more-in { min-height: 0; overflow: hidden; }
.card.open { border-color: color-mix(in srgb, var(--o) 30%, rgba(186, 207, 247, 0.12)); background: rgba(186, 214, 247, 0.065); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3); }
.more-in > :first-child { margin-top: 2px; }
.more-in > * { margin: 0 12px 10px 14px; }
.card .details { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 9px; background: rgba(5, 6, 15, 0.55); font-size: 12px; }
.card .details .row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.card .details .row .side { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.card .details .row .val { color: var(--text); font-family: var(--mono); display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.card .details .row .aux { color: var(--muted); font-family: var(--mono); }
.card .parts { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 9px; background: rgba(5, 6, 15, 0.5); }
.card .part { display: flex; flex-direction: column; gap: 4px; }
.card .part + .part { padding-top: 6px; border-top: 1px solid rgba(186, 207, 247, 0.07); }
.card .part-line { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text2); }
.card .part-line .arrow { width: 18px; height: 18px; }
.card .part-total { font-size: 12px; color: var(--muted); }
.chips-amt { display: flex; flex-wrap: wrap; gap: 4px; }
.amt-chip { height: 22px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 6px; background: rgba(186, 214, 247, 0.06); font-size: 11.5px; }
.card .facts { font-size: 12px; color: var(--text2); display: flex; flex-direction: column; gap: 3px; }
.card .facts span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.card .facts b { font-family: var(--mono); }
.card .actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* новое въезжает, изменившееся мигает */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter .36s var(--ease); }
  .card.enter { animation: card-in .5s var(--ease); }
  .flash { animation: flash .9s ease-out; }
  .dot.live { animation: breathe 2.4s ease-in-out infinite; }
  .card.live::before { animation: breathe 2.4s ease-in-out infinite; }
  .card.hot { animation: glow 2.6s ease-in-out infinite; }
  #app.view-in > * { animation: view-in .32s var(--ease); }
  .pop-in { animation: pop-in .16s var(--ease); }
  .t-body { animation: fade-up .24s var(--ease); }
}
@keyframes breathe { 50% { opacity: 0.45; } }
@keyframes enter { from { opacity: 0; transform: translateY(-4px); } }
@keyframes card-in {
  0% { opacity: 0; transform: translateY(-8px) scale(.985); box-shadow: 0 0 0 1px color-mix(in srgb, var(--o) 60%, transparent), 0 0 28px color-mix(in srgb, var(--o) 35%, transparent); }
  60% { opacity: 1; transform: none; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes flash { 0% { background: color-mix(in srgb, var(--o) 30%, transparent); } 100% { background: transparent; } }
@keyframes glow { 50% { box-shadow: 0 0 26px color-mix(in srgb, var(--o) 28%, transparent); } }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(4px); } }

.loud {
  flex-shrink: 0; padding: 8px 8px 8px 10px; display: flex; align-items: center; gap: 10px;
  border-radius: 12px; background: rgba(245, 180, 85, 0.08); border: 1px solid rgba(245, 180, 85, 0.3);
}
.loud .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.loud .txt b { color: var(--text); font-weight: 600; }
.loud .txt span { font-size: 12px; color: var(--text2); }
@media (prefers-reduced-motion: no-preference) { .loud { animation: loud 1.6s ease-in-out infinite; } }
@keyframes loud { 50% { border-color: rgba(245, 180, 85, 0.7); box-shadow: 0 0 22px rgba(245, 180, 85, 0.22); } }

/* ---------- функции ботов ---------- */

.tools-wrap { display: grid; grid-template-rows: 0fr; flex-shrink: 0; transition: grid-template-rows .3s var(--ease); }
.tools-wrap.open { grid-template-rows: 1fr; }
.tools-in { min-height: 0; overflow: hidden; }
.col .tools-wrap.open .tools-in { max-height: 58vh; overflow-y: auto; border-bottom: 1px solid rgba(186, 207, 247, 0.08); background: rgba(5, 6, 15, 0.35); }
.feed .tools-wrap { margin-bottom: 4px; }
.feed .tools-wrap.open .tools-in { border-radius: 12px; border: 1px solid var(--line); background: rgba(186, 214, 247, 0.03); }
.tools { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.tools .seg button { height: 32px; font-size: 12.5px; }
.tools .seg button svg { flex-shrink: 0; opacity: .8; }
.page-tools { padding: 16px 18px 18px; }
.t-body { display: flex; flex-direction: column; gap: 10px; }
.t-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-row.end { justify-content: flex-end; }
.t-row .field.sm { flex: 1; min-width: 140px; }
.t-row .chips .field.sm { flex: 0 0 auto; min-width: 0; }
.t-label { flex-shrink: 0; min-width: 64px; font-size: 12px; color: var(--muted); }
.t-title { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.t-title .muted { font-weight: 400; }
.t-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.t-error { margin: 0; font-size: 12px; color: var(--sell); }
.t-loading { display: flex; align-items: center; gap: 10px; padding: 10px 2px; font-size: 12.5px; color: var(--text2); }
.t-block { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid rgba(186, 207, 247, 0.07); }
.t-block:last-child { border-bottom: none; padding-bottom: 0; }
.t-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px dashed rgba(186, 207, 247, 0.16); background: rgba(186, 214, 247, 0.02); }
.t-list { display: flex; flex-direction: column; gap: 4px; }
.t-item { min-height: 36px; padding: 5px 6px 5px 10px; display: flex; align-items: center; gap: 7px; border-radius: 9px; background: rgba(186, 214, 247, 0.04); border: 1px solid rgba(186, 207, 247, 0.06); font-size: 12.5px; color: var(--text2); transition: background .15s, border-color .15s; }
.t-item.col { flex-direction: column; align-items: stretch; gap: 3px; padding: 6px 6px 7px 10px; }
.t-item-row { display: flex; align-items: center; gap: 7px; }
.t-item b.mono { color: var(--text); }
.t-item.link { width: 100%; border: 1px solid rgba(186, 207, 247, 0.06); text-align: left; cursor: pointer; }
.t-item.link:hover { background: rgba(186, 214, 247, 0.08); border-color: var(--line2); }
.t-item .legs { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.t-item .pct, .t-stat .pct { font-family: var(--mono); color: var(--c-arbitrage); min-width: 50px; }
.t-sub { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.t-stat { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-stat b { color: var(--text); }
.t-pre { margin: 0; padding: 10px 12px; border-radius: 9px; background: rgba(5, 6, 15, 0.6); font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--text2); white-space: pre-wrap; word-break: break-word; }
.t-pre.small { font-size: 11px; max-height: 360px; overflow: auto; }
.t-report { padding: 10px 12px; border-radius: 9px; background: rgba(5, 6, 15, 0.5); font-size: 12.5px; line-height: 1.6; color: var(--text2); }
.t-report b { color: var(--text); }
.t-report code { font-family: var(--mono); color: var(--text); }
.t-table { display: flex; flex-direction: column; border-radius: 9px; overflow: hidden; border: 1px solid rgba(186, 207, 247, 0.07); }
.t-table .tr { display: grid; align-items: center; gap: 8px; padding: 5px 10px; font-size: 12px; border-bottom: 1px solid rgba(186, 207, 247, 0.05); }
.t-table .tr:last-child { border-bottom: none; }
.t-table .tr:nth-child(odd) { background: rgba(186, 214, 247, 0.025); }
.t-table.prints .tr { grid-template-columns: 70px 16px 70px 1fr; font-family: var(--mono); }
.t-table.walls .tr { grid-template-columns: 22px minmax(70px, 1fr) 16px 74px 58px 52px 88px; }
.t-row > .t-note { flex: 1; min-width: 200px; }
.t-table .ex-cell { display: inline-flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; }
.t-table .ex-cell span { overflow: hidden; text-overflow: ellipsis; }
.t-table.prints { max-height: 420px; overflow-y: auto; }
.t-table.walls { max-height: 520px; overflow-y: auto; }

.tools-toggle { width: 100%; height: 34px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text2); font-size: 12.5px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
.tools-toggle:hover { background: var(--hi); color: var(--text); }
.tools-toggle svg:last-child { margin-left: auto; transition: transform .25s var(--ease); }
.tools-toggle.on { color: var(--text); border-color: color-mix(in srgb, var(--o) 40%, transparent); }
.tools-toggle.on svg:last-child { transform: rotate(180deg); }

/* ---------- Автозакрытие ---------- */

.stoploss { flex-shrink: 0; overflow: hidden; border-radius: 16px; background: rgba(186, 214, 247, 0.045); border: 1px solid rgba(186, 215, 247, 0.20); box-shadow: inset 0 1px 0 rgba(186, 214, 247, 0.06), 0 0 28px rgba(142, 187, 255, 0.07); }
.stoploss .col-head { min-height: 64px; }
.stoploss .body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.stoploss .hint { font-size: 12px; color: var(--muted); }
.stoploss .sep { height: 1px; background: rgba(186, 207, 247, 0.08); }
.sl-delay { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); }
.sl-in .sl-delay { padding: 0 12px 12px; }
.sl-delay-field { flex: 0 0 auto; width: 92px; }
.sl-delay-field input { text-align: right; }
.sl-delay-field .unit { font-size: 12px; color: var(--muted); }
.stoploss .closes { display: flex; flex-direction: column; gap: 2px; }
.stoploss .close-row { min-height: 30px; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.stoploss .close-row .sym { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); }
.stoploss .close-row .what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stoploss .close-row .t { flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.power { display: inline-flex; color: var(--muted); transition: color .3s, filter .3s; }
.power.on { color: var(--buy); filter: drop-shadow(0 0 6px rgba(79, 209, 165, 0.6)); }

/* ---------- уведомления в углу ---------- */

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 380px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  --o: var(--accent);
  position: relative; pointer-events: auto; padding: 12px 6px 16px 16px; display: flex; align-items: flex-start; gap: 8px; overflow: hidden;
  border-radius: 14px; background: #121829; border: 1px solid rgba(186, 215, 247, 0.30);
  border-left: 3px solid var(--o);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 34px color-mix(in srgb, var(--o) 22%, transparent);
  cursor: pointer; color: var(--text);
}
.toast::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 46px; background: linear-gradient(180deg, color-mix(in srgb, var(--o) 14%, transparent), transparent); pointer-events: none; }
.toast .body { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.toast .t1 { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--o); }
.toast .t1 .t-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .t1 .t-time { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--text2); }
.toast .t2 { display: flex; align-items: center; gap: 7px; }
.toast .t2 .coin { font-family: var(--mono); font-size: 16px; font-weight: 700; color: #FFFFFF; }
.toast .t2 .where { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .t2 .metric { font-family: var(--mono); font-size: 15px; font-weight: 700; color: #FFFFFF; }
.toast .t3 { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #CFD7E6; min-width: 0; }
.toast .t3 .what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast .t3 b { color: #FFFFFF; }
.toast .t3.plain { white-space: normal; color: var(--text); font-size: 13px; }
.toast .t-side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.toast .tiger-mini { color: var(--text2); }
.toast .bar { position: absolute; left: 16px; right: 14px; bottom: 7px; height: 2px; border-radius: 2px; background: rgba(186, 207, 247, 0.14); overflow: hidden; }
.toast .bar i { display: block; height: 100%; width: 100%; background: var(--o); transform-origin: left; }
.toast.urgent { border-color: rgba(242, 193, 78, 0.6); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75), 0 0 44px rgba(242, 193, 78, 0.35); }
.toast.msg { padding: 12px 16px; cursor: default; border-left-width: 1px; }
.toast.msg::after { display: none; }
.toast.msg.bad { border-color: rgba(255, 123, 114, 0.5); background: #1F1318; }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .32s var(--ease); }
  .toast.leaving { animation: toast-out .22s ease-in forwards; }
  .toast .bar i { animation: shrink var(--life, 8s) linear forwards; }
  .toast.urgent { animation: toast-in .32s var(--ease), urgent 1.2s ease-in-out .3s 4; }
}
.toast.leaving { pointer-events: none; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(28px); } }
@keyframes shrink { to { transform: scaleX(0); } }
@keyframes urgent { 50% { box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75), 0 0 60px rgba(242, 193, 78, 0.6); } }

/* ---------- меню слева ---------- */

.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(2, 3, 8, 0.55); }
.drawer {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 61; width: 300px; display: flex; flex-direction: column;
  background: var(--bg2); border-right: 1px solid rgba(186, 207, 247, 0.12); box-shadow: 24px 0 48px rgba(0, 0, 0, 0.5);
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide-in .22s var(--ease); }
  .backdrop { animation: fade-in .2s ease-out; }
  #drawer-root.closing .drawer { animation: slide-out .18s ease-in forwards; }
  #drawer-root.closing .backdrop { animation: fade-out .18s ease-in forwards; }
}
@keyframes slide-in { from { transform: translateX(-28px); opacity: 0; } }
@keyframes slide-out { to { transform: translateX(-28px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.drawer .head { height: 60px; flex-shrink: 0; padding: 0 8px 0 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.drawer nav { flex: 1; min-height: 0; padding: 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { position: relative; width: 100%; height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: none; border-radius: 10px; background: transparent; color: var(--text2); font-weight: 500; text-align: left; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--hi); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--hi); box-shadow: inset 0 0 0 1px rgba(186, 207, 247, 0.12); color: var(--text); }
.nav-item.o-agregarot::after, .nav-item.o-spuffer::after, .nav-item.o-stoploss::after, .nav-item.o-nowostnik::after, .nav-item.o-arbitrage::after, .nav-item.o-oi::after { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--o); opacity: .8; }
.nav-item .grow { flex: 1; }
.nav-item .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.nav-sep { height: 1px; margin: 14px 12px; background: var(--line); }
.drawer .foot { padding: 14px 24px 18px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(186, 207, 247, 0.08); font-size: 12px; color: var(--muted); }

/* ---------- страницы: бот, настройки ---------- */

.page { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 28px 40px 40px; }
.page-in { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; }
.page-head .names { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.page-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.page-head h1[class*="o-"] { text-shadow: 0 0 28px color-mix(in srgb, var(--o) 30%, transparent); }
.page-head .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.divider { flex-shrink: 0; align-self: flex-end; width: 1px; height: 24px; margin: 0 8px 10px; background: rgba(186, 207, 247, 0.14); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(186, 214, 247, 0.05); }
.tile .big { font-family: var(--dot); font-weight: 800; font-size: 32px; line-height: 1; color: var(--text); }
.tile .big small { font-family: var(--font); font-weight: 400; font-size: 14px; color: var(--text2); margin-left: 6px; }
.tile .sub { font-size: 12px; color: var(--text2); }

.section { overflow: hidden; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(186, 214, 247, 0.05); }
.section > .head { height: 52px; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.section > .head .caps { flex: 1; }
.section > .head .note { font-size: 12px; color: var(--muted); }
.section .body { padding: 20px 18px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
.fields { display: flex; flex-direction: column; gap: 22px; }
.fieldset { display: flex; flex-direction: column; gap: 8px; }
.fieldset > label, .fieldset > .label { font-size: 13px; font-weight: 500; color: var(--text); }
.fieldset .help { font-size: 12px; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); }
.row-line { min-height: 68px; padding: 12px 10px 12px 18px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(186, 207, 247, 0.08); }
.row-line:last-child { border-bottom: none; }
.row-line .names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-line .names b { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.row-line .names span { font-size: 12px; color: var(--muted); }
.row-block { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid rgba(186, 207, 247, 0.08); }
.row-block:last-child { border-bottom: none; }
.row-block > b { font-weight: 500; color: var(--text); }
.row-block .help svg { vertical-align: -2px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 16px; }
.qr { flex-shrink: 0; width: 120px; height: 120px; padding: 8px; border-radius: 12px; background: #fff; }
.qr img { width: 100%; height: 100%; display: block; }
.qr-empty { flex-shrink: 0; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px dashed rgba(186, 207, 247, 0.30); font-size: 12px; color: var(--muted); text-align: center; }
.tiger-row { min-height: 58px; }
.grp-btn { gap: 6px; }
.group-pop .grp-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; padding: 4px 6px 6px; }
.menu .grp-cell { width: auto; min-width: 0; height: 30px; min-height: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 0; border: 1px solid transparent; border-radius: 7px; background: rgba(186, 214, 247, 0.03); transition: background .12s, border-color .12s, transform .12s var(--ease); }
.menu .grp-cell:hover { background: rgba(186, 214, 247, 0.1); transform: translateY(-1px); }
.menu .grp-cell.on { border-color: var(--accent); background: rgba(186, 214, 247, 0.1); }
.group-pop .grp-cell .grp-chip { min-width: 20px; height: 18px; }

.list { display: flex; flex-direction: column; gap: 6px; }
.event-row { min-height: 36px; display: flex; align-items: center; gap: 12px; font-size: 13px; border-bottom: 1px solid rgba(186, 207, 247, 0.06); }
.event-row .t { flex-shrink: 0; width: 48px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- открытый интерес ---------- */

.oi-page { max-width: 1440px; }
.oi-sub { font-size: 13.5px; color: var(--text2); }
.oi-bad { font-size: 12.5px; color: var(--warn); cursor: help; }

/* overflow: clip, а не hidden: иначе шапка таблицы не прилипнет при прокрутке страницы */
.oi-table-sec { overflow: clip; }
.oi-filters { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.oi-f { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oi-f .t-label { min-width: 0; }
.oi-f .seg button { height: 32px; padding: 0 12px; font-size: 12.5px; }
.toggle-chip.ex { padding: 0 10px 0 8px; }
.toggle-chip.ex img.ex { vertical-align: 0; }
.oi-search { width: 190px; height: 36px; }

/* Строка таблицы: монета | ОИ было → сейчас | оборот было → сейчас */
.oi-grid { display: grid; grid-template-columns: minmax(84px, .45fr) minmax(0, 1fr) minmax(0, 1fr) 16px; align-items: center; column-gap: 28px; }
.oi-th { position: sticky; top: -28px; z-index: 2; padding: 8px 16px 7px; border-bottom: 1px solid var(--line); background: #0B0D17; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.oi-th > * { min-width: 0; white-space: nowrap; }
.oi-th .sort { min-width: 0; padding: 4px 0; display: inline-flex; align-items: center; gap: 3px; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.oi-th .sort:hover, .oi-th .sort.on { color: var(--text); }
.oi-th .sort.sz { margin-left: auto; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); font-family: var(--mono); letter-spacing: 0; }
.oi-th .sort.sz.on { border-color: var(--line3); }
.th-pair { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.th-sub { overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; letter-spacing: .02em; text-transform: none; color: var(--faint); }
.oi-wait { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--warn); }
.oi-row { scroll-margin-top: 46px; border-bottom: 1px solid rgba(186, 207, 247, 0.06); transition: background .15s; }
.oi-row:last-child { border-bottom: none; }
.oi-main { width: 100%; min-height: 46px; padding: 6px 16px; border: none; background: transparent; color: var(--text2); font-size: 13px; text-align: left; transition: background .12s; }
.oi-main:hover { background: rgba(186, 214, 247, 0.04); }
.oi-row.open { background: rgba(186, 214, 247, 0.025); box-shadow: inset 2px 0 0 var(--c-oi); }
.oi-row.open .oi-main { background: rgba(186, 214, 247, 0.05); }
.c-coin { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.c-coin b { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--text); }
.small { font-size: 11px; }
.c-chev { justify-self: end; display: inline-flex; color: var(--faint); transition: transform .22s var(--ease); }
.oi-row.open .c-chev { transform: rotate(180deg); }
.oi-rows { transition: opacity .2s; }
.oi-rows.busy { opacity: .65; }
.oi-more-btn { width: 100%; height: 44px; border: none; border-top: 1px solid var(--line); background: transparent; color: var(--text2); font-size: 13px; }
.oi-more-btn:hover { background: var(--hi); color: var(--text); }

/* «было → сейчас»: цифры, полоса (серое — было/осталось, зелёное — прибавилось, красное — убыло), процент */
.pair { min-width: 0; display: grid; grid-template-columns: minmax(128px, auto) minmax(36px, 1fr) 62px; align-items: center; column-gap: 12px; }
.pv { min-width: 0; overflow: hidden; display: inline-flex; align-items: baseline; gap: 5px; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv .was { color: var(--muted); }
.pv .ar { color: var(--faint); font-size: 11px; }
.pv b { font-weight: 500; color: var(--text); }
.bar { height: 8px; display: flex; gap: 2px; }
.bar i { height: 100%; min-width: 2px; }
.bar i:first-child { border-radius: 4px 0 0 4px; }
.bar i:last-child { border-radius: 0 4px 4px 0; }
.bar i:only-child { border-radius: 4px; }
.bar .b { background: rgba(186, 207, 247, 0.26); }
.bar .u { background: var(--buy); }
.bar .dn { background: color-mix(in srgb, var(--sell) 70%, transparent); }
.pp { justify-self: end; font-family: var(--mono); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Монета: графики бирж и список бирж */
.oi-detail { padding: 8px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.od-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-coin { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text); }
.od-price { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--text2); }
.od-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.od-card { min-width: 0; padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 8px; border-radius: 12px; background: rgba(5, 6, 15, 0.55); border: 1px solid rgba(186, 207, 247, 0.07); }
.od-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.od-title > b { color: var(--text); font-weight: 600; }
.od-from { margin-left: auto; font-size: 11.5px; color: var(--warn); cursor: help; }
.od-venues { display: flex; flex-direction: column; border-radius: 10px; border: 1px solid rgba(186, 207, 247, 0.07); overflow: hidden; }
.oi-vgrid { display: grid; grid-template-columns: minmax(150px, .5fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: 28px; }
.od-venues .vh { padding: 7px 12px; background: rgba(186, 214, 247, 0.03); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.od-venues .vh > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-venues .vr { width: 100%; min-height: 40px; padding: 4px 12px; border: none; border-top: 1px solid rgba(186, 207, 247, 0.05); background: transparent; color: var(--text2); font-size: 12.5px; text-align: left; transition: background .12s, opacity .12s; }
.od-venues .vr:hover:not(:disabled) { background: rgba(186, 214, 247, 0.05); }
.od-venues .vr:disabled { cursor: default; }
.od-venues .vr[aria-pressed="false"]:not(:disabled) .v-name { opacity: .55; }
.od-venues .vr.total .v-name > span { font-weight: 600; color: var(--text); }
.od-venues .pv { font-size: 12px; }
.od-venues .pp { font-size: 12.5px; }
.v-name { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.v-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-name em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.v-name .key { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--c); }
.vr[aria-pressed="false"] .v-name .key { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.vr:disabled .v-name .key { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }

/* График: SVG растянут на ширину, подписи осей — HTML поверх (не растягиваются). */
.oi-chart { position: relative; height: var(--h); border-radius: 6px; outline-offset: 4px; touch-action: pan-y; }
.oi-chart.empty { display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px dashed rgba(186, 207, 247, 0.14); font-size: 12.5px; color: var(--muted); text-align: center; }
.oi-chart .plot { position: absolute; top: 8px; right: 58px; bottom: 22px; left: 0; }
.oi-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.oi-chart .g { stroke: rgba(186, 207, 247, 0.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.oi-chart .z { stroke: rgba(186, 207, 247, 0.30); stroke-width: 1; vector-effect: non-scaling-stroke; }
.oi-chart .ln { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; transition: opacity .15s; }
.oi-chart .ln.wide { stroke-width: 3; }
.oi-chart .dim { opacity: .15; }
.oi-chart .end { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #0A0C16; transition: opacity .15s; }
.oi-chart .yax { position: absolute; top: 8px; right: 0; bottom: 22px; width: 54px; }
.oi-chart .yax span { position: absolute; right: 0; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.oi-chart .xax { position: absolute; left: 0; right: 58px; bottom: 0; height: 16px; }
.oi-chart .xax span { position: absolute; bottom: 0; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.oi-chart .xax .first { transform: none; }
.oi-chart .xax .last { transform: translateX(-100%); }
.chart-tip { position: fixed; z-index: 80; min-width: 150px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; border-radius: 10px; background: rgba(14, 17, 30, 0.97); border: 1px solid var(--line2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55); font-size: 12px; color: var(--text2); pointer-events: none; }
.chart-tip .tt { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chart-tip .tr { display: grid; grid-template-columns: 12px 58px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
.chart-tip .tr i { width: 12px; height: 2px; border-radius: 2px; }
.chart-tip .tr b { justify-self: end; font-family: var(--mono); font-weight: 600; color: var(--text); }
.chart-tip .tr .tv { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.chart-tip .tx { font-size: 11.5px; color: var(--text2); }
.chart-cross { position: fixed; z-index: 79; width: 1px; background: rgba(186, 207, 247, 0.35); pointer-events: none; }
.chart-dot { position: fixed; z-index: 79; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #0A0C16; pointer-events: none; }
.chart-tip[hidden], .chart-cross[hidden], .chart-dot[hidden] { display: none; }

/* Уведомления — свёрнуты в одну строку, раскрываются по нажатию */
.oi-rules-sec > .head { width: 100%; border: none; border-bottom: 1px solid var(--line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.oi-rules-sec > .head:hover { background: rgba(186, 214, 247, 0.03); }
.oi-rules-sec:not(.open) > .head { border-bottom-color: transparent; }
.oi-rules-sec.open > .head .c-chev { transform: rotate(180deg); }
.oi-rules-sec .t-row .field.sm { flex: 0 0 auto; min-width: 0; }
.oi-rule { min-height: 46px; }
.oi-rule.off { opacity: .55; }
.oi-rule .switch { width: 46px; height: 34px; }
.oi-rule .grow b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.oi-link { color: var(--text2); }
.oi-link:hover { color: var(--c-oi); }

@media (max-width: 1100px) {
  .od-grid { grid-template-columns: minmax(0, 1fr); }
  .oi-grid, .oi-vgrid { column-gap: 18px; }
  .pair { grid-template-columns: minmax(0, 1fr) 58px; grid-template-areas: "v p" "b b"; row-gap: 5px; }
  .pair .pv { grid-area: v; }
  .pair .bar { grid-area: b; height: 6px; }
  .pair .pp { grid-area: p; }
}
@media (max-width: 760px) {
  .oi-filters { padding: 10px 12px; }
  .oi-f { flex-basis: 100%; }
  .oi-f .seg { flex: 1; }
  .oi-f .seg button { padding: 0 4px; font-size: 11.5px; }
  .oi-search { width: 100%; }
  .oi-th { top: -20px; padding: 8px 12px; }
  .th-sub { display: none; }
  .oi-main { padding: 7px 12px; }
  .oi-grid { grid-template-columns: minmax(58px, .5fr) minmax(0, 1fr) minmax(0, 1fr) 12px; column-gap: 12px; }
  .pair { grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; }
  .pv { font-size: 11px; gap: 3px; }
  .pp { font-size: 12px; }
  .oi-detail { padding: 6px 10px 14px; }
  .oi-vgrid { grid-template-columns: minmax(70px, .5fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; }
  .od-venues .vh, .od-venues .vr { padding-left: 8px; padding-right: 8px; }
  .od-venues .pv { font-size: 10.5px; }
  .od-venues .pp { font-size: 11px; }
  .v-name { gap: 5px; }
  .v-name em { display: none; }
  .od-venues .vh > :first-child { visibility: hidden; }
}
@media (max-width: 480px) {
  .pv .was, .pv .ar { display: none; }
}

/* ---------- логи ---------- */

.logs-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.logs-bar { height: 56px; flex-shrink: 0; padding: 0 12px 0 18px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.logs-bar .title { flex: 1; font-weight: 600; color: var(--text); }
.logs {
  flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 14px 18px; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--text2); white-space: pre-wrap; word-break: break-word;
}
.logs .w { color: var(--warn); }
.logs .e { color: var(--sell); }
.logs .a { color: var(--text); }

/* ---------- вход ---------- */

.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 22px; }
.login .err { min-height: 18px; font-size: 13px; color: var(--sell); }

/* ---------- мини-режим и телефон ---------- */

.mini, .phone { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mini .top, .phone .top { flex-shrink: 0; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.phone .top[data-region] { padding: 18px 8px 6px 20px; }

.bots-strip { border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s; }
.strip-head { width: 100%; min-height: 40px; padding: 6px 10px 6px 12px; display: flex; align-items: center; gap: 10px; border: none; background: transparent; color: var(--text2); text-align: left; transition: background .15s; }
.strip-head:hover { background: var(--hi); }
.strip-head .dots { display: inline-flex; align-items: center; gap: 6px; }
/* Список стоящих ботов длинный — в узком окне переносится на вторую строку, а не режется. */
.strip-head .strip-sum { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.strip-head .chev { display: inline-flex; color: var(--muted); transition: transform .28s var(--ease); }
.bots-strip.collapsed .chev { transform: rotate(-90deg); }
.strip-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s var(--ease), opacity .25s; }
.bots-strip.collapsed .strip-body { grid-template-rows: 0fr; opacity: 0; }
.strip-in { min-height: 0; overflow: hidden; }
.strip-in .tiles2 { padding: 0 8px 8px; }
.tiles2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bot-tile { position: relative; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px; background: rgba(186, 214, 247, 0.03); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; transition: border-color .15s, background .15s; overflow: hidden; }
.bot-tile::after { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--o); opacity: .8; }
.bot-tile:hover { border-color: var(--line2); background: rgba(186, 214, 247, 0.06); }
.bot-tile .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-tile .count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (max-width: 400px) {
  .bot-tile { padding: 0 9px 0 10px; gap: 6px; font-size: 12px; }
  .bot-tile .count { font-size: 11px; }
}
.bot-tile.off { color: var(--muted); background: rgba(186, 214, 247, 0.02); }
.tiles2 .bot-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

.sl-row { border-radius: 12px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.sl-main { min-height: 56px; padding: 0 4px 0 14px; display: flex; align-items: center; gap: 12px; }
.sl-row .names { flex: 1; min-width: 0; height: 52px; padding: 0; display: flex; flex-direction: column; justify-content: center; border: none; background: transparent; text-align: left; }
.sl-row .names b { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.sl-row .names b svg { color: var(--muted); transition: transform .25s var(--ease); }
.sl-row.open .names b svg { transform: rotate(180deg); }
.sl-row .names span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s var(--ease); }
.sl-row.open .sl-more { grid-template-rows: 1fr; }
.sl-in { min-height: 0; overflow: hidden; }
.sl-in .chips { padding: 0 12px 12px; }
.sl-in .hint { font-size: 12px; color: var(--muted); }

/* Вкладки мини-окна и телефона: ширина по слову (равные клетки резали «Плотности»),
   свободное место — поровну. Не влезли — листаются пальцем/колёсиком. Подложку
   ставит main.js (placeFilterPill) через --pill-x/--pill-w на обёртке. */
.seg.filters { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.seg.filters::-webkit-scrollbar { display: none; }
.seg.filters::before {
  width: var(--pill-w, 0px); transform: translateX(var(--pill-x, 0px)); left: 0;
  transition: transform .28s var(--ease), width .28s var(--ease);
}
.filters button { flex: 1 0 auto; font-size: 12px; padding: 0 7px; gap: 5px; }
.filters button span { overflow: visible; display: inline-grid; }
/* Жирная надпись выбранной вкладки не должна двигать соседей: место под жирную — всегда. */
.filters button span::after { content: attr(data-t); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; }
.filters button .tab-dot { width: 5px; height: 5px; }
@media (max-width: 470px) { .filters button .tab-dot { display: none; } }
@media (max-width: 400px) { .filters button { padding: 0 3px; font-size: 11.5px; } }

.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.feed-head { padding: 12px 20px 6px; display: flex; align-items: baseline; justify-content: space-between; }
.tabbar { flex-shrink: 0; height: 76px; padding: 6px 12px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-top: 1px solid var(--line); background: rgba(5, 6, 15, 0.94); }
.tabbar button { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 12px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; transition: background .15s, color .15s; }
.tabbar button[aria-current="page"] { background: rgba(186, 214, 247, 0.06); color: var(--text); }

/* узкое окно (мини-панель): карточка компактнее, кнопка Tiger меньше */
@media (max-width: 520px) {
  .tiger-btn { width: 38px; margin: 5px 5px 5px 0; }
  .card-main { padding: 9px 4px 9px 13px; }
  .t-table.walls .tr { grid-template-columns: 22px minmax(60px, 1fr) 16px 64px 56px 48px; }
  .t-table.walls .tr > :last-child { display: none; }
  #toasts { width: auto; left: 12px; right: 12px; }
}

@media (max-width: 1100px) {
  .home { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-y: auto; }
  .home .stack { grid-column: 1 / -1; min-height: 640px; }
  .col { min-height: 520px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  .page { padding: 20px 16px 96px; }
  .page-head h1 { font-size: 26px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  #toasts { left: 12px; right: 12px; bottom: 88px; width: auto; }
  .topbar .summary, .topbar .search, .topbar [data-action="mini"] { display: none; }
  .topbar .crumb { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
