/* ============================================================
   Vibrant gradient PWA styling.
   THEME-AGNOSTIC: colors come from /themes/<name>.css which must be
   loaded BEFORE this file. See <link> tags in index.html / admin.html.
   ============================================================ */
:root {
  /* Layout & inks (theme-independent) — bumped secondary contrast per design review */
  --ink-0: #ffffff;
  --ink-1: rgba(255, 255, 255, 0.88);
  --ink-2: rgba(255, 255, 255, 0.65);   /* design-review: was 0.65, kept */
  --ink-3: rgba(255, 255, 255, 0.45);   /* design-review: was 0.4, bumped */
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover: rgba(255, 255, 255, 0.10);
  --accent-green:  #34d399;
  --accent-red:    #f87171;
  --accent-yellow: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;

  /* Design tokens from review brief (Pass 1+2) */
  --amber:        #f5b042;            /* peak-rate accent */
  --good:         #5be39a;            /* availability green */
  --cream:        #fff6f2;            /* warm white for brand */
  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.14);
  --text-muted:   rgba(255, 255, 255, 0.65);
  --text-faint:   rgba(255, 255, 255, 0.45);

  /* Legacy aliases — kept so older CSS rules keep working when a theme is active. */
  --brand-crimson: var(--brand-primary);
  --brand-scarlet: var(--brand-secondary);
  --brand-coral:   var(--brand-accent);
  --brand-maroon:  var(--brand-deep);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  color: var(--ink-0);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%,  var(--bg-radial-1), transparent 60%),
    radial-gradient(ellipse 70% 55% at 90% 25%, var(--bg-radial-2), transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 100%, var(--bg-radial-3), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--brand-accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ------------ Layout ------------ */
.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 120px;
  min-height: 100vh;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(26, 5, 9, 0.7);
  margin: 0 -16px 0;
  padding-left: 20px;
  padding-right: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-dot {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, #f87171, #991b1b 80%);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45), inset 0 0 0 1px rgba(255,255,255,0.08);
  display: grid; place-items: center;
  font-size: 18px;
  overflow: hidden;
}
.brand-dot img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.brand-text {
  background: linear-gradient(135deg, #fca5a5, #ef4444 60%, #b91c1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.02em;
}
.brand-wordmark {
  height: 22px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(220, 38, 38, 0.35));
}
.admin-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: var(--brand-coral);
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 2px;
}

/* ------------ Pre-launch strip (consolidated, design review #5) ------------ */
.prelaunch-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 4px 0 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.18), rgba(230, 57, 70, 0.04));
  border: 1px solid rgba(230, 57, 70, 0.30);
  font-size: 12px;
  line-height: 1.3;
}
.prelaunch-strip .badge-d {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary, #E63946);
  letter-spacing: 0.02em;
}
.prelaunch-strip .msg {
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  min-width: 0;
}
.prelaunch-strip[hidden] { display: none; }

/* ------------ Legacy Coming Soon banner (kept for backwards compat) ------------ */
.coming-soon-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 4px 0 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.22), rgba(92, 15, 26, 0.55));
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: 0 8px 20px rgba(120, 10, 20, 0.3), inset 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.coming-soon-banner::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  animation: cs-shimmer 3.5s infinite;
  pointer-events: none;
}
@keyframes cs-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.cs-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
  animation: cs-pulse-glow 2s infinite;
  flex-shrink: 0;
}
@keyframes cs-pulse-glow {
  0%   { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
.cs-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.cs-text strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.cs-text span {
  font-size: 12px;
  color: var(--ink-2);
}

.iconbtn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  display: grid; place-items: center;
  transition: transform 0.15s, background 0.15s;
}
.iconbtn:hover { background: var(--card-hover); }
.iconbtn:active { transform: scale(0.95); }

/* ------------ Compact page header (booking view) ------------ */
.page-head {
  margin: 6px 0 18px;
  padding: 0 2px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-head .page-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ------------ Hero (kept for admin login + confirmation screens) ------------ */
.hero {
  margin: 8px 0 20px;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--gradient-main);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.2), transparent 50%);
  pointer-events: none;
}
.hero h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  line-height: 1.2;
}
.hero p { font-size: 14px; opacity: 0.9; margin-top: 4px; position: relative; }
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  backdrop-filter: blur(8px);
}
.hero .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}
.hero-logo {
  position: absolute;
  right: -24px; top: -24px;
  width: 180px; height: 180px;
  opacity: 0.18;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.4));
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }

/* ------------ Section ------------ */
.section { margin: 20px 0; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .hint { color: var(--ink-3); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }

/* ------------ Numbered step headers (design review #9 + spec refinement) ------------ */
.step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.step-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand-primary, #E63946);
  color: #fff;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-1);
  flex-shrink: 0;
}
.step-divider {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.step-summary {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-head.subtle .step-label { color: var(--text-muted); font-weight: 700; }

/* ------------ Slot legend (design review #8 + spec refinement) ------------ */
.slot-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}
.slot-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.slot-legend .sw {
  width: 10px; height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}
.slot-legend .lg-free  .sw { background: rgba(255, 255, 255, 0.05); }
.slot-legend .lg-sel   .sw { background: var(--brand-primary, #E63946); border-color: transparent; }
.slot-legend .lg-peak  .sw { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.50); }
.slot-legend .lg-taken .sw { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.06); }

/* ------------ Date chips ------------ */
.date-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Right-edge fade so users know more dates are scrollable */
  -webkit-mask-image: linear-gradient(to right, black 90%, transparent);
          mask-image: linear-gradient(to right, black 90%, transparent);
}
.date-chips::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: center;
  transition: all 0.2s;
  scroll-snap-align: start;
  font-weight: 600;
}
.date-chip .dow { font-size: 9px; color: rgba(255,255,255,0.55); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.date-chip .dom { font-size: 18px; font-weight: 700; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.date-chip .mon { font-size: 8px; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px; }
.date-chip.active {
  background: var(--brand-primary, #E63946);
  border-color: transparent;
  box-shadow: 0 0 0 1px var(--brand-primary, #E63946), 0 6px 18px -6px rgba(230, 57, 70, 0.55);
  transform: translateY(-1px);
}
.date-chip.active .dow, .date-chip.active .mon { color: rgba(255,255,255,0.85); }

/* ------------ Court tabs ------------ */
.court-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.court-tab {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: left;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.court-tab .label { font-size: 9px; color: rgba(255,255,255,0.55); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.court-tab .name { font-size: 15px; font-weight: 700; margin-top: 2px; }
.court-tab .meta { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; color: var(--good); margin-top: 6px; font-weight: 600; }
/* Availability dot — green >5, amber 1-5, red 0 (design review #7) */
.court-tab .meta.avail { display: inline-flex; align-items: center; gap: 6px; }
.court-tab .meta.avail .avail-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3);
}
.court-tab .meta.avail.good       { color: var(--good); }
.court-tab .meta.avail.good  .avail-dot { background: var(--good); }
.court-tab .meta.avail.low        { color: var(--amber); }
.court-tab .meta.avail.low   .avail-dot { background: var(--amber); }
.court-tab .meta.avail.none       { color: var(--accent-red); }
.court-tab .meta.avail.none  .avail-dot { background: var(--accent-red); }
.court-tab.active .meta.avail,
.court-tab.active .meta.avail .avail-dot {
  /* On the active (filled) card, force readable white */
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.92);
}
.court-tab.active .meta.avail { background: transparent; }
.court-tab.active {
  background: var(--brand-primary, #E63946);
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(230, 57, 70, 0.6);
}
.court-tab.active .label { color: rgba(255,255,255,0.85); }
.court-tab.active .meta  { color: #ffffff; }
.court-tab.active .meta .avail-dot { background: #ffffff; }

/* ------------ Slot grid (grouped by time-of-day) ------------ */
.slot-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.slot-group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px;
  margin-bottom: 8px;
}
.slot-group-header .lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.slot-group-header .rate {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}
.slot-group-header.peak .lbl  { color: var(--amber); }
.slot-group-header.peak .rate { color: rgba(255, 255, 255, 0.5); }

.slot-group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.slot {
  padding: 10px 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  transition: all 0.15s;
  position: relative;
  color: var(--ink-0);
  font-feature-settings: 'tnum';
}
.slot:hover:not(:disabled):not(.selected) { background: var(--card-hover); transform: translateY(-1px); }
.slot .price {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  margin-top: 2px;
}
.slot.peak {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}
.slot.peak::after {
  content: '';
}
.slot.selected {
  background: var(--brand-primary, #E63946);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(230, 57, 70, 0.6);
}
.slot.selected .price { color: rgba(255,255,255,0.9); }

/* Taken: muted card, no strikethrough — design review #4 + #8 */
.slot.taken,
.slot:disabled.taken {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
  color: rgba(255, 255, 255, 0.30);
  cursor: not-allowed;
  text-decoration: none;
}
.slot.past {
  opacity: 0.25;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Empty state: every slot taken/past */
.slot-empty {
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.slot-empty .icon { font-size: 32px; margin-bottom: 8px; }
.slot-empty .title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.slot-empty .sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.slot-empty .empty-ctas {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.slot-empty .btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ------------ Sticky bottom bar (design review #10) ------------ */
.stickybar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(26, 5, 9, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
}
.stickybar .sb-row {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stickybar .sb-meta {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.stickybar .sb-meta .sb-left  { font-weight: 500; }
.stickybar .sb-meta .sb-right {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-align: right;
}
.stickybar .sb-cta { gap: 12px; }
.stickybar .sb-total .amt {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stickybar .sb-total .amt-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}
.stickybar .sb-btn {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 140px;
}
.stickybar .sb-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.40);
  box-shadow: none;
  cursor: not-allowed;
}
/* Backwards-compat: `.summary.visible` no longer needed; bar is always visible. */
.summary,
.stickybar { /* shared positioning rules above */ }

.btn {
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--gradient-button);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.40);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.55); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: var(--card); box-shadow: none; border: 1px solid var(--card-border); }
.btn-ghost:hover { background: var(--card-hover); box-shadow: none; }
.btn-full { width: 100%; padding: 14px 20px; font-size: 15px; }

/* ------------ Modal ------------ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s;
}
.modal-backdrop.visible { display: flex; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-1);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid var(--card-border);
  border-left: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--ink-3);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.modal .sub { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--ink-0);
  font-size: 15px;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--brand-scarlet); }
.form-group .error { color: var(--accent-red); font-size: 12px; margin-top: 4px; display: none; }
.form-group.invalid .error { display: block; }
.form-group.invalid input { border-color: var(--accent-red); }

/* ------------ Booking receipt ------------ */
.receipt {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px dashed var(--card-border);
  margin-bottom: 16px;
}
.receipt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 14px;
}
.receipt-row + .receipt-row { border-top: 1px solid var(--card-border); }
.receipt-row .label { color: var(--ink-2); font-size: 12px; }
.receipt-row .val { font-weight: 600; }
.receipt-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 4px; margin-top: 8px;
  border-top: 1px solid var(--card-border);
  font-size: 18px; font-weight: 800;
}
.receipt-total .val { background: var(--gradient-button); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------ Toast ------------ */
.toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  font-size: 14px;
  font-weight: 600;
  max-width: 90vw;
}
.toast.visible { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: var(--accent-red); }
.toast .icon { margin-right: 8px; }

/* ------------ My bookings ------------ */
.booking-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.booking-card .info { flex: 1; min-width: 0; }
.booking-card .info .court { font-size: 11px; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.booking-card .info .time { font-size: 16px; font-weight: 700; margin-top: 2px; }
.booking-card .info .date { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.booking-card .price { font-weight: 800; color: var(--accent-green); font-size: 16px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-2);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ------------ Admin ------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
}
.stat-card .label { font-size: 11px; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .value { font-size: 22px; font-weight: 800; margin-top: 4px; }
.stat-card .value.green { color: var(--accent-green); }
.stat-card .value.gradient { background: var(--gradient-main); -webkit-background-clip: text; background-clip: text; color: transparent; }

.admin-booking {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--card-border);
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.admin-booking .col { display: flex; flex-direction: column; gap: 2px; }
.admin-booking .name { font-weight: 700; font-size: 14px; }
.admin-booking .phone { font-size: 12px; color: var(--ink-2); }
.admin-booking .time { font-size: 12px; color: var(--ink-2); }
.admin-booking .badge-court {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-booking .badge-court[data-court="court-1"] { background: rgba(153, 27, 27, 0.35); color: #fecaca; }
.admin-booking .badge-court[data-court="court-2"] { background: rgba(239, 68, 68, 0.28); color: #fecaca; }
.btn-danger {
  padding: 8px 12px;
  font-size: 12px;
  background: rgba(248, 113, 113, 0.2);
  color: var(--accent-red);
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  box-shadow: none;
  font-weight: 600;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.3); transform: none; box-shadow: none; }

/* ------------ Skeleton / loader ------------ */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ------------ Install banner ------------ */
.install-banner {
  position: fixed;
  bottom: 90px; left: 16px; right: 16px;
  max-width: 488px;
  margin: 0 auto;
  padding: 12px 14px;
  background: var(--gradient-main);
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 25;
  animation: slideUp 0.3s ease;
}
.install-banner.visible { display: flex; }
.install-banner .text { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.3; }
.install-banner .close {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(0,0,0,0.25);
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
}
.install-banner button.install-btn {
  padding: 8px 14px;
  background: #fff;
  color: #b91c1c;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}

/* ------------ Utility ------------ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-sm { gap: 8px; }
.muted { color: var(--ink-2); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* Smaller screens */
@media (max-width: 360px) {
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 22px; }
}
