@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg0: #07050c;
  --bg1: #0d0a14;
  --bg2: #14101e;
  --surface: rgba(24, 18, 36, 0.72);
  --surface-solid: #181224;
  --surface-2: rgba(32, 24, 48, 0.85);
  --line: rgba(148, 120, 190, 0.16);
  --line-strong: rgba(168, 140, 210, 0.32);
  --text: #f2edf8;
  --text-2: #b7adc8;
  --text-3: #7d748f;
  --accent: #9b7bc8;
  --accent-2: #7a5fa8;
  --accent-soft: rgba(155, 123, 200, 0.14);
  --cyan: #8eb8c8;
  --green: #7cb892;
  --red: #c48888;
  --amber: #c4b07a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --sidebar: 268px;
  --font: "Pretendard", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(110, 70, 160, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(60, 40, 100, 0.18), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(40, 25, 70, 0.2), transparent 50%),
    var(--bg0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #d4c4ec; text-decoration: none; transition: color .15s; }
a:hover { color: #efe6ff; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: rgba(255,255,255,.06);
  padding: .12em .4em;
  border-radius: 6px;
}

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: linear-gradient(180deg, rgba(14,10,22,.96), rgba(10,8,16,.98));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  overflow-y: auto;
}
.main {
  flex: 1;
  margin-left: var(--sidebar);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content { padding: 8px 28px 48px; max-width: 1120px; }
.footer {
  margin-top: auto;
  padding: 18px 28px 28px;
  color: var(--text-3);
  font-size: .72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 20px;
  color: inherit;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(100,60,160,.25);
  flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg2);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text strong {
  display: block;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-text span {
  display: block;
  font-size: .72rem;
  color: var(--text-3);
  margin-top: 2px;
}

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 16px 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: #e8dcff;
  border-color: rgba(155,123,200,.28);
  box-shadow: inset 0 0 0 1px rgba(155,123,200,.08);
}
.nav-badge {
  margin-left: auto;
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #dccff0;
}

.sidebar-foot, .side-user, .user-chip {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
}
.side-user, .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-user .meta, .user-chip .meta { min-width: 0; flex: 1; }
.side-user .meta strong, .user-chip .meta strong {
  display: block;
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user .meta span, .user-chip .meta span {
  font-size: .72rem;
  color: var(--text-3);
}
.logout {
  color: var(--text-3);
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
}
.logout:hover { background: rgba(255,255,255,.06); color: var(--text); }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(7,5,12,.92), rgba(7,5,12,.7) 70%, transparent);
  backdrop-filter: blur(12px);
}
.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.topbar .crumb, .topbar .sub {
  margin: 3px 0 0;
  color: var(--text-3);
  font-size: .8rem;
}
.topbar-spacer { flex: 1; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  place-items: center;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 40;
  backdrop-filter: blur(2px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(155,123,200,.6);
}
.chip.exp .dot { background: var(--accent); }
.chip.point .dot { background: var(--cyan); }
.chip small { color: var(--text-3); font-weight: 600; }

/* Surfaces */
.card, .hero, .metric-card, .stat, .stat-card, .kpi-mini, .auth-card, .product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.card, .hero { padding: 20px 22px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h2, .card-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.02em;
}
.card-head .sub { font-size: .75rem; color: var(--text-3); margin-top: 2px; }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: 1.35fr 1fr; }
.g-side { grid-template-columns: 1fr 1.2fr; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 12px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 22px; }
.muted { color: var(--text-2); }
.tiny { font-size: .75rem; color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nowrap { white-space: nowrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-text { text-align: center; }
.link { color: #d4c4ec; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Metric / stat cards */
.metric-grid { gap: 12px; }
.metric-card, .stat, .kpi-mini, .stat-card {
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s;
}
.metric-card::after, .stat::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(155,123,200,.12), transparent 70%);
  pointer-events: none;
}
.metric-card:hover, .stat:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}
.metric-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.metric-icon {
  width: 30px; height: 30px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: .85rem;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  color: #dccff0;
}
.metric-card .label, .stat .label, .kpi-mini .label, .stat-card .label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.metric-card .value, .stat .value, .kpi-mini .value, .stat-card .value, .big-num {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.metric-card .value small, .stat .value small {
  font-size: .72rem;
  font-weight: 650;
  color: var(--text-3);
  margin-left: 4px;
}
.metric-card .foot, .stat .foot {
  margin-top: 10px;
  font-size: .74rem;
  color: var(--text-3);
}
.metric-card.accent, .stat.accent { border-color: rgba(155,123,200,.35); }
.metric-card.accent .value, .stat.accent .value { color: #e2d6f5; }
.metric-card.cyan, .stat.cyan { border-color: rgba(142,184,200,.3); }
.metric-card.cyan .value, .stat.cyan .value { color: #c5e0ea; }
.stat.green { border-color: rgba(124,184,146,.3); }
.stat.green .value { color: #b8dfc4; }
.stat.amber { border-color: rgba(196,176,122,.3); }
.stat.amber .value { color: #e8dcb0; }

/* Hero */
.hero-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hero-name h2 { margin: 0; font-size: 1.4rem; font-weight: 750; letter-spacing: -.03em; }
.hero-sub { margin: 4px 0 0; color: var(--text-2); font-size: .88rem; }
.hero-level { flex: 1; min-width: 200px; }
.hero-level .line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .84rem;
  color: var(--text-2);
  margin-bottom: 8px;
}
.hero-level .line strong { color: #e2d6f5; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
}
.progress > span, .progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), #c4a8e8);
}
.level-ring {
  --p: 0;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: conic-gradient(#9b7bc8 calc(var(--p) * 1%), rgba(255,255,255,.07) 0);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.level-ring .inner {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.level-ring .inner b { font-size: 1.1rem; }
.level-ring .inner span { font-size: .55rem; color: var(--text-3); letter-spacing: .08em; }

/* Avatar */
.avatar, .avatar-fallback {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2038;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.avatar-fallback {
  display: grid; place-items: center;
  font-weight: 700;
  font-size: .85rem;
  color: #dccff0;
}
.avatar.lg, .avatar-fallback.lg { width: 64px; height: 64px; font-size: 1.1rem; }
.avatar.sm, .avatar-fallback.sm { width: 32px; height: 32px; font-size: .7rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 16px;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong); }
.btn:active { transform: scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, rgba(155,123,200,.45), rgba(100,70,150,.35));
  border-color: rgba(155,123,200,.4);
  color: #f3ecff;
}
.btn-primary:hover { background: linear-gradient(135deg, rgba(155,123,200,.55), rgba(100,70,150,.45)); }
.btn-ghost { background: transparent; }
.btn-danger {
  background: rgba(196,136,136,.12);
  border-color: rgba(196,136,136,.35);
  color: #efc4c4;
}
.btn-success {
  background: rgba(124,184,146,.12);
  border-color: rgba(124,184,146,.35);
  color: #c4e8d0;
}
.btn-sm { padding: 7px 12px; font-size: .8rem; border-radius: 10px; min-height: 36px; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Forms */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: .8rem;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 550;
}
.input, select.input, textarea.input, .select {
  width: 100%;
  background: rgba(10, 8, 16, .85);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: rgba(155,123,200,.5);
  box-shadow: 0 0 0 3px rgba(155,123,200,.12);
}
.input-group, .input-suffix { display: flex; gap: 8px; align-items: center; }
.input-suffix { color: var(--text-3); font-size: .85rem; }
.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.amount-preview {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.search-box, .live-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 8, 16, .7);
}
.search-box svg, .live-search svg {
  width: 18px; height: 18px;
  color: var(--text-3);
  flex-shrink: 0;
}
.search-box .input, .live-search .input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
}
.hint { font-size: .78rem; color: var(--text-3); margin-top: 6px; }

/* Tables / lists */
.table-wrap { overflow-x: auto; }
table, .table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
th, .table th {
  color: var(--text-3);
  font-weight: 650;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
td, .table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.table tr:hover td { background: rgba(255,255,255,.02); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.table tr.me td { background: rgba(155,123,200,.08); }
.up { color: #9fd9b0 !important; }
.down { color: #e8b0b0 !important; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  transition: border-color .15s, background .15s;
}
.list-row:hover {
  border-color: var(--line-strong);
  background: rgba(255,255,255,.045);
}
.list-row .body { min-width: 0; flex: 1; }
.list-row .body strong {
  display: block;
  font-size: .92rem;
  font-weight: 650;
}
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user .meta strong { color: var(--text); font-size: .88rem; }
.cell-user .meta span { display: block; font-size: .72rem; color: var(--text-3); }

/* Badges */
.badge, .chip:not(.exp):not(.point) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  background: rgba(255,255,255,.06);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.badge.purple, .chip.purple { color: #e2d6f5; background: rgba(155,123,200,.18); border-color: rgba(155,123,200,.3); }
.badge.cyan, .chip.cyan { color: #c5e0ea; background: rgba(100,150,170,.16); }
.badge.green, .chip.green, .badge.success { color: #c4e8d0; background: rgba(124,184,146,.15); }
.badge.red, .chip.red, .badge.danger { color: #efc4c4; background: rgba(196,136,136,.15); }
.badge.amber, .chip.amber, .badge.warning { color: #e8dcb0; background: rgba(196,176,122,.15); }
.badge.blue { color: #c0d0ef; background: rgba(100,130,180,.16); }
.admin-tag {
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(155,123,200,.25);
  color: #e8dcff;
  font-weight: 700;
}

/* Alerts */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size: .9rem;
  margin-bottom: 12px;
}
.alert.error { border-color: rgba(196,136,136,.35); background: rgba(196,136,136,.1); }
.alert.info { border-color: rgba(155,123,200,.3); background: var(--accent-soft); }
.alert.success { border-color: rgba(124,184,146,.3); background: rgba(124,184,146,.1); }
.alert.warn, .alert.warning { border-color: rgba(196,176,122,.3); background: rgba(196,176,122,.1); }

/* Toast */
.toast-host {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 16px;
  border-radius: 16px;
  background: rgba(20, 15, 30, .95);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.toast-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: #e2d6f5;
}
.toast.ok .toast-icon, .toast.success .toast-icon {
  background: rgba(124,184,146,.2); color: #c4e8d0;
}
.toast.error .toast-icon { background: rgba(196,136,136,.25); color: #efc4c4; }
.toast.warn .toast-icon, .toast.warning .toast-icon { background: rgba(196,176,122,.2); color: #e8dcb0; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { display: block; font-size: .78rem; color: var(--text-3); margin-bottom: 2px; }
.toast-msg { display: block; font-size: .92rem; color: var(--text); line-height: 1.4; }
.toast-close {
  border: none; background: transparent; color: var(--text-3);
  font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 0 2px;
}
.toast-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(155,123,200,.6);
  transform-origin: left center;
  animation: toast-bar 4.2s linear forwards;
}
.toast.error .toast-bar { background: rgba(196,136,136,.7); }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-enter { animation: toast-in .38s var(--ease) both; }
.toast-leave { animation: toast-out .3s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) translateX(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px) translateX(8px) scale(.96); }
}

/* Ranking */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.podium-item {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.podium-item.first {
  border-color: var(--line-strong);
  transform: scale(1.03);
  background: linear-gradient(180deg, rgba(155,123,200,.12), var(--surface));
}
.rank-change { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-change.up { color: #9fd9b0; }
.rank-change.down { color: #e8b0b0; }
.rank-change.same { color: var(--text-3); }

/* Shop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.product-card {
  overflow: hidden;
  transition: border-color .15s, transform .2s;
}
.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.product-card .thumb {
  aspect-ratio: 16/10;
  background: #1a1424;
  object-fit: cover;
  width: 100%;
}
.product-card .body { padding: 14px; }
.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #1a1424;
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-3);
  font-size: .9rem;
}
.empty .big { font-size: 2rem; margin-bottom: 8px; opacity: .7; }
.chart-box { height: 200px; position: relative; }
.tabs, .filters, .seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.tab, .seg a, .seg button {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.seg a, .seg button { border: none; }
.tab.active, .tab:hover, .seg a.active, .seg button.active {
  background: var(--accent-soft);
  color: #e8dcff;
  border-color: rgba(155,123,200,.35);
}
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: .85rem;
  color: var(--text-2);
}
.pagination a:hover, .pagination .current {
  background: var(--accent-soft);
  color: #e8dcff;
}

/* User search */
.user-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.user-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.user-option:hover, .user-option.selected {
  border-color: rgba(155,123,200,.45);
  background: rgba(155,123,200,.12);
}
.user-option .u { min-width: 0; flex: 1; }
.user-option .u strong { display: block; font-size: .92rem; }
.user-option .u span { display: block; font-size: .75rem; color: var(--text-3); }
.user-option .avatar, .user-option .avatar-fallback {
  width: 36px; height: 36px;
}

.amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.amt.up { color: #9fd9b0; }
.amt.down { color: #e8b0b0; }
.page-title { font-size: 1.25rem; font-weight: 750; margin: 0 0 4px; letter-spacing: -.02em; }
.page-desc { color: var(--text-2); font-size: .88rem; margin: 0 0 18px; }
.gradient-text, .grad-text { color: #e2d6f5; font-weight: 700; }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-2);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* Auth */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.auth-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(110, 70, 170, .35), transparent 60%),
    linear-gradient(160deg, #0a0712, #07050c 60%);
  border-right: 1px solid var(--line);
}
.auth-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 12px;
  letter-spacing: -.04em;
  line-height: 1.2;
}
.auth-hero p, .lede {
  color: var(--text-2);
  max-width: 440px;
  font-size: .95rem;
  line-height: 1.65;
}
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--text-3);
  font-weight: 700;
  margin-bottom: 14px;
}
.auth-features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  font-size: .9rem;
  color: var(--text-2);
}
.auth-feature strong { color: var(--text); display: block; margin-bottom: 2px; }
.auth-feature .fi {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: #e2d6f5;
  flex-shrink: 0;
  font-size: .85rem;
}
.auth-feature span {
  display: block;
  font-size: .78rem;
  color: var(--text-3);
  margin-top: 2px;
}
.auth-side {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 26px;
}
.auth-card h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-2); margin: 0 0 20px; font-size: .9rem; }
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #5865F2;
  color: #fff !important;
  font-weight: 700;
  border: none;
  font-size: .95rem;
  min-height: 48px;
  transition: filter .15s, transform .15s;
}
.discord-btn:hover { filter: brightness(1.06); color: #fff !important; }
.discord-btn:active { transform: scale(.99); }
.auth-divider {
  text-align: center;
  color: var(--text-3);
  font-size: .75rem;
  margin: 22px 0 14px;
  letter-spacing: .04em;
}
.auth-steps { display: flex; flex-direction: column; gap: 8px; }
.auth-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-2);
}
.auth-step .n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #e2d6f5;
  display: grid; place-items: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-foot {
  margin-top: 20px;
  font-size: .72rem;
  color: var(--text-3);
  line-height: 1.5;
}
.dev-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-3);
}

/* Animations */
.anim-page { animation: page-in .35s ease both; }
.anim-card {
  animation: card-in .45s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 55ms);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* Mobile tables as cards */
@media (max-width: 720px) {
  .table-wrap { border: none; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .table td {
    border: none;
    padding: 6px 0;
    text-align: left !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--text-3);
    font-size: .72rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
    max-width: 38%;
  }
}

@media (max-width: 960px) {
  .g-4, .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-main, .g-side { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

@media (max-width: 768px) {
  .sidebar {
    width: min(86vw, 300px);
    transform: translateX(-105%);
    transition: transform .22s var(--ease);
    box-shadow: 12px 0 40px rgba(0,0,0,.5);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .mobile-overlay { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .content, .topbar { padding-left: 14px; padding-right: 14px; }
  .content {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .topbar {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 8px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .topbar h1 { font-size: 1.05rem; }
  .topbar .crumb, .topbar .sub, .topbar-spacer { display: none; }
  .topbar .chip { padding: 6px 9px; font-size: .72rem; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .hero-actions {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
  }
  .hero-actions .btn, .hero-actions form, .hero-actions form .btn { width: 100%; }
  .form-grid { grid-template-columns: 1fr !important; }
  .g-main, .g-side, .g-2, .g-3 { grid-template-columns: 1fr !important; }
  .content > .grid.g-4 { grid-template-columns: 1fr 1fr !important; }
  .podium { grid-template-columns: 1fr !important; }
  .podium-item.first { transform: none; order: -1; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .btn { min-height: 44px; }
  .input, .select { min-height: 44px; font-size: 16px; }
  .tabs, .filters, .seg {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar, .filters::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .toast-host {
    left: 12px; right: 12px; width: auto;
  }
  .auth-side {
    padding: 20px 14px;
    padding-top: max(24px, env(safe-area-inset-top));
  }
  .auth-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .content > .grid.g-4 { grid-template-columns: 1fr 1fr !important; }
  .product-grid { grid-template-columns: 1fr; }
  .metric-card .value, .stat .value { font-size: 1.15rem; }
  .topbar h1 { font-size: .95rem; }
}

@media (max-width: 360px) {
  .content > .grid.g-4 { grid-template-columns: 1fr !important; }
}

@media (hover: none) {
  .metric-card:hover, .stat:hover, .product-card:hover, .list-row:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-enter, .toast-leave, .anim-page, .anim-card, .toast-bar {
    animation: none !important;
  }
}
