/* ============================================================
   Spoof Shop — design system
   Warm dark "midnight bakery": chocolate surfaces with real
   contrast, strawberry-glaze accent, crisp mint for money.
   Fonts: Sora (display) · Inter (body) · JetBrains Mono (code)
   Scale: 8px spacing rhythm · body 16px/1.65 · nothing < 12px
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #241c15;
  --bg-glow-a: rgba(244, 143, 174, 0.08);
  --bg-glow-b: rgba(94, 214, 184, 0.06);
  --card: #2e251d;
  --card-soft: #292018;
  --text: #f7f0e9;
  --muted: #c0afa0;
  --faint: #97877a;
  --line: rgba(255, 240, 225, 0.11);
  --line-strong: rgba(255, 240, 225, 0.20);

  --accent: #f48cae;        /* strawberry glaze */
  --accent-strong: #ff9fc2;
  --accent-ink: #33101e;
  --dough: #e9b06d;         /* baked tan */
  --mint: #5ecfa8;          /* money / LTC */
  --info: #82b4fb;
  --ok: #57d38f;
  --bad: #ff7a85;
  --warn: #fbbf24;
  --pay: #5fd4e8;

  --st-submitted: #b9c2d0;
  --st-securing: #82b4fb;
  --st-ban_checking: #fbbf24;
  --st-paying: #5fd4e8;
  --st-accepted: #57d38f;
  --st-rejected: #ff7a85;
  --st-failed: #ff9e64;
  --st-cancelled: #9aa3b2;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f1ea;
    --bg-glow-a: rgba(240, 106, 159, 0.08);
    --bg-glow-b: rgba(94, 207, 168, 0.07);
    --card: #ffffff;
    --card-soft: #fbf6f0;
    --text: #2b2018;
    --muted: #75655a;
    --faint: #a08d7f;
    --line: rgba(60, 40, 20, 0.10);
    --line-strong: rgba(60, 40, 20, 0.20);

    --accent: #e0568c;
    --accent-strong: #d63f7d;
    --accent-ink: #fff;
    --dough: #c98d45;
    --mint: #159c6e;
    --info: #2c6fd1;
    --ok: #178a4f;
    --bad: #d43d55;
    --warn: #b07708;
    --pay: #0e8ea6;

    --st-submitted: #5b6779;
    --st-securing: #2c6fd1;
    --st-ban_checking: #b07708;
    --st-paying: #0e8ea6;
    --st-accepted: #178a4f;
    --st-rejected: #d43d55;
    --st-failed: #c05f18;
    --st-cancelled: #6b7280;

    --shadow: 0 12px 32px rgba(90, 60, 30, 0.12);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 85% -10%, var(--bg-glow-a), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, var(--bg-glow-b), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .brand, .price-usd {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}
h1 { font-size: 32px; line-height: 1.18; font-weight: 800; margin: 0 0 10px; }
h2 { margin: 0 0 14px; font-size: 20px; font-weight: 700; }
h3 { font-size: 15.5px; font-weight: 700; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  word-break: break-all;
}

.muted { color: var(--muted); font-weight: 400; }
.error { color: var(--bad); font-weight: 500; }

main {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  flex: 1;
}

