/* Стили вкладок SZ Auction */

/* ── дашборд ───────────────────────────────────────────────────────── */
#dashboard { display: flex; flex-direction: column; gap: 12px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
#dash-top { grid-column: span 7; }
#dash-deals { grid-column: span 5; }
#dash-movers { grid-column: span 7; }
#dash-trend { grid-column: span 5; }
#dash-recent { grid-column: span 12; }
@media (max-width: 1350px) {
  #dash-top, #dash-deals, #dash-movers, #dash-trend { grid-column: span 12; }
}
.rank-list { display: flex; flex-direction: column; gap: 2px; max-height: 470px; overflow-y: auto; margin: 0 -6px; }
.rank-row {
  display: grid; grid-template-columns: 22px 32px minmax(0, 1fr) 96px auto 70px;
  align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--radius); cursor: pointer;
  transition: background .12s;
}
.rank-row:hover { background: rgba(255, 255, 255, .045); }
.rank-row .n { font: calc(11px * var(--fs)) var(--mono); color: var(--text-3); text-align: right; }
.rank-row img { width: 32px; height: 32px; object-fit: contain; background: rgba(255, 255, 255, .03); border-radius: 7px; }
.rank-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .nm small { display: block; font-size: calc(11px * var(--fs)); color: var(--text-3); }
.rank-row .pr { font: calc(13px * var(--fs)) var(--mono); text-align: right; color: var(--head); }
.rank-row .spark { width: 96px; height: 26px; }
#dash-deals-list { max-height: 470px; overflow-y: auto; margin: 0 -6px; }
.dd-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--radius); transition: background .12s;
}
.dd-row:hover { background: rgba(255, 255, 255, .045); }
.dd-icon { width: 30px; height: 30px; object-fit: contain; flex: none; background: rgba(255, 255, 255, .03); border-radius: 6px; }
.dd-name { cursor: pointer; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.dd-name:hover { color: var(--accent); }
.dd-price { font-family: var(--mono); color: var(--head); white-space: nowrap; }
.dd-disc { font: 600 calc(12px * var(--fs)) var(--mono); color: var(--good); min-width: 42px; text-align: right; }
.movers-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-title { font-size: calc(11px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.mini-title.up { color: var(--good); } .mini-title.down { color: var(--bad); }
.mini-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: calc(13px * var(--fs));
}
.mini-row:hover { background: rgba(255, 255, 255, .045); }
.mini-row img { width: 26px; height: 26px; object-fit: contain; }
.mini-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .nm small { display: block; font: calc(11px * var(--fs)) var(--mono); color: var(--text-3); }
.dash-bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; margin-top: 6px; }
.dash-bars .bar {
  flex: 1; border-radius: 3px 3px 0 0; min-height: 4px;
  background: linear-gradient(180deg, rgba(79, 156, 249, .85), rgba(79, 156, 249, .18));
  transition: filter .15s;
}
.dash-bars .bar:hover { filter: brightness(1.35); }
.dash-dates { display: flex; justify-content: space-between; color: var(--text-3); font: calc(11px * var(--fs)) var(--mono); margin-top: 6px; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dash-chips .chip { cursor: pointer; }
.dash-chips .chip:hover { background: rgba(79, 156, 249, .18); }
.spark { display: block; overflow: visible; }

/* ── карточка предмета ─────────────────────────────────────────────── */
.card-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.big-icon {
  width: 60px; height: 60px; object-fit: contain; flex: none;
  background: rgba(255, 255, 255, .03); border-radius: 12px; padding: 4px;
  border: 1px solid var(--border);
}
.card-title { font-size: calc(21px * var(--fs)); font-weight: 600; color: var(--head); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-sub { color: var(--text-3); font-size: calc(12.5px * var(--fs)); margin-top: 2px; }
.card-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.star-btn { cursor: pointer; color: var(--gold); display: inline-flex; }
.star-btn .ic { width: 20px; height: 20px; }
.star-btn:hover { filter: brightness(1.3); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.stat {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 13px; min-width: 0;
}
.stat .lbl { font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 2px; white-space: nowrap; }
.stat .val { font: 600 calc(17px * var(--fs)) var(--mono); color: var(--head); white-space: nowrap; }
.stat .val.good { color: var(--good); } .stat .val.bad { color: var(--bad); }
.stat input { width: 100%; height: 28px; font-size: calc(14px * var(--fs)); }
.uses-warn {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 10px 0 2px; padding: 9px 13px; border-radius: 10px;
  background: rgba(255, 198, 92, .07); border: 1px solid rgba(255, 198, 92, .28);
  color: var(--gold); font-size: calc(12.5px * var(--fs));
}
.uses-warn .ic { width: 16px; height: 16px; margin-top: 1px; }

/* раскрывающиеся блоки карточки — единый вид */
.card details > summary, .sell-block summary, .catch-block summary, .q-breakdown summary,
.craft-block summary, .stats-block summary, .lot-insight summary {
  cursor: pointer; user-select: none; list-style: none;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0; color: var(--text); font-size: calc(13.5px * var(--fs)); font-weight: 600;
}
.card details > summary::-webkit-details-marker { display: none; }
.card details > summary::before {
  content: ""; width: 6px; height: 6px; flex: none;
  border: solid var(--text-3); border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg); transition: transform .15s; margin-right: 2px;
}
.card details[open] > summary::before { transform: rotate(45deg); }
.sell-block, .catch-block, .q-breakdown, .craft-block, .stats-block, .lot-insight {
  margin-top: 10px; border-top: 1px solid var(--border); padding-top: 6px;
}
.lot-insight { border: 1px solid rgba(79, 156, 249, .22); border-radius: 10px; padding: 6px 13px 10px;
  background: linear-gradient(90deg, rgba(79, 156, 249, .07), transparent 70%); }
.lot-insight summary { color: var(--accent); }
.insight-grid { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 6px; color: var(--text-2); font-size: calc(13px * var(--fs)); }
.insight-grid b { color: var(--head); font-family: var(--mono); }
.risk-badge { display: inline-block; border-radius: 6px; padding: 0 7px; font-size: calc(11px * var(--fs)); font-weight: 600; }
.risk-badge.low { color: var(--good); background: var(--good-bg); }
.risk-badge.medium { color: var(--gold); background: rgba(255, 198, 92, .12); }
.risk-badge.high { color: var(--bad); background: var(--bad-bg); }
.sell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 6px; }
.sell-opt { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.sell-opt-t { font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 2px; }
.sell-price { font: 700 calc(19px * var(--fs)) var(--mono); }
.catch-block table, .q-breakdown table { margin-top: 4px; }
.catch-actions { white-space: nowrap; text-align: right; }
.q-row { cursor: pointer; }
.pick-price { cursor: pointer; border-bottom: 1px dashed rgba(140, 170, 220, .35); padding: 1px 4px; border-radius: 5px; }
.pick-price:hover { background: rgba(255, 255, 255, .05); }
.pick-price.selected { background: var(--accent-dim); box-shadow: inset 0 0 0 1px rgba(79, 156, 249, .45); border-bottom-color: transparent; }

.craft-recipe { margin-top: 6px; }
.craft-variant { font-size: calc(11px * var(--fs)); color: var(--accent); margin-bottom: 4px; }
.craft-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.craft-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 4px 11px 4px 5px; font-size: calc(13px * var(--fs)); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.craft-chip:hover { border-color: rgba(79, 156, 249, .5); background: rgba(79, 156, 249, .06); }
.craft-chip img { width: 26px; height: 26px; object-fit: contain; }
.craft-chip b { font-family: var(--mono); color: var(--accent); }
.craft-meta, .hd-req { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.craft-meta b, .hd-req b { color: var(--text); font-weight: 500; }
.stats-grid { display: grid; justify-content: start; grid-template-columns: repeat(auto-fit, minmax(250px, 340px)); gap: 8px; margin-top: 4px; }
.stats-sec { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; }
.stats-sec-title { font-size: calc(10.5px * var(--fs)); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 4px; }
.stats-row { display: flex; align-items: baseline; gap: 12px; padding: 2px 0; font-size: calc(13.5px * var(--fs)); }
.stats-lbl { color: var(--text-2); flex: 1; min-width: 0; }
.stats-val { font-family: var(--mono); font-weight: 600; color: var(--head); white-space: nowrap; }
.stats-note { font-size: calc(12.5px * var(--fs)); color: var(--text-3); padding: 2px 0; }

/* ── лоты ──────────────────────────────────────────────────────────── */
#lots-table td { font-family: var(--mono); font-size: calc(12.5px * var(--fs)); }
#lots-table tr.cheap td:nth-child(2) { color: var(--good); font-weight: 600; }

/* ── графики ───────────────────────────────────────────────────────── */
.chart-legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-title { font-weight: 600; color: var(--head); }
#chart-count { font-weight: 400; color: var(--text-3); font-size: calc(12.5px * var(--fs)); }
.chart-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-tools label { font-size: calc(12px * var(--fs)); }
.chart-keys { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 4px; font-size: calc(11.5px * var(--fs)); color: var(--text-3); }
.chart-keys span { display: inline-flex; align-items: center; gap: 6px; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.key-dot.up { background: var(--up); } .key-dot.down { background: var(--down); }
.key-line { width: 16px; height: 2px; background: var(--accent); display: inline-block; border-radius: 1px; }
.key-dash { width: 16px; height: 0; border-top: 2px dashed #8899b4; display: inline-block; }
.key-bar { width: 8px; height: 10px; background: rgba(140, 180, 255, .35); display: inline-block; border-radius: 1px; }
.chart-box { position: relative; }
.chart-box canvas { width: 100%; display: block; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: rgba(8, 13, 23, .94); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 7px 10px; font-size: calc(12px * var(--fs)); color: var(--text);
  white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
}
.chart-tip b { font-family: var(--mono); color: var(--head); }
#trend-block, #recent-sales { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 4px; }
#trend-block table, #recent-sales table { margin-top: 6px; font-size: calc(12.5px * var(--fs)); }
.trend-nums summary { font-weight: 400 !important; color: var(--text-3) !important; font-size: calc(12px * var(--fs)) !important; }

/* ── снайпер и лента ───────────────────────────────────────────────── */
.sniper-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 1250px) { .sniper-grid { grid-template-columns: 1fr; } }
.feed-card { display: flex; flex-direction: column; min-height: 420px; max-height: 70vh; }
.feed-card .card-head-row { align-items: flex-start; }
.feed { display: flex; flex: 1; flex-direction: column; gap: 5px; min-height: 0; overflow-y: auto; padding: 1px; }
.feed.empty-feed { color: var(--text-3); font-size: calc(13px * var(--fs)); }
.feed .evt {
  display: grid; grid-template-columns: 42px 26px minmax(120px, 1fr) auto auto auto;
  align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid transparent; border-radius: 9px; padding: 7px 10px;
  font-size: calc(13px * var(--fs));
}
.feed .evt.fresh { border-color: rgba(79, 156, 249, .55); box-shadow: 0 0 14px rgba(79, 156, 249, .15); }
.feed .evt .t { color: var(--text-3); font: calc(11.5px * var(--fs)) var(--mono); }
.feed .evt img { width: 26px; height: 26px; object-fit: contain; }
.feed .evt .evt-item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .evt .evt-item small { display: block; color: var(--text-3); font-size: calc(11px * var(--fs)); }
.feed .evt .evt-traits { display: inline-flex; align-items: center; gap: 5px; }
.feed .evt .price { color: var(--good); font: 600 calc(13px * var(--fs)) var(--mono); white-space: nowrap; }
#sniper-table td { vertical-align: middle; }
#sniper-table .price-edit { width: 130px; height: 28px; }
.newlots-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; flex: 1; }
.newlot {
  width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto;
  align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid transparent; border-radius: 9px; padding: 6px 10px;
  color: var(--text); transition: border-color .12s, background .12s;
}
.newlot:hover { border-color: rgba(79, 156, 249, .4); background: rgba(79, 156, 249, .05); }
.newlot img { width: 28px; height: 28px; object-fit: contain; }
.newlot b, .newlot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newlot b { font-weight: 500; }
.newlot small { color: var(--text-3); font-size: calc(11.5px * var(--fs)); }
.newlot strong { font: 600 calc(13px * var(--fs)) var(--mono); }

/* ── арбитраж ──────────────────────────────────────────────────────── */
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cats label {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 4px 12px 4px 9px; font-size: calc(12.5px * var(--fs)); cursor: pointer; user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.cats label .ic { width: 14px; height: 14px; color: var(--text-3); }
.cats label:hover { border-color: rgba(79, 156, 249, .45); }
.cats label:has(input:checked) { border-color: rgba(79, 156, 249, .6); color: var(--accent); background: var(--accent-dim); }
.cats label:has(input:checked) .ic { color: var(--accent); }
.cats input { display: none; }
#arbi-table tbody tr, #mk-table tbody tr { cursor: pointer; }
#arbi-progress { display: flex; align-items: center; gap: 10px; }

/* ── журнал рынка ──────────────────────────────────────────────────── */
#mk-table td { white-space: nowrap; }
#mk-table td.nm { white-space: normal; min-width: 200px; }
#mk-table .spark { width: 120px; height: 28px; }
#mk-table td.lots { color: var(--text-2); font-family: var(--mono); font-size: calc(12px * var(--fs)); }
.mk-name { display: flex; align-items: center; gap: 0; }
.mk-name small { display: block; color: var(--text-3); font-size: calc(11px * var(--fs)); }

/* ── убежище ───────────────────────────────────────────────────────── */
.hd-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1250px) { .hd-layout { grid-template-columns: 1fr; } }
.hd-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; max-height: calc(100vh - 160px); }
.hd-side .row-controls { margin: 0; }
.hd-side .seg { align-self: flex-start; }
#hd-profit-table { font-size: calc(12px * var(--fs)); }
#hd-profit-table td { padding: 5px 6px; }
.hd-list { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; flex: 1; margin: 0 -6px; }
.hd-recipe {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: var(--radius); cursor: pointer; font-size: calc(13px * var(--fs));
  transition: background .12s;
}
.hd-recipe:hover { background: rgba(255, 255, 255, .045); }
.hd-recipe.active { background: var(--accent-dim); box-shadow: inset 0 0 0 1px rgba(79, 156, 249, .3); }
.hd-recipe img { width: 30px; height: 30px; object-fit: contain; }
.hd-recipe-txt { display: flex; flex-direction: column; min-width: 0; }
.hd-recipe-txt > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-recipe-hint { font-size: calc(11px * var(--fs)); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-recipe-side { text-align: right; font-size: calc(11px * var(--fs)); color: var(--text-3); white-space: nowrap; }
.hd-recipe-side .chg { font-size: calc(12px * var(--fs)); display: block; }
.hd-variant { font-size: calc(10.5px * var(--fs)); color: var(--accent); border: 1px solid rgba(79, 156, 249, .35); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.hd-crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: calc(12px * var(--fs)); flex-wrap: wrap; }
.hd-item, .hd-crumb { cursor: pointer; }
.hd-item:hover, .hd-crumb:hover { color: var(--accent); }
.hd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.hd-variants { margin: 10px 0; }
.hd-variant-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.hd-variant-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; padding: 7px 12px; border-radius: 9px; line-height: 1.3; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text);
}
.hd-variant-chip .muted { font-size: calc(11.5px * var(--fs)); }
.hd-variant-chip.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(79, 156, 249, .5); }
.hd-batch { background: var(--accent-dim); color: var(--accent-soft); border-radius: var(--radius); padding: 8px 12px; margin-top: 10px; font-size: calc(13px * var(--fs)); }
.hd-section-title { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: calc(13.5px * var(--fs)); font-weight: 600; color: var(--head); }
.hd-section-title .ic { color: var(--accent); }
.hd-node {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 5px 8px; font-size: calc(13px * var(--fs)); border-radius: 7px;
}
.hd-node:hover { background: rgba(255, 255, 255, .04); }
.hd-node img { width: 24px; height: 24px; object-fit: contain; }
.hd-arrow { cursor: pointer; color: var(--accent); width: 16px; display: inline-flex; user-select: none; }
.hd-arrow .ic { width: 14px; height: 14px; transition: transform .15s; }
.hd-arrow.open .ic { transform: rotate(90deg); }
.hd-arrow-space { width: 16px; }
.hd-price { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); }
.hd-price .ic { width: 14px; height: 14px; color: var(--text-3); }
.hd-both { color: var(--text-3); font-size: calc(11.5px * var(--fs)); white-space: nowrap; font-family: var(--mono); }
.hd-tag { font-size: calc(11px * var(--fs)); padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.hd-tag.craft { background: var(--good-bg); color: var(--good); }
.hd-tag.buy { background: var(--accent-dim); color: var(--accent); }
.hd-npc { font-size: calc(10.5px * var(--fs)); color: var(--gold); border: 1px solid rgba(255, 198, 92, .35); border-radius: 5px; padding: 0 5px; margin-left: 4px; font-family: var(--sans); }
.hd-energy {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid var(--border); font-size: calc(13px * var(--fs));
}
.hd-energy .ic { color: var(--gold); }
.hd-summary {
  margin-top: 10px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel-2);
  display: flex; flex-direction: column; gap: 4px; font-size: calc(13.5px * var(--fs));
}
.hd-profit-line { font-size: calc(17px * var(--fs)); margin-top: 4px; }
.hd-usedin { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; }
.hd-use {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 5px; border-radius: 9px; cursor: pointer; font-size: calc(12.5px * var(--fs));
  border: 1px solid var(--border); background: var(--panel-2);
}
.hd-use:hover { border-color: rgba(79, 156, 249, .45); }
.hd-use img { width: 24px; height: 24px; object-fit: contain; }
.hd-profit-row { cursor: pointer; }
.hd-menu {
  position: fixed; z-index: 100; background: var(--panel-solid);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 4px; box-shadow: 0 14px 34px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 2px;
}
.hd-menu button {
  display: flex; align-items: center; gap: 8px; text-align: left; white-space: nowrap;
  background: none; border: 0; border-radius: 7px; padding: 7px 12px; cursor: pointer; color: var(--text);
}
.hd-menu button:hover { background: var(--accent-dim); color: var(--accent); }

