/* Cartly Design System */
:root {
  --bg: #020617;
  --bg-grid: #0a1628;
  --surface-0: #0b1220;
  --surface-1: #0f172a;
  --surface-2: #131e36;
  --surface-3: #1e293b;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-mute: #64748b;
  --text-faint: #475569;

  --emerald: #34d399;
  --teal: #22d3ee;
  --discord: #5865f2;
  --discord-hover: #4752c4;

  --amber: #fbbf24;
  --rose: #fb7185;
  --grad: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(52,211,153,0.18), rgba(34,211,238,0.18));

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-card: 0 1px 0 0 rgba(255,255,255,0.04) inset, 0 8px 24px -12px rgba(0,0,0,0.6);
  --shadow-pop: 0 24px 60px -20px rgba(0,0,0,0.6), 0 1px 0 0 rgba(255,255,255,0.05) inset;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 75% -10%, rgba(34,211,238,0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(52,211,153,0.06), transparent 60%);
}

/* Grid texture overlay */
.bg-grid::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Top nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(2,6,23,0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background-image: url('assets/cartly-logo.png');
  background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.25), 0 4px 14px -2px rgba(34,211,238,0.3);
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-link {
  padding: 7px 12px; border-radius: 8px;
  color: var(--text-dim); text-decoration: none; font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
  border: 0; background: transparent;
  font-family: inherit;
}
.nav-link:hover { color: var(--text); background: var(--surface-1); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-spacer { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.btn:hover { background: var(--surface-3); border-color: #475569; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-1); color: var(--text); border-color: var(--border); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 6px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 12px; }

.btn-primary {
  background: var(--grad);
  color: #04141a;
  border-color: transparent;
  box-shadow: 0 6px 20px -6px rgba(34,211,238,0.5);
}
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.btn-discord {
  background: var(--discord);
  color: #fff;
  border-color: transparent;
}
.btn-discord:hover { background: var(--discord-hover); border-color: transparent; }

.btn-danger {
  background: rgba(251,113,133,0.08);
  color: #fda4af;
  border-color: rgba(251,113,133,0.25);
}
.btn-danger:hover { background: rgba(251,113,133,0.15); color: #fecdd3; border-color: rgba(251,113,133,0.4);}

.btn-success {
  background: rgba(52,211,153,0.1);
  color: #6ee7b7;
  border-color: rgba(52,211,153,0.3);
}
.btn-success:hover { background: rgba(52,211,153,0.2); color: #a7f3d0; border-color: rgba(52,211,153,0.5);}

.btn-icon { width: 30px; padding: 0; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  transition: border-color .15s, background .15s;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.select option {
  background: #0f172a;
  color: #e2e8f0;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface-1);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.08);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

/* Pills / badges */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor;
}
.pill.amber { color: #fcd34d; background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.25); }
.pill.emerald { color: #6ee7b7; background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.25); }
.pill.teal { color: #67e8f9; background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); }
.pill.rose { color: #fda4af; background: rgba(251,113,133,0.08); border-color: rgba(251,113,133,0.25); }
.pill.slate { color: var(--text-dim); }
.pill.no-dot::before { display: none; }

/* Page chrome */
.page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 32px 80px;
}
.page-narrow { max-width: 980px; }
.page-wide { max-width: 1320px; }

.section-title {
  font-size: 18px; font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.section-sub {
  font-size: 13px; color: var(--text-dim); margin: 0 0 18px;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat {
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat-label {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.stat-value {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-family: var(--font-mono);
}
.stat-trend {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-mute);
  display: flex; align-items: center; gap: 6px;
}
.stat-trend .up { color: #6ee7b7; }
.stat-trend .down { color: #fda4af; }
.stat-spark {
  position: absolute;
  right: 14px; top: 18px;
  width: 80px; height: 32px;
  opacity: 0.7;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(15,23,42,0.5);
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:hover { background: rgba(30,41,59,0.4); }
.table tbody tr:last-child td { border-bottom: 0; }

.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-name { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-handle { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qual-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
  font-size: 11px;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-dim); }
.faint { color: var(--text-mute); }

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 48px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-1);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 22px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(52,211,153,0.18);
}
.hero h1 {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 17px; line-height: 1.55;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Product cards grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 32px;
}
.product-card {
  padding: 24px;
  display: flex; flex-direction: column;
  gap: 16px;
  position: relative;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s;
}
.product-card:hover { border-color: var(--border-strong); }
.product-card:hover .product-cta { color: var(--teal); }
.product-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.product-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid rgba(34,211,238,0.25);
  font-size: 22px;
}
.product-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.product-tagline { font-size: 13px; color: var(--text-dim); margin: 4px 0 0; }
.product-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.product-price .small { color: var(--text-mute); font-size: 11px; }
.product-na { color: var(--text-mute); font-style: italic; font-size: 12px; }
.product-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.product-features li {
  font-size: 12.5px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px;
}
.product-features li svg { color: var(--emerald); flex-shrink: 0; }
.product-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.product-cta {
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s;
}

/* Detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 28px;
}
.detail-hero {
  padding: 32px;
}
.detail-hero h2 {
  font-size: 32px; letter-spacing: -0.02em; font-weight: 600; margin: 16px 0 8px;
}
.detail-hero p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 0; }

.feature-list {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.feature-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: var(--text);
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.feature-list li svg { color: var(--emerald); margin-top: 2px; flex-shrink: 0; }

.sidekick {
  padding: 24px;
  align-self: start;
  position: sticky; top: 80px;
}
.price-row {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono);
}
.price-big { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.price-unit { color: var(--text-dim); font-size: 13px; }
.fee-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.fee-row:last-child { border-bottom: 0; }
.waitlist-questionnaire {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.waitlist-questionnaire .textarea {
  min-height: 74px;
}
.form-error {
  color: #fda4af;
  background: rgba(251,113,133,0.08);
  border: 1px solid rgba(251,113,133,0.22);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2,6,23,0.7);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 24px;
}
.modal {
  width: 100%;
  max-width: 460px;
  padding: 28px;
  border-radius: 18px;
  position: relative;
}
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 920px; }
.modal h3 {
  font-size: 18px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em;
}
.modal-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 20px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px; cursor: pointer;
  background: transparent; border: 0;
  color: var(--text-dim);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* Toggle switch */
.switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: transform .2s, background .2s;
}
.switch.on { background: var(--grad); border-color: transparent; }
.switch.on::after { transform: translateX(16px); background: #04141a; }

/* Tab bar */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 9px 14px;
  border-radius: 8px 8px 0 0;
  background: transparent; border: 0;
  cursor: pointer;
  color: var(--text-mute);
  font: inherit; font-weight: 500; font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--teal); }

/* Misc */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
}

/* Chart */
.chart-card { padding: 22px; }
.chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.chart-svg { width: 100%; height: 200px; }

/* Source breakdown */
.source-list { display: flex; flex-direction: column; gap: 10px; }
.source-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.source-row .src-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.source-row .src-bar-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 999px;
}
.source-row .src-name {
  width: 130px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.source-row .src-count {
  width: 50px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* Empty state */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}
.empty h4 { color: var(--text); font-weight: 500; font-size: 15px; margin: 12px 0 4px; }

/* Discord auth screen */
.auth-card {
  max-width: 420px;
  margin: 80px auto;
  padding: 36px 32px;
  text-align: center;
}
.auth-card .auth-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin: 0 auto 18px;
  background-image: url('assets/cartly-logo.png');
  background-size: cover;
  box-shadow: 0 8px 28px -8px rgba(34,211,238,0.4);
}
.auth-card h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 600; }
.auth-card p { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }
.auth-perms {
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.auth-perms-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 13px; }
.auth-perms-row svg { color: var(--emerald); margin-top: 3px; flex-shrink: 0; }

/* Settings two-col */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .lbl { font-size: 13px; }
.setting-row .desc { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

/* Code-like box */
.code-box {
  background: #050a14;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-box .key { color: #67e8f9; }
.code-box .val { color: #6ee7b7; }
.code-box .com { color: var(--text-mute); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .25s ease both; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-0); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; border: 2px solid var(--surface-0); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Toast */
.toast-wrap {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 10px;
  min-width: 240px;
  animation: fadeUp .2s ease;
}
.toast.success { border-color: rgba(52,211,153,0.4); }
.toast.success .dot { background: var(--emerald); }
.toast.error { border-color: rgba(251,113,133,0.4); }
.toast.error .dot { background: var(--rose); }
.toast .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); }

/* Admin layout helpers */
.admin-header {
  margin-bottom: 24px;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-header-actions {
  flex-wrap: wrap;
}
.admin-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.admin-products-grid {
  margin-top: 0;
}

.table-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.table-toolbar-controls {
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}
.table-toolbar-meta {
  font-size: 12px;
  white-space: nowrap;
}
.search-field {
  gap: 8px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 200px;
  flex: 1 1 220px;
}
.search-field .input {
  min-width: 0;
}
.table-filter {
  width: 140px;
  font-size: 12px;
  height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.table-filter-wide {
  width: 160px;
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll .table {
  min-width: 920px;
}

@media (max-width: 1024px) {
  .admin-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
  .sidekick {
    position: static;
    top: auto;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 24px 16px 64px;
  }
  .nav-inner {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .nav-links {
    margin-left: 0;
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .nav-spacer {
    display: none;
  }
  .hero {
    padding: 48px 0 32px;
  }
  .hero h1 {
    font-size: clamp(28px, 8vw, 40px);
  }
  .hero p {
    font-size: 15px;
  }
  .detail-hero {
    padding: 22px;
  }
  .detail-hero h2 {
    font-size: 24px;
  }
  .product-head {
    flex-direction: column;
    align-items: stretch;
  }
  .product-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .chart-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .table-toolbar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .search-field,
  .table-filter,
  .table-filter-wide {
    width: 100%;
    flex: 1 1 auto;
  }
  .table-toolbar-meta {
    width: 100%;
    text-align: right;
  }
  .toast-wrap {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .btn-lg {
    white-space: normal;
    height: auto;
    min-height: 46px;
    padding: 10px 18px;
    line-height: 1.25;
    text-align: center;
  }
  .btn-discord.btn-lg span {
    text-align: center;
  }
}
