/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg:        #07090f;
  --bg-card:   #0d1018;
  --bg-card-h: #111520;
  --border:    rgba(255,255,255,0.06);
  --border-h:  rgba(110,113,255,0.55);
  --text:      #dde1ec;
  --text-dim:  #6b7591;
  --text-muted:#3d4460;
  --accent:    #6e71ff;
  --accent-bg: rgba(110,113,255,0.12);
  --low:       #3ddc84;
  --low-bg:    rgba(61,220,132,0.1);
  --med:       #ffc14d;
  --med-bg:    rgba(255,193,77,0.1);
  --high:      #ff5f5f;
  --high-bg:   rgba(255,95,95,0.1);
  --queue-c:   #ff8533;
  --queue-bg:  rgba(255,133,51,0.14);
  --queue-bdr: rgba(255,133,51,0.4);
  --header-bg: rgba(7,9,15,0.92);
  --body-grad: rgba(110,113,255,0.10);
  --r:         13px;
  --r-sm:      7px;
}

[data-theme="light"] {
  --bg:        #f2f3f8;
  --bg-card:   #ffffff;
  --bg-card-h: #eaecf5;
  --border:    rgba(0,0,0,0.08);
  --border-h:  rgba(85,88,238,0.45);
  --text:      #181b2e;
  --text-dim:  #454870;
  --text-muted:#9096b8;
  --accent:    #5558ee;
  --accent-bg: rgba(85,88,238,0.10);
  --low:       #1a9450;
  --low-bg:    rgba(26,148,80,0.10);
  --med:       #9e6300;
  --med-bg:    rgba(158,99,0,0.10);
  --high:      #c42b2b;
  --high-bg:   rgba(196,43,43,0.10);
  --queue-c:   #b84e00;
  --queue-bg:  rgba(184,78,0,0.10);
  --queue-bdr: rgba(184,78,0,0.32);
  --header-bg: rgba(242,243,248,0.92);
  --body-grad: rgba(85,88,238,0.06);
}

/* ─── Base ────────────────────────────────────────────── */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  background-image: radial-gradient(ellipse 70% 40% at 50% 0%, var(--body-grad) 0%, transparent 65%);
}

/* ─── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Header ──────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  max-width: 1600px; margin: 0 auto;
  padding: 0 24px; height: 52px;
  display: flex; align-items: center; gap: 16px;
}

.brand {
  font-size: 17px; font-weight: 900;
  letter-spacing: -0.5px; flex-shrink: 0; color: var(--text);
}
.brand span { color: var(--accent); }

.header-center { flex: 1; }
.header-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* Lang switcher */
.lang-switcher { display: flex; gap: 2px; }

.lang-btn {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 8px; border-radius: 6px;
  color: var(--text-muted); text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.lang-btn:hover    { color: var(--text); background: rgba(255,255,255,0.06); }
.lang-btn--active  { color: var(--accent); background: var(--accent-bg); }

/* Theme toggle */
.theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px; border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.theme-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }
[data-theme="light"] .theme-btn:hover { background: rgba(0,0,0,0.06); }
.theme-btn .icon-sun  { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="light"] .theme-btn .icon-sun  { display: block; }
[data-theme="light"] .theme-btn .icon-moon { display: none; }