/* ── сравнение ─────────────────────────────────────────────────────── */
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compare-slot-card { min-height: 300px; }
.compare-title { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: calc(15px * var(--fs)); }
.compare-title img { width: 32px; height: 32px; object-fit: contain; }
.compare-table { width: 100%; margin-top: 12px; }
.compare-table th { text-align: left; color: var(--text-3); font-weight: 500; width: 52%; text-transform: none; letter-spacing: 0; font-size: calc(13px * var(--fs)); }
.compare-table td { font-family: var(--mono); font-weight: 600; color: var(--head); text-align: right; }
.compare-reason { margin-top: 12px; line-height: 1.4; }
.compare-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.compare-filters label { font-size: calc(12px * var(--fs)); color: var(--text-3); }
.compare-filters select { height: 28px; font-size: calc(12px * var(--fs)); }
@media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr; } }

/* ── ассистент ─────────────────────────────────────────────────────── */
.ai-card { display: flex; flex-direction: column; gap: 10px; min-height: calc(100vh - 230px); }
.ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; min-height: 240px; max-height: calc(100vh - 360px); }
.ai-msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.ai-ava {
  width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .05); color: var(--text-2);
}
.ai-msg.bot .ai-ava { background: var(--accent-dim); color: var(--accent); }
.ai-ava .ic { width: 16px; height: 16px; }
.ai-body { min-width: 0; line-height: 1.55; font-size: calc(14px * var(--fs)); }
.ai-msg.user .ai-body { color: var(--head); background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; justify-self: start; white-space: pre-wrap; }
.ai-body p { margin: 0 0 8px; }
.ai-body ul, .ai-body ol { margin: 0 0 8px; padding-left: 20px; }
.ai-body li { margin: 2px 0; }
.ai-body h4 { margin: 10px 0 4px; font-size: calc(14px * var(--fs)); color: var(--head); }
.ai-body code { font-family: var(--mono); font-size: calc(12.5px * var(--fs)); background: rgba(255, 255, 255, .06); padding: 0 4px; border-radius: 4px; }
.ai-body strong { color: var(--head); }
.ai-meta { font-size: calc(11.5px * var(--fs)); color: var(--text-3); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-meta .chip { cursor: pointer; padding: 1px 8px 1px 2px; font-size: calc(11.5px * var(--fs)); }
.ai-meta .chip img { width: 18px; height: 18px; }
.ai-stage { color: var(--text-3); font-size: calc(13px * var(--fs)); display: inline-flex; gap: 8px; align-items: center; }
.ai-stage::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite; }
.ai-err { color: var(--bad); }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-quick button {
  height: 30px; padding: 0 12px; border-radius: 15px; cursor: pointer; font-size: calc(12.5px * var(--fs));
  border: 1px solid var(--border-strong); background: var(--panel-2); color: var(--text-2);
  transition: border-color .12s, color .12s, background .12s;
}
.ai-quick button:hover { border-color: rgba(79, 156, 249, .5); color: var(--accent); background: rgba(79, 156, 249, .06); }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form textarea { flex: 1; min-height: 48px; max-height: 180px; }
.ai-form .btn { height: 48px; }
.pill-status { display: inline-flex; align-items: center; gap: 7px; font-size: calc(12px * var(--fs)); color: var(--text-2); }

