/* SOKOLENOK · LUDIK — design system 1:1 to mockups */

:root {
  --bg: #0a0d0c;
  --bg-side: #080a09;
  --card: #0e1413;
  --card-2: #121918;
  --card-h: #161e1c;
  --line: #1b2522;
  --line-2: #283631;
  --line-acc: rgba(74, 222, 128, 0.32);

  --g: #4ade80;
  --g-2: #22c55e;
  --g-soft: rgba(74, 222, 128, 0.08);
  --g-soft-2: rgba(74, 222, 128, 0.14);
  --g-glow: rgba(74, 222, 128, 0.45);
  --g-dim: rgba(74, 222, 128, 0.6);

  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.10);
  --yellow: #eab308;
  --yellow-soft: rgba(234, 179, 8, 0.10);
  --purple: #c084fc;
  --purple-soft: rgba(192, 132, 252, 0.10);

  --text: #e6efe8;
  --text-2: #cdd5cf;
  --dim: #8e9994;
  --mute: #5b6661;

  --r: 14px;
  --r-sm: 10px;
  --r-pill: 100px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(74, 222, 128, 0.05), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(74, 222, 128, 0.04), transparent 60%);
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
::selection { background: var(--g-soft-2); color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--g-soft-2); }
::-webkit-scrollbar-track { background: transparent; }

/* ============ LAYOUT ============ */
.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  padding: 32px 18px 24px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.main {
  padding: 32px 56px 60px;
  min-width: 0;
  position: relative;
}

/* ============ SIDEBAR ============ */
.brand {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 12px 28px;
  text-align: center;
}
.brand-logo {
  width: 110px; height: auto;
  filter: drop-shadow(0 0 18px rgba(74, 222, 128, 0.35));
}
.brand-tag {
  font-size: 12px; font-weight: 600; color: var(--g);
  letter-spacing: 0.04em;
  margin-top: -2px;
}

.nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
  margin-top: 6px;
}
.nav.nav-bottom {
  flex: 0 0 auto;
  margin-top: 6px;
  margin-bottom: 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--r-sm);
  color: var(--dim); font-size: 14px; font-weight: 500;
  transition: all 0.15s; user-select: none;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.025); }
.nav-link.active {
  color: var(--g); background: var(--g-soft);
  border-color: var(--line-acc);
  box-shadow: inset 0 0 18px rgba(74, 222, 128, 0.05);
}
.nav-ico { width: 17px; height: 17px; flex-shrink: 0; display: inline-flex; }
.nav-ico svg { width: 100%; height: 100%; }

/* ============ SIDE USER CARD (logged-in: avatar + nick + pulse dot) ============ */
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  margin-bottom: 10px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.side-user::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, var(--g-soft), transparent 65%);
  opacity: 0.6; pointer-events: none;
}
.side-user:hover { border-color: var(--line-acc); background: var(--card-h); }
.side-user-avatar {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--card-2); border: 1px solid var(--line-acc);
  flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--g); font-size: 14px;
  position: relative; z-index: 1;
}
.side-user-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.side-user-text { min-width: 0; flex: 1; position: relative; z-index: 1; }
.side-user-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.side-user-sub {
  font-size: 10px; color: var(--dim); margin-top: 1px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.side-user-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--g); flex-shrink: 0;
  position: relative; z-index: 1;
  box-shadow: 0 0 8px var(--g);
  animation: sokPulse 2.4s ease-out infinite;
}

.side-status {
  padding: 14px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; align-items: flex-start; gap: 11px;
  position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.side-status::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, var(--g-soft), transparent 60%);
  pointer-events: none;
}
.side-status .ico {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--g-soft); border: 1px solid var(--line-acc);
  color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.side-status .ico svg { width: 16px; height: 16px; }
.side-status .text { position: relative; z-index: 1; min-width: 0; }
.side-status .t1 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.side-status .t2 { font-size: 11px; color: var(--dim); line-height: 1.45; }

.side-copy {
  padding: 0 8px 14px;
  font-size: 11px; color: var(--mute); line-height: 1.6;
}

.side-controls {
  display: flex; gap: 8px;
  padding: 0 8px;
}
.lang-pick, .theme-toggle {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 13px; font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}
.lang-pick { padding: 0 12px; gap: 6px; }
.lang-pick:hover, .theme-toggle:hover { border-color: var(--line-2); }
.lang-pick svg { width: 12px; height: 12px; color: var(--dim); }
.theme-toggle { width: 36px; color: var(--dim); }
.theme-toggle:hover { color: var(--g); border-color: var(--line-acc); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ============ TOP TOOLBAR (status pill area, top-right of main) ============ */
.main-top {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  margin-bottom: 4px;
  min-height: 38px;
}
.main-top .lang-pick, .main-top .theme-toggle {
  height: 36px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--text);
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--g); box-shadow: 0 0 10px var(--g-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px var(--g-glow); }
  50% { box-shadow: 0 0 16px var(--g-glow), 0 0 4px var(--g); }
}

/* ============ EYEBROW + TITLE ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700;
  background: var(--g-soft); padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-acc);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--g); box-shadow: 0 0 8px var(--g-glow);
}

.page-title {
  font-size: 64px; line-height: 1.04;
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}
.page-title .green { color: var(--g); }
.page-sub {
  font-size: 15px; color: var(--dim);
  max-width: 720px; margin-bottom: 32px; line-height: 1.55;
}

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dim); margin-bottom: 16px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--g); }
.back-link svg { width: 14px; height: 14px; }

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
  transition: border-color 0.22s ease, background 0.22s ease;
}
.card:hover { border-color: var(--line-2); }
.card.flush { padding: 0; }

.card-eyebrow {
  font-size: 11px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.card-eyebrow svg { width: 14px; height: 14px; }

.card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
  flex-wrap: wrap;
}
.card-h > :first-child { min-width: 0; flex: 1; }
.card-h h2 {
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin: 0;
}
.card-h h3 { font-size: 14px; font-weight: 700; margin: 0; }
.card-link {
  font-size: 12px; color: var(--g); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  text-transform: none; white-space: nowrap; flex-shrink: 0;
}
.card-link:hover { color: #5beb91; }
.card-link svg { width: 12px; height: 12px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm); cursor: pointer; transition: all 0.15s;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  line-height: 1; white-space: nowrap;
}
.btn:hover { background: var(--card-h); border-color: var(--line-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--g); color: #061008; border-color: var(--g); font-weight: 700;
  box-shadow: 0 4px 14px rgba(74, 222, 128, 0.22);
}
.btn-primary:hover {
  background: #5beb91; border-color: #5beb91;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12), 0 6px 18px rgba(74, 222, 128, 0.32);
  color: #061008;
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--card-2); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-outline {
  background: transparent; border-color: var(--line-acc); color: var(--g);
}
.btn-outline:hover { background: var(--g-soft); border-color: var(--g); color: var(--g); }

/* huge green Steam button on landing */
.steam-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 26px; border-radius: 12px;
  background: var(--g);
  color: #061008; font-weight: 700; font-size: 17px;
  border: 1px solid var(--g);
  box-shadow: 0 0 0 0 var(--g-glow), 0 8px 28px rgba(74, 222, 128, 0.32);
  transition: all 0.18s;
  position: relative; overflow: hidden;
  width: 100%; max-width: 480px;
  justify-content: flex-start;
}
.steam-btn .label { flex: 1; }
.steam-btn:hover {
  background: #5beb91; color: #061008; transform: translateY(-1px);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.14), 0 12px 36px rgba(74, 222, 128, 0.45);
}
.steam-btn svg { flex-shrink: 0; }
.steam-btn .arrow { margin-left: 4px; }

