/* SZ Auction — тема в духе Oxide: поле точек, стеклянные панели,
   боковая навигация, моноширинные цифры; акцент — голубой. */
:root {
  --bg: #060a11;
  --panel: rgba(11, 17, 29, 0.72);
  --panel-solid: #0d1422;
  --panel-2: rgba(255, 255, 255, 0.028);
  --panel-hover: rgba(79, 156, 249, 0.055);
  --border: rgba(140, 180, 255, 0.10);
  --border-strong: rgba(140, 180, 255, 0.18);
  --text: #d9e4f3;
  --head: #f0f6ff;
  --text-2: #aebed6;
  --text-3: #8497b5;
  --accent: #4f9cf9;
  --accent-2: #6d9dff;
  --accent-soft: #8fdcff;
  --accent-dim: rgba(79, 156, 249, 0.13);
  --good: #35d49a;
  --good-bg: rgba(53, 212, 154, 0.12);
  --bad: #ff5d6c;
  --bad-bg: rgba(255, 93, 108, 0.12);
  --gold: #ffc65c;
  --violet: #b07aff;
  --up: #35d49a;
  --down: #ff5d6c;
  --fs: 1.12;
  --radius: 8px;
  --radius-lg: 12px;
  --nav-w: 212px;
  --panel-w: 318px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: calc(14px * var(--fs))/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* мягкое свечение поверх точек: голубое сверху справа, бирюзовое снизу */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(60, 150, 255, 0.10), transparent 60%),
    radial-gradient(800px 420px at 0% 105%, rgba(40, 200, 255, 0.06), transparent 60%);
}
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.ic {
  width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.14em;
}
.nav-ic, .sb-ic, .search-ic { display: inline-flex; align-items: center; color: inherit; }
.nav-ic .ic { width: 17px; height: 17px; }
.mono, .val, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); font-size: calc(12.5px * var(--fs)); }
.ml-auto { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.good { color: var(--good); } .bad { color: var(--bad); } .gold { color: var(--gold); }
[hidden] { display: none !important; }

/* стекло — всё, что лежит на поле точек */
.glass, .card, .kpi {
  background: var(--panel);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--border);
}

/* ── раскладка ─────────────────────────────────────────────────────── */
#app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--nav-w) var(--panel-w) minmax(0, 1fr);
  gap: 10px;
  height: calc(100vh - 46px);
  padding: 10px 10px 0;
}
body.panel-hidden #app, body.panel-auto #app { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
body.panel-hidden #item-panel, body.panel-auto #item-panel { display: none; }

#tab-content { overflow-y: auto; min-width: 0; padding: 0 4px 14px 0; scrollbar-gutter: stable; }
#tab-content > section { display: none; flex-direction: column; gap: 12px; }
#tab-content > section.active { display: flex; animation: rise .22s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }

