/* ═══════════════════════════════════════════════════════════════════════════
   Reset + Tokens
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Base surfaces */
  --bg-0:      #0a0a0b;
  --bg-1:      #0f0f11;
  --surface:   #131316;
  --surface-2: #1a1a1e;
  --surface-3: #202024;

  /* Borders / dividers */
  --line:      #26262b;
  --line-2:    #1c1c20;
  --line-hi:   #363640;

  /* Text */
  --fg:        #ededf0;
  --fg-2:      #a1a1a8;
  --fg-3:      #6b6b73;
  --fg-4:      #46464d;

  /* Accent — lime/electric */
  --acc:       #a3e635;
  --acc-2:     #84cc16;
  --acc-bg:    rgba(163,230,53,.08);
  --acc-bg-2:  rgba(163,230,53,.14);
  --acc-line:  rgba(163,230,53,.22);
  --acc-glow:  rgba(163,230,53,.35);

  /* Status */
  --ok:        #4ade80;
  --warn:      #fbbf24;
  --danger:    #f87171;
  --info:      #60a5fa;

  /* Rarity */
  --rar-normal:    #71717a;
  --rar-rare:      #60a5fa;
  --rar-epic:      #c084fc;
  --rar-legendary: #fbbf24;
  --rar-secret:    #f87171;

  /* Radius scale */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Base
   ═══════════════════════════════════════════════════════════════════════════ */

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ambient background grid */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none; z-index: 0;
}
body > * { position: relative; z-index: 1; }

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

code {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--fg-2);
}

a { color: var(--acc); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .8; }

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

/* ═══════════════════════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════════════════════ */

.layout { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 24px;
  background: rgba(15,15,17,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}

.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--fg);
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--acc);
  box-shadow: 0 0 8px var(--acc-glow);
}
.brand-name {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--fg-2);
}

.nav-sep {
  width: 1px; height: 16px; background: var(--line);
}

.nav-link {
  color: var(--fg-3); font-size: 12px; font-weight: 500;
  padding: 4px 8px; border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--fg-2); background: var(--surface-2); text-decoration: none; }
.nav-link.active { color: var(--fg); background: var(--surface-2); }

.spacer { flex: 1; }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11px; color: var(--fg-2);
}
.user-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, var(--acc-2), var(--acc));
  color: #0a0a0b;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}

.content {
  flex: 1; padding: 28px 24px;
  max-width: 1200px; margin: 0 auto; width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Auth page
   ═══════════════════════════════════════════════════════════════════════════ */

.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background: var(--bg-0);
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(163,230,53,.05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(96,165,250,.03), transparent 40%);
  pointer-events: none;
}

.auth-wrap {
  width: 340px; position: relative;
}

.auth-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
}
.auth-brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  box-shadow: 0 4px 20px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-mark svg { display: block; }
.auth-brand-text {
  font-size: 13px; font-weight: 600; color: var(--fg);
  letter-spacing: 0.02em;
}
.auth-brand-text .dim { color: var(--fg-3); font-weight: 500; }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.03) inset,
    0 20px 60px rgba(0,0,0,.4);
}

.auth-heading {
  font-size: 16px; font-weight: 600; color: var(--fg);
  margin-bottom: 4px; letter-spacing: -0.01em;
}
.auth-sub {
  font-size: 12px; color: var(--fg-3);
  margin-bottom: 22px;
}

.auth-foot {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 10px; color: var(--fg-4);
  text-align: center; letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════════════════════ */

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--fg-2); margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field input {
  width: 100%; padding: 9px 11px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-size: 13px; font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover:not(:focus) { border-color: var(--line-hi); }
.field input:focus {
  border-color: var(--acc-line);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--acc-bg);
}
.field input::placeholder { color: var(--fg-4); }