/* ============ FORMS ============ */
.input, .select {
  width: 100%;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--text); font-size: 14px;
  transition: border-color 0.15s;
}
.input::placeholder { color: var(--mute); }
.input:focus, .select:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 3px var(--g-soft); }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e9994' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-with-icon { position: relative; }
.input-with-icon .input { padding-left: 38px; }
.input-with-icon .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); display: inline-flex; }
.input-with-icon .ic svg { width: 14px; height: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

/* ============ ALERTS ============ */
.alert {
  padding: 14px 16px; border-radius: var(--r-sm);
  font-size: 14px; display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}
.alert-info { background: rgba(96, 165, 250, 0.06); border-color: rgba(96, 165, 250, 0.2); color: #cfe6ff; }
.alert-warn { background: var(--yellow-soft); border-color: rgba(234, 179, 8, 0.25); color: #f7e9b8; }
.alert-error { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.3); color: #fac6c6; }
.alert-ok { background: var(--g-soft); border-color: var(--line-acc); color: var(--g); }

/* ============ EMPTY ============ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 16px; text-align: center;
  color: var(--dim);
}
.empty-state .icon { font-size: 36px; margin-bottom: 10px; }
.empty-state .title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state .desc { font-size: 13px; color: var(--dim); max-width: 440px; line-height: 1.55; }

/* ============ SPINNER ============ */
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--card-h); border-top-color: var(--g);
  animation: spin 0.8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-inline { display: flex; align-items: center; gap: 10px; padding: 18px 0; color: var(--dim); font-size: 14px; }

/* ============ LANDING HERO ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.hero h1 {
  font-size: 76px; line-height: 1.02;
  margin: 12px 0 22px;
  letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 span.green { color: var(--g); }
.hero-sub {
  font-size: 17px; color: var(--dim);
  max-width: 540px; margin-bottom: 32px; line-height: 1.55;
}
.hero-sub .accent { color: var(--g); font-weight: 600; }
.hero-note {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dim); margin-top: 14px; margin-bottom: 28px;
}
.hero-note svg { width: 14px; height: 14px; color: var(--g); }

.or-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0 18px;
  color: var(--mute); font-size: 12px;
  text-transform: lowercase; letter-spacing: 0.16em;
}
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.lookup-row { display: flex; gap: 10px; }
.lookup-row .input { flex: 1; }
.lookup-hint { font-size: 12px; color: var(--mute); margin-top: 12px; }

/* Hero side panel (right column, 2x2 grid of cards) */
.hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
}
.hero-side .card { padding: 18px; }

/* ============ LANDING — profile preview card ============ */
.prof-card .pc-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.prof-card .pc-avatar {
  width: 56px; height: 56px; border-radius: 10px;
  background: var(--card-2); flex-shrink: 0; overflow: hidden;
  border: 1px solid var(--line-acc);
}
.prof-card .pc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prof-card .pc-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.prof-card .pc-name .verified {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--g); color: #061008;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
.prof-card .pc-sub {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--dim); margin-top: 2px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}
.prof-card .pc-sub button { color: var(--mute); padding: 0; display: inline-flex; }
.prof-card .pc-sub button:hover { color: var(--g); }
.prof-card .pc-sub svg { width: 12px; height: 12px; }
.prof-card .pc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line);
  font-size: 11px; color: var(--text); font-weight: 600;
}
.pill svg { width: 11px; height: 11px; color: var(--g); }
.pill.green { background: var(--g-soft); border-color: var(--line-acc); color: var(--g); }
.pill.purple { background: var(--purple-soft); border-color: rgba(192, 132, 252, 0.3); color: var(--purple); }

.prof-card .pc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.prof-card .pc-stat .lbl { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 5px; }
.prof-card .pc-stat .lbl svg { width: 10px; height: 10px; color: var(--g); }
.prof-card .pc-stat .val { font-size: 18px; font-weight: 700; color: var(--text); }
.prof-card .pc-stat .desc { font-size: 9.5px; color: var(--g); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin-top: 2px; }
.prof-card .pc-stat .desc.dim { color: var(--mute); }