/* ── навигация ─────────────────────────────────────────────────────── */
#sidebar {
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  padding: 12px 10px; overflow: hidden auto;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 10px 12px; cursor: pointer; white-space: nowrap;
  font: 700 calc(14px * var(--fs)) var(--mono); letter-spacing: .14em; color: var(--head);
  transition: filter .15s;
}
.brand:hover { filter: brightness(1.2); }
.brand b { color: var(--accent); font-weight: 700; }
.brand-ring {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 3px solid var(--accent); box-shadow: 0 0 12px rgba(79, 156, 249, .65);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3); padding: 12px 11px 5px; white-space: nowrap;
}
.nav button, .side-btn, .switch-row {
  display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 11px; border-radius: var(--radius);
  color: var(--text-2); background: none; border: 0; cursor: pointer;
  font: calc(13.5px * var(--fs)) var(--sans); text-align: left; position: relative; white-space: nowrap;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav button:hover, .side-btn:hover, .switch-row:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.nav button.active { background: var(--accent-dim); color: var(--head); }
.nav button.active::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.nav .nav-ic, .side-btn .nav-ic, .switch-row .nav-ic { color: var(--text-3); transition: color .15s; }
.nav button.active .nav-ic { color: var(--accent); }
.nav button:hover .nav-ic, .side-btn:hover .nav-ic { color: var(--text-2); }
.nav-badge {
  margin-left: auto; font: 600 calc(10.5px * var(--fs)) var(--mono); font-style: normal;
  background: var(--good); color: #04140d; border-radius: 9px; padding: 0 6px; line-height: 17px;
}
.nav-spacer { flex: 1; min-height: 12px; }
.side-controls { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
.switch-row .switch { margin-left: auto; }
.switch-row b { color: var(--text-3); font-weight: 500; font-family: var(--mono); font-size: calc(12px * var(--fs)); }
#sniper-switch.on .nav-ic { color: var(--good); filter: drop-shadow(0 0 5px rgba(53, 212, 154, .6)); }
#net-switch.on b { color: var(--accent); }

/* узкий экран: навигация сворачивается в полосу иконок */
@media (max-width: 1240px) {
  :root { --nav-w: 60px; --panel-w: 296px; }
  .nav-lbl, .nav-group, .brand span:last-child { display: none; }
  .nav-group { display: block; height: 10px; padding: 0; font-size: 0; }
  .brand { justify-content: center; padding: 6px 0 12px; }
  .nav button, .side-btn, .switch-row { justify-content: center; padding: 0; }
  .nav button.active::before { left: -10px; }
  .nav-badge { position: absolute; top: 3px; right: 3px; margin: 0; }
  .switch-row { flex-direction: column; height: auto; padding: 6px 0; gap: 4px; }
  .switch-row .switch { margin: 0; transform: scale(.85); }
}
@media (max-width: 1100px) {
  :root { --panel-w: 270px; }
}

/* ── список предметов ──────────────────────────────────────────────── */
#item-panel {
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; min-height: 0;
}
.search-box { position: relative; display: flex; align-items: center; }
.search-box .search-ic { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.search-box .search-ic .ic { width: 15px; height: 15px; }
.search-box input { width: 100%; padding-left: 34px; }
.search-box.sm input { height: 32px; }
.panel-filters { display: flex; flex-direction: column; gap: 6px; }
.panel-filters select { width: 100%; height: 30px; font-size: calc(12.5px * var(--fs)); }
.panel-meta { display: flex; justify-content: space-between; gap: 6px; padding: 0 2px; }
.panel-meta .muted { font-size: calc(11.5px * var(--fs)); }
#item-list { flex: 1; overflow-y: auto; position: relative; min-height: 0; margin: 0 -6px; }
.item-row {
  position: absolute; left: 6px; right: 6px; height: 44px;
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center; gap: 9px; padding: 0 8px 0 6px;
  border-radius: var(--radius); cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s;
}
.item-row:hover { background: rgba(255, 255, 255, .045); }
.item-row.selected { background: var(--accent-dim); box-shadow: inset 0 0 0 1px rgba(79, 156, 249, .3); }
.item-row img {
  width: 32px; height: 32px; object-fit: contain;
  background: rgba(255, 255, 255, .03); border-radius: 7px;
}
.item-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--fs)); }
.item-row .nm small { display: block; color: var(--text-3); font-size: calc(11px * var(--fs)); overflow: hidden; text-overflow: ellipsis; }
.item-row .px { text-align: right; font: calc(12.5px * var(--fs))/1.25 var(--mono); color: var(--text); white-space: nowrap; }
.item-row .px small { display: block; font-size: calc(10.5px * var(--fs)); color: var(--text-3); }
.item-row .px small.up { color: var(--good); } .item-row .px small.down { color: var(--bad); }
.item-row .px.stale { opacity: .5; }
.item-row .nm .qtag { display: block; font-size: calc(11px * var(--fs)); line-height: 1.2; }