/* ═══════════════════════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500; font-family: inherit;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s, opacity .12s, transform .06s;
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }

.btn-primary {
  background: var(--acc);
  color: #0a0a0b;
  border-color: var(--acc);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1) inset, 0 4px 12px rgba(163,230,53,.15);
}
.btn-primary:hover:not(:disabled) { background: var(--acc-2); border-color: var(--acc-2); }

.btn-success {
  background: var(--ok); color: #0a0a0b; border-color: var(--ok);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1) inset, 0 4px 12px rgba(74,222,128,.15);
}
.btn-success:hover:not(:disabled) { background: #22c55e; border-color: #22c55e; }

.btn-danger {
  background: #ef4444; color: #fff; border-color: #ef4444;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1) inset, 0 4px 12px rgba(239,68,68,.15);
}
.btn-danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--fg-2);
  border-color: var(--line);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-3); color: var(--fg); border-color: var(--line-hi);
}

.btn-plain {
  color: var(--fg-3);
}
.btn-plain:hover:not(:disabled) { color: var(--fg); background: var(--surface-2); }

.btn-sm { padding: 4px 9px; font-size: 11px; }
.btn-full { width: 100%; }

.btn-trade {
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--r-md);
  min-width: 160px;
}
.btn-trade svg { width: 14px; height: 14px; }

.kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--fg-3);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Error / notice
   ═══════════════════════════════════════════════════════════════════════════ */