/* Update time */
.header-meta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.header-meta__label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.header-meta__value { font-size: 12px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.header-clock { font-size: 13px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }

/* ─── Nav ─────────────────────────────────────────────── */
.nav { border-top: 1px solid var(--border); }

.nav-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  padding: 10px 14px; text-decoration: none; border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-link:hover      { color: var(--text); }
.nav-link--active    { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tg-bot-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 8px;
  background: rgba(41,168,224,0.12);
  border: 1px solid rgba(41,168,224,0.3);
  border-radius: 20px;
  text-decoration: none;
  color: #29a8e0;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tg-bot-btn:hover {
  background: rgba(41,168,224,0.22);
  border-color: rgba(41,168,224,0.55);
  transform: translateY(-1px);
}
.tg-bot-btn__text   { display: flex; flex-direction: column; line-height: 1.25; }
.tg-bot-btn__label  { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; opacity: .65; }
.tg-bot-btn__handle { font-size: 12px; font-weight: 700; }

/* ─── Container ───────────────────────────────────────── */
.container {
  max-width: 1600px; margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ─── Group ───────────────────────────────────────────── */
.group { margin-bottom: 40px; }

.group-header {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.group__title {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px;
}

.group__icon--fav { color: #ffc14d; flex-shrink: 0; }

/* Group stats */
.group-stats { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.gs-online-block {
  display: flex; align-items: baseline; gap: 3px;
  font-variant-numeric: tabular-nums;
}
.gs-online { font-size: 15px; font-weight: 800; color: var(--low); }
.gs-sep    { font-size: 13px; color: var(--text-muted); }
.gs-max    { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.gs-label  { font-size: 11px; color: var(--text-muted); margin-left: 2px; }

.gs-queue {
  display: flex; align-items: center; gap: 5px;
  background: var(--queue-bg);
  border: 1px solid var(--queue-bdr);
  color: var(--queue-c);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ─── Grid ────────────────────────────────────────────── */
.servers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

/* ─── Card ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  will-change: transform;
}

.card:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 0 1px rgba(110,113,255,0.2), 0 8px 28px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}

/* Head */
.card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
}

.card__title {
  display: flex; align-items: baseline; gap: 7px;
  flex: 1; min-width: 0;
}

.card__number {
  font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-bg);
  border-radius: 4px; padding: 1px 5px;
  flex-shrink: 0; letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}

.card__name {
  font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}

/* Favorite button */
.fav-btn {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-muted); border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s; flex-shrink: 0; line-height: 0;
}
.fav-btn svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  transition: fill 0.15s, stroke 0.15s;
}
.fav-btn:hover         { color: var(--med); background: rgba(255,193,77,0.1); }
.fav-btn--on           { color: var(--med); }
.fav-btn--on svg       { fill: var(--med); stroke: var(--med); }

/* Body */
.card__body { display: flex; flex-direction: column; gap: 8px; }

.card__online-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
}

.card__online-nums {
  display: flex; align-items: baseline; gap: 4px;
  font-variant-numeric: tabular-nums;
}

.card__num {
  font-size: 28px; font-weight: 900; line-height: 1;
  letter-spacing: -1.5px;
  transition: color 0.3s;
  display: inline-block;
}
@keyframes num-changed {
  0%   { opacity: 0.3; transform: scale(1.22) translateY(-3px); }
  55%  { opacity: 1;   transform: scale(1.05) translateY(0); }
  100% { opacity: 1;   transform: scale(1)    translateY(0); }
}
@keyframes num-changed-sm {
  0%   { opacity: 0.3; transform: scale(1.15); }
  60%  { opacity: 1;   transform: scale(1.04); }
  100% { opacity: 1;   transform: scale(1); }
}
@keyframes content-fadein {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.num-flash     { animation: num-changed    0.4s ease-out; }
.num-flash-sm  { animation: num-changed-sm 0.35s ease-out; }
.content-fadein { animation: content-fadein 0.3s ease-out; }
.card__sep { font-size: 18px; color: var(--text-muted); font-weight: 300; }
.card__max { font-size: 15px; font-weight: 500; color: var(--text-dim); }

/* Load colors */
.load--low  { color: var(--low); }
.load--med  { color: var(--med); }
.load--medium { color: var(--med); }
.load--high { color: var(--high); }

/* Queue badge */
.queue-badge {
  display: none; align-items: center; gap: 5px;
  background: var(--queue-bg);
  border: 1px solid var(--queue-bdr);
  color: var(--queue-c);
  border-radius: var(--r-sm); padding: 5px 10px;
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 8px rgba(255,133,51,0.15);
}
.queue-badge--visible { display: flex; }
.queue-badge strong   { font-size: 14px; font-weight: 900; }

/* Progress bar */
.card__bar-row {
  display: flex; align-items: center; gap: 8px;
}

.progress {
  flex: 1; height: 5px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px; overflow: hidden;
}

.progress__fill {
  height: 100%; border-radius: 3px;
  transition: width 0.5s ease;
}
.progress__fill.load--low    { background: var(--low);  box-shadow: 0 0 5px rgba(61,220,132,0.5); }
.progress__fill.load--medium { background: var(--med);  box-shadow: 0 0 5px rgba(255,193,77,0.5); }
.progress__fill.load--high   { background: var(--high); box-shadow: 0 0 5px rgba(255,95,95,0.5); }

.progress__pct {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  font-variant-numeric: tabular-nums; flex-shrink: 0; width: 34px; text-align: right;
}

/* Chart */
.card__chart {
  height: 46px; overflow: hidden; border-radius: 5px;
  opacity: 0.65; transition: opacity 0.2s;
}
.card:hover .card__chart { opacity: 1; }
.card__chart svg { width: 100%; height: 100%; display: block; }

/* Footer */
.card__footer {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-top: 2px;
}

/* Group tag — hidden in group, shown when in fav-grid */
.card__group-tag {
  display: none;
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: rgba(255,255,255,0.05); border-radius: 4px;
  padding: 2px 7px; text-transform: uppercase; letter-spacing: 0.7px;
}
#fav-grid .card__group-tag { display: inline-flex; }

/* Badges */
.card__badges { display: flex; gap: 4px; flex-wrap: wrap; }

.badge {
  font-size: 10px; font-weight: 700; border-radius: 4px;
  padding: 2px 6px; letter-spacing: 0.3px;
}
.badge--rec    { background: rgba(255,193,77,0.12); color: #ffc14d; }
.badge--donate { background: rgba(110,113,255,0.14); color: #a5a9ff; }
.badge--exp    { background: rgba(61,220,132,0.12); color: var(--low); }
.badge--lock   { background: rgba(255,255,255,0.05); color: var(--text-dim); }

/* Social links */
.card__links { margin-left: auto; display: flex; gap: 5px; }

.soc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; border-radius: var(--r-sm);
  text-decoration: none; transition: opacity 0.15s, transform 0.15s;
}
.soc-btn:hover { opacity: 0.7; transform: scale(1.1); }
.soc-btn--tg { background: rgba(41,182,246,0.14); color: #7dd3fc; }
.soc-btn--vk { background: rgba(100,130,255,0.14); color: #93c5fd; }

/* ─── Empty ───────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 80px 0; color: var(--text-muted); text-align: center;
}
.empty svg { opacity: 0.25; }
.empty code {
  background: rgba(255,255,255,0.06); padding: 2px 8px;
  border-radius: 5px; font-size: 13px; color: var(--accent);
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1600px; margin: 0 auto;
  padding: 9px 24px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}

.footer-brand { font-weight: 800; font-size: 13px; color: var(--text-dim); }
.footer-brand span { color: var(--accent); }
.footer-dot { color: var(--text-muted); }
#countdown { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ─── Market ──────────────────────────────────────────── */

.page-header__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

/* Server tabs */
.market-controls {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}

.server-tabs-wrap { flex: 1; min-width: 0; overflow: hidden; }

.server-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.server-tabs::-webkit-scrollbar { display: none; }

.server-tab {
  flex-shrink: 0;
  font-size: 12px; font-weight: 700;
  padding: 5px 10px; border-radius: 6px;
  text-decoration: none; color: var(--text-muted);
  background: rgba(255,255,255,0.04); border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.server-tab:hover      { color: var(--text); background: rgba(255,255,255,0.07); }
.server-tab--active    { color: var(--accent); background: var(--accent-bg); border-color: rgba(110,113,255,0.3); }
.server-tab--vc        { }
.server-tab--vc.server-tab--active { color: #ffc14d; background: rgba(255,193,77,0.12); border-color: rgba(255,193,77,0.3); }

/* Right controls */
.market-right-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Type toggle */
.type-toggle { display: flex; background: rgba(255,255,255,0.04); border-radius: 8px; padding: 3px; gap: 2px; }

.type-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 6px;
  text-decoration: none; color: var(--text-dim);
  transition: color 0.15s, background 0.15s;
}
.type-btn--active          { font-weight: 700; }
.type-btn--sell.type-btn--active { background: rgba(61,220,132,0.15); color: var(--low); }
.type-btn--buy.type-btn--active  { background: rgba(255,95,95,0.15);  color: var(--high); }

/* Currency pill */
.currency-pill {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(110,113,255,0.12); color: var(--accent);
  border: 1px solid rgba(110,113,255,0.25);
}
.currency-pill--vc { background: rgba(255,193,77,0.12); color: #ffc14d; border-color: rgba(255,193,77,0.3); }

/* Category filter */
.cat-filter {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.cat-filter:last-of-type { margin-bottom: 12px; }

.cat-filter--sub {
  padding-left: 10px;
  border-left: 2px solid var(--border);
  margin-bottom: 12px;
}

.cat-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}
.cat-btn:hover { border-color: var(--border-h); color: var(--text); }
.cat-btn--active {
  background: var(--accent); border-color: var(--accent);
  color: #fff; pointer-events: none;
}
.cat-btn--sub {
  height: 26px; padding: 0 10px; font-size: 11px;
}
.cat-btn__arrow {
  font-size: 14px; line-height: 1; opacity: 0.5;
}

/* Item name & category badge in card */
.item-name {
  font-size: 12px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.item-name--primary {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.item-card__title {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px; justify-content: center;
  color: inherit;
  border-radius: var(--r-sm);
  padding: 2px 4px; margin: -2px -4px;
  transition: background 0.15s;
}
.item-card__title:hover { background: rgba(110,113,255,0.07); }
.item-card__title:hover .item-name--primary { color: var(--accent); }
.item-card__meta {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.item-id-badge--sm {
  font-size: 10px; padding: 1px 5px;
  opacity: 0.7;
}
.item-cat-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px; padding: 1px 6px;
  white-space: nowrap;
}
.item-cat-badge__parent { color: var(--text-muted); opacity: 0.6; }
.item-cat-badge__sep    { opacity: 0.4; }

/* Toolbar */
.market-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

.market-search {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 12px;
  transition: border-color 0.2s;
}
.market-search:focus-within { border-color: var(--accent); }
.market-search svg { color: var(--text-muted); flex-shrink: 0; }

.search-input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 13px; width: 100%;
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
/* Hide number input arrows */
.search-input::-webkit-outer-spin-button,
.search-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.search-input[type=number] { -moz-appearance: textfield; }

.market-stats-bar { display: flex; gap: 6px; flex-shrink: 0; }

.stat-pill {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  background: rgba(255,255,255,0.04); border-radius: 4px;
  padding: 3px 8px; white-space: nowrap;
}

/* Table wrapper */
.market-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }

.market-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}

.market-table thead { background: rgba(255,255,255,0.03); }

.market-table th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  white-space: nowrap; border-bottom: 1px solid var(--border);
  user-select: none;
}

.market-table th.sortable:hover { color: var(--text); }
.market-table th.sort-asc  .sort-icon { color: var(--accent); }
.market-table th.sort-desc .sort-icon { color: var(--accent); }
.sort-icon { font-size: 10px; opacity: 0.5; }
th.sort-asc  .sort-icon::after { content: '↑'; }
th.sort-desc .sort-icon::after { content: '↓'; }
th.sort-asc  .sort-icon, th.sort-desc .sort-icon { opacity: 1; }
th:not(.sort-asc):not(.sort-desc) .sort-icon::after { content: '↕'; }

.market-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text);
}

.market-table tbody tr:last-child td { border-bottom: none; }

.market-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

/* Columns */
.col-item    { min-width: 90px; }
.col-upg     { min-width: 70px; }
.col-price   { min-width: 140px; font-variant-numeric: tabular-nums; }
.col-count   { min-width: 80px;  font-variant-numeric: tabular-nums; }
.col-sellers { min-width: 70px;  font-variant-numeric: tabular-nums; text-align: center; }
.col-detail  { width: 40px; text-align: center; }

/* Item ID badge */
.item-id-badge {
  font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--accent-bg);
  border-radius: 5px; padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}

/* Upgrade badge */
.upg-badge {
  font-size: 11px; font-weight: 800;
  color: #ffc14d; background: rgba(255,193,77,0.12);
  border: 1px solid rgba(255,193,77,0.25);
  border-radius: 4px; padding: 1px 6px;
}
.upg-badge--sm {
  font-size: 10px; padding: 0 4px;
}
.no-upg { color: var(--text-muted); }

/* Price cells */
.price--min { color: var(--low);  font-weight: 700; }
.price--max { color: var(--text-dim); }

/* Detail button */
.detail-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px 8px;
  border-radius: 5px; line-height: 0;
  transition: color 0.15s, background 0.15s;
}
.detail-btn:hover { color: var(--accent); background: var(--accent-bg); }

/* ─── Item cards (market) ────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 8px;
  align-items: start;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.item-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 0 1px rgba(110,113,255,0.15), 0 6px 20px rgba(0,0,0,0.4);
  z-index: 10;
}

/* Head */
.item-card__head {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* Two-column sell/buy body */
.item-card__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 6px;
}
.item-card__body .item-section:only-child {
  grid-column: 1 / -1;
}

/* Item icon with hover preview */
.item-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  position: relative;
  cursor: default;
  overflow: visible;
}
.item-icon > img:first-child {
  width: 32px; height: 32px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.item-icon--lg {
  width: 44px; height: 44px;
}
.item-icon__preview {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: 12px;
  padding: 10px;
  width: 160px; height: 160px;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  pointer-events: none;
}
.item-icon:hover .item-icon__preview {
  display: flex;
}
.item-icon__preview img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}

/* Item detail link in card head */
.item-detail-link {
  margin-left: auto; flex-shrink: 0;
  color: var(--text-muted);
  display: flex; align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.item-detail-link:hover {
  color: var(--accent);
  background: rgba(110,113,255,0.1);
}

/* "Show more" link inside section */
.listing-more {
  display: block;
  text-align: center;
  padding: 4px 10px;
  font-size: 11px; font-weight: 600;
  color: var(--low);
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(61,220,132,0.03);
  text-decoration: none;
  transition: background 0.15s;
}
.listing-more:hover { background: rgba(61,220,132,0.07); }
.listing-more--buy  { color: var(--high); background: rgba(255,95,95,0.03); }
.listing-more--buy:hover { background: rgba(255,95,95,0.07); }

/* Server label inside listing row */
.listing-server {
  font-size: 10px; font-weight: 700;
  color: var(--accent);
  background: rgba(110,113,255,0.12);
  border: 1px solid rgba(110,113,255,0.2);
  border-radius: 3px; padding: 1px 5px;
  flex-shrink: 0;
}

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 24px 0 8px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.page-btn:hover { border-color: var(--border-h); color: var(--text); }
.page-btn--active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
  pointer-events: none;
}
.page-btn--disabled {
  opacity: 0.35; pointer-events: none;
}
.page-ellipsis {
  color: var(--text-muted); font-size: 13px; padding: 0 4px;
  line-height: 34px;
}

/* Item hero (detail page header) */
.item-hero {
  display: flex; align-items: center; gap: 14px;
}

.item-hero__icon {
  width: 96px; height: 96px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}
.item-hero__icon img {
  width: 88px; height: 88px;
  object-fit: contain;
}

/* Item detail page */
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none;
  padding: 4px 8px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.back-link:hover { color: var(--accent); background: rgba(110,113,255,0.08); }

.item-servers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 6px;
}

.item-server-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.item-server-label {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.item-server-block .item-card__body {
  padding: 6px;
  gap: 6px;
}

/* Compact rows on item detail page */
.item-server-block .listing-row {
  padding: 3px 8px;
  font-size: 11px;
}
.item-server-block .item-section__head {
  padding: 4px 8px;
}
.item-server-block .item-section {
  font-size: 11px;
}

/* Sell / Buy sections */
.item-section {
  border-radius: var(--r-sm);
  overflow: hidden;
}

.item-section--sell { border: 1px solid rgba(61,220,132,0.15); }
.item-section--buy  { border: 1px solid rgba(255,95,95,0.15); }

.item-section__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px;
}
.item-section--sell .item-section__head { background: rgba(61,220,132,0.07); }
.item-section--buy  .item-section__head { background: rgba(255,95,95,0.07); }

.section-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
}
.section-label--sell { color: var(--low); }
.section-label--buy  { color: var(--high); }