/* категории — свой выпадающий список с векторными иконками */
.cat-dd { position: relative; }
.cat-dd-btn {
  width: 100%; height: 34px; display: flex; align-items: center; gap: 9px;
  padding: 0 11px; font: calc(13px * var(--fs)) var(--sans); text-align: left; cursor: pointer;
  background: rgba(3, 8, 16, .45); border: 1px solid var(--border-strong);
  border-radius: var(--radius); color: var(--text);
}
.cat-dd-btn:hover { border-color: rgba(79, 156, 249, .45); }
.cat-dd-btn::after { content: ""; margin-left: auto; width: 7px; height: 7px; border: solid var(--text-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.cat-dd-btn .muted { display: none; }
.cat-dd-list {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 40;
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 5px; max-height: 62vh; overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
}
.cat-dd-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: calc(13px * var(--fs));
}
.cat-dd-row:hover { background: rgba(255, 255, 255, .05); }
.cat-dd-row.active { background: var(--accent-dim); color: var(--accent); }
.cat-dd-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-ic { width: 16px; height: 16px; color: var(--accent); opacity: .85; }
.cat-dd-row .cat-ic, .cat-dd-btn .cat-ic {
  width: 26px; height: 26px; padding: 5px; border-radius: 7px;
  background: rgba(79, 156, 249, .08);
}
.cat-dd-btn .cat-ic { width: 22px; height: 22px; padding: 4px; }

/* ── кнопки ────────────────────────────────────────────────────────── */
button { font: inherit; color: inherit; }
.btn, .btn-primary, .btn-sniper, .btn-sold, .back-arrow {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .035);
  color: var(--text); font: 500 calc(13px * var(--fs)) var(--sans); cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s, filter .15s;
}
.btn:hover, .back-arrow:hover { background: rgba(255, 255, 255, .075); border-color: rgba(140, 180, 255, .3); }
.btn:active, .btn-primary:active, .btn-sniper:active, .btn-sold:active, .back-arrow:active { transform: translateY(1px); }
.btn:focus-visible, .nav button:focus-visible, .seg button:focus-visible { outline: 2px solid rgba(79, 156, 249, .6); outline-offset: 1px; }
.btn.primary, .btn-primary {
  background: linear-gradient(180deg, #62cfff, #38a6ee); border-color: transparent;
  color: #031220; font-weight: 600;
  box-shadow: 0 4px 18px rgba(79, 156, 249, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn.primary:hover, .btn-primary:hover { filter: brightness(1.08); }
.btn.accent, .btn-sniper { color: var(--accent); border-color: rgba(79, 156, 249, .38); background: rgba(79, 156, 249, .07); }
.btn.accent:hover, .btn-sniper:hover { background: rgba(79, 156, 249, .15); border-color: rgba(79, 156, 249, .6); }
.btn.good, .btn-sold { color: var(--good); border-color: rgba(53, 212, 154, .38); background: rgba(53, 212, 154, .06); }
.btn.good:hover, .btn-sold:hover { background: rgba(53, 212, 154, .14); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.btn.sm, .btn-sniper, .btn-sold, .back-arrow { height: 28px; padding: 0 10px; font-size: calc(12px * var(--fs)); border-radius: 7px; }
.btn.block { width: 100%; }
.btn .nav-ic .ic, .btn-sniper .ic, .btn-sold .ic { width: 15px; height: 15px; }
.btn.sm .nav-ic .ic { width: 13px; height: 13px; }
.btn:disabled, .btn-primary:disabled, .btn-sniper:disabled, .btn-sold:disabled { opacity: .4; pointer-events: none; }
.del-btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px; border: 0; background: none;
  color: var(--text-3); cursor: pointer; transition: background .15s, color .15s;
}
.del-btn:hover { color: var(--bad); background: var(--bad-bg); }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.del-btn .ic, .icon-btn .ic { width: 15px; height: 15px; }

/* сегментный переключатель */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: rgba(3, 8, 16, .45); border: 1px solid var(--border); border-radius: 9px;
}
.seg button {
  height: 26px; padding: 0 10px; border-radius: 6px; border: 0; background: none;
  color: var(--text-2); font-size: calc(12px * var(--fs)); cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.seg button.on, .seg button.active { background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(79, 156, 249, .32); }
#item-sort { display: flex; }
#item-sort button { flex: 1; padding: 0 4px; font-size: calc(11.5px * var(--fs)); }
.seg.sm button { height: 24px; font-size: calc(11.5px * var(--fs)); }

/* ── поля ──────────────────────────────────────────────────────────── */
input, select, textarea {
  height: 34px; padding: 0 11px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: rgba(3, 8, 16, .45);
  color: var(--text); font: calc(13px * var(--fs)) var(--sans); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 12px; resize: none; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: rgba(79, 156, 249, .6); box-shadow: 0 0 0 3px rgba(79, 156, 249, .12); }
input[type="number"] { font-family: var(--mono); }
input[type="checkbox"] { height: auto; accent-color: var(--accent); cursor: pointer; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.6); }
select { cursor: pointer; }
select option { background: var(--panel-solid); color: var(--text); }
.input-sm { height: 28px; font-size: calc(12px * var(--fs)); padding: 0 8px; }
.w-90 { width: 90px; } .w-160 { width: 160px; } .w-200 { width: 200px; }
.w-240 { width: 240px; } .w-280 { width: 280px; }
label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: calc(13px * var(--fs)); }
.check-sm { font-size: calc(12px * var(--fs)); cursor: pointer; user-select: none; }

/* переключатель */
.switch { position: relative; width: 36px; height: 20px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 1; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 11px;
  background: rgba(140, 180, 255, .16); transition: background .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: #9fb1cc; transition: transform .2s, background .2s;
}
.switch input:checked + i { background: var(--accent); box-shadow: 0 0 10px rgba(79, 156, 249, .45); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }

/* ── карточки и раскладка блоков ───────────────────────────────────── */
.card { border-radius: var(--radius-lg); padding: 16px 18px; }
.card.empty { color: var(--text-3); text-align: center; padding: 56px 20px; font-size: calc(14.5px * var(--fs)); }
.card h2 { margin: 0 0 4px; font-size: calc(19px * var(--fs)); font-weight: 600; letter-spacing: -.01em; color: var(--head); }
.card h3 { margin: 0 0 10px; font-size: calc(14.5px * var(--fs)); font-weight: 600; color: var(--head); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.page-head > div:first-child { flex: 1; min-width: 280px; }
.page-head p { margin: 0; max-width: 820px; }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head-row h3 { margin: 0; }
.card-head-row p { margin: 2px 0 0; }
.row-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { border-radius: var(--radius-lg); padding: 12px 16px; min-width: 0; }
.kpi-lbl { font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.kpi-val { margin-top: 3px; font: 600 calc(21px * var(--fs)) var(--mono); color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val.good { color: var(--good); } .kpi-val.bad { color: var(--bad); } .kpi-val.gold { color: var(--gold); }
.kpi-sub { font-size: calc(11.5px * var(--fs)); color: var(--text-3); margin-top: 1px; }

/* ── таблицы ───────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs)); }
th {
  text-align: left; color: var(--text-3); font-weight: 600; font-size: calc(10.5px * var(--fs));
  text-transform: uppercase; letter-spacing: .07em;
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 8px 10px; border-bottom: 1px solid rgba(140, 180, 255, .06); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(79, 156, 249, .045); }
tbody tr:last-child td { border-bottom: none; }
th[data-sort], th[data-key], th[data-k] { cursor: pointer; user-select: none; }
th[data-sort]:hover, th[data-key]:hover, th[data-k]:hover { color: var(--accent); }
td img.arbi-icon {
  width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 9px;
  background: rgba(255, 255, 255, .03); border-radius: 6px;
}

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  font: 600 calc(11.5px * var(--fs)) var(--mono); white-space: nowrap;
}
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: rgba(255, 255, 255, .05); color: var(--text-2); }
.chg { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.chg.up { color: var(--good); } .chg.down { color: var(--bad); } .chg.flat { color: var(--text-3); }

/* качество и ранг — как в игре */
.q0 { color: var(--text-2); } .q1 { color: #7dd87d; } .q2 { color: #4fc3f7; }
.q3 { color: #b39ddb; } .q4 { color: #ef5350; } .q5 { color: #ffd54f; } .q6 { color: #ff8a65; }
.rank-DEFAULT { color: var(--text); }
.rank-RANK_NEWBIE { color: #8bc34a; }
.rank-RANK_STALKER { color: #64b5f6; }
.rank-RANK_VETERAN { color: #b388ff; }
.rank-RANK_MASTER { color: #ff6e6e; }
.rank-RANK_LEGEND { color: #ffd54f; }
.rank-QUEST_ITEM { color: #80cbc4; }

.upg { color: var(--gold); font-weight: 600; font-family: var(--mono); font-size: calc(12px * var(--fs)); }
.pot-hi { display: inline-block; padding: 0 6px; border-radius: 6px;
  background: rgba(255, 198, 92, .13); border: 1px solid rgba(255, 198, 92, .35);
  color: var(--gold); font-size: calc(11px * var(--fs)); white-space: nowrap; }
.pot-max { display: inline-block; padding: 0 7px; border-radius: 6px;
  background: rgba(255, 198, 92, .28); border: 1px solid var(--gold);
  color: #fff3d0; font-size: calc(11.5px * var(--fs)); font-weight: 700; white-space: nowrap;
  box-shadow: 0 0 8px rgba(255, 198, 92, .4); }
.row-pot { background: rgba(255, 198, 92, .035); }
.row-pot-max { background: rgba(255, 198, 92, .09); }
.res-yes { font-size: calc(11px * var(--fs)); color: var(--violet); border: 1px solid rgba(176, 122, 255, .4);
  border-radius: 5px; padding: 0 6px; white-space: nowrap; }
.uses-flag { color: var(--gold); cursor: help; }
.uses-flag .ic { width: 13px; height: 13px; }

/* ── чипы, автодополнение ──────────────────────────────────────────── */
.chip-filter { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cf-label { font-size: calc(12px * var(--fs)); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.cf-opts { display: flex; gap: 4px; flex-wrap: wrap; }
.cf-chip {
  height: 26px; padding: 0 9px; font: calc(12px * var(--fs)) var(--mono); border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03); color: var(--text-2);
  transition: background .12s, color .12s, border-color .12s;
}
.cf-chip:hover { border-color: rgba(79, 156, 249, .5); color: var(--accent); }
.cf-chip.on { background: var(--accent-dim); color: var(--accent); border-color: rgba(79, 156, 249, .55); }
.cf-zero { font-family: var(--sans); }

.ac-list {
  position: fixed; z-index: 200;
  background: var(--panel-solid); border: 1px solid var(--border-strong);
  border-radius: 10px; overflow-y: auto; padding: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.ac-row { display: flex; align-items: center; gap: 10px; padding: 6px 9px; border-radius: 7px; cursor: pointer; font-size: calc(13.5px * var(--fs)); }
.ac-row:hover, .ac-row.hl { background: var(--accent-dim); }
.ac-row img { width: 24px; height: 24px; object-fit: contain; }
.ac-row .ac-px { margin-left: auto; font: calc(11.5px * var(--fs)) var(--mono); color: var(--text-3); }
.ac-empty { color: var(--text-3); cursor: default; }
.ac-empty:hover { background: none; }
.picker-wrap { position: relative; display: inline-flex; }
.picker-wrap input { width: 100%; }
.picker-wrap.grow { flex: 1; min-width: 220px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(79, 156, 249, .08); color: var(--text);
  border: 1px solid rgba(79, 156, 249, .2);
  border-radius: 8px; padding: 3px 10px 3px 4px; font-size: calc(12.5px * var(--fs));
}
.chip img { width: 22px; height: 22px; object-fit: contain; }
.chip .x { cursor: pointer; color: var(--text-3); display: inline-flex; }
.chip .x:hover { color: var(--bad); }

.dash-empty {
  border: 1px dashed rgba(140, 180, 255, .18); border-radius: 10px;
  color: var(--text-3); text-align: center; padding: 22px 14px; font-size: calc(12.5px * var(--fs));
}
.progress-bar { height: 4px; background: rgba(140, 180, 255, .12); border-radius: 2px; overflow: hidden; min-width: 120px; }
.progress-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }

/* ── строка состояния ──────────────────────────────────────────────── */
#statusbar {
  position: fixed; z-index: 2; left: 10px; right: 10px; bottom: 8px; height: 28px;
  display: flex; align-items: center; gap: 18px; padding: 0 14px;
  border-radius: var(--radius); font: calc(12px * var(--fs)) var(--mono); color: var(--text-2);
  white-space: nowrap; overflow: hidden;
}
#statusbar .grow { flex: 1; }
.sb-item { display: inline-flex; align-items: center; gap: 7px; }
.sb-item .ic { width: 13px; height: 13px; color: var(--text-3); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 7px var(--good); }
.dot.warn { background: var(--gold); box-shadow: 0 0 7px var(--gold); }
.dot.bad { background: var(--bad); box-shadow: 0 0 7px var(--bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.sb-meter { width: 70px; height: 4px; border-radius: 2px; background: rgba(140, 180, 255, .14); overflow: hidden; }
.sb-meter i { display: block; height: 100%; width: 0; background: var(--good); transition: width .4s, background .4s; }
#emission.blowout { color: var(--bad); }

/* ── прочее ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140, 180, 255, .14); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(140, 180, 255, .28); background-clip: padding-box; }

dialog {
  background: var(--panel-solid); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 20px 22px; min-width: 420px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(2, 5, 10, .65); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 0 14px; font-size: calc(17px * var(--fs)); color: var(--head); }
.set-grid { display: grid; gap: 10px; margin-bottom: 8px; }
.set-grid label { justify-content: space-between; }
.dialog-actions { justify-content: flex-end; margin-top: 16px; }

.toast {
  position: fixed; z-index: 300; left: 50%; bottom: 52px; transform: translateX(-50%);
  background: var(--panel-solid); border: 1px solid rgba(79, 156, 249, .35);
  color: var(--text); border-radius: 10px; padding: 9px 16px; font-size: calc(13px * var(--fs));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: rise .2s ease both;
}

/* ── находки снайпера: всплывающие плашки справа сверху ───────────────── */
.find-toasts {
  position: fixed; z-index: 310; top: 14px; right: 14px;
  display: flex; flex-direction: column; gap: 8px; width: 380px; max-width: calc(100vw - 28px);
  pointer-events: none;
}
.find-toast {
  position: relative; overflow: hidden; pointer-events: auto; cursor: pointer;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 46px auto 22px; align-items: center; gap: 8px;
  padding: 10px 10px 12px 12px; border-radius: 12px;
  background: rgba(11, 18, 31, .94); border: 1px solid rgba(53, 212, 154, .45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 18px rgba(53, 212, 154, .18);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: ft-in .28s cubic-bezier(.2, .9, .3, 1.2) both;
  transition: border-color .15s, transform .15s;
}
.find-toast:hover { border-color: var(--good); transform: translateX(-3px); }
@keyframes ft-in { from { opacity: 0; transform: translateX(40px) scale(.96); } }
.find-toast img { width: 40px; height: 40px; object-fit: contain; background: rgba(255,255,255,.04); border-radius: 8px; }
.ft-body { min-width: 0; }
.ft-head { display: flex; justify-content: space-between; gap: 8px; font-size: calc(11px * var(--fs)); }
.ft-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--good); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.ft-tag .ic { width: 12px; height: 12px; }
.ft-name { font-weight: 600; font-size: calc(14px * var(--fs)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-meta { font-size: calc(12px * var(--fs)); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-price { font: 700 calc(15px * var(--fs)) var(--mono); color: var(--good); text-align: right; white-space: nowrap; }
.ft-price small { display: block; font: 400 calc(10.5px * var(--fs)) var(--sans); color: var(--text-3); }
.ft-close { align-self: start; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ft-close:hover { background: rgba(255,255,255,.08); color: var(--text); }
.ft-close .ic { width: 13px; height: 13px; }
.ft-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--good); opacity: .6; transform-origin: left; animation: ft-timer 25s linear forwards; }
.find-toast.hold .ft-timer { animation-play-state: paused; }
@keyframes ft-timer { to { transform: scaleX(0); } }

/* оповещение о сдвиге цены избранного — золотая рамка, цвет по направлению */
.find-toast.watch { border-color: rgba(255, 198, 92, .5); box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 18px rgba(255, 198, 92, .16); }
.find-toast.watch .ft-tag { color: var(--gold); }
.find-toast.watch .ft-price { color: var(--head); }
.find-toast.watch .ft-timer { background: var(--gold); }

/* ── маскот Аксель ─────────────────────────────────────────────── */
.axel { object-fit: contain; user-select: none; pointer-events: none; }
.brand-axel { width: 30px; height: 30px; flex: none; margin: -4px 0; filter: drop-shadow(0 0 8px rgba(79, 156, 249, .35)); transition: transform .25s; }
.brand:hover .brand-axel { transform: rotate(-8deg) scale(1.08); }
.feed.empty-feed { display: flex; align-items: center; gap: 14px; }
.empty-axel { flex: none; opacity: .95; }
.find-toast .ft-axel { width: 46px; height: 46px; background: none; border-radius: 0; margin: -6px -4px -6px 0; }

/* иконки вкладок — Аксель */
.nav-axel { width: 26px; height: 26px; flex: none; justify-content: center; }
.nav-axel img.axel { width: 34px; height: 34px; margin: -4px; filter: grayscale(.2) brightness(.92); opacity: .92; transition: filter .18s, opacity .18s, transform .22s; }
.nav button:hover .nav-axel img.axel, .switch-row:hover .nav-axel img.axel { filter: none; opacity: 1; transform: scale(1.08); }
.nav button.active .nav-axel img.axel { filter: drop-shadow(0 0 7px rgba(79, 156, 249, .5)); opacity: 1; transform: scale(1.1); }
#sniper-switch.on .nav-axel img.axel { filter: drop-shadow(0 0 7px rgba(53, 212, 154, .6)); opacity: 1; }
.nav button { height: 42px; }

/* ── крупнее и выразительнее ───────────────────────────────────── */
body { font-weight: 450; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: .01em; }
h2 { font-size: calc(21px * var(--fs)); background: linear-gradient(92deg, #fff 30%, var(--accent-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h3 { font-size: calc(15px * var(--fs)); color: var(--head); }
th { font-weight: 650; letter-spacing: .04em; }
td, .item-row .nm { font-weight: 500; }
b, strong { font-weight: 700; color: var(--head); }
.mono, .val, .num, .ft-price, .item-row .px { font-weight: 600; }
.muted { color: var(--text-2); }
.card { border-color: var(--border-strong); box-shadow: 0 10px 34px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .045); }
.card:hover { border-color: rgba(79, 156, 249, .26); }
.btn { font-weight: 600; }
.nav button { font-weight: 560; }
.nav-group { font-weight: 700; color: var(--text-2); }
.nav button.active { font-weight: 700; box-shadow: inset 0 0 0 1px rgba(79, 156, 249, .18), 0 0 18px rgba(79, 156, 249, .08); }
.kpi .v, .kpi-v { font-weight: 700; }

/* маскот в шапке страницы */
.page-head { position: relative; }
.head-axel { width: 96px; height: 96px; margin: -14px -4px -14px 0; flex: none; order: 2; pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(79, 156, 249, .25)); animation: axel-float 4.8s ease-in-out infinite; }
@keyframes axel-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .head-axel { animation: none; } }
@media (max-width: 900px) { .head-axel { width: 64px; height: 64px; } }

/* ── читаемость: точки фона почти не видны внутри панелей ─────────── */
.card { background: rgba(10, 16, 28, .93); }
#statusbar { font-size: calc(12.5px * var(--fs)); color: var(--text); }
.muted, .kpi-lbl, .kpi-sub { color: var(--text-2); }

/* ── Центр Акселя ─────────────────────────────────────────────────── */
.inbox { position: fixed; z-index: 320; top: 12px; right: 12px; bottom: 48px; width: 400px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px;
  background: rgba(8, 13, 24, .97); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  animation: ft-in .22s cubic-bezier(.2, .9, .3, 1.15) both; }
.inbox[hidden] { display: none; }
.inbox-head { display: flex; align-items: center; gap: 10px; }
.inbox-head > div { flex: 1; min-width: 0; }
.inbox-head h3 { margin: 0; }
.inbox-tabs { align-self: flex-start; }
.inbox-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 3px; }
.ib-item { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px;
  border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); cursor: pointer; transition: border-color .15s, transform .15s; }
.ib-item:hover { border-color: rgba(79, 156, 249, .4); transform: translateX(-2px); }
.ib-item.unread { border-color: rgba(79, 156, 249, .5); background: rgba(79, 156, 249, .07); }
.ib-item img { width: 46px; height: 46px; object-fit: contain; }
.ib-title { font-weight: 650; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-text { font-size: calc(12px * var(--fs)); color: var(--text-2); }
.ib-time { font: calc(11px * var(--fs)) var(--mono); color: var(--text-3); align-self: start; }
.ib-empty { text-align: center; color: var(--text-2); padding: 34px 10px; }
.ib-empty img { display: block; margin: 0 auto 8px; }
.ib-good { color: var(--good); } .ib-bad { color: var(--bad); }

/* ── график «Рынок по дням» ───────────────────────────────────────── */
#dash-trend .card-head-row { flex-wrap: wrap; gap: 8px; }
.dash-bars { gap: 6px; height: 168px; align-items: stretch; border-bottom: 1px solid var(--border-strong);
  background: repeating-linear-gradient(0deg, transparent 0 41px, rgba(140, 180, 255, .07) 41px 42px); }
.dash-bars .bcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; min-width: 0; cursor: default; }
.dash-bars .bval { text-align: center; font: 650 calc(11px * var(--fs)) var(--mono); color: var(--text); padding-bottom: 3px; white-space: nowrap; }
.dash-bars .bar { flex: none; width: 100%; }
.dash-bars .bcol.partial .bar { opacity: .45; background: repeating-linear-gradient(45deg, rgba(79,156,249,.55) 0 5px, rgba(79,156,249,.15) 5px 10px); }
.dash-bars .bcol:hover .bar { filter: brightness(1.4); }
.dash-bars .bcol.last .bar { box-shadow: 0 0 14px rgba(79, 156, 249, .45); }
.dash-dates { gap: 6px; }
.dash-dates span { flex: 1; text-align: center; }
.dash-tip { position: fixed; z-index: 400; pointer-events: none; padding: 7px 10px; border-radius: 8px; font-size: calc(12px * var(--fs));
  background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: 0 8px 22px rgba(0,0,0,.5); line-height: 1.5; }

/* ── пустой блок «Выгодные сейчас» ────────────────────────────────── */
.deals-empty { display: flex; align-items: center; gap: 18px; padding: 8px 6px; }
.deals-empty img { flex: none; width: 112px; height: 112px; filter: drop-shadow(0 6px 16px rgba(79, 156, 249, .25)); }
.deals-empty p { margin: 0 0 10px; color: var(--text); }
.deals-empty .row-gap { flex-wrap: wrap; }

/* тост с Акселем: успех, ошибка, находка */
.toast.axel { display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 8px; }
.toast.axel img { width: 40px; height: 40px; }
.toast.err { border-color: rgba(255, 93, 108, .55); }
.toast.ok { border-color: rgba(53, 212, 154, .55); }

/* вкладка «Центр Акселя» */
#inbox-list.inbox-list { margin-top: 12px; max-height: calc(100vh - 300px); overflow-y: auto; }
.nav button .nav-badge { background: var(--accent); color: #04121c; }