/* ── журнал сделок ─────────────────────────────────────────────────── */
.jr-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jr-sell-price { width: 150px; height: 28px; }
#jr-open td, #jr-closed td, #jr-by-item td { white-space: nowrap; }
.jr-actions { display: flex; gap: 4px; justify-content: flex-end; }
.jr-hint { display: block; font-size: calc(11px * var(--fs)); color: var(--text-3); }

/* изменения рецептов и мгновенный показ рецепта */
.hd-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#hd-changes > summary { font-size: calc(14px * var(--fs)); }
.hd-change { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: start;
  padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.hd-change:hover { background: rgba(255, 255, 255, .045); }
.hd-change img { width: 30px; height: 30px; object-fit: contain; }
.hd-change small { display: block; color: var(--text-3); font-size: calc(12px * var(--fs)); }
.hd-badge { font-size: calc(10.5px * var(--fs)); border-radius: 5px; padding: 0 6px; margin-left: 6px; white-space: nowrap; font-weight: 600; }
.hd-badge.new_item, .hd-badge.new_variant { color: var(--good); background: var(--good-bg); }
.hd-badge.changed { color: var(--gold); background: rgba(255, 198, 92, .12); }
.hd-badge.removed_item, .hd-badge.removed_variant { color: var(--bad); background: var(--bad-bg); }
.hd-pending { color: var(--text-3); font-family: var(--mono); }

/* фильтры готового пресета снайпера — правятся прямо в таблице */
#sniper-table select.pf { height: 28px; font-size: calc(12px * var(--fs)); padding: 0 6px; max-width: 160px; }

.key-ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #b39ddb; display: inline-block; }
#price-chart { cursor: zoom-in; user-select: none; }

.ai-msg { grid-template-columns: 40px minmax(0, 1fr); }
.ai-msg.bot .ai-ava { width: 40px; height: 40px; background: none; border-radius: 0; }
.ai-ava img.axel { width: 40px; height: 40px; }

/* подсказка-вопросик в заголовке панели */
.hint {
  position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 18px; height: 18px; margin-left: 6px; padding: 0; border-radius: 50%; cursor: help;
  border: 1px solid var(--border-strong); background: none; color: var(--text-2);
  font: 600 11px/1 var(--sans); letter-spacing: 0; text-transform: none;
}
.hint:hover, .hint:focus-visible { color: var(--head); border-color: var(--accent); outline: none; }
.hint-pop {
  display: none; position: absolute; z-index: 30; left: -8px; top: calc(100% + 8px); width: min(320px, 70vw);
  padding: 10px 12px; border-radius: 10px; background: var(--panel-solid); border: 1px solid var(--border-strong);
  color: var(--text); font: 400 calc(13px * var(--fs))/1.45 var(--sans); text-align: left; white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45) !important;
}
.hint:hover .hint-pop, .hint:focus-visible .hint-pop, .hint.open .hint-pop { display: block; }

