:root {
  --bg: #05060f;
  --bg-2: #0b0d1f;
  --surface: rgba(18, 22, 48, 0.62);
  --surface-solid: #11142c;
  --surface-hi: rgba(255, 255, 255, 0.04);
  --text: #e8ecff;
  --muted: #8a93b8;
  --border: rgba(var(--line-rgb), 0.16);
  --border-hi: rgba(var(--line-rgb), 0.32);

  --cyan: #22e4ff;
  --violet: #8b5cff;
  --magenta: #ff3dcb;
  --amber: #ffb938;
  --cyan-rgb: 34, 228, 255;
  --violet-rgb: 139, 92, 255;
  --magenta-rgb: 255, 61, 203;
  --amber-rgb: 255, 185, 56;
  --line-rgb: 130, 150, 255;
  --danger: #ff4d6d;

  --seat-available: rgba(var(--cyan-rgb), 0.12);
  --seat-available-border: rgba(var(--cyan-rgb), 0.55);
  --seat-available-text: #bff6ff;
  --seat-reserved: rgba(var(--amber-rgb), 0.22);
  --seat-reserved-border: rgba(var(--amber-rgb), 0.75);
  --seat-reserved-text: #ffe2a8;
  --seat-paid: rgba(120, 128, 170, 0.12);
  --seat-paid-border: rgba(120, 128, 170, 0.28);
  --seat-paid-text: rgba(160, 168, 205, 0.45);
  --seat-selected: linear-gradient(160deg, var(--magenta), var(--violet));
  --aisle-text: var(--magenta);

  --primary: linear-gradient(135deg, var(--cyan), var(--violet));
  --radius: 18px;
  --font-display: 'Orbitron', 'Eurostile', 'Segoe UI', system-ui, sans-serif;
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(var(--violet-rgb), 0.28), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(var(--cyan-rgb), 0.16), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(var(--magenta-rgb), 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* Faint perspective grid in the background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--line-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--line-rgb), 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  z-index: -1;
}

a { color: var(--cyan); }

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

/* ---------- Header ---------- */
header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--cyan);
}
header.site h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  background: linear-gradient(90deg, #fff 0%, #c9d4ff 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header.site p { margin: 6px 0 0; color: var(--muted); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* Neon hairline on the top edge of every panel */
.card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.8;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Screen ---------- */
.map-scroll {
  overflow-x: auto;
  padding: 4px 2px 6px;
  container-type: inline-size;
}
.screen {
  /* Sticky so the screen stays in view while the map is scrolled sideways on phones */
  position: sticky;
  left: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.6em;
  font-size: clamp(0.62rem, 1.4vw, 0.85rem);
  color: rgba(191, 246, 255, 0.85);
  margin: 6px auto 34px;
  padding-top: 34px;
  width: min(100%, 760px);
  text-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.8);
}
/* Curved glowing screen */
.screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 26px;
  border-top: 3px solid var(--cyan);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -6px 22px -4px rgba(var(--cyan-rgb), 0.9), inset 0 8px 18px -8px rgba(var(--cyan-rgb), 0.7);
  filter: drop-shadow(0 0 6px rgba(var(--cyan-rgb), 0.8));
}
/* Projected light falling onto the seats */
.screen::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 4%;
  right: 4%;
  height: 90px;
  background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.16), transparent);
  clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* ---------- Seat map ---------- */
