/* ── PIONEER PIT CREW — BRAND TOKENS ─────────────────────────────────────── */
:root {
  --black:     #0a0a0a;
  --dark:      #111111;
  --surface:   #1a1a1a;
  --surface2:  #222222;
  --border:    #2e2e2e;
  --border2:   #3a3a3a;
  --gold:      #c9a84c;
  --gold-dim:  #a07c2e;
  --gold-glow: rgba(201,168,76,.15);
  --white:     #f5f0e8;
  --muted:     #888880;
  --muted2:    #555550;
  --green:     #2a7a4f;
  --green-bg:  #0d2318;
  --red:       #a03030;
  --red-bg:    #1e0c0c;
  --blue:      #2a5a8a;
  --blue-bg:   #0a1520;
  --shadow:    0 8px 32px rgba(0,0,0,.5);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

html {
  color: var(--white);
  background: var(--black);
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--white); }
button, input, select { font: inherit; cursor: pointer; }

/* ── LAYOUT ── */
.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}
.narrow { width: min(600px, calc(100% - 32px)); }

/* ── HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--black);
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
}

.brand-label strong {
  display: block;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.brand-label span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

/* ── HERO PANEL ── */
.hero-panel {
  background: linear-gradient(135deg, #111 0%, #1a1400 60%, #111 100%);
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--gold);
  padding: clamp(24px, 5vw, 40px);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-title {
  margin: 0 0 8px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  position: relative;
}

.page-title span { color: var(--gold); }

.lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  position: relative;
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 4px;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
}

.card h2 .gold { color: var(--gold); }
.card p.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* ── METRICS ── */
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.metric {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  padding: 18px 16px;
  text-align: center;
}

.metric strong {
  display: block;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 40px;
  letter-spacing: 2px;
  color: var(--gold);
  line-height: 1;
}

.metric span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ── PERK BAR ── */
.perk-section { margin-bottom: 20px; }

.perk-tier {
  margin-bottom: 14px;
}

.perk-tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.perk-tier-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.perk-tier-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.perk-bar {
  height: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.perk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width .5s ease;
}

.perk-summary-text {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--gold-glow);
  border-left: 2px solid var(--gold);
}

/* ── FORMS ── */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.field small {
  font-size: 11px;
  color: var(--muted2);
  line-height: 1.4;
}

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=password],
select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--white);
  font-size: 14px;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
}

input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

input[readonly] {
  background: var(--surface);
  color: var(--muted);
}

select option { background: var(--surface2); }

/* ── BUTTONS ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  background: var(--gold);
  color: var(--black);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
}

.button:hover { opacity: .88; transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button.outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border2);
}

.button.outline:hover { border-color: var(--gold); color: var(--gold); }

.button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 11px;
}

.button.danger {
  background: var(--red);
  color: var(--white);
}

.button.sm { min-height: 34px; padding: 0 12px; font-size: 10px; }
.button[disabled] { opacity: .4; pointer-events: none; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── NOTICES ── */
.notice {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid;
  margin-bottom: 14px;
}

.notice.info { background: var(--blue-bg); color: #8ab4d4; border-color: var(--blue); }
.notice.success { background: var(--green-bg); color: #6ab98a; border-color: var(--green); }
.notice.error { background: var(--red-bg); color: #c47a7a; border-color: var(--red); }
.notice.warn { background: #1a1400; color: var(--gold); border-color: var(--gold-dim); }
.hidden { display: none !important; }

/* ── LINK BOX ── */
.link-box { display: flex; gap: 8px; }
.link-box input { min-width: 0; flex: 1; }

/* ── QR ── */
.qr-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.qr-wrap img { width: 140px; height: 140px; border: 1px solid var(--border2); }

/* ── TABLES ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--white);
}

td.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge.booked { background: var(--blue-bg); color: #8ab4d4; border-color: var(--blue); }
.badge.completed { background: var(--green-bg); color: #6ab98a; border-color: var(--green); }
.badge.cancelled, .badge.rejected { background: var(--red-bg); color: #c47a7a; border-color: var(--red); }
.badge.manual_review { background: #1a1200; color: var(--gold); border-color: var(--gold-dim); }
.badge.processed { background: var(--green-bg); color: #6ab98a; border-color: var(--green); }
.badge.failed, .badge.needs_mapping { background: var(--red-bg); color: #c47a7a; border-color: var(--red); }
.badge.active { background: var(--green-bg); color: #6ab98a; border-color: var(--green); }
.badge.paused { background: var(--red-bg); color: #c47a7a; border-color: var(--red); }

/* ── CONSENT ── */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.consent input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--gold);
}

/* ── SEARCH RESULTS ── */
.results { display: grid; gap: 6px; margin-top: 8px; }

.result-btn {
  text-align: left;
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  transition: border-color .15s;
}

.result-btn:hover, .result-btn.selected {
  border-color: var(--gold);
  background: #1a1400;
}

.result-btn span { display: block; color: var(--gold); font-size: 11px; margin-top: 2px; letter-spacing: 1px; }

/* ── FILTERS ── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── TOPBAR ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── MISC ── */
.muted { color: var(--muted); }
.fine-print { font-size: 11px; color: var(--muted2); line-height: 1.5; }
.gold { color: var(--gold); }
code { font-family: monospace; font-size: 13px; color: var(--gold); letter-spacing: 1px; }

footer.footer {
  color: var(--muted2);
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .link-box { flex-direction: column; }
  .button { width: 100%; }
  .button.sm { width: auto; }
  .topbar { flex-direction: column; }
  .qr-wrap { flex-direction: column; }
}
