/* ViperX Samples — ink-blue console, amber lamp.
   Display: Archivo. Body: Karla. Data: JetBrains Mono. */

:root {
  --bg:        #0b0e13;
  --surface:   #11151d;
  --surface-2: #161b25;
  --line:      #232a37;
  --line-soft: #1b212c;

  --text:      #eceef3;
  --muted:     #8f98ab;
  --dim:       #5f697c;

  --accent:    #ffb43a;   /* amber — the only loud colour */
  --accent-dk: #e89a1d;
  --ink:       #17120492; /* unused placeholder guard */
  --on-accent: #1a1304;
  --link:      #6fd3c4;

  --ok:        #4fd18b;
  --warn:      #e5a93c;
  --err:       #ff6b6b;

  --radius: 10px;
  --max: 1160px;

  --font-display: Archivo, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font: Karla, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 400px at 15% -5%, rgba(255,180,58,.07), transparent 60%),
    radial-gradient(700px 350px at 90% 0%, rgba(111,211,196,.05), transparent 55%);
  background-repeat: no-repeat;
}

h1, h2, h3, .brand, .price, .stat .v {
  font-family: var(--font-display);
  letter-spacing: -.015em;
}
h1, h2, h3 { text-wrap: balance; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11,14,19,.88);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 66px; flex-wrap: wrap; padding-block: 10px;
}
.brand {
  font-weight: 700; font-size: 18px; color: var(--text);
  display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand::before {
  content: ""; width: 9px; height: 18px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-dk));
  box-shadow: 0 0 12px rgba(255,180,58,.5);
}
.nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.cart-pill {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; color: var(--text) !important;
  font-size: 13px;
}

/* ---------- Hero ---------- */
.hero { padding-block: 58px 34px; max-width: 46ch; }
.eyebrow {
  font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.hero h1 { font-size: clamp(30px, 5.5vw, 44px); line-height: 1.08; margin: 0 0 12px; font-weight: 700; }
.hero p { color: var(--muted); margin: 0; font-size: 16.5px; }

/* ---------- Product grid ---------- */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  padding-bottom: 64px;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
  transition: border-color .16s ease, transform .16s ease;
}
.card:hover { border-color: #39424f; transform: translateY(-2px); }
.card .cover {
  aspect-ratio: 4/3; max-width: 100%; position: relative;
  display: flex; align-items: flex-end; overflow: hidden;
  background: var(--surface-2);
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card .desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.price { font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }

/* Generated cover art — a waveform block per pack, no image needed */
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cover-tag {
  position: relative; z-index: 2; margin: 12px;
  font: 600 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-accent); background: var(--accent);
  padding: 5px 9px; border-radius: 4px;
}

audio { width: 100%; height: 34px; margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent); border: 0;
  padding: 10px 16px; border-radius: 8px;
  font: 700 13.5px/1.2 var(--font-display); letter-spacing: -.01em;
  cursor: pointer;
  transition: background .14s ease;
}
.btn:hover { background: #ffc361; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); border-color: #39424f; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.danger { background: #c23b3b; color: #fff; }
.btn.danger:hover { background: #d44a4a; }
.btn.wide { width: 100%; }

/* ---------- Panels, tables, forms ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px; min-width: 0;
}
.panel h2 { margin: 0 0 15px; font-size: 18px; font-weight: 700; }
.panel h3 { margin: 20px 0 11px; font-size: 15px; font-weight: 700; }

.tbl-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  color: var(--dim); font-weight: 600; font-size: 10.5px;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); padding: 10px 12px; border-radius: 8px;
  font: 14px/1.5 var(--font);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; min-width: 0; }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font: 600 11.5px/1.5 var(--mono); border: 1px solid transparent; white-space: nowrap;
}
.badge.paid, .badge.fulfilled   { background: rgba(79,209,139,.12); color: var(--ok);   border-color: rgba(79,209,139,.3); }
.badge.pending, .badge.unfulfilled { background: rgba(229,169,60,.12); color: var(--warn); border-color: rgba(229,169,60,.3); }
.badge.failed, .badge.cancelled { background: rgba(255,107,107,.12); color: var(--err);  border-color: rgba(255,107,107,.3); }
.badge.refunded                 { background: rgba(143,152,171,.12); color: var(--muted); border-color: rgba(143,152,171,.3); }
.badge.in_progress              { background: rgba(111,211,196,.12); color: var(--link); border-color: rgba(111,211,196,.3); }

/* ---------- Notices ---------- */
.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; border: 1px solid; border-left-width: 3px; }
.notice.ok   { background: rgba(79,209,139,.07);  border-color: rgba(79,209,139,.35);  color: #b7f0d3; }
.notice.err  { background: rgba(255,107,107,.07); border-color: rgba(255,107,107,.35); color: #ffc9c9; }
.notice.info { background: rgba(111,211,196,.07); border-color: rgba(111,211,196,.35); color: #b6ece4; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 44px;
  padding-block: 26px; color: var(--muted); font-size: 13px;
}
.site-footer .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.admin-bar { background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .inner { display: flex; align-items: center; gap: 22px; min-height: 58px; flex-wrap: wrap; padding-block: 8px; }
.admin-bar a { color: var(--muted); font-size: 14px; }
.admin-bar a.active, .admin-bar a:hover { color: var(--text); text-decoration: none; }
.admin-bar a.active { font-weight: 700; }
.admin-bar .spacer { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px,1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; min-width: 0; }
.stat .k { color: var(--dim); font: 600 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.stat .v { font-size: 25px; font-weight: 700; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat.alert .v { color: var(--accent); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; flex: 1 1 150px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before {
  content: ''; position: absolute; left: -5px; top: 17px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.timeline .when { color: var(--dim); font: 11.5px/1.5 var(--mono); }

.split { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 20px; }
.prod-split { display: grid; grid-template-columns: minmax(0,320px) 1fr; gap: 28px; }

@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .prod-split { grid-template-columns: 1fr; }
  .hero { padding-block: 40px 26px; }
  th, td { padding: 9px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