/* ============ LANDING — inventory preview ============ */
.inv-prev .ip-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.inv-prev .ip-top svg { width: 14px; height: 14px; color: var(--mute); }
.inv-prev .ip-total-label { font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.inv-prev .ip-total { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.inv-prev .ip-count { font-size: 12px; color: var(--dim); margin-bottom: 14px; }
.inv-prev .ip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.inv-prev .ip-item {
  aspect-ratio: 1; border-radius: 8px; background: var(--card-2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 22px; position: relative; overflow: hidden;
}
.inv-prev .ip-item img {
  width: 78%; height: 78%; object-fit: contain;
}
.inv-prev .ip-item .rb { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 2px; border-radius: 1px; }
.inv-prev .ip-item .rb.r { background: var(--red); }
.inv-prev .ip-item .rb.p { background: var(--purple); }
.inv-prev .ip-item .rb.y { background: var(--yellow); }
.inv-prev .ip-item .rb.g { background: var(--g); }
.inv-prev .ip-foot {
  font-size: 12px; color: var(--g); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.inv-prev .ip-foot svg { width: 12px; height: 12px; }

/* ============ LANDING — stats card (tabs + grid + chart) ============ */
.stats-prev .st-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab {
  padding: 7px 12px; font-size: 12px; font-weight: 600;
  border-radius: 8px; background: transparent; color: var(--dim);
  border: 1px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--g); background: var(--g-soft); border-color: var(--line-acc); }
.stats-prev .st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.stats-prev .st-item .lbl {
  font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 5px;
}
.stats-prev .st-item .lbl svg { width: 11px; height: 11px; color: var(--g); }
.stats-prev .st-item .val { font-size: 17px; font-weight: 700; }
.stats-prev .st-chart {
  height: 70px; margin-top: 4px;
  border-top: 1px solid var(--line); padding-top: 12px;
}
.stats-prev .st-chart svg { width: 100%; height: 100%; display: block; }

/* ============ LANDING — news preview ============ */
.news-prev .np-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.news-prev .np-item:first-of-type { border-top: 0; padding-top: 4px; }
.news-prev .np-thumb {
  width: 54px; height: 54px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--g-soft), var(--card-2));
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.news-prev .np-date { font-size: 11px; color: var(--mute); text-transform: lowercase; margin-bottom: 4px; font-weight: 500; }
.news-prev .np-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.35; margin-bottom: 3px; }
.news-prev .np-desc { font-size: 11.5px; color: var(--dim); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-prev .np-foot {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--g); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ============ LANDING — features row ============ */
.feat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 32px;
}
.feat {
  background: transparent;
  padding: 0;
  display: flex; gap: 12px; align-items: flex-start;
}
.feat .feat-ico {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--g-soft); border: 1px solid var(--line-acc); color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feat .feat-ico svg { width: 17px; height: 17px; }
.feat .feat-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.feat .feat-desc { font-size: 12px; color: var(--dim); line-height: 1.5; }

.scroll-down {
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px; padding: 18px 0;
  color: var(--mute); opacity: 0.7;
}
.scroll-down svg { width: 28px; height: 28px; }

/* ============ DASHBOARD LAYOUT (main + right rail) ============ */
.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dash-rail { display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 20px; }
@media (max-width: 1280px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-rail { position: static; }
}

/* ============ RAIL LOOKUP (check someone else's account from dashboard) ============ */
.rail-lookup {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.rail-h {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.rail-h h3 {
  font-size: 11px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; margin: 0;
}
.rail-lookup-form {
  padding: 14px 16px 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.rail-input { padding: 9px 12px; font-size: 13px; }
.rail-lookup-form .btn { width: 100%; }
.rail-lookup-hint {
  padding: 0 16px 12px;
  font-size: 10.5px; color: var(--mute); line-height: 1.5;
}
.rail-recent { display: flex; flex-direction: column; }
.rail-recent-h {
  padding: 10px 16px 6px;
  font-size: 10px; color: var(--mute); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600;
  border-top: 1px solid var(--line);
}
.rail-recent-empty {
  padding: 12px 16px 16px;
  font-size: 11px; color: var(--mute); line-height: 1.5;
}
.rail-recent-item {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px;
  padding: 9px 16px; align-items: center;
  text-decoration: none; color: inherit;
  border-top: 1px solid var(--line);
  transition: background 0.18s ease;
}
.rail-recent-item:hover { background: var(--card-2); }
.rail-recent-avatar {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--g); font-size: 13px;
  overflow: hidden; flex-shrink: 0;
}
.rail-recent-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.3s ease;
}
.rail-recent-avatar img.loaded { opacity: 1; }
.rail-recent-name {
  font-size: 12px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-recent-sub {
  font-size: 10px; color: var(--dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.rail-recent-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  color: var(--mute); cursor: pointer; transition: all 0.15s ease;
  border: 0; background: transparent; padding: 0;
}
.rail-recent-x:hover { color: var(--red); background: var(--red-soft); }
.rail-recent-x svg { width: 13px; height: 13px; }

/* ============ NEWS RAIL (3 compact cards stacked in dashboard right rail) ============ */
.news-rail {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.news-rail-h {
  padding: 14px 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid var(--line);
}
.news-rail-h h3 {
  font-size: 11px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; margin: 0;
}
.news-rail-h .card-link { font-size: 11px; }
.news-rail-item {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background 0.18s ease;
  align-items: start;
}
.news-rail-item:last-child { border-bottom: 0; }
.news-rail-item:hover { background: var(--card-2); }
.news-rail-thumb {
  width: 72px; height: 54px; border-radius: 8px;
  background: linear-gradient(135deg, var(--g-soft), var(--card-2));
  border: 1px solid var(--line);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--mute);
}
.news-rail-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity 0.3s ease;
}
.news-rail-thumb img.loaded { opacity: 1; }
.news-rail-thumb svg { width: 22px; height: 22px; }
.news-rail-body { min-width: 0; }
.news-rail-date {
  font-size: 9.5px; color: var(--g); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px;
}
.news-rail-title {
  font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 4px;
}
.news-rail-desc {
  font-size: 11px; color: var(--dim); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-rail-footer {
  padding: 10px 16px; text-align: center;
  font-size: 11px; border-top: 1px solid var(--line);
  display: block; color: var(--dim); text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.news-rail-footer:hover { color: var(--g); background: var(--card-2); }
.news-rail-empty {
  padding: 22px 16px; text-align: center;
  font-size: 12px; color: var(--mute); line-height: 1.5;
}

/* ============ FACEIT CARD (dashboard) ============ */
.faceit-card {
  padding: 0; overflow: hidden;
}
.faceit-card .fc-h {
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 108, 0, 0.04), transparent);
}
.fc-h-left { display: flex; align-items: center; gap: 12px; }
.fc-badge {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: #ff6c00; color: #fff;
  border: 1px solid rgba(255, 108, 0, 0.5);
}

/* Profile row */
.faceit-card .fc-prof {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  padding: 18px 22px;
  align-items: center;
}
.fc-avatar {
  width: 56px; height: 56px; border-radius: 12px;
  border: 1px solid var(--line); object-fit: cover;
  background: var(--card-2); display: block;
}
.fc-avatar-fb {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--g);
}
.fc-ident { min-width: 0; }
.fc-nick {
  font-size: 20px; font-weight: 800; line-height: 1.1;
  display: flex; align-items: center; gap: 6px; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fc-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--g); color: #061008; flex-shrink: 0;
}
.fc-verified svg { width: 11px; height: 11px; }
.fc-sub {
  font-size: 11.5px; color: var(--dim); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}

.fc-level {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-left: 1px solid var(--line);
}
.fc-level-ico {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}
.fc-level-label { font-size: 11px; color: var(--dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; }
.fc-elo { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }

.fc-mini {
  display: grid; grid-template-columns: repeat(4, auto);
  gap: 18px; padding-left: 16px; border-left: 1px solid var(--line);
}
.fc-mini-item { text-align: right; min-width: 50px; }
.fc-mini-label {
  font-size: 10px; color: var(--dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px;
}
.fc-mini-val { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }

/* Recent streak */
.fc-streak {
  padding: 10px 22px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: var(--card-2);
}
.fc-streak-label {
  font-size: 10.5px; color: var(--dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.fc-streak-pip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px;
  font-size: 10.5px; font-weight: 800; color: #fff;
}
.fc-streak-pip.win  { background: var(--g); color: #061008; }
.fc-streak-pip.loss { background: var(--red); color: #fff; }
.fc-streak-note {
  margin-left: auto;
  font-size: 11.5px; color: var(--g); font-weight: 700;
}

/* Two-col inner (maps + matches) */
.fc-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.fc-maps, .fc-matches { padding: 16px 22px; min-width: 0; }
.fc-maps { border-right: 1px solid var(--line); }
.fc-inner-single { grid-template-columns: 1fr; }
.fc-inner-single .fc-maps { border-right: 0; }
.fc-block-h {
  font-size: 11px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; margin-bottom: 12px;
}
.fc-maps-tbl .tbl-head, .fc-maps-tbl .tbl-row {
  grid-template-columns: minmax(0, 1.6fr) 60px minmax(0, 1.2fr) 50px;
}

.fc-matches-list {
  display: flex; flex-direction: column; gap: 6px;
}
.fc-match {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
  border-left: 3px solid var(--mute);
}
.fc-match.win  { border-left-color: var(--g); }
.fc-match.loss { border-left-color: var(--red); }
.fc-match:hover { transform: translateX(2px); border-color: var(--line-2); }
.fc-match-row1 {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 10px; align-items: center;
}
.fc-match-stats {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding-left: 40px;
  font-size: 11px;
}
.fc-stat {
  display: inline-flex; gap: 5px; align-items: baseline;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fc-stat .lbl { font-size: 9px; color: var(--mute); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 700; font-family: inherit; }
.fc-stat .val { color: var(--text); }
.fc-stat .val.pos { color: var(--g); }
.fc-stat .val.neg { color: var(--red); }
.fc-stat .sep { color: var(--mute); margin: 0 1px; }
.fc-stat .k { color: var(--g); }
.fc-stat .d { color: var(--red); }
.fc-stat .a { color: var(--dim); }

/* Hide letter fallback inside match map icons — gradient alone reads better */
.fc-match-map-ico .ico-letter { display: none; }
.fc-match-map-ico { width: 30px; height: 22px; }
.fc-match-map-ico {
  width: 32px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; border: 1px solid var(--line); flex-shrink: 0;
}
.fc-match-info { min-width: 0; }
.fc-match-name { font-size: 12.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-match-meta { font-size: 10.5px; color: var(--mute); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-match-score {
  display: flex; align-items: baseline; gap: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 800; font-size: 14px; letter-spacing: -0.01em;
}
.fc-match-score .sep { color: var(--mute); }
.fc-match-score.win > span:first-child { color: var(--g); }
.fc-match-score.loss > span:last-child { color: var(--red); }
.fc-match-result {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.fc-match-result.win  { background: var(--g-soft); color: var(--g); }
.fc-match-result.loss { background: var(--red-soft); color: var(--red); }

/* Empty/error state */
.faceit-empty .empty-state { padding: 32px 22px; }

@media (max-width: 1180px) {
  .faceit-card .fc-prof { grid-template-columns: auto 1fr; }
  .fc-level, .fc-mini {
    grid-column: 1 / -1;
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px;
  }
  .fc-mini { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .fc-mini-item { text-align: left; }
}
@media (max-width: 880px) {
  .fc-inner { grid-template-columns: 1fr; }
  .fc-maps { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ============ STATS DISCLAIMER (lifetime warning under KPI row) ============ */
.stats-disclaimer {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px;
  background: rgba(74, 222, 128, 0.04);
  border: 1px solid var(--line-acc);
  border-radius: var(--r-sm);
  font-size: 12px; color: var(--dim); line-height: 1.55;
}
.stats-disclaimer .sd-icon {
  width: 16px; height: 16px; color: var(--g); flex-shrink: 0; margin-top: 1px;
  display: inline-flex;
}
.stats-disclaimer .sd-icon svg { width: 100%; height: 100%; }
.stats-disclaimer strong { color: var(--text); font-weight: 600; }

/* Small "Lifetime" pill next to table titles */
.lifetime-badge {
  display: inline-block;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 7px; border-radius: var(--r-pill);
  background: var(--g-soft); color: var(--g);
  border: 1px solid var(--line-acc);
  vertical-align: middle;
  line-height: 1.2;
}

/* ============ TRUST SIGNALS (lookup page) ============ */
.trust-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 16px;
}
.trust-banner.trust-red {
  background: linear-gradient(180deg, rgba(239,68,68,0.08), var(--card));
  border-color: rgba(239,68,68,0.4);
}
.trust-banner.trust-yellow {
  background: linear-gradient(180deg, rgba(234,179,8,0.06), var(--card));
  border-color: rgba(234,179,8,0.35);
}
.trust-banner.trust-green {
  background: linear-gradient(180deg, rgba(74,222,128,0.06), var(--card));
  border-color: var(--line-acc);
}
.trust-banner .tb-ico {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--line);
}
.trust-red    .tb-ico { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); color: var(--red); }
.trust-yellow .tb-ico { background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.4); color: var(--yellow); }
.trust-green  .tb-ico { background: var(--g-soft); border-color: var(--line-acc); color: var(--g); }
.trust-banner .tb-ico svg { width: 20px; height: 20px; }
.trust-banner .tb-body { flex: 1; min-width: 0; }
.trust-banner .tb-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.trust-banner .tb-sub { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.trust-banner .tb-pips { display: flex; gap: 6px; }
.trust-banner .tb-pips .pip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800;
  border: 1px solid var(--line);
}
.tb-pips .pip-red    { background: rgba(239,68,68,0.15);  color: var(--red);    border-color: rgba(239,68,68,0.45); }
.tb-pips .pip-yellow { background: rgba(234,179,8,0.15);  color: var(--yellow); border-color: rgba(234,179,8,0.4); }
.tb-pips .pip-green  { background: var(--g-soft);         color: var(--g);      border-color: var(--line-acc); }

.trust-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.trust-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
}
.trust-item .ti-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
}
.trust-item.trust-red    { border-left: 3px solid var(--red); }
.trust-item.trust-red    .ti-dot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.trust-item.trust-yellow { border-left: 3px solid var(--yellow); }
.trust-item.trust-yellow .ti-dot { background: var(--yellow); }
.trust-item.trust-green  { border-left: 3px solid var(--g); }
.trust-item.trust-green  .ti-dot { background: var(--g); }
.trust-item .ti-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.trust-item .ti-desc  { font-size: 11.5px; color: var(--dim); line-height: 1.5; }

/* Card severity borders (applied via JS to specific cards based on flag.area) */
.flag-red {
  border-color: rgba(239,68,68,0.45) !important;
  box-shadow: 0 0 0 1px rgba(239,68,68,0.25), 0 8px 24px -16px rgba(239,68,68,0.4);
}
.flag-yellow {
  border-color: rgba(234,179,8,0.45) !important;
  box-shadow: 0 0 0 1px rgba(234,179,8,0.2);
}

/* Ban banner inside profile card */
.lk-ban-banner {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; margin-bottom: 14px;
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--r-sm);
  color: var(--red);
}
.lk-ban-banner .lb-icon { display: inline-flex; flex-shrink: 0; }
.lk-ban-banner .lb-icon svg { width: 20px; height: 20px; }
.lk-ban-banner .lb-title { font-size: 13px; font-weight: 800; }
.lk-ban-banner .lb-sub   { font-size: 11px; color: var(--dim); margin-top: 2px; }

/* External profile links (Steam / CSStats / Leetify) on lookup page */
.ext-links { margin-top: 16px; padding: 16px 18px; }
.ext-links-grid { display: flex; flex-direction: column; gap: 6px; }
.ext-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.ext-link:hover { transform: translateX(2px); border-color: var(--line-acc); background: var(--card-h); }
.ext-link-body { min-width: 0; }
.ext-link-label { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.ext-link-tag {
  font-size: 10px; color: var(--mute); margin-top: 1px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
}
.ext-link-arrow {
  display: inline-flex; color: var(--mute);
  transition: color 0.18s ease, transform 0.18s ease;
}
.ext-link-arrow svg { width: 14px; height: 14px; }
.ext-link:hover .ext-link-arrow { color: var(--g); transform: translate(2px, -2px); }

/* ============ LEETIFY CARD (lookup page) ============ */
.leetify-card { padding: 0; overflow: hidden; }
.leetify-card .fc-h { background: linear-gradient(180deg, rgba(167, 139, 250, 0.06), transparent); }
.leetify-card .leetify-badge {
  background: #a78bfa; color: #1a0d3d;
  border-color: rgba(167, 139, 250, 0.5);
}
.leetify-stats {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  padding: 16px 18px;
}
.lt-stat {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
}
.lt-stat-label {
  font-size: 10px; color: var(--dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px;
}
.lt-stat-val { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }

.leetify-card .fc-block-h { padding: 0 18px; }
.leetify-card .fc-matches-list { padding: 0 18px 16px; }

.lt-source-tag {
  display: inline-block;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

/* ============ KPI CARDS (matches/inventory pages) ============ */
.kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-bottom: 28px;
}
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.kpi {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform 0.22s cubic-bezier(.2,.6,.2,1),
              border-color 0.22s ease,
              box-shadow 0.22s ease,
              background 0.22s ease;
  position: relative;
}
.kpi::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at top right, var(--g-soft), transparent 65%);
  opacity: 0; transition: opacity 0.22s ease; pointer-events: none;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--line-acc);
  background: var(--card-h);
  box-shadow: 0 12px 28px -16px rgba(74, 222, 128, 0.32);
}
.kpi:hover::after { opacity: 0.6; }
.kpi > * { position: relative; z-index: 1; }
.kpi .kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kpi .kpi-ico {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--g-soft); border: 1px solid var(--line-acc);
  color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi .kpi-ico svg { width: 16px; height: 16px; }
.kpi .kpi-name { font-size: 12px; color: var(--dim); font-weight: 600; }
.kpi .kpi-val { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.015em; line-height: 1.1; }
.kpi .kpi-sub { font-size: 10.5px; color: var(--g); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-top: 2px; }
.kpi .kpi-sub.dim { color: var(--mute); }
.kpi .kpi-sub.red, .kpi .kpi-sub.bad { color: var(--red); }
.kpi .kpi-sub.yellow, .kpi .kpi-sub.mid { color: var(--yellow); }
.kpi.has-spark .kpi-val { font-size: 23px; }
.kpi-spark { margin-top: 6px; height: 32px; }
.kpi-spark svg { width: 100%; height: 100%; }

/* ============ TRACKING CTA (lives in dashboard right rail) ============ */
.tracking-cta {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px;
}
.tracking-cta .tc-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.tracking-cta .tc-ico {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--g-soft); border: 1px solid var(--line-acc); color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tracking-cta .tc-ico svg { width: 16px; height: 16px; }
.tracking-cta .tc-title { font-size: 13px; font-weight: 700; }
.tracking-cta .tc-desc { font-size: 11.5px; color: var(--dim); line-height: 1.5; margin-top: 2px; }
.tracking-cta .btn { width: 100%; }

/* ============ DASHBOARD GRID (matches) ============ */
.three-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* ============ MATCH ROWS ============ */
.match-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto auto;
  gap: 16px; align-items: center;
  padding: 12px 8px; border-radius: var(--r-sm);
  transition: background 0.15s;
}
.match-row:hover { background: var(--card-2); }
.match-row + .match-row { border-top: 1px solid var(--line); }
.match-map { display: flex; align-items: center; gap: 12px; min-width: 0; }
.match-map-ico {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.match-map-ico svg, .match-map-ico img { width: 100%; height: 100%; object-fit: cover; }
.match-map-name { font-size: 14px; font-weight: 700; color: var(--text); }
.match-mode { font-size: 11px; color: var(--dim); margin-top: 2px; }
.match-score {
  font-size: 18px; font-weight: 800; line-height: 1;
}
.match-score.win { color: var(--g); }
.match-score.lose { color: var(--red); }
.match-result {
  font-size: 11px; font-weight: 700; text-transform: lowercase;
  margin-top: 4px;
}
.match-result.win { color: var(--g); }
.match-result.lose { color: var(--red); }
.match-stat { text-align: center; min-width: 56px; }
.match-stat .lbl { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 4px; }
.match-stat .val { font-size: 14px; font-weight: 700; }
.match-chev { color: var(--mute); }
.match-chev svg { width: 16px; height: 16px; }
.show-more {
  text-align: center; padding: 16px 0 4px;
  font-size: 13px; color: var(--g); font-weight: 600;
}

/* ============ TABLE-LIKE LISTS (maps, weapons, players) ============ */
.tbl { width: 100%; }
.tbl-head, .tbl-row {
  display: grid; align-items: center; gap: 12px;
  padding: 10px 4px;
  font-size: 13px;
}
.tbl-head {
  font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; border-bottom: 1px solid var(--line);
  padding-bottom: 10px; margin-bottom: 4px;
}
.tbl-row + .tbl-row { border-top: 1px solid var(--line); }
.tbl-row:hover { background: var(--card-2); border-radius: 8px; }

/* Right-align numeric columns (everything except first cell by default) */
.tbl-head > div:not(:first-child),
.tbl-row > div:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
/* First column always left, allow truncation */
.tbl-row > div:first-child { min-width: 0; }

/* maps table — Map name (flex) | Раунды | Winrate (bar+%) | Победы */
.tbl-maps .tbl-head, .tbl-maps .tbl-row {
  grid-template-columns: minmax(0, 1fr) 64px minmax(100px, 1.1fr) 64px;
}
.tbl-maps .map-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl-maps .map-ico {
  width: 30px; height: 30px; border-radius: 6px; background: var(--card-2);
  border: 1px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tbl-maps .map-ico svg, .tbl-maps .map-ico img { width: 100%; height: 100%; object-fit: cover; }
.tbl-maps .map-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.tbl-maps .winrate-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.tbl-maps .winrate-bar { flex: 1; min-width: 40px; max-width: 90px; height: 4px;
  background: var(--card-h); border-radius: 2px; overflow: hidden; }
.tbl-maps .winrate-fill { height: 100%; background: var(--g); border-radius: 2px;
  transition: width 0.4s ease; }
.tbl-maps .winrate-cell > span { min-width: 36px; text-align: right; }

/* weapons table — Weapon | Kills | Shots | Acc% */
.tbl-weapons .tbl-head, .tbl-weapons .tbl-row {
  grid-template-columns: minmax(0, 1fr) 80px 80px 70px;
}
.tbl-weapons .w-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl-weapons .w-ico {
  width: 52px; height: 32px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden;
}
.tbl-weapons .w-ico svg { width: 30px; height: 18px; color: var(--text); }
.tbl-weapons .w-ico img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.tbl-weapons .w-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}

/* Generic w-ico (used outside .tbl-weapons too — e.g. movers / dashboard widgets) */
.w-ico {
  width: 44px; height: 28px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden;
}
.w-ico img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.w-ico .ico-letter,
.map-ico .ico-letter {
  font-weight: 800; font-size: 12px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.map-ico img { width: 100%; height: 100%; object-fit: cover; }
.fc-match-map-ico img { width: 100%; height: 100%; object-fit: cover; }
.fc-match-map-ico .ico-letter { font-size: 12px; }

/* players table */
.tbl-players .tbl-head, .tbl-players .tbl-row { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr) 80px; }
.tbl-players .p-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tbl-players .p-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--card-2);
  border: 1px solid var(--line); flex-shrink: 0;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--g); font-size: 11px; font-weight: 700;
}
.tbl-players .p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tbl-players .p-name {
  font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.tbl-players .p-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px; margin-left: auto;
  color: var(--mute); border: 1px solid var(--line); background: var(--card-2);
  transition: all 0.15s ease;
}
.tbl-players .p-check:hover { color: var(--g); border-color: var(--line-acc); }
.tbl-players .p-check svg { width: 13px; height: 13px; }

/* ============ INSIGHTS LIST ============ */
.insight {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.insight:first-of-type { border-top: 0; padding-top: 0; }
.insight .ins-ico {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--g-soft); border: 1px solid var(--line-acc); color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.insight .ins-ico svg { width: 14px; height: 14px; }
.insight .ins-body { flex: 1; min-width: 0; }
.insight .ins-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.insight .ins-title { font-size: 13px; font-weight: 700; }
.insight .ins-tag {
  font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--yellow-soft); color: var(--yellow);
}
.insight .ins-tag.gameplay { background: var(--purple-soft); color: var(--purple); }
.insight .ins-tag.shooting { background: var(--g-soft); color: var(--g); }
.insight .ins-desc { font-size: 11.5px; color: var(--dim); line-height: 1.55; }

/* ============ EXTRA STATS WITH SPARKLINES ============ */
.xstat {
  display: grid; grid-template-columns: 1fr 80px;
  gap: 12px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.xstat:first-of-type { border-top: 0; padding-top: 0; }
.xstat .xs-name { font-size: 13px; color: var(--text); }
.xstat .xs-val { font-size: 16px; font-weight: 700; color: var(--text); margin-top: 2px; }
.xstat .xs-sub { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 2px; }
.xstat .xs-spark { height: 36px; }
.xstat .xs-spark svg { width: 100%; height: 100%; }

/* ============ INVENTORY PAGE — Tabs (weapons categories) ============ */
.cat-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line);
  color: var(--dim); font-size: 13px; font-weight: 600;
}
.cat-tab svg { width: 16px; height: 16px; }
.cat-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 16px; flex-shrink: 0;
}
.cat-ico-img img {
  width: 100%; height: 100%; object-fit: contain;
  filter: brightness(0) invert(0.7);
  transition: filter 0.15s ease;
}
.cat-tab:hover .cat-ico-img img { filter: brightness(0) invert(0.95); }
.cat-tab.active .cat-ico-img img {
  /* tint toward the green accent when active */
  filter: brightness(0) saturate(100%) invert(72%) sepia(38%) saturate(680%) hue-rotate(74deg) brightness(95%);
}
.cat-label { white-space: nowrap; }
.cat-tab:hover { color: var(--text); border-color: var(--line-2); }
.cat-tab.active { color: var(--g); background: var(--g-soft); border-color: var(--g); }
.cat-tab .cnt { font-size: 11px; color: var(--mute); font-weight: 700; }
.cat-tab.active .cnt { color: var(--g-dim); }