.seatmap {
  --gap: clamp(2px, 0.45cqw, 5px);
  --cell: clamp(24px, calc((100cqw - 4px - var(--gap) * (var(--cols) - 1)) / var(--cols)), 42px);
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  width: max-content;
  margin: 0 auto;
  user-select: none;
}
.seatmap > * {
  display: grid;
  place-items: center;
  font-size: calc(var(--cell) * 0.34);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.seatmap .empty { background: transparent; }
.seatmap .aisle {
  font-family: var(--font-display);
  color: var(--aisle-text);
  font-size: calc(var(--cell) * 0.42);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(var(--magenta-rgb), 0.8);
}
.seat {
  position: relative;
  appearance: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  font: inherit;
  /* Chair silhouette: rounded back, flatter seat */
  border-radius: 38% 38% 18% 18% / 42% 42% 16% 16%;
  background: var(--seat-available);
  border: 1px solid var(--seat-available-border);
  color: var(--seat-available-text);
  box-shadow: inset 0 -3px 0 rgba(var(--cyan-rgb), 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.seat[data-status='available']:hover {
  transform: translateY(-2px);
  background: rgba(var(--cyan-rgb), 0.28);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.55), inset 0 -3px 0 rgba(var(--cyan-rgb), 0.5);
}
.seat[data-status='reserved'] {
  background: var(--seat-reserved);
  border-color: var(--seat-reserved-border);
  color: var(--seat-reserved-text);
  box-shadow: 0 0 10px rgba(var(--amber-rgb), 0.35), inset 0 -3px 0 rgba(var(--amber-rgb), 0.35);
}
.seat[data-status='paid'] {
  background: var(--seat-paid);
  border-color: var(--seat-paid-border);
  color: var(--seat-paid-text);
  box-shadow: none;
}
.seat[data-status='paid']::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  top: 50%;
  height: 1px;
  background: rgba(160, 168, 205, 0.35);
  transform: rotate(-35deg);
}
.seat.is-selected {
  background: var(--seat-selected) !important;
  border-color: #ffb6ef !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(var(--magenta-rgb), 0.75), 0 0 36px rgba(var(--violet-rgb), 0.45) !important;
}
.seat.is-selected::after { display: none; }
.seat.is-highlight {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.8);
}
.seat:focus-visible { outline: 2px solid #fff; outline-offset: 2px; z-index: 1; }
.readonly .seat[data-status='reserved'],
.readonly .seat[data-status='paid'] { cursor: not-allowed; }
.seat.flash { animation: flash 1s ease-out; }
@keyframes flash {
  0% { transform: scale(1.35); box-shadow: 0 0 0 2px #fff, 0 0 28px 6px var(--cyan); }
  100% { transform: scale(1); }
}

.swipe-hint {
  display: none;
  text-align: center;
  margin: 12px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.8;
}
@media (max-width: 820px) {
  .swipe-hint { display: block; }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch {
  width: 16px;
  height: 14px;
  border-radius: 38% 38% 18% 18% / 42% 42% 16% 16%;
  border: 1px solid;
}
.swatch.available { background: var(--seat-available); border-color: var(--seat-available-border); }
.swatch.reserved { background: var(--seat-reserved); border-color: var(--seat-reserved-border); box-shadow: 0 0 8px rgba(var(--amber-rgb), 0.5); }
.swatch.paid { background: var(--seat-paid); border-color: var(--seat-paid-border); }
.swatch.selected { background: var(--seat-selected); border-color: #ffb6ef; box-shadow: 0 0 8px rgba(var(--magenta-rgb), 0.7); }

/* ---------- Stats ---------- */
.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  backdrop-filter: blur(10px);
}
.stat b {
  font-family: var(--font-display);
  color: var(--cyan);
  font-size: 1.15rem;
  margin-right: 6px;
  text-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.6);
  letter-spacing: 0.02em;
}
#count-reserved { color: var(--amber); text-shadow: 0 0 12px rgba(var(--amber-rgb), 0.6); }
#count-paid { color: #b9c1e6; text-shadow: none; }

/* ---------- Side panel & forms ---------- */
.panel h2,
.card h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel h3 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chip {
  font-family: var(--font-display);
  background: rgba(var(--magenta-rgb), 0.14);
  border: 1px solid rgba(var(--magenta-rgb), 0.55);
  color: #ffd2f4;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 0 10px rgba(var(--magenta-rgb), 0.25);
}
.chip.muted {
  font-family: inherit;
  background: var(--surface-hi);
  border-color: var(--border);
  color: var(--muted);
  font-weight: 500;
  box-shadow: none;
  letter-spacing: 0;
}
.total {
  margin: 12px 0 0;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--cyan);
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 14px 0 6px;
}
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(5, 6, 15, 0.55);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: rgba(138, 147, 184, 0.7); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(var(--cyan-rgb), 0.15), 0 0 16px rgba(var(--cyan-rgb), 0.2);
}
select option { background: var(--surface-solid); }
textarea { resize: vertical; min-height: 64px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 500;
}
.check input { width: 18px; height: 18px; accent-color: var(--cyan); }

.btn {
  position: relative;
  font: inherit;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
  background: var(--primary);
  color: #04121a;
  box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.35), 0 0 40px rgba(var(--violet-rgb), 0.2);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s, opacity 0.2s;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 0 28px rgba(var(--cyan-rgb), 0.55), 0 0 60px rgba(var(--violet-rgb), 0.35);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; filter: grayscale(0.6); }