.section-count {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border-radius: 3px; padding: 1px 5px;
}

/* Individual listing rows */
.listing-row {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-top: 1px solid rgba(255,255,255,0.03);
  font-size: 11px;
}
.listing-row--best-sell { background: rgba(61,220,132,0.04); }
.listing-row--best-buy  { background: rgba(255,95,95,0.04); }

.listing-lavka {
  font-size: 10px; font-weight: 700;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px; padding: 1px 5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.listing-qty {
  color: var(--text-muted); font-size: 11px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}

.listing-price {
  margin-left: auto;
  font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-dim); font-size: 12px;
  white-space: nowrap;
}
.listing-price--best     { color: var(--low);  font-weight: 800; }
.listing-price--best-buy { color: var(--high); font-weight: 800; }
.listing-price.price--sm { font-size: 10px; }
.listing-price.price--xs { font-size: 9px; letter-spacing: -0.2px; }

/* Stats bar pills */
.sell-stat { color: var(--low); }
.buy-stat  { color: var(--high); }

/* ─── Modal ───────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 80px); display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { transform: scale(0.95) translateY(8px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);   opacity: 1; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--text);
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 2px; border-radius: 5px; line-height: 0;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-body { overflow-y: auto; padding: 16px 20px; }

.modal-loading, .modal-empty {
  text-align: center; color: var(--text-muted);
  padding: 32px 0; font-size: 14px;
}

.modal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.modal-table th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 6px 10px; border-bottom: 1px solid var(--border);
}
.modal-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text); }
.modal-table tbody tr:last-child td { border-bottom: none; }
.modal-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

.modal-user  { font-weight: 600; }
.modal-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.modal-count { font-variant-numeric: tabular-nums; color: var(--text-dim); }

/* ─── Page header (non-online pages) ─────────────────── */
.page-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.page-sub   { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

/* ─── Group count badge ───────────────────────────────── */
.group-count {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: rgba(255,255,255,0.05); border-radius: 4px;
  padding: 2px 7px;
}

/* ─── Discounts ───────────────────────────────────────── */
.bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.bonus-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bonus-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 0 1px rgba(110,113,255,0.15), 0 6px 20px rgba(0,0,0,0.4);
}