/* ============ INVENTORY PAGE — Chart card ============ */
.chart-card { padding: 22px; }
.chart-tabs { display: flex; gap: 4px; }
.chart-tabs .tab { padding: 5px 12px; font-size: 12px; }
.chart-area { height: 200px; margin-top: 16px; position: relative; }
.chart-area svg { width: 100%; height: 100%; display: block; }
.chart-tip {
  position: absolute; background: var(--card-h); border: 1px solid var(--line-acc);
  border-radius: 8px; padding: 8px 12px;
  font-size: 11px; pointer-events: none;
}
.chart-tip .tip-date { color: var(--dim); margin-bottom: 2px; }
.chart-tip .tip-val { font-size: 13px; font-weight: 700; color: var(--g); }
.chart-axis {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--mute); margin-top: 6px;
  padding: 0 4px;
}

/* ============ INVENTORY PAGE — Top/movers lists ============ */
.movers-list .mv-item {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.movers-list .mv-item:first-of-type { border-top: 0; padding-top: 4px; }
.movers-list .mv-rank {
  font-size: 13px; color: var(--mute); font-weight: 700; min-width: 18px;
}
.movers-list .mv-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.movers-list .mv-info > div:last-child { min-width: 0; flex: 1; }
.movers-list .mv-img {
  width: 38px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--g-soft), var(--card-2));
  border: 1px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 14px;
}
.movers-list .mv-name { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movers-list .mv-meta { font-size: 10.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movers-list .mv-price { text-align: right; white-space: nowrap; }
.movers-list .mv-price .p1 { font-size: 13px; font-weight: 700; }
.movers-list .mv-price .p2 { font-size: 10.5px; font-weight: 700; }
.movers-list .mv-price .p2.up { color: var(--g); }
.movers-list .mv-price .p2.down { color: var(--red); }

/* ============ INVENTORY ANALYTICS SIDEBAR ============ */
.analytics .a-block { padding: 16px 0; border-top: 1px solid var(--line); }
.analytics .a-block:first-of-type { padding-top: 0; border-top: 0; }
.analytics .a-eyebrow {
  font-size: 10px; color: var(--g); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 700; margin-bottom: 10px;
}

.portfolio-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.portfolio-grade { font-size: 18px; font-weight: 800; }
.portfolio-ring {
  width: 60px; height: 60px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.portfolio-ring svg { transform: rotate(-90deg); }
.portfolio-ring .pr-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--g);
}
.portfolio-desc { font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.portfolio-desc .green { color: var(--g); font-weight: 700; }

.rec-item, .alert-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rec-item:first-of-type, .alert-item:first-of-type { border-top: 0; padding-top: 0; }
.rec-item .ri-ico, .alert-item .ai-ico {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--g-soft); border: 1px solid var(--line-acc); color: var(--g);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rec-item .ri-ico svg, .alert-item .ai-ico svg { width: 12px; height: 12px; }
.alert-item.red .ai-ico { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.3); color: var(--red); }
.rec-item .ri-title, .alert-item .ai-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.rec-item .ri-desc, .alert-item .ai-desc { font-size: 11px; color: var(--dim); line-height: 1.5; }

.actions-list .act-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; margin-top: 6px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  transition: border-color 0.15s;
}
.actions-list .act-item:first-child { margin-top: 0; }
.actions-list .act-item:hover { border-color: var(--line-acc); color: var(--g); }
.actions-list .act-item svg { width: 14px; height: 14px; color: var(--dim); }
.actions-list .act-item:hover svg { color: var(--g); }