/* «Не интересно» в движении цен и список скрытых */
.mini-row { grid-template-columns: 26px minmax(0, 1fr) auto 22px; }
.mini-x {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer; opacity: .35;
}
.mini-x svg { width: 13px; height: 13px; }
.mini-row:hover .mini-x, .mini-x:focus-visible { opacity: 1; }
.mini-x:hover { background: var(--bad-bg); color: var(--bad); }
.dash-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.dash-hidden[hidden] { display: none; }
.hid-chip { cursor: pointer; padding: 3px 9px; font-family: inherit; }
.hid-chip:hover { border-color: var(--accent); }
.hid-chip svg { width: 12px; height: 12px; opacity: .7; }
.toast.with-action { display: flex; align-items: center; gap: 12px; }
.toast-act { border: 0; background: none; padding: 2px 4px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* звёздочка «в избранное» */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text-3); cursor: pointer;
}
.fav-btn .ic { width: 16px; height: 16px; }
.fav-btn:hover { color: var(--gold); background: var(--hover); }
.fav-btn.on { color: var(--gold); }
.fav-btn.fav-big {
  width: auto; height: 30px; padding: 0 12px 0 9px; vertical-align: middle; margin: 0 4px;
  border: 1.5px solid var(--gold); border-radius: 8px; color: var(--gold);
  font: 600 calc(12.5px * var(--fs)) var(--sans); letter-spacing: 0; text-transform: none;
}
.fav-btn.fav-big .ic { width: 17px; height: 17px; }
.fav-btn.fav-big:hover { background: var(--tint-gold); }
.fav-btn.fav-big.on { background: var(--gold); color: #18142d; }
.rank-row { grid-template-columns: 22px 32px minmax(0, 1fr) 96px auto 70px 26px; }
.mini-row { grid-template-columns: 26px minmax(0, 1fr) auto 26px 22px; }

/* вкладка «Избранное» */
.fav-row {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) 110px 90px 110px 80px 26px; align-items: center; gap: 12px;
  padding: 7px 8px; border-top: 1px dashed var(--border-strong); cursor: pointer;
}
.fav-row:hover { background: var(--hover); }
.fav-row.fav-head { cursor: default; border-top: 0; padding-bottom: 4px; color: var(--text-3); font-size: calc(11.5px * var(--fs)); }
.fav-row.fav-head:hover { background: none; }
.fav-row.fav-head span:nth-child(n+3) { text-align: right; }
.fav-row img { width: 32px; height: 32px; object-fit: contain; }
.fav-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fav-row .nm small { display: block; font-size: calc(11px * var(--fs)); color: var(--text-3); font-weight: 400; }
.fav-row .pr, .fav-row .num, .fav-row .chg { text-align: right; font-weight: 600; white-space: nowrap; }
.fav-row .pr { color: var(--gold); }
@media (max-width: 760px) {
  .fav-row { grid-template-columns: 32px minmax(0, 1fr) 84px 64px 26px; gap: 8px; }
  .fav-row > :nth-child(5), .fav-row > :nth-child(6) { display: none; }
}

/* название в шапке меню — кнопка «домой» */
.brand { margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--panel-2); }
.brand:hover { border-color: var(--gold); filter: none; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand span { display: block; line-height: 1.15; }
.brand small { display: block; margin-top: 2px; font: 500 calc(10.5px * var(--fs)) var(--sans); letter-spacing: .04em; color: var(--text-2); }
@media (max-width: 1240px) { .brand { padding: 6px 0; } }

/* на средних экранах график в строке уже, чтобы название не обрезалось */
@media (max-width: 1700px) {
  .rank-row { grid-template-columns: 20px 32px minmax(0, 1fr) 56px auto 58px 24px; gap: 8px; }
  .rank-row .spark { width: 56px; }
}
#dash-movers .card-head-row .row-gap { flex-wrap: nowrap; }
#dash-movers .card-head-row { flex-wrap: wrap; }
/* панель с открытой подсказкой поднимается над соседними, иначе они её перекрывают */
.card:has(.hint:hover), .card:has(.hint.open), .card:has(.hint:focus-visible) { position: relative; z-index: 6; }