.error {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--danger);
  background: rgba(248,113,113,.06);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: var(--r-sm);
  padding: 8px 10px; margin-bottom: 12px;
}
.error::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   Stats
   ═══════════════════════════════════════════════════════════════════════════ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: border-color .15s;
}
.stat:hover { border-color: var(--line-hi); }
.stat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); font-weight: 600;
}
.stat-icon {
  color: var(--fg-4);
}
.stat-value {
  font-size: 24px; font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-delta {
  margin-top: 6px;
  font-size: 10px; color: var(--fg-3);
}
.stat-delta .live-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ok); margin-right: 5px;
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,.4); }
  50%      { opacity: 1; box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Panels
   ═══════════════════════════════════════════════════════════════════════════ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  gap: 12px;
  flex-wrap: wrap;
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--fg);
  letter-spacing: -0.005em;
}
.panel-title .count {
  padding: 1px 6px;
  background: var(--surface-3);
  border-radius: 3px;
  font-size: 10px; color: var(--fg-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Segmented control
   ═══════════════════════════════════════════════════════════════════════════ */

.seg {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.seg-btn {
  padding: 3px 10px;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--fg-3);
  font-size: 11px; font-weight: 500; font-family: inherit;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.seg-btn:hover { color: var(--fg-2); }
.seg-btn.active {
  background: var(--surface-3);
  color: var(--fg);
  box-shadow: 0 0 0 1px var(--line-hi), 0 1px 2px rgba(0,0,0,.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Table
   ═══════════════════════════════════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 8px 16px;
  text-align: left;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-3); font-weight: 600;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-2);
}
thead th:first-child { padding-left: 16px; }
tbody tr {
  border-bottom: 1px solid var(--line-2);
  transition: background .08s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

tbody tr.row-link { cursor: pointer; }
tbody tr.row-link:hover { background: var(--surface-3); }
tbody tr.row-link:hover td:last-child { color: var(--acc) !important; }
tbody tr.row-link td { padding: 18px 20px; font-size: 14px; }
tbody tr.row-link .player-avatar-sm {
  width: 44px; height: 44px; border-radius: 10px;
  font-size: 15px;
}
tbody tr.row-link .username-cell { gap: 14px; }
tbody tr.row-link .username-cell strong { font-size: 15px; font-weight: 600; }
tbody tr.row-link code { font-size: 12px; padding: 2px 7px; }
tbody td { padding: 10px 16px; vertical-align: middle; }

tbody tr.og-player-row {
  background: linear-gradient(90deg, rgba(251,191,36,.13), rgba(217,119,6,.035));
  box-shadow: inset 3px 0 #fbbf24;
}
tbody tr.og-player-row:hover {
  background: linear-gradient(90deg, rgba(251,191,36,.2), rgba(217,119,6,.07));
}
tbody tr.og-player-row .player-avatar-sm {
  border: 1px solid rgba(251,191,36,.65);
  box-shadow: 0 0 18px rgba(251,191,36,.16);
}
.player-card-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.og-detected, .og-count {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 100px;
  font-size: 9px; line-height: 1.4; font-weight: 700; letter-spacing: .055em;
  color: #fbbf24; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.25);
}
.og-count { min-width: 26px; justify-content: center; color: var(--fg-4); background: transparent; border-color: var(--line); }
.og-count.has-og { color: #fbbf24; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); }
.executor-detected {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 100px;
  font-size: 9px; line-height: 1.4; font-weight: 700; letter-spacing: .055em;
  color: #f87171; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.28);
  cursor: default;
}
.presence { font-size: 9px; font-weight: 600; color: var(--fg-4); }
.presence.online { color: var(--ok); }
.presence.offline { color: var(--fg-4); }
.carry-status {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  padding: 2px 7px;
  border: 1px solid rgba(113,113,122,.22);
  border-radius: 999px;
  overflow: hidden;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.carry-status.holding {
  color: #fbbf24;
  background: rgba(251,191,36,.11);
  border-color: rgba(251,191,36,.35);
}
.carry-status.empty {
  color: var(--fg-4);
  background: rgba(113,113,122,.06);
}

.username-cell {
  display: flex; align-items: center; gap: 10px;
}
.player-avatar-sm {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: #0a0a0b;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.player-avatar-sm.roblox-pfp,
.player-avatar-lg.roblox-pfp {
  background: var(--surface-3) !important;
}
.player-avatar-sm img,
.player-avatar-lg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  line-height: 1.4;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.badge-normal    { color: var(--rar-normal); background: rgba(113,113,122,.1); border-color: rgba(113,113,122,.2); }
.badge-rare      { color: var(--rar-rare);   background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.2); }
.badge-epic      { color: var(--rar-epic);   background: rgba(192,132,252,.08); border-color: rgba(192,132,252,.2); }
.badge-legendary { color: var(--rar-legendary); background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.2); }
.badge-secret    { color: var(--rar-secret); background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.2); }
.badge-og        { color: #fbbf24; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.32); box-shadow: 0 0 10px rgba(251,191,36,.08); }

.log-event {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border: 1px solid; border-radius: 100px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.log-event.joined { color: var(--ok); background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.22); }
.log-event.left { color: var(--danger); background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.22); }

/* ═══════════════════════════════════════════════════════════════════════════
   Status banner
   ═══════════════════════════════════════════════════════════════════════════ */

.trade-status {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  font-size: 12px; font-weight: 500;
  border: 1px solid transparent;
}
.trade-status .stx-body { flex: 1; }
.trade-status .stx-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; opacity: .8;
  margin-bottom: 2px;
}
.trade-status .stx-text { color: inherit; opacity: .95; }

.trade-status.pending   { background: rgba(251,191,36,.06); border-color: rgba(251,191,36,.2); color: var(--warn); }
.trade-status.selecting { background: rgba(163,230,53,.06); border-color: rgba(163,230,53,.2); color: var(--acc); }
.trade-status.selected  { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.28); color: var(--ok); }
.trade-status.complete  { background: rgba(74,222,128,.06); border-color: rgba(74,222,128,.2); color: var(--ok); }
.trade-status.cancelled { background: rgba(248,113,113,.06); border-color: rgba(248,113,113,.2); color: var(--danger, #f87171); }
.trade-status.ready     { background: rgba(96,165,250,.06); border-color: rgba(96,165,250,.2); color: var(--info); }
.trade-status.accepted  { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.28); color: var(--ok); }

.dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  position: relative;
}
.dot::after {
  content: ''; position: absolute; inset: -3px;
  border-radius: 50%; background: inherit; opacity: .4;
  animation: ping 1.6s ease-out infinite;
}
.dot-orange { background: var(--warn); }
.dot-cyan   { background: var(--acc); }
.dot-green  { background: var(--ok); }
.dot-red    { background: #f87171; }
@keyframes ping {
  0%   { transform: scale(1);   opacity: .5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Inventory
   ═══════════════════════════════════════════════════════════════════════════ */

.inv-controls {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.inv-search {
  padding: 5px 10px 5px 28px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-size: 12px; font-family: inherit;
  outline: none;
  width: 220px;
  transition: border-color .15s, box-shadow .15s;
  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='%236b6b73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 9px center;
}
.inv-search:focus {
  border-color: var(--acc-line);
  box-shadow: 0 0 0 3px var(--acc-bg);
}
.inv-search::placeholder { color: var(--fg-4); }

/* Inventory grid — deterministic column widths */
.inv-grid { display: block; width: 100%; }

.inv-head, .inv-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 140px 160px 120px;
  align-items: center;
  gap: 0;
}

.inv-head {
  padding: 8px 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-2);
}
.inv-head .inv-cell {
  padding: 4px 12px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-3); font-weight: 600;
}

.inv-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  position: relative;
  transition: background .08s;
}
.inv-row:last-child { border-bottom: none; }
.inv-row:hover { background: var(--surface-2); }
.inv-row.selected { background: var(--acc-bg); }
.inv-row.selected::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--acc);
}