/* ============ INVENTORY TABLE ============ */
.items-toolbar {
  display: flex; gap: 10px; align-items: center;
  margin: 22px 0 12px;
}
.items-toolbar .input-with-icon { flex: 1; max-width: 320px; }
.items-toolbar .select { max-width: 200px; }
.view-toggle {
  display: inline-flex; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px; gap: 2px; margin-left: auto;
}
.view-toggle button {
  padding: 6px 10px; border-radius: 6px; color: var(--dim);
  display: inline-flex; align-items: center; justify-content: center;
}
.view-toggle button.active { background: var(--g-soft); color: var(--g); }
.view-toggle svg { width: 16px; height: 16px; }

.items-h {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.items-h h2 { font-size: 16px; }
.items-h .cnt {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: var(--g-soft); color: var(--g); font-weight: 700;
}

.items-table { padding: 0; }
.items-table .it-head, .items-table .it-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 110px 130px 130px 110px 110px;
  align-items: center; gap: 12px;
  padding: 12px 18px;
}
.items-table .it-head {
  font-size: 11px; color: var(--dim); text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.items-table .it-row {
  border-bottom: 1px solid var(--line);
  position: relative; transition: background 0.15s;
}
.items-table .it-row:hover { background: var(--card-2); }
.items-table .it-row:last-child { border-bottom: 0; }
.items-table .it-row::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: var(--g);
}
.items-table .it-row.r-covert::before { background: var(--red); }
.items-table .it-row.r-contraband::before { background: #ffa500; }
.items-table .it-row.r-extraord::before { background: var(--purple); }
.items-table .it-row.r-classified::before { background: #e93afe; }
.items-table .it-row.r-restricted::before { background: #7e3cdc; }

.it-name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.it-img {
  width: 56px; height: 36px; border-radius: 6px;
  background: linear-gradient(135deg, var(--g-soft), var(--card-2));
  border: 1px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; overflow: hidden;
}
.it-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.it-cond .c1 { font-size: 12.5px; color: var(--text); font-weight: 600; }
.it-cond .c2 { font-size: 11px; color: var(--mute); margin-top: 2px; }
.it-rarity { font-size: 12.5px; font-weight: 700; color: var(--red); }
.it-rarity.contra { color: #ffa500; }
.it-rarity.extra { color: var(--purple); }
.it-rarity.classified { color: #e93afe; }
.it-rarity.restricted { color: #7e3cdc; }
.it-price .p1 { font-size: 13.5px; font-weight: 700; color: var(--text); }
.it-price .p2 { font-size: 11px; font-weight: 700; margin-top: 2px; }
.it-price .p2.up { color: var(--g); }
.it-price .p2.down { color: var(--red); }
.it-src { font-size: 12.5px; color: var(--text); font-weight: 600; }
.it-actions { display: flex; gap: 4px; }
.it-actions button {
  width: 30px; height: 30px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--mute); transition: all 0.15s;
}
.it-actions button:hover { color: var(--g); background: var(--card-h); }
.it-actions svg { width: 15px; height: 15px; }

.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dim);
}
.pagination .pg-pages { display: flex; gap: 4px; }
.pagination .pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 7px; background: transparent; color: var(--dim);
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.pagination .pg-btn:hover { background: var(--card-2); color: var(--text); }
.pagination .pg-btn.active { background: var(--g-soft); color: var(--g); border: 1px solid var(--line-acc); }
.pagination .pg-btn:disabled { opacity: 0.3; }
.pagination .pg-right { display: flex; align-items: center; gap: 10px; }
.pagination .pg-right .select { padding: 6px 24px 6px 10px; font-size: 12px; max-width: 130px; }

/* ============ PRICE SOURCES (KPI variant) ============ */
.src-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.src-list .src-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.src-list .src-name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.src-list .src-name svg { width: 12px; height: 12px; color: var(--g); }
.src-list .src-val { font-size: 12px; color: var(--text); font-weight: 600; }
.src-list .src-val .pct { color: var(--dim); font-weight: 500; margin-left: 4px; }
.src-foot { font-size: 11px; color: var(--dim); margin-top: 6px; }

/* ============ TOAST ============ */
.toast-host {
  position: fixed; top: 22px; right: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast-wrap {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--g);
  padding: 12px 18px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text);
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
  min-width: 240px; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
}
.toast-wrap.err { border-left-color: var(--red); }
.toast-wrap.warn { border-left-color: var(--yellow); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ UTILS ============ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 12px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 22px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 14px; } .mb-3 { margin-bottom: 22px; }
.text-sm { font-size: 12px; }
.text-mute { color: var(--mute); }
.text-dim { color: var(--dim); }
.text-g { color: var(--g); }
.text-red { color: var(--red); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.f-right { margin-left: auto; }

/* Legacy classes still used by app.js — keep working in new system */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.id-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--dim); font-family: 'JetBrains Mono', monospace;
  background: var(--card-2); border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 8px;
}
.id-chip .copy-btn { color: var(--mute); padding: 0; display: inline-flex; transition: color 0.15s; }
.id-chip .copy-btn:hover { color: var(--g); }
.id-chip .copy-btn svg { width: 12px; height: 12px; }
.visibility-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line);
}
.visibility-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.visibility-chip.public { color: var(--g); border-color: var(--line-acc); background: var(--g-soft); }
.visibility-chip.public::before { background: var(--g); box-shadow: 0 0 6px var(--g-glow); }
.visibility-chip.friends { color: var(--yellow); border-color: rgba(234, 179, 8, 0.3); background: var(--yellow-soft); }
.visibility-chip.friends::before { background: var(--yellow); }
.visibility-chip.private { color: var(--mute); }
.visibility-chip.private::before { background: var(--mute); }
.profile-card { display: flex; align-items: center; gap: 18px; }
.profile-card .avatar { width: 76px; height: 76px; border-radius: 12px; border: 1px solid var(--line-acc); background: var(--card-2); flex-shrink: 0; object-fit: cover; }
.profile-card .avatar.avatar-empty { display: flex; align-items: center; justify-content: center; color: var(--mute); font-size: 28px; }
.profile-name { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.profile-sub { font-size: 13px; color: var(--dim); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.item-card { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: all 0.15s; display: flex; flex-direction: column; }
.item-card:hover { border-color: var(--line-acc); transform: translateY(-2px); }
.item-img { aspect-ratio: 1.4; background: linear-gradient(135deg, var(--g-soft), var(--card-2)); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.item-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.item-img .rarity-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--g); }
.item-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.item-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-price { font-size: 15px; font-weight: 700; color: var(--g); }
.item-price.no-price { color: var(--mute); font-size: 12px; font-weight: 500; }
.item-meta { font-size: 11px; color: var(--mute); }
.item-actions { display: flex; gap: 6px; margin-top: 8px; }
.news-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item .news-img { width: 80px; height: 56px; border-radius: 8px; background: var(--card-2); flex-shrink: 0; overflow: hidden; }
.news-item .news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-meta { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 4px; }
.news-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 4px; }
.news-summary { font-size: 12px; color: var(--dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .name { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.list-row .meta { font-size: 12px; color: var(--dim); }
.list-row .val { font-size: 14px; font-weight: 600; color: var(--text); }
.card-h .card-sub { font-size: 12px; color: var(--dim); margin-top: 4px; }
.brand-logo[src*="logo-full"] { width: auto; } /* if loading the old image accidentally */
.inv-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px;
}
.inv-toolbar .input, .inv-toolbar .select { padding: 9px 12px; font-size: 13px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .three-col { grid-template-columns: 1fr 1fr; }
  .feat-row { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 56px; }
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; padding: 12px 16px; align-items: center; overflow-x: auto; }
  .sidebar .brand { padding: 0 14px 0 0; }
  .brand-logo { width: 60px; }
  .nav { flex-direction: row; gap: 4px; }
  .side-status, .side-copy, .side-controls { display: none; }
  .main { padding: 18px 16px 40px; }
  .page-title { font-size: 36px; }
  .kpis, .kpis.k4 { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: 1fr; }
  .items-table .it-head, .items-table .it-row { grid-template-columns: 1fr; gap: 6px; padding: 14px; }
}

/* ============ ANIMATIONS (premium feel) ============ */

/* Pulse on green status dots (sidebar/topbar live indicator) */
@keyframes sokPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}
.eyebrow .dot,
.status-pill .dot {
  animation: sokPulse 2.4s ease-out infinite;
}