.bonus-card__head { display: flex; align-items: center; gap: 8px; }
.bonus-card__name { font-size: 15px; font-weight: 700; color: var(--text); }

.bonus-card__mults { display: flex; flex-direction: column; gap: 8px; }

.mult {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
}
.mult--donate { background: rgba(110,113,255,0.1); border: 1px solid rgba(110,113,255,0.2); }
.mult--xp     { background: rgba(61,220,132,0.08); border: 1px solid rgba(61,220,132,0.2); }

.mult__icon  { font-size: 16px; flex-shrink: 0; }
.mult__label { font-size: 12px; color: var(--text-dim); flex: 1; }
.mult__value {
  font-size: 18px; font-weight: 900; letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.mult--donate .mult__value { color: var(--accent); }
.mult--xp     .mult__value { color: var(--low); }

.bonus-card__footer { border-top: 1px solid var(--border); padding-top: 10px; }
.bonus-online {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot--on  { background: var(--low); box-shadow: 0 0 5px rgba(61,220,132,0.6); }
.dot--off { background: var(--text-muted); }

/* ─── Coming soon ─────────────────────────────────────── */
.coming-soon {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 0; text-align: center;
}

.coming-soon__icon {
  opacity: 0.7;
  animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.coming-soon__title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.coming-soon__sub   { font-size: 14px; color: var(--text-dim); }

.coming-soon__features {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 16px;
}

.cs-feature {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 16px;
  font-size: 13px; color: var(--text-dim);
}
.cs-feature__icon { font-size: 18px; }

/* ─── Responsive ──────────────────────────────────────── */

/* Wide screens */
@media (min-width: 1700px) {
  .servers    { grid-template-columns: repeat(5, 1fr); }
  .bonus-grid { grid-template-columns: repeat(5, 1fr); }
  .item-grid  { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}

/* Medium desktop / tablet landscape */
@media (max-width: 1100px) {
  .item-grid    { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .item-servers { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* Nav compact */
@media (max-width: 900px) {
  .nav-link { font-size: 12px; padding: 10px 10px; gap: 4px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .header-center  { display: none; }
  .header-top     { padding: 0 16px; height: 48px; }
  .nav-inner      { padding: 0 8px; }
  .container      { padding: 20px 16px 72px; }
  .group-stats    { gap: 6px; }
  .gs-label       { display: none; }
  .page-title     { font-size: 20px; }
  .page-header    { padding: 20px 0 16px; margin-bottom: 20px; }

  /* Market grid — single column, auto height */
  .item-grid      { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 6px; }
  .item-servers   { grid-template-columns: 1fr; }

  /* Market toolbar — stack vertically */
  .market-toolbar   { flex-direction: column; align-items: stretch; gap: 8px; }
  .market-search    { min-width: 0; }
  .market-stats-bar { flex-wrap: wrap; gap: 4px; }

  /* Category filter — wrap, no scroll */
  .cat-filter { flex-wrap: wrap; gap: 4px; }
  .cat-btn    { height: 26px; padding: 0 10px; font-size: 11px; }

  /* Page header row stacks */
  .page-header__row { flex-direction: column; gap: 8px; }

  /* Item detail hero */
  .item-hero        { gap: 10px; }
  .item-hero__icon  { width: 64px; height: 64px; }
  .item-hero__icon img { width: 56px; height: 56px; }

  /* Pagination */
  .pagination { gap: 3px; padding: 16px 0 6px; }
  .page-btn   { min-width: 30px; height: 30px; font-size: 12px; }

  /* Market item card: stack sell/buy vertically */
  .item-card__body { grid-template-columns: 1fr; }

  /* Tg-bot button: text only */
  .tg-bot-btn__text { display: none; }
  .tg-bot-btn { padding: 5px 8px; gap: 0; }
}

/* Small mobile */
@media (max-width: 640px) {
  .servers    { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bonus-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card       { padding: 12px; gap: 9px; }
  .card__num  { font-size: 22px; }
  .card__max  { font-size: 13px; }
  .queue-badge        { font-size: 11px; padding: 4px 8px; }
  .queue-badge strong { font-size: 12px; }
  .group__title       { font-size: 10px; }
  .header-meta        { display: none; }
  .header-clock       { display: none; }

  /* Nav compact — тільки іконки, без тексту */
  .nav-inner { justify-content: space-around; padding: 0 4px; gap: 0; }
  .nav-link  { flex-direction: column; font-size: 0; padding: 8px 6px; gap: 0; }
  .nav-link svg { display: block; width: 18px; height: 18px; }
}

/* Small phones */
@media (max-width: 480px) {
  .page-title { font-size: 18px; }
  .lang-btn   { font-size: 10px; padding: 3px 6px; }

  /* Item card head compact */
  .item-card__head { gap: 6px; }
  .item-icon       { width: 32px; height: 32px; border-radius: 6px; }
  .item-icon > img:first-child { width: 26px; height: 26px; }

  /* Market stats pills compact */
  .stat-pill { font-size: 10px; padding: 2px 6px; }

  /* Tg-bot button: hide entirely */
  .tg-bot-btn { display: none; }

  /* Disable hover image previews on touch devices */
  .item-icon:hover .item-icon__preview,
  .dc-icon:hover .dc-icon__preview { display: none; }

  /* Listing rows: allow wrap so price fits */
  .listing-row { flex-wrap: wrap; row-gap: 2px; }
}

/* Very small phones */
@media (max-width: 400px) {
  .servers    { grid-template-columns: 1fr; }
  .bonus-grid { grid-template-columns: 1fr; }
  .card__num  { font-size: 26px; }
  .coming-soon__features { flex-direction: column; }
  .lang-switcher { gap: 0; }
  .brand { font-size: 14px; }
}

@media (max-width: 360px) {
  .card__chart { display: none; }
}

/* ─── Items catalog ──────────────────────────────────── */
.items-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.catalog-card:hover { border-color: var(--border-h); }

.item-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
}
.item-description p  { margin-bottom: 8px; }
.item-description p:last-child { margin-bottom: 0; }
.item-description ul, .item-description ol { padding-left: 18px; margin-bottom: 8px; }
.item-description li { margin-bottom: 3px; }
.item-description strong, .item-description b { color: var(--text); font-weight: 600; }
.item-description a { color: var(--accent); }
.item-description a:hover { text-decoration: underline; }

.item-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.catalog-card__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}
.catalog-card__icon img {
  width: 34px; height: 34px;
  object-fit: contain;
  display: block;
}

.catalog-card__info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}

.catalog-card__name {
  font-size: 12px; font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.catalog-card__meta {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
}

/* ─── Scripts page ───────────────────────────────────── */
.script-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  align-items: start;
}

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.script-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.script-card__head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.script-card__icon { color: var(--accent); flex-shrink: 0; }

.script-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.script-card__preview {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: block;
}

.script-card__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

.script-card__files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.script-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--accent-bg);
  border: 1px solid rgba(110,113,255,0.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  white-space: nowrap;
}
.script-file-btn:hover {
  background: rgba(110,113,255,0.22);
  border-color: rgba(110,113,255,0.55);
  transform: translateY(-1px);
}

/* ─── Discount slider ────────────────────────────────── */
.dc-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.dc-slider__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  min-width: 48px;
  flex-shrink: 0;
}

.dc-slider__count {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.dc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), rgba(255,255,255,0.1) var(--pct, 0%));
  outline: none;
  cursor: pointer;
}
.dc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
  transition: transform 0.1s;
}
.dc-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.dc-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
}
.dc-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
}