.inv-cell {
  padding: 0 12px;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.inv-cell.col-check  { padding-left: 20px; }
.inv-cell.col-name strong { font-size: 13px; font-weight: 600; color: var(--fg); }
.inv-cell.col-mut    { color: var(--fg-2); }
.inv-cell.col-mps    {
  text-align: right;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  padding-right: 20px;
}
.inv-cell.col-mps span { color: var(--acc); }

input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  background: var(--bg-1);
  cursor: pointer;
  position: relative;
  transition: background .12s, border-color .12s;
}
input[type="checkbox"]:hover { border-color: var(--acc); }
input[type="checkbox"]:checked {
  background: var(--acc);
  border-color: var(--acc);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0;
  width: 5px; height: 9px;
  border: solid #0a0a0b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Player header
   ═══════════════════════════════════════════════════════════════════════════ */

.player-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.player-avatar-lg {
  width: 52px; height: 52px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #0a0a0b;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15);
}
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--fg);
  line-height: 1.2;
  margin-bottom: 4px;
}
.player-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--fg-3);
}
.player-meta > span {
  display: flex; align-items: center; gap: 5px;
}
.player-meta code {
  font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Action bar (sticky bottom)
   ═══════════════════════════════════════════════════════════════════════════ */

.action-bar {
  position: sticky; bottom: 0; z-index: 50;
  background: rgba(15,15,17,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 12px;
}
.sel-summary { flex: 1; display: flex; align-items: center; gap: 12px; font-size: 12px; }
.sel-count {
  display: flex; align-items: center; gap: 6px;
  color: var(--fg-2);
}
.sel-count-num {
  padding: 2px 8px;
  background: var(--acc-bg-2);
  border: 1px solid var(--acc-line);
  border-radius: 3px;
  color: var(--acc);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 600;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.sel-hint { color: var(--fg-4); font-size: 11px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Empty state
   ═══════════════════════════════════════════════════════════════════════════ */

.empty {
  text-align: center; padding: 48px 20px;
  color: var(--fg-3);
}
.empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg-4);
  margin-bottom: 10px;
}
.empty-title {
  font-size: 13px; font-weight: 600; color: var(--fg-2);
  margin-bottom: 3px;
}
.empty-sub { font-size: 11px; color: var(--fg-4); }

/* ═══════════════════════════════════════════════════════════════════════════
   Spinner
   ═══════════════════════════════════════════════════════════════════════════ */

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-hi); border-top-color: var(--acc);
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .content { padding: 20px 14px; }
  .topbar { padding: 0 14px; }
  .action-bar { padding: 10px 14px; flex-wrap: wrap; }
  .inv-search { width: 100%; }
  .stat-value { font-size: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