/* Fade-in for main content after JS finishes painting */
@keyframes sokFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main .kpis,
.main .three-col,
.main .inv-grid-layout,
.dash-rail,
.lk-grid {
  animation: sokFadeIn 0.45s cubic-bezier(.2,.6,.2,1) both;
}
.main .three-col + .three-col { animation-delay: 0.06s; }
.dash-rail { animation-delay: 0.12s; }

/* Shimmer skeleton while loading-inline is showing */
@keyframes sokShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.loading-inline {
  position: relative; overflow: hidden;
}
.loading-inline::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.06), transparent);
  background-size: 200% 100%;
  animation: sokShimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* Steam button — subtle lift + arrow nudge */
.steam-btn { transition: transform 0.22s cubic-bezier(.2,.6,.2,1), box-shadow 0.22s ease; }
.steam-btn:hover { transform: translateY(-2px); }
.steam-btn .arrow { transition: transform 0.22s cubic-bezier(.2,.6,.2,1); }
.steam-btn:hover .arrow { transform: translateX(4px); }

/* Nav-link active indicator + hover */
.nav-link { transition: color 0.18s ease, background 0.18s ease; position: relative; }
.nav-link:hover { color: var(--text); background: var(--card-2); }

/* Primary button glow on hover (defined in btn-primary, here we add scale) */
.btn-primary { transition: all 0.22s cubic-bezier(.2,.6,.2,1); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* Lookup form input — focus ring already in :focus rule, here we animate it */
.input, .select { transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }

/* Tabs (chart-tabs, st-tabs) — smooth active */
.chart-tabs .tab,
.st-tabs .tab,
.cat-tab,
.pg-btn { transition: all 0.18s ease; }

/* Toast slide-in */
@keyframes sokToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast {
  animation: sokToastIn 0.28s cubic-bezier(.2,.6,.2,1) both;
}

/* Match row chevron — slide right on hover */
.match-row { transition: background 0.18s ease, transform 0.18s ease; }
.match-row:hover { background: var(--card-2); }
.match-chev { transition: transform 0.18s ease; }
.match-row:hover .match-chev { transform: translateX(3px); }

/* Movers list — subtle hover */
.movers-list .mv-item { transition: transform 0.18s ease; }
.movers-list .mv-item:hover { transform: translateX(2px); }

/* Insight cards — gentle lift */
.insight { transition: transform 0.18s ease; }
.insight:hover { transform: translateX(2px); }

/* Card-link arrow nudge */
.card-link { transition: color 0.18s ease, gap 0.18s ease; }
.card-link svg { transition: transform 0.18s ease; }
.card-link:hover { color: var(--g); }
.card-link:hover svg { transform: translateX(3px); }

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

/* ============ LANDING CONTENT SECTIONS ============ */
.lp-section {
  max-width: 1100px; margin: 0 auto;
  padding: 64px 0 8px;
  scroll-margin-top: 24px;
}
.lp-h2 {
  font-size: 32px; font-weight: 800; letter-spacing: -0.02em;
  margin: 10px 0 14px;
}
.lp-lead {
  font-size: 15px; color: var(--dim); line-height: 1.7;
  max-width: 720px; margin-bottom: 28px;
}
.lp-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 880px) { .lp-cards { grid-template-columns: 1fr; } }
.lp-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.lp-card:hover { transform: translateY(-2px); border-color: var(--line-acc); }
.lp-card-num {
  font-size: 12px; font-weight: 800; color: var(--g);
  letter-spacing: 0.1em; margin-bottom: 10px;
}
.lp-card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.lp-card-desc { font-size: 13px; color: var(--dim); line-height: 1.6; }

.lp-feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 880px) { .lp-feature-grid { grid-template-columns: 1fr; } }
.lp-feature {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.lp-feature:hover { transform: translateY(-2px); border-color: var(--line-acc); }
.lp-feature-ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--g-soft); border: 1px solid var(--line-acc); color: var(--g);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.lp-feature-ico svg { width: 20px; height: 20px; }
.lp-feature-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.lp-feature-desc { font-size: 13px; color: var(--dim); line-height: 1.6; }

.lp-sec-grid { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.lp-sec-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px;
}
.lp-sec-item > svg { width: 24px; height: 24px; color: var(--g); flex-shrink: 0; margin-top: 2px; }
.lp-sec-title { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.lp-sec-desc { font-size: 13px; color: var(--dim); line-height: 1.6; }

.lp-faq { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.lp-faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 0;
  overflow: hidden;
}
.lp-faq-item summary {
  padding: 16px 18px; cursor: pointer; font-weight: 600; font-size: 14px;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  transition: color 0.15s ease;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after {
  content: '+'; font-size: 20px; color: var(--g); font-weight: 400;
  transition: transform 0.2s ease;
}
.lp-faq-item[open] summary::after { transform: rotate(45deg); }
.lp-faq-item summary:hover { color: var(--g); }
.lp-faq-item p {
  padding: 0 18px 16px; margin: 0;
  font-size: 13px; color: var(--dim); line-height: 1.65;
}

/* Inventory freshness indicator */
.inv-freshness {
  font-size: 11.5px; color: var(--mute); white-space: nowrap;
}
.inv-freshness.busy { color: var(--g); }

/* ============ REPUTATION (social credit) ============ */
.rep-card { padding: 18px 20px; }
.rep-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 4px 0 14px; flex-wrap: wrap;
}
.rep-verdict {
  font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
}
.rep-verdict.rep-good    { color: var(--g); }
.rep-verdict.rep-bad     { color: var(--red); }
.rep-verdict.rep-mixed   { color: var(--yellow); }
.rep-verdict.rep-neutral { color: var(--dim); }
.rep-counts { display: flex; gap: 10px; }
.rep-count {
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--card-2); border: 1px solid var(--line);
}
.rep-count.up   { color: var(--g); }
.rep-count.down { color: var(--red); }