/* ─── Discounts page ──────────────────────────────────── */
.dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  align-items: start;
}

.dc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dc-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 0 0 1px rgba(110,113,255,0.15), 0 6px 20px rgba(0,0,0,0.4);
}

.dc-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  overflow: visible;
  position: relative;
  cursor: default;
}
.dc-icon > img {
  width: 48px; height: 48px;
  object-fit: contain;
  border-radius: 8px;
}
.dc-icon__preview {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: 12px;
  padding: 10px;
  width: 140px; height: 140px;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  pointer-events: none;
}
.dc-icon:hover .dc-icon__preview { display: flex; }
.dc-icon__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.dc-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 5px;
}

.dc-head {
  display: flex; align-items: flex-start; gap: 6px;
}

.dc-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dc-badge {
  flex-shrink: 0;
  font-size: 12px; font-weight: 800;
  background: rgba(61,220,132,0.14);
  color: var(--low);
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.2px;
}

.dc-prices {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.dc-price-old {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.dc-price-new {
  font-size: 14px; font-weight: 700;
  color: var(--low);
}

.dc-servers {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}

.dc-servers__label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  flex-shrink: 0;
}

.dc-server-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
}
.dc-server-pill__num {
  font-size: 11px; font-weight: 700;
}
.dc-server-pill--hidden { display: none; }