/* ---------- top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
}
.topnav .brand:hover { color: var(--text); }
.topnav .brand .logo { display: block; }
.topnav .spacer { flex: 1; }
.topnav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.topnav a:hover { color: var(--accent); }
.topnav .whoami {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}
.topnav .whoami::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.grid.two > .card { margin-bottom: 0; }
@media (max-width: 860px) {
  .grid.two { grid-template-columns: 1fr; }
}

/* ---------- auth pages (login / signup) ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
  margin: 7vh auto 0;
  max-width: 980px;
}
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 0; }
}

.pitch {
  padding: 8px 0;
}
.pitch .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.pitch .kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pitch h1 { font-size: 34px; line-height: 1.2; }
.pitch h1 .accent { color: var(--accent); }

.price-hero {
  margin: 22px 0 10px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 16%, var(--card-soft)),
      color-mix(in srgb, var(--mint) 10%, var(--card-soft)));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: var(--shadow);
}
.price-hero .price-usd {
  display: block;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
}
.price-hero .price-ltc {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--mint);
  font-weight: 500;
}
.price-hero .price-note {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.price-hero .price-note strong { color: var(--text); }

.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 22px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.avail-pill.none {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}
.avail-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

.steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 48px;
  color: var(--text);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-strong), var(--accent));
}
.steps li::after {
  content: "";
  position: absolute;
  left: 14.5px;
  top: 34px;
  bottom: 2px;
  width: 1px;
  background: var(--line-strong);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps li .step-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.trust-row .t {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.trust-row .t::before {
  content: "✓";
  color: var(--mint);
  font-weight: 700;
}
.trust-row .t:not(:last-child)::after {
  content: "·";
  margin: 0 16px;
  color: var(--faint);
  font-weight: 700;
}

.auth-card {
  padding: 30px 28px;
}
.auth-card h2 { display: flex; align-items: center; gap: 9px; }
.auth-card .alt {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  text-align: center;
}

/* ---------- forms ---------- */
label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--muted);
}
label .hint {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 2px;
}
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
textarea {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  min-height: 132px;
}
select { cursor: pointer; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--accent-strong), var(--accent));
  color: var(--accent-ink);
  font: 600 15.5px/1 var(--font-body);
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}
button:hover, .btn:hover { filter: brightness(1.08); }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.mini {
  padding: 5px 12px;
  min-height: 30px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  box-shadow: none;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
button.mini:hover { background: color-mix(in srgb, var(--accent) 26%, transparent); filter: none; }
button.block { width: 100%; }

form.inline { display: inline-block; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
table.kv { min-width: 0; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
  white-space: nowrap;
}
td.detail-cell, td.status-detail { white-space: normal; min-width: 140px; }
th {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  background: color-mix(in srgb, var(--text) 3%, transparent);
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
td.actions { white-space: normal; min-width: 130px; }
td.actions form.inline { margin: 2px 4px 2px 0; }

table.kv th {
  width: 190px;
  text-transform: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  vertical-align: top;
}
table.kv td { white-space: normal; }

/* ---------- status chip system ----------
   Shapes: submitted hollow · securing pulse · ban_checking diamond ·
   paying pulse(cyan) · accepted ✓ · rejected ✕ · failed ! · cancelled – */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--st-submitted);
  background: color-mix(in srgb, var(--st-submitted) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--st-submitted) 28%, transparent);
}
.chip::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.chip.submitted::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
}
.chip.securing {
  color: var(--st-securing);
  background: color-mix(in srgb, var(--st-securing) 13%, transparent);
  border-color: color-mix(in srgb, var(--st-securing) 28%, transparent);
}
.chip.securing::before { animation: pulse 1.4s ease-in-out infinite; }
.chip.ban_checking {
  color: var(--st-ban_checking);
  background: color-mix(in srgb, var(--st-ban_checking) 13%, transparent);
  border-color: color-mix(in srgb, var(--st-ban_checking) 30%, transparent);
}
.chip.ban_checking::before {
  border-radius: 2px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
}
.chip.paying {
  color: var(--st-paying);
  background: color-mix(in srgb, var(--st-paying) 13%, transparent);
  border-color: color-mix(in srgb, var(--st-paying) 28%, transparent);
}
.chip.paying::before { animation: pulse 1.1s ease-in-out infinite; }
.chip.accepted {
  color: var(--st-accepted);
  background: color-mix(in srgb, var(--st-accepted) 14%, transparent);
  border-color: color-mix(in srgb, var(--st-accepted) 32%, transparent);
}
.chip.accepted::before {
  content: "✓";
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}
.chip.rejected {
  color: var(--st-rejected);
  background: color-mix(in srgb, var(--st-rejected) 13%, transparent);
  border-color: color-mix(in srgb, var(--st-rejected) 30%, transparent);
}
.chip.rejected::before {
  content: "✕";
  width: auto;
  height: auto;
  background: none;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}
.chip.failed {
  color: var(--st-failed);
  background: color-mix(in srgb, var(--st-failed) 14%, transparent);
  border-color: color-mix(in srgb, var(--st-failed) 30%, transparent);
}
.chip.failed::before {
  content: "!";
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  font-family: var(--font-display);
}
.chip.cancelled {
  color: var(--st-cancelled);
  background: color-mix(in srgb, var(--st-cancelled) 12%, transparent);
  border-color: color-mix(in srgb, var(--st-cancelled) 26%, transparent);
}
.chip.cancelled::before {
  content: "–";
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.chip.chip-lg {
  font-size: 13px;
  padding: 5px 14px 5px 11px;
}

/* ---------- banners & notices ---------- */
.banner {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.banner.error-banner, p.error.banner {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
}
p.banner.dropped {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
}
.warn-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 26%, transparent);
}

/* ---------- dashboard ---------- */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 4px 0 24px;
}
.dash-head h1 { margin: 0; font-size: 26px; }
.dash-head .head-price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mint);
  background: color-mix(in srgb, var(--mint) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--mint) 26%, transparent);
}
.dash-head .head-price .mono { font-family: var(--font-mono); font-size: 12.5px; }
.dash-head .spacer { flex: 1; }

.submit-hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.submit-hint code { font-size: 12.5px; }

.payout-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- sell detail ---------- */
.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 6px;
}
.detail-head h2 { margin: 0; }
.detail-head .muted { font-size: 13.5px; }
.creds-box {
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--mint) 30%, var(--line));
  background: color-mix(in srgb, var(--mint) 6%, var(--card-soft));
}
.creds-box h3 { margin: 0 0 6px; color: var(--mint); }
.creds-box p { color: var(--muted); font-size: 14px; }

/* ---------- admin ---------- */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.admin-toolbar select { width: auto; margin-top: 0; padding: 7px 10px; font-size: 13.5px; }
.admin-toolbar .count { font-size: 13px; color: var(--faint); }
.admin-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-stat {
  flex: 1 1 150px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  border: 1px solid var(--line);
}
.admin-stat .k {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  margin-bottom: 4px;
}
.admin-stat .v { font-family: var(--font-mono); font-size: 15px; font-weight: 500; }

/* ---------- misc / footer ---------- */
.error-card {
  max-width: 460px;
  margin: 10vh auto 0;
  text-align: center;
  padding: 44px 28px;
}
.error-card .logo-big { margin-bottom: 14px; }

footer {
  border-top: 1px solid var(--line);
  padding: 24px 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}
footer a { color: var(--muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

@media (max-width: 480px) {
  main { padding: 20px 16px 48px; }
  .price-hero { padding: 20px 22px; }
  .price-hero .price-usd { font-size: 38px; }
  .card { padding: 22px 18px; }
  .auth-card { padding: 24px 20px; }
  th, td { padding: 11px 12px; }
  .trust-row .t:not(:last-child)::after { margin: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