.rep-breakdown {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
}
.rep-bd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  border-left: 3px solid var(--mute);
}
.rep-bd-item.bad  { border-left-color: var(--red); }
.rep-bd-item.good { border-left-color: var(--g); }
.rep-bd-emoji { font-size: 15px; }
.rep-bd-label { flex: 1; font-size: 13px; font-weight: 600; }
.rep-bd-count {
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--text);
}

.rep-vote { margin-top: 4px; }
.rep-vote-h {
  font-size: 11px; color: var(--dim); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 700; margin-bottom: 8px;
}
.rep-vote-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--dim); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.rep-btn:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.rep-btn-bad.active  { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.rep-btn-good.active { background: var(--g-soft); color: var(--g); border-color: var(--g); }

.rep-login-hint, .rep-note {
  font-size: 11.5px; color: var(--mute); line-height: 1.5;
}
.rep-login-hint {
  padding: 10px 12px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.rep-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Reputation: comment input + actions + comments list */
.rep-comment-input {
  width: 100%; margin-top: 10px; resize: vertical;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text); font-size: 13px; font-family: inherit; padding: 9px 11px;
  line-height: 1.5; min-height: 48px;
}
.rep-comment-input:focus { outline: none; border-color: var(--line-acc); }
.rep-comment-counter { font-size: 10.5px; color: var(--mute); text-align: right; margin-top: 3px; }
.rep-actions { display: flex; gap: 8px; margin-top: 8px; }
.rep-save { background: var(--g); color: #061008; border: none; font-weight: 700; }
.rep-save:hover { background: #5beb91; }
.rep-save:disabled { opacity: 0.6; cursor: default; }

.rep-comments { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rep-comments-h {
  font-size: 11px; color: var(--dim); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 700; margin-bottom: 10px;
}
.rep-cm {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line);
  margin-bottom: 8px;
}
.rep-cm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.rep-cm-chip {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill);
  background: var(--card-h); border: 1px solid var(--line);
}
.rep-cm-chip.bad  { color: var(--red); }
.rep-cm-chip.good { color: var(--g); }
.rep-cm-text { font-size: 13px; color: var(--text); line-height: 1.5; word-break: break-word; }
.rep-cm-date { font-size: 10.5px; color: var(--mute); margin-top: 5px; }

/* Reputation summary thumbs are now buttons */
.rep-count {
  cursor: pointer; font-family: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.rep-count:hover { transform: translateY(-1px); }
.rep-count.up:hover   { border-color: var(--g); }
.rep-count.down:hover { border-color: var(--red); }
/* Pulse highlight when jumping to the vote area */
@keyframes repVotePulse {
  0%   { box-shadow: 0 0 0 0 var(--g-soft); }
  60%  { box-shadow: 0 0 0 4px var(--g-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.rep-vote-pulse { animation: repVotePulse 1.2s ease-out; border-radius: var(--r-sm); }
.rep-btn-hint { box-shadow: 0 0 0 2px var(--line-acc); }

/* ============ FEED ============ */
.feed-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.feed-tabs .tab {
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  color: var(--dim); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.feed-tabs .tab:hover { color: var(--text); border-color: var(--line-2); }
.feed-tabs .tab.active { color: var(--g); background: var(--g-soft); border-color: var(--g); }

#feed-list { display: flex; flex-direction: column; gap: 14px; }
.feed-item { padding: 16px 18px; }
.feed-item-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.feed-pub { display: flex; align-items: center; gap: 10px; min-width: 0; }
.feed-pub-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--g); overflow: hidden;
}
.feed-pub-avatar.sm { width: 34px; height: 34px; border-radius: 8px; font-size: 13px; }
.feed-pub-avatar.official { background: var(--g-soft); border-color: var(--line-acc); color: var(--g); }
.feed-pub-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-pub-avatar svg { width: 20px; height: 20px; }
.feed-pub-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; background: var(--g); color: #061008; flex-shrink: 0;
}
.feed-verified svg { width: 9px; height: 9px; }
.feed-date { font-size: 11.5px; color: var(--mute); margin-top: 1px; }
.feed-tag {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: var(--r-pill); flex-shrink: 0;
}
.feed-tag.news { background: var(--g-soft); color: var(--g); border: 1px solid var(--line-acc); }
.feed-tag.post { background: var(--card-2); color: var(--dim); border: 1px solid var(--line); }
.feed-item-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 6px; }
.feed-item-body { font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.feed-item-img { width: 100%; border-radius: var(--r-sm); margin-top: 12px; border: 1px solid var(--line); display: block; }
.feed-item-link {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-size: 12.5px; font-weight: 700; color: var(--g);
}
.feed-item-link svg { width: 13px; height: 13px; }
.feed-item-link:hover { color: #5beb91; }

#feed-side .card { position: sticky; top: 20px; }
.feed-side-empty { font-size: 12.5px; color: var(--mute); line-height: 1.6; }
.feed-pub-list { display: flex; flex-direction: column; gap: 12px; }
.feed-pub-row { display: flex; align-items: center; gap: 10px; }
.feed-pub-row-info { flex: 1; min-width: 0; }
.feed-pub-desc { font-size: 11px; color: var(--mute); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ NAV BADGE (unread) ============ */
.nav-link { position: relative; }
.nav-label { flex: 1; }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--g); color: #061008; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}

/* ============ MESSENGER ============ */
.main-messages { padding: 0; height: 100vh; overflow: hidden; }
.main-messages .main-top { display: none; }
.msgr {
  display: grid; grid-template-columns: 340px 1fr;
  height: 100vh; background: var(--bg);
}
@media (max-width: 760px) { .msgr { grid-template-columns: 1fr; } }

.msgr-left { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.msgr-left-h { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.msgr-tabs { display: flex; gap: 6px; }
.msgr-tab {
  flex: 1; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--dim);
  font-size: 13px; font-weight: 600;
}
.msgr-tab.active { color: var(--g); background: var(--g-soft); border-color: var(--g); }
.msgr-list { flex: 1; overflow-y: auto; min-height: 0; }
.msgr-list-empty { padding: 24px 18px; font-size: 13px; color: var(--mute); line-height: 1.6; }
.msgr-section-h {
  padding: 14px 16px 6px; font-size: 10.5px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
}

.msgr-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--card-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--g); overflow: hidden; font-size: 16px;
}
.msgr-avatar img { width: 100%; height: 100%; object-fit: cover; }

.msgr-convo {
  display: flex; gap: 12px; align-items: center; padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--line); transition: background 0.12s ease;
}
.msgr-convo:hover { background: var(--card); }
.msgr-convo.active { background: var(--g-soft); }
.msgr-convo-body { flex: 1; min-width: 0; }
.msgr-convo-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.msgr-convo-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgr-convo-time { font-size: 11px; color: var(--mute); flex-shrink: 0; }
.msgr-convo-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 2px; }
.msgr-convo-preview { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.msgr-unread {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--g); color: #061008; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.msgr-friend { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.msgr-friend-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.msgr-friend-name:hover { color: var(--g); }
.msgr-friend-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.msgr-pending { font-size: 11px; color: var(--mute); }

/* Right pane */
.msgr-right { display: flex; flex-direction: column; min-height: 0; height: 100vh; }
.msgr-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px; color: var(--mute);
}
.msgr-empty-ico { width: 64px; height: 64px; color: var(--line-2); margin-bottom: 16px; }
.msgr-empty-ico svg { width: 100%; height: 100%; }
.msgr-empty-title { font-size: 17px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.msgr-empty-sub { font-size: 13px; max-width: 320px; line-height: 1.5; }

.msgr-thread-h {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--card);
}
.msgr-thread-h .msgr-avatar { width: 40px; height: 40px; font-size: 14px; }
.msgr-thread-h-info { flex: 1; min-width: 0; }
.msgr-thread-name { font-size: 15px; font-weight: 700; color: var(--text); text-decoration: none; }
.msgr-thread-name:hover { color: var(--g); }
.msgr-thread-actions { display: flex; gap: 6px; }

.msgr-thread-scroll {
  flex: 1; overflow-y: auto; min-height: 0; padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.msgr-date-sep { text-align: center; margin: 12px 0 8px; }
.msgr-date-sep span {
  font-size: 11px; color: var(--mute); background: var(--card);
  padding: 3px 12px; border-radius: var(--r-pill); border: 1px solid var(--line);
}
.msgr-bubble-row { display: flex; }
.msgr-bubble-row.me { justify-content: flex-end; }
.msgr-bubble-row.them { justify-content: flex-start; }
.msgr-bubble {
  max-width: 70%; padding: 8px 12px; border-radius: 14px;
  font-size: 14px; line-height: 1.45; position: relative;
}
.msgr-bubble-row.me .msgr-bubble { background: var(--g); color: #061008; border-bottom-right-radius: 4px; }
.msgr-bubble-row.them .msgr-bubble { background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msgr-bubble-text { white-space: pre-wrap; word-break: break-word; }
.msgr-bubble-time { font-size: 10px; opacity: 0.6; margin-top: 3px; text-align: right; }

.msgr-composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--card); }
.msgr-input {
  flex: 1; resize: none; max-height: 120px; padding: 10px 14px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 20px;
  color: var(--text); font-size: 14px; font-family: inherit; line-height: 1.4;
}
.msgr-input:focus { outline: none; border-color: var(--line-acc); }
.msgr-send {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; cursor: pointer;
  background: var(--g); color: #061008; border: none;
  display: flex; align-items: center; justify-content: center;
}
.msgr-send:hover { background: #5beb91; }
.msgr-send svg { width: 18px; height: 18px; }
.msgr-composer-locked { padding: 16px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); text-align: center; }

/* Lookup social actions card */
.lk-social-card { padding: 14px 16px; }
.lk-social-actions { display: flex; flex-direction: column; gap: 8px; }
.lk-social-primary { background: var(--g); color: #061008; border: none; font-weight: 700; text-align: center; }
.lk-social-primary:hover { background: #5beb91; }
.lk-social-hint { font-size: 12px; color: var(--dim); margin-bottom: 2px; }
.lk-social-block { color: var(--red); }
.lk-social-block:hover { border-color: var(--red); }

/* ============================================================
   MOBILE ADAPTATION
   Burger + slide-in sidebar; single-column content; etc.
   ============================================================ */

/* Burger button + overlay are hidden on desktop */
.mobile-burger { display: none; }
.mobile-overlay { display: none; }

@media (max-width: 860px) {
  /* Layout: drop the sidebar column, main takes full width */
  .layout { grid-template-columns: 1fr; }

  /* Sidebar becomes an off-canvas drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 80;
    width: 260px; max-width: 84vw; height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  .sidebar.open { transform: translateX(0); }

  /* Burger button — fixed top-left */
  .mobile-burger {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 12px; z-index: 70;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--line); color: var(--text);
    cursor: pointer;
  }
  .mobile-burger svg { width: 20px; height: 20px; }
  .mobile-burger:active { background: var(--card-2); }

  /* Dim overlay behind the open drawer */
  .mobile-overlay {
    display: block; position: fixed; inset: 0; z-index: 75;
    background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .mobile-overlay.show { opacity: 1; pointer-events: auto; }

  /* Main content: tighter padding, leave room for the burger */
  .main { padding: 60px 16px 48px; }
  .main-top { justify-content: flex-end; }

  .page-title { font-size: 24px; }

  /* Collapse all multi-column grids to a single column */
  .kpis, .kpis.k4, .three-col,
  .dash-row, .dash-layout,
  .inv-grid-layout, .feed-grid,
  .lk-grid {
    grid-template-columns: 1fr !important;
  }
  .dash-rail { position: static !important; }

  /* Faceit mini-stats: 2 per row instead of 4 */
  .fc-mini { grid-template-columns: repeat(2, 1fr) !important; }

  /* Tables: let wide ones scroll horizontally instead of squishing */
  .tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl-head, .tbl-row { min-width: 0; }

  /* Landing demo cards stack */
  .ip-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-section { padding: 40px 0 8px; }
  .lp-h2 { font-size: 24px; }

  /* Category tabs (inventory) wrap nicely */
  .cat-tabs { gap: 5px; }
  .cat-tab { padding: 8px 11px; font-size: 12px; }
}

/* Messenger: switch to single-pane on mobile (list OR thread) */
@media (max-width: 760px) {
  .msgr { grid-template-columns: 1fr; }
  /* When a thread is active we hide the list; toggled via body class */
  body.msgr-thread-open .msgr-left { display: none; }
  body:not(.msgr-thread-open) .msgr-right { display: none; }
  .main-messages { padding: 0; }
}

/* Very small phones */
@media (max-width: 420px) {
  .main { padding: 58px 12px 40px; }
  .page-title { font-size: 21px; }
  .kpi-card .kpi-val { font-size: 22px; }
  .msgr-bubble { max-width: 82%; }
  .rep-vote-btns { gap: 5px; }
  .rep-btn { padding: 6px 9px; font-size: 11.5px; }
}

/* Messenger mobile back button (hidden on desktop) */
.msgr-back { display: none; }
@media (max-width: 760px) {
  .msgr-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    background: transparent; border: none; color: var(--text); cursor: pointer;
  }
  .msgr-back svg { width: 20px; height: 20px; }
}

/* ============ LEGAL / DOC PAGES ============ */
.doc-wrap { max-width: 820px; margin: 0 auto; padding: 0 20px 80px; }
.doc-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.doc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.02em; }
.doc-logo { width: 32px; height: 32px; }
.doc-back { font-size: 13px; color: var(--dim); text-decoration: none; }
.doc-back:hover { color: var(--g); }
.doc h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 28px 0 6px; }
.doc-upd { font-size: 12.5px; color: var(--mute); margin-bottom: 24px; }
.doc h2 { font-size: 17px; font-weight: 700; margin: 28px 0 10px; color: var(--text); }
.doc p { font-size: 14px; line-height: 1.7; color: var(--dim); margin: 0 0 12px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { font-size: 14px; line-height: 1.7; color: var(--dim); margin-bottom: 6px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--g); text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.doc-foot-nav {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
}
.doc-foot-nav a { font-size: 13px; color: var(--g); text-decoration: none; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 720px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 16px 18px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 220px; font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.cookie-banner-text a { color: var(--g); text-decoration: none; }
.cookie-banner-actions { display: flex; gap: 8px; }

/* ============ SITE FOOTER (legal links) ============ */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 28px 20px; text-align: center;
}
.site-footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer-links a { font-size: 13px; color: var(--dim); text-decoration: none; }
.site-footer-links a:hover { color: var(--g); }
.site-footer-legal { font-size: 11.5px; color: var(--mute); line-height: 1.6; max-width: 720px; margin: 0 auto; }

@media (max-width: 520px) {
  .doc h1 { font-size: 23px; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* Sidebar legal links */
.side-legal-links { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.side-legal-links a { font-size: 11px; color: var(--mute); text-decoration: none; }
.side-legal-links a:hover { color: var(--g); }

/* ============ ADMIN PANEL ============ */
.kpi-hot { border-color: var(--yellow) !important; }
.kpi-hot .kpi-val { color: var(--yellow); }
.admin-empty { padding: 20px; text-align: center; color: var(--mute); font-size: 13px; }
.admin-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child { border-bottom: none; }
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-title { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-row-sub { font-size: 12px; color: var(--mute); margin-top: 3px; word-break: break-word; }
.admin-row-sub a { color: var(--g); text-decoration: none; }
.admin-row-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.admin-tag {
  display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-pill); background: var(--card-2);
  border: 1px solid var(--line); color: var(--dim); letter-spacing: 0.05em;
}
.admin-manual { display: flex; gap: 8px; margin-top: 16px; }
.admin-input {
  flex: 1; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-family: inherit;
}
.admin-input:focus { outline: none; border-color: var(--line-acc); }
.admin-tool { margin-bottom: 8px; }

/* ============ MODAL ============ */
.modal-host {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-dialog {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r);
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-x { background: none; border: none; color: var(--mute); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.modal-label { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-top: 4px; }
.modal-input {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font-size: 14px; font-family: inherit; line-height: 1.5; resize: vertical;
}
.modal-input:focus { outline: none; border-color: var(--line-acc); }
.modal-hint { font-size: 12px; color: var(--mute); line-height: 1.5; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

.btn-full { width: 100%; justify-content: center; }

/* Public page */
.pub-header { padding: 20px; margin-bottom: 14px; }
.pub-header-top { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.feed-pub-avatar.lg { width: 64px; height: 64px; border-radius: 14px; font-size: 24px; }
.pub-header-info { flex: 1; min-width: 0; }
.pub-header-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pub-header-desc { font-size: 13px; color: var(--dim); margin-top: 4px; line-height: 1.5; }
.pub-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.feed-owner-tag {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--g-soft); color: var(--g); border: 1px solid var(--line-acc);
  padding: 1px 6px; border-radius: var(--r-pill); margin-left: 6px;
}
.feed-del {
  background: none; border: none; color: var(--mute); cursor: pointer; padding: 4px;
  border-radius: 6px; flex-shrink: 0;
}
.feed-del:hover { color: var(--red); background: var(--card-2); }

/* feed-pub-name as link */
a.feed-pub-name { text-decoration: none; color: var(--text); }
a.feed-pub-name:hover { color: var(--g); }

/* Feed post report button */
.feed-h-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.feed-report { background: none; border: none; color: var(--mute); cursor: pointer; padding: 3px; border-radius: 5px; }
.feed-report:hover { color: var(--red); background: var(--card-2); }

/* ============ CONSENT GATE ============ */
.consent-intro { font-size: 13px; color: var(--dim); margin-bottom: 6px; line-height: 1.5; }
.consent-row {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  font-size: 13px; color: var(--text); line-height: 1.5;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--card-2);
  border: 1px solid var(--line);
}
.consent-row input[type=checkbox] { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--g); cursor: pointer; }
.consent-row a { color: var(--g); text-decoration: none; }
.consent-row a:hover { text-decoration: underline; }

/* ============ IMAGE UPLOAD FIELD ============ */
.upload-field { display: flex; flex-direction: column; gap: 8px; }
.upload-controls { display: flex; gap: 8px; }
.upload-preview { position: relative; display: inline-block; }
.upload-preview:empty { display: none; }
.upload-preview img {
  max-width: 100%; max-height: 160px; border-radius: var(--r-sm);
  border: 1px solid var(--line); display: block;
}
.upload-clear {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  background: rgba(0,0,0,0.7); color: #fff; border: none; font-size: 16px; line-height: 1;
}
.upload-clear:hover { background: var(--red); }

/* Public cover banner */
.pub-cover {
  width: 100%; aspect-ratio: 4 / 1; max-height: 260px; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line); margin-bottom: -8px;
  background: var(--card-2);
}
.pub-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-header.has-cover { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