.btn.block { width: 100%; margin-top: 18px; }
.btn.secondary {
  background: var(--surface-hi);
  color: var(--text);
  border: 1px solid var(--border-hi);
  box-shadow: none;
}
.btn.secondary:hover:not(:disabled) {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.25);
}
.btn.danger {
  background: linear-gradient(135deg, #ff4d6d, #c026d3);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
}
.btn.small {
  padding: 7px 12px;
  font-size: 0.68rem;
  border-radius: 9px;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row .btn { flex: 1; }

.hint { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.hint strong { color: var(--text); }
.error { color: var(--danger); font-size: 0.88rem; margin: 10px 0 0; min-height: 1.2em; }

.notice {
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
  font-size: 0.92rem;
}
.notice.success {
  background: linear-gradient(160deg, rgba(var(--cyan-rgb), 0.1), rgba(var(--violet-rgb), 0.12));
  border: 1px solid rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.12), inset 0 0 30px rgba(var(--violet-rgb), 0.08);
}
.notice .code {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  display: block;
  margin: 6px 0 8px;
  color: #fff;
  text-shadow: 0 0 16px rgba(var(--cyan-rgb), 0.9), 0 0 32px rgba(var(--violet-rgb), 0.6);
}
.notice strong { color: var(--cyan); }

td code {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.badge.pending { color: var(--amber); border-color: rgba(var(--amber-rgb), 0.45); background: rgba(var(--amber-rgb), 0.1); }
.badge.paid { color: #3dffa8; border-color: rgba(61, 255, 168, 0.4); background: rgba(61, 255, 168, 0.08); }
.badge.cancelled { color: #ff7a93; border-color: rgba(255, 77, 109, 0.4); background: rgba(255, 77, 109, 0.08); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(17, 20, 44, 0.92);
  border: 1px solid rgba(var(--cyan-rgb), 0.45);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(var(--cyan-rgb), 0.25);
  backdrop-filter: blur(12px);
  max-width: calc(100% - 32px);
  z-index: 10;
}
.toast[hidden] { display: none; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
}
.live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b5275;
}
.live.on { color: #3dffa8; }
.live.on::before {
  background: #3dffa8;
  box-shadow: 0 0 10px #3dffa8;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 2px #3dffa8; opacity: 0.6; }
}

/* ---------- Admin ---------- */
.login {
  max-width: 380px;
  margin: 14vh auto 0;
  padding: 30px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.toolbar h2 { margin: 0 !important; }
.toolbar .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
tbody tr { cursor: pointer; transition: background 0.15s; }
tbody tr:hover td { background: rgba(var(--line-rgb), 0.05); }
tr.is-highlight td { background: rgba(var(--cyan-rgb), 0.08); }
tr.is-highlight td:first-child { box-shadow: inset 3px 0 0 var(--cyan); }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 6px; }
td .sub { color: var(--muted); font-size: 0.8rem; }
.section-gap { margin-top: 22px; }

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

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ---------- Referral ---------- */
.ref-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  background: linear-gradient(90deg, rgba(var(--violet-rgb), 0.18), rgba(var(--cyan-rgb), 0.06));
  border: 1px solid rgba(var(--violet-rgb), 0.4);
}
.ref-banner[hidden] { display: none; }
.ref-banner::before {
  content: '★';
  color: var(--violet);
  text-shadow: 0 0 10px var(--violet);
}
.ref-banner strong { color: var(--text); }
.ref-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cbb8ff;
  background: rgba(var(--violet-rgb), 0.14);
  border: 1px solid rgba(var(--violet-rgb), 0.35);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ---------- Payment ---------- */
.pay-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(var(--cyan-rgb), 0.05);
  border: 1px dashed rgba(var(--cyan-rgb), 0.35);
  font-size: 0.88rem;
}
.pay-box p { margin: 6px 0 0; }
.pay-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.pay-amount {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.upload {
  position: relative;
  display: block;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  border: 1.5px dashed var(--border-hi);
  border-radius: 12px;
  background: rgba(5, 6, 15, 0.45);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.upload:hover,
.upload:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(var(--cyan-rgb), 0.18);
}
.upload.has-file {
  border-style: solid;
  border-color: rgba(61, 255, 168, 0.55);
  background: rgba(61, 255, 168, 0.05);
}
/* Visually hidden but still focusable/clickable through the label */
.upload input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.upload-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 12px;
  text-align: center;
}
.upload-empty[hidden],
.upload-filled[hidden] { display: none; }
.upload-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  color: var(--cyan);
  border: 1px solid rgba(var(--cyan-rgb), 0.5);
  box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.3);
}
.upload-sub { font-size: 0.75rem; color: var(--muted); }
.upload-filled {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}
.upload-filled img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
}
.upload-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.upload-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
input[type='file'] {
  padding: 8px;
  font-size: 0.85rem;
}
input[type='file']::file-selector-button {
  font: inherit;
  margin-right: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  background: var(--surface-hi);
  color: var(--text);
  cursor: pointer;
}

/* ---------- Admin: proof & members ---------- */
.proof-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border-hi);
  background: var(--surface-hi);
  color: var(--cyan);
  font: inherit;
  font-size: 0.75rem;
  cursor: zoom-in;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.proof-thumb:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.35);
}
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }

.proof-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-hi);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--cyan-rgb), 0.12);
}
.proof-dialog::backdrop {
  background: rgba(3, 4, 12, 0.75);
  backdrop-filter: blur(6px);
}
.proof-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}
.proof-head .btn-row { margin: 0; }
.proof-head .btn-row .btn { flex: none; }
#proof-image {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}
#proof-image[hidden] { display: none; }

tr.no-click { cursor: default; }
td.rank {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--violet);
  text-shadow: 0 0 10px rgba(var(--violet-rgb), 0.6);
}
.link-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.link-cell code.link {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}
.num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.num.paid { color: #3dffa8; text-shadow: 0 0 10px rgba(61, 255, 168, 0.4); }
.num.pending { color: var(--amber); }
#member-form input { min-width: 170px; }
.proof-head .eyebrow { display: flex; margin-bottom: 4px; }

/* ---------- Admin: history ---------- */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 4px 0 20px;
}
.summary-item[hidden] { display: none; }
.summary-item {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-hi);
  border: 1px solid var(--border);
}
.summary-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}
.summary-value.paid { color: #3dffa8; text-shadow: 0 0 14px rgba(61, 255, 168, 0.35); }
.summary-value.pending { color: var(--amber); text-shadow: 0 0 14px rgba(var(--amber-rgb), 0.3); }
.summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline-day {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 14px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.timeline-day:first-child { padding-top: 0; }
.timeline-item {
  --tone: var(--muted);
  display: grid;
  grid-template-columns: 70px 14px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.timeline-item:hover { background: rgba(var(--line-rgb), 0.06); }
.timeline-item.paid { --tone: #3dffa8; }
.timeline-item.pending { --tone: var(--amber); }
.timeline-item.booked { --tone: var(--violet); }
.timeline-item.cancelled { --tone: #ff7a93; }
.timeline-time {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
  text-align: right;
}
.timeline-dot {
  position: relative;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 10px var(--tone);
}
.timeline-body {
  display: grid;
  gap: 2px;
  font-size: 0.88rem;
  min-width: 0;
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
.timeline-label {
  font-weight: 700;
  color: var(--tone);
}
.timeline-item.paid .timeline-label { color: #3dffa8; }
.timeline-item.pending .timeline-label { color: var(--amber); }
.timeline-item.booked .timeline-label { color: #b9a2ff; }
.timeline-item.cancelled .timeline-label { color: #ff7a93; }
.timeline-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}
.timeline-body code {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.ref-tag.inline { margin: 0 0 0 8px; vertical-align: 1px; }
@media (max-width: 560px) {
  .timeline-item { grid-template-columns: 52px 12px minmax(0, 1fr); gap: 8px; }
}

/* ---------- Admin: settings ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}
.settings-grid .span-2 { grid-column: span 3; }
.settings-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.settings-actions .error { margin: 0; }
@media (max-width: 640px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-grid .span-2 { grid-column: auto; }
}

.config-warning {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a0c00;
  background: var(--amber);
}

.chapter-field input::-webkit-calendar-picker-indicator { opacity: 0.6; }
.label-note {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.85;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* ---------- Admin: e-tickets & chapters ---------- */
.ticket-cell { display: grid; gap: 4px; justify-items: start; }
.ticket-state { font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ticket-state.ok { color: #3dffa8; }
.ticket-state.bad { color: #ff7a93; }
td .sub.chapter { color: #e0c27a; }

.chapter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.chapter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: var(--surface-hi);
  border: 1px solid var(--border-hi);
  font-size: 0.88rem;
}
.chapter-count { color: var(--muted); font-size: 0.78rem; }
.chapter-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 77, 109, 0.12);
  color: #ff7a93;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.chapter-remove:hover { background: rgba(255, 77, 109, 0.3); }

/* ---------- Type-to-filter dropdown (JCI chapter) ---------- */
.combo { position: relative; }
.combo input { padding-right: 40px; cursor: pointer; }
.combo.open input { cursor: text; }
.combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  border: 0;
  background: none;
  cursor: pointer;
}
.combo-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -6px 0 0 -4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.combo.open .combo-toggle::after { transform: rotate(-135deg); margin-top: -2px; }
.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 10px;
  border: 1px solid var(--border-hi);
  background: var(--surface-solid);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.combo-option {
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.combo-option.none { color: var(--muted); border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.combo-option.active { background: rgba(var(--cyan-rgb), 0.14); color: var(--text); }
.combo-option[aria-selected='true'] { font-weight: 700; color: var(--cyan); }
.combo-option mark { background: none; color: var(--cyan); font-weight: 700; text-decoration: underline; }
.combo-empty { padding: 10px; color: var(--muted); font-size: 0.9rem; }