.dc-servers__more {
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: none; border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dc-servers__more:hover { background: var(--accent-bg); color: var(--accent); }

.dc-server-pill__name {
  font-size: 10px; font-weight: 400;
  color: rgba(110,113,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.dc-until {
  font-size: 10px;
  color: var(--text-muted);
}

/* ── Houses / Businesses pages ── */
.map-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; min-width: 0;
}
.map-filters .market-search { min-width: 0; }

/* ── Map cards (houses / businesses) ─────────────────────── */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  align-items: start;
}

.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.map-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.map-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.map-card__id {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.map-card__owner {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card__name {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card__footer { margin-top: 3px; }

/* ── Arbitrage cards ──────────────────────────────────────── */
.arb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  align-items: start;
}

.arb-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.arb-card:hover {
  border-color: var(--border-h);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}

.arb-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.arb-card__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.arb-card__row--sell { border-left: 2px solid rgba(248,113,113,0.5); padding-left: 8px; }
.arb-card__row--buy  { border-left: 2px solid rgba(52,211,153,0.5);  padding-left: 8px; }

.arb-card__row-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 76px;
}

.arb-card__row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  font-size: 12px;
}

.arb-card__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 13px;
}

.arb-card__sep { color: var(--text-muted); }
.arb-card__qty { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.arb-card__profit,
.arb-card__total { font-size: 13px; display: flex; align-items: baseline; gap: 4px; }
.filter-select {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; cursor: pointer;
}
.filter-check {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  user-select: none;
}
.filter-check input { cursor: pointer; accent-color: var(--accent); }

.data-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table thead th {
  background: var(--bg-card); padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--accent-bg); }
.data-table td { padding: 9px 14px; vertical-align: middle; }

.srv-badge {
  display: inline-block; min-width: 22px; text-align: center;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 5px; padding: 1px 6px; font-size: 12px; font-weight: 700;
  margin-right: 4px;
}
.srv-name { font-size: 12px; color: var(--text-muted); }
.id-cell { font-family: monospace; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.owner-cell { font-weight: 500; }
.name-cell { color: var(--text-muted); font-size: 12px; }

.auction-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,170,0,.12); color: #ffaa00;
  border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600;
}
.auction-badge__end { font-size: 11px; font-weight: 400; opacity: .8; }
.mkt-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600;
}
