/* =========================================================================
   SweetSpot court booking — styles (brand theme at the end of this file)
   Mobile-first.
   Brand palette: #020202 black · #a65330 rust · #fa4c05 / #fc6e02 / #fd8a01
   orange ramp · #daa16a tan · #e3c5b9 peach · #7b7a78 / #a6a5a3 / #b7b6b4 greys.
   Booking-status colours stay universal so customers read them instantly:
   green = available, grey = taken, blue = yours, red = past/unavailable/error.
   ========================================================================= */
:root {
  /* Brand */
  --dark: #020202;
  --brand: #a65330;        /* rust: buttons, links (white text passes AA) */
  --brand-dark: #86411f;   /* rust, darkened for hover */
  --accent: #fa4c05;       /* vivid orange: highlights on dark backgrounds */
  --accent-2: #fc6e02;
  --accent-3: #fd8a01;
  --tan: #daa16a;
  --peach: #e3c5b9;
  --peach-soft: #f8eee9;   /* very light peach tint for selected states */
  --grey-1: #a6a5a3;
  --grey-2: #b7b6b4;
  --grey-3: #7b7a78;
  /* Booking status */
  --avail: #22a55a;
  --avail-bg: #e6f6ec;
  --taken: var(--grey-2);
  --taken-bg: #ecebe9;
  --mine: #2563eb;
  --mine-bg: #e3ecfd;
  --danger: #dc2626;
  --danger-bg: #fdecec;
  --warn: #8a4f17;
  --warn-bg: #fbf0e3;
  /* Neutrals (warm, from the palette greys) */
  --ink: var(--dark);
  --ink-2: #4a4947;
  --ink-3: #6a6967;        /* slightly darker than #7b7a78 for readable small text */
  --line: #e6e4e1;
  --surface: #ffffff;
  --surface-2: #f5f4f2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--surface); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.95); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.nav { display: none; gap: 4px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--brand); margin-left: 6px; }
.nav a.btn-primary:hover { background: var(--brand-dark); }
.nav-toggle { background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 16px 16px; background: #fff; }
.mobile-nav.open { display: grid; gap: 2px; }
.mobile-nav a { padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; }
.mobile-nav a:hover { background: var(--surface-2); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav, .mobile-nav.open { display: none; }
}

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid transparent; font: 600 1rem var(--font); cursor: pointer; text-decoration: none; transition: background .15s, transform .05s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .slot:focus-visible { outline: 3px solid rgba(250,76,5,.45); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--peach-soft); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd5dc; border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
input[type=file] { font: inherit; width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.form-row { display: grid; gap: 12px; align-items: start; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cards, alerts, badges ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title h2, .card-title h3 { margin: 0; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: .95rem; border: 1px solid; margin-bottom: 14px; }
.alert-error { background: var(--danger-bg); border-color: #f5c2c2; color: #8f1d1d; }
.alert-success { background: var(--avail-bg); border-color: #b7e4c7; color: #14532d; }
.alert-info { background: var(--mine-bg); border-color: #c7d7fb; color: #1e3a8a; }
.alert-warn { background: var(--warn-bg); border-color: #f6dd8f; color: #78350f; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--avail-bg); color: #15803d; }
.b-grey { background: var(--taken-bg); color: #4b5563; }
.b-blue { background: var(--mine-bg); color: #1d4ed8; }
.b-red { background: var(--danger-bg); color: #b91c1c; }
.b-amber { background: var(--warn-bg); color: var(--warn); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: radial-gradient(900px 480px at 92% 110%, rgba(250,76,5,.55), transparent 60%), radial-gradient(700px 380px at 70% -20%, rgba(253,138,1,.28), transparent 60%), linear-gradient(160deg, #020202 0%, #1a0d07 55%, #3a1a0c 100%); }
.hero .container { padding-top: 56px; padding-bottom: 64px; position: relative; z-index: 1; }
.hero p.lead { font-size: 1.15rem; max-width: 560px; opacity: .92; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 36px; max-width: 520px; }
.hero-stats div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px; }
.hero-stats strong { display: block; font-size: 1.3rem; font-family: var(--font-head); }
.hero-stats span { font-size: .8rem; opacity: .85; }
.hero-court { position: absolute; right: -60px; bottom: -40px; width: 420px; opacity: .14; z-index: 0; }
@media (min-width: 860px) { .hero .container { padding-top: 88px; padding-bottom: 96px; } .hero-court { opacity: .22; width: 520px; right: 0; } }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 8px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--peach); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.feature-icon svg { width: 22px; height: 22px; }
.price-card { text-align: left; }
.price-card .price { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--brand); }
.price-card .price small { font-size: 1rem; color: var(--ink-3); font-weight: 500; }
.price-card.peak { border-color: var(--brand); border-width: 2px; }
.steps { counter-reset: step; display: grid; gap: 14px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; left: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
details.faq { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 16px; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--brand); }
details.faq[open] summary::after { content: '–'; }
details.faq p { color: var(--ink-2); }

/* ---------- Calendar ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .85rem; color: var(--ink-2); margin: 8px 0 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.day-btn { flex: none; scroll-snap-align: start; min-width: 74px; padding: 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: center; font: inherit; color: var(--ink); }
.day-btn b { display: block; font-size: 1.25rem; font-family: var(--font-head); }
.day-btn small { display: block; font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.day-btn[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-btn[aria-pressed=true] small { color: rgba(255,255,255,.8); }
.cal-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-head, .cal-row { display: grid; grid-template-columns: 64px repeat(var(--courts, 4), minmax(0, 1fr)); gap: 6px; padding: 6px 8px; align-items: stretch; }
.cal-head { position: sticky; top: 64px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .85rem; z-index: 2; }
.cal-head div { text-align: center; padding: 6px 0; }
.cal-row + .cal-row { border-top: 1px solid #f0f2f4; }
.cal-time { font-size: .78rem; color: var(--ink-2); display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.cal-time b { font-size: .86rem; color: var(--ink); }
.peak-tag { font-size: .66rem; color: var(--brand); font-weight: 700; text-transform: uppercase; }
.slot { min-height: 52px; border-radius: 10px; border: 1px solid transparent; font: 600 .78rem var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: default; padding: 4px 2px; }
.slot.A { background: var(--avail-bg); color: #166534; border-color: #bfe6cd; cursor: pointer; }
.slot.A:hover { background: #d3f0de; border-color: var(--avail); }
.slot.A.selected { background: var(--avail); color: #fff; border-color: var(--avail); box-shadow: 0 0 0 3px rgba(34,165,90,.25); }
.slot.T { background: var(--taken-bg); color: var(--ink-3); }
.slot.M { background: var(--mine-bg); color: #1d4ed8; border-color: #bcd0fa; }
.slot.P, .slot.U { background: #fbeeee; color: #c24141; opacity: .75; }
.slot .s-price { font-weight: 500; font-size: .72rem; opacity: .9; }
@media (min-width: 640px) { .cal-head, .cal-row { grid-template-columns: 96px repeat(var(--courts, 4), minmax(0, 1fr)); gap: 8px; padding: 6px 12px; } .slot { font-size: .85rem; min-height: 56px; } }
.cal-status { padding: 28px; text-align: center; color: var(--ink-3); }

/* ---------- Booking sheet (bottom drawer on mobile, dialog on desktop) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 80; display: none; }
.sheet-backdrop.open { display: block; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #fff; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -10px 40px rgba(0,0,0,.15); }
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 44px; height: 5px; background: #d6dbe0; border-radius: 3px; margin: -6px auto 14px; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; border-radius: 20px; transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .sheet-handle { display: none; }
}
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0 18px; font-size: .95rem; }
.summary dt { color: var(--ink-3); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary .total { font-size: 1.25rem; color: var(--brand); font-family: var(--font-head); }
.method { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.method + .method { margin-top: 8px; }
.method input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; }
.method:has(input:checked) { border-color: var(--brand); background: var(--peach-soft); }

/* ---------- Pay page ---------- */
.pay-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .pay-layout { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.qr-box { background: #fff; border: 2px dashed var(--peach); border-radius: 16px; padding: 16px; text-align: center; }
.qr-box img { width: 100%; max-width: 320px; margin: 0 auto; image-rendering: pixelated; border-radius: 8px; }
.amount-big { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--brand); }
.countdown { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.countdown.low { color: var(--danger); }
.instructions { white-space: pre-line; color: var(--ink-2); font-size: .95rem; }
.status-hero { text-align: center; padding: 32px 20px; }
.status-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.status-icon svg { width: 36px; height: 36px; }
.status-icon.ok { background: var(--avail-bg); color: var(--avail); }
.status-icon.wait { background: var(--warn-bg); color: var(--warn); }
.status-icon.bad { background: var(--danger-bg); color: var(--danger); }
.dropzone { border: 2px dashed #cfd5dc; border-radius: 12px; padding: 16px; text-align: center; background: var(--surface-2); }
.dropzone img { max-height: 180px; margin: 10px auto 0; border-radius: 8px; }

/* ---------- Account / tables ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { background: none; border: none; padding: 12px 14px; font: 600 .95rem var(--font); color: var(--ink-3); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tab[aria-selected=true] { color: var(--brand); border-bottom-color: var(--brand); }
.booking-item { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.booking-item + .booking-item { margin-top: 10px; }
.booking-item .row1 { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.booking-item .meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--ink-2); font-size: .92rem; }
.booking-item .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef0f3; vertical-align: top; }
table.data th { background: var(--surface-2); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: var(--ink-3); padding: 32px 16px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px; background: var(--surface-2); }
.auth-card { width: 100%; max-width: 440px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--grey-2); padding: 40px 0 24px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .grid { gap: 24px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; }

/* ---------- Toast & modal ---------- */
.toast-host { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 480px; width: 100%; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: .95rem; animation: rise .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--brand); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin-bottom: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 480px) { .modal-actions .btn { flex: 1 1 100%; } }

/* ---------- Admin ---------- */
.admin-shell { display: grid; min-height: calc(100vh - 64px); }
.admin-nav { background: var(--dark); color: #fff; display: flex; overflow-x: auto; gap: 2px; padding: 8px; position: sticky; top: 64px; z-index: 30; }
.admin-nav button { background: none; border: none; color: var(--grey-2); font: 600 .9rem var(--font); padding: 10px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.admin-nav button[aria-current=page] { background: rgba(250,76,5,.22); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.admin-nav .count { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; }
.admin-main { padding: 20px 16px 48px; background: var(--surface-2); min-width: 0; }
@media (min-width: 1000px) {
  .admin-shell { grid-template-columns: 240px 1fr; }
  .admin-nav { flex-direction: column; overflow: visible; position: sticky; top: 64px; height: calc(100vh - 64px); padding: 16px 10px; }
  .admin-main { padding: 28px 32px 64px; }
}
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .v { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.kpi.alert-kpi { border-color: #f6c2c2; background: #fff7f7; }
.kpi.alert-kpi .v { color: var(--danger); }
.filters { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr repeat(4, 1fr) auto; align-items: end; } }
.filters .field { margin: 0; }
.vq-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.vq-item + .vq-item { margin-top: 12px; }
.vq-item.overdue { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.vq-item.warning { border-color: #f2c94c; }
.vq-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 16px; font-size: .9rem; }
@media (min-width: 760px) { .vq-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.vq-grid dt { color: var(--ink-3); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.vq-grid dd { margin: 0 0 4px; font-weight: 600; word-break: break-word; }
.vq-actions { display: grid; gap: 8px; }
@media (min-width: 560px) { .vq-actions { grid-template-columns: 2fr 1fr auto; } }
.mismatch { color: var(--danger); }
.qr-preview { max-width: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.switch input { width: 22px; height: 22px; accent-color: var(--brand); }
.court-now { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
@media (min-width: 760px) { .court-now { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.court-now div { border-radius: 12px; padding: 12px; font-weight: 700; text-align: center; }
.receipt-img { max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 10px; }

/* ---------- Brand accents ---------- */
.hero .eyebrow { color: var(--accent-3); }
.hero .btn-light { background: var(--accent); color: #fff; }
.hero .btn-light:hover { background: var(--accent-2); }
.hero-stats strong { color: var(--accent-3); }
.site-footer h4 { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 4px; }
.price-card.peak { border-color: var(--accent); }
.price-card .price { color: var(--brand); }
.peak-tag { color: var(--accent); }
.guest-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--peach-soft); border: 1px solid var(--peach); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; font-size: .9rem; }

/* ---------- Open Play ---------- */
.slot.O { background: var(--peach-soft); color: var(--brand); border-color: var(--peach); cursor: pointer; }
.slot.O:hover { border-color: var(--brand); }
.op-card { display: grid; gap: 10px; align-content: start; }
.op-card .op-when { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.op-meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.op-meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.op-card.full .op-meter i { background: var(--danger); }
.op-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--ink-2); }
.op-price { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: var(--brand); }

/* =========================================================================
   SweetSpot brand theme (brand/BRAND.md). Overrides everything above.
   Dark and athletic: Court Black page, Graphite cards, Chalk text, Spot Orange.
   Orange buttons use Court Black text (white on orange fails contrast).
   Status colours stay green / grey / blue / red, tuned for a dark background.
   ========================================================================= */
:root {
  color-scheme: dark;
  --header-h: 76px;
  /* Brand tokens */
  --ss-orange: #F25A1D; --ss-orange-dark: #D9440F; --ss-orange-light: #FF8A3D;
  --ss-black: #121212; --ss-graphite: #262626; --ss-steel: #3A3A3A;
  --ss-concrete: #D6D4D1; --ss-chalk: #F7F2EC; --ss-ball: #D8F03A;
  /* Old names mapped onto the brand */
  --dark: var(--ss-black);
  --brand: var(--ss-orange);
  --brand-dark: var(--ss-orange-dark);
  --accent: var(--ss-orange); --accent-2: var(--ss-orange-light); --accent-3: var(--ss-orange-light);
  --peach: rgba(242,90,29,.45);
  --peach-soft: rgba(242,90,29,.14);
  --ink: var(--ss-chalk);
  --ink-2: var(--ss-concrete);
  --ink-3: #A8A5A1;
  --line: var(--ss-steel);
  --surface: var(--ss-graphite);
  --surface-2: #1B1B1B;
  --radius: 8px; --radius-sm: 6px;
  --shadow: none;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  /* Status, readable on dark */
  --avail: #22C55E; --avail-bg: rgba(34,197,94,.14);
  --taken: #6B6966; --taken-bg: #1E1E1E;
  --mine: #60A5FA; --mine-bg: rgba(96,165,250,.16);
  --danger: #F87171; --danger-bg: rgba(248,113,113,.12);
  --warn: #FBBF24; --warn-bg: rgba(251,191,36,.12);
}
body { background: var(--ss-black); color: var(--ink); }
a { color: var(--ss-orange-light); }

/* Type: Display / Heading styles from the brand kit */
h1, h2, h3, h4 { font-family: var(--font-head); font-style: italic; text-transform: uppercase; letter-spacing: -.01em; }
h1 { font-weight: 900; font-stretch: 125%; line-height: .95; font-size: clamp(2.6rem, 8vw, 6rem); }
h2 { font-weight: 800; font-stretch: 112%; line-height: 1; font-size: clamp(1.9rem, 5vw, 3.5rem); }
h3 { font-weight: 800; font-stretch: 112%; font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-weight: 800; font-stretch: 112%; }
.card h3, .modal h3, .sheet h3, .admin-main h3 { font-size: 1.15rem; }
.card h2, .admin-main h2, .auth-card h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
main.section h1, .auth-card h1, .container > div > h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.orange { color: var(--ss-orange); }
.eyebrow { color: var(--ss-orange); font-weight: 600; font-stretch: 110%; letter-spacing: .28em; font-size: .8rem; }
.eyebrow::before { content: "/// "; letter-spacing: .05em; }
.label { font-weight: 600; font-stretch: 110%; text-transform: uppercase; letter-spacing: .28em; font-size: .72rem; }

/* Header */
.site-header { background: var(--ss-black); border-bottom: 1px solid var(--ss-steel); backdrop-filter: none; }
.site-header .container { height: var(--header-h); }
.brand { color: var(--ink); }
.brand-logo { height: 66px; width: auto; display: block; }
.nav a { color: var(--ink-2); font-weight: 600; font-stretch: 110%; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; border-radius: 4px; }
.nav a:hover { background: var(--ss-graphite); color: var(--ink); }
.nav a.btn-primary, .nav a.btn-primary:hover { background: transparent; color: var(--ss-black); margin-left: 10px; letter-spacing: .08em; }
.nav-toggle { border-color: var(--ss-steel); color: var(--ink); background: transparent; }
.mobile-nav { background: var(--ss-black); border-top-color: var(--ss-steel); }
.mobile-nav a { color: var(--ink); }
.mobile-nav a:hover { background: var(--ss-graphite); }
.cal-head { top: var(--header-h); }
.auth-wrap { min-height: calc(100vh - var(--header-h)); background: var(--ss-black); }
.admin-shell { min-height: calc(100vh - var(--header-h)); }
.admin-nav { top: var(--header-h); }
@media (min-width: 1000px) { .admin-nav { top: var(--header-h); height: calc(100vh - var(--header-h)); } }

/* Buttons: skewed parallelogram (the X slash), text stays upright */
.btn { border-radius: 4px; font-weight: 600; }
.btn-primary, .btn-secondary, .btn-light { position: relative; isolation: isolate; background: transparent; border: 0; border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; padding-left: 28px; padding-right: 28px; }
.btn-sm.btn-primary, .btn-sm.btn-secondary { padding-left: 16px; padding-right: 16px; letter-spacing: .06em; }
.btn-primary::before, .btn-secondary::before, .btn-light::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(-12deg); border-radius: 2px; transition: background .15s; }
.btn-primary, .btn-light { color: var(--ss-black); }
.btn-primary::before, .btn-light::before { background: var(--ss-orange); }
.btn-primary:hover, .btn-light:hover { background: transparent; }
.btn-primary:hover::before, .btn-light:hover::before { background: var(--ss-orange-dark); }
.btn-secondary { color: var(--ink); }
.btn-secondary::before { border: 2px solid var(--ink); }
.btn-secondary:hover { background: transparent; color: var(--ss-black); }
.btn-secondary:hover::before { background: var(--ink); }
.hero .btn-light, .hero .btn-light:hover { background: transparent; color: var(--ss-black); }
.btn-ghost { background: var(--ss-graphite); color: var(--ink); border: 1px solid var(--ss-steel); }
.btn-ghost:hover { background: var(--ss-steel); }
.btn-danger { background: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn .spinner { border-color: rgba(127,127,127,.4); border-top-color: currentColor; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .slot:focus-visible { outline-color: rgba(242,90,29,.7); }

/* Forms */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  background: #1B1B1B; color: var(--ink); border: 1px solid var(--ss-steel); border-radius: 4px;
}
input::placeholder, textarea::placeholder { color: #8A8784; }
input[readonly] { color: var(--ink-3); }
.check input, .method input, .switch input { accent-color: var(--ss-orange); }

/* Cards and surfaces */
.card { background: var(--ss-graphite); border: 1px solid var(--ss-steel); border-radius: 8px; box-shadow: none; }
.op-card:hover, .price-card:hover { border-color: var(--ss-orange); }
.section.alt { background: #181818; }
.feature-icon { background: var(--peach-soft); color: var(--ss-orange); border-radius: 4px; }
.price-card .price, .summary .total, .amount-big, .op-price { color: var(--ss-orange); font-style: italic; font-stretch: 112%; }
.price-card.peak { border-color: var(--ss-orange); }
.step::before { background: var(--ss-orange); color: var(--ss-black); border-radius: 2px; transform: skewX(-12deg); }
details.faq { background: var(--ss-graphite); border-color: var(--ss-steel); border-radius: 8px; }
details.faq summary::after { color: var(--ss-orange); }
details.faq p { color: var(--ink-2); }
.booking-item, .table-wrap, .kpi, .vq-item, .switch { background: var(--ss-graphite); border-color: var(--ss-steel); }
table.data th { background: #1B1B1B; color: var(--ink-2); }
table.data th, table.data td { border-bottom-color: var(--ss-steel); }
.tabs { border-bottom-color: var(--ss-steel); }
.tab { color: var(--ink-3); }
.tab[aria-selected=true] { color: var(--ss-orange); border-bottom-color: var(--ss-orange); }
.guest-bar { background: var(--peach-soft); border-color: var(--peach); }
.dropzone { background: #1B1B1B; border-color: var(--ss-steel); }

/* Alerts and badges, dark versions */
.alert-error { background: var(--danger-bg); border-color: rgba(248,113,113,.45); color: #FECACA; }
.alert-success { background: var(--avail-bg); border-color: rgba(34,197,94,.45); color: #BBF7D0; }
.alert-info { background: var(--mine-bg); border-color: rgba(96,165,250,.45); color: #BFDBFE; }
.alert-warn { background: var(--warn-bg); border-color: rgba(251,191,36,.45); color: #FDE68A; }
.b-green { background: var(--avail-bg); color: #86EFAC; }
.b-grey { background: #2E2E2E; color: #C8C5C1; }
.b-blue { background: var(--mine-bg); color: #93C5FD; }
.b-red { background: var(--danger-bg); color: #FCA5A5; }
.b-amber { background: var(--warn-bg); color: #FCD34D; }
.status-icon.ok { background: var(--avail-bg); color: var(--avail); }
.status-icon.wait { background: var(--warn-bg); color: var(--warn); }
.status-icon.bad { background: var(--danger-bg); color: var(--danger); }
.kpi.alert-kpi { border-color: rgba(248,113,113,.5); background: var(--danger-bg); }
.vq-item.overdue { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,.15); }
.vq-item.warning { border-color: var(--warn); }

/* Hero */
.hero { background: radial-gradient(800px 420px at 95% 115%, rgba(242,90,29,.35), transparent 60%), linear-gradient(160deg, #121212 0%, #161210 60%, #24150E 100%); color: var(--ink); border-bottom: 1px solid var(--ss-steel); }
.hero-logo { width: min(360px, 78vw); height: auto; margin-bottom: 28px; }
.hero .eyebrow { color: var(--ss-orange); }
.hero p.lead { color: var(--ink-2); opacity: 1; }
.hero p.lead:empty { display: none; }
.hero-stats div { background: rgba(38,38,38,.85); border: 1px solid var(--ss-steel); border-radius: 8px; }
.hero-stats strong { color: var(--ss-orange); font-style: italic; font-stretch: 112%; }
.hero-court { stroke: var(--ss-orange); }

/* Calendar */
.day-btn { background: var(--ss-graphite); border-color: var(--ss-steel); color: var(--ink); border-radius: 4px; }
.day-btn b { font-style: italic; font-stretch: 112%; }
.day-btn[aria-pressed=true] { background: var(--ss-orange); border-color: var(--ss-orange); color: var(--ss-black); }
.day-btn[aria-pressed=true] small { color: rgba(18,18,18,.75); }
.cal-wrap { background: var(--ss-graphite); border-color: var(--ss-steel); border-radius: 8px; box-shadow: none; }
.cal-head { background: #1B1B1B; border-bottom-color: var(--ss-steel); }
.cal-row + .cal-row { border-top-color: #303030; }
.cal-time b { color: var(--ink); }
.peak-tag { color: var(--ss-orange); }
.slot { border-radius: 4px; }
.slot.A { background: var(--avail-bg); color: #86EFAC; border-color: rgba(34,197,94,.4); }
.slot.A:hover { background: rgba(34,197,94,.24); border-color: var(--avail); }
.slot.A.selected { background: var(--avail); color: var(--ss-black); border-color: var(--avail); box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
.slot.T { background: var(--taken-bg); color: #8A8784; border-color: #2A2A2A; }
.slot.M { background: var(--mine-bg); color: #93C5FD; border-color: rgba(96,165,250,.45); }
.slot.P, .slot.U { background: rgba(248,113,113,.08); color: #E79A9A; opacity: .7; }
.slot.O { background: var(--peach-soft); color: var(--ss-orange-light); border-color: var(--peach); }
.slot.O:hover { border-color: var(--ss-orange); }
.legend { color: var(--ink-2); }
.legend i { border-radius: 2px; }
.legend .lg-A { background: var(--avail-bg); border: 1px solid rgba(34,197,94,.6); }
.legend .lg-T { background: var(--taken-bg); border: 1px solid #3A3A3A; }
.legend .lg-M { background: var(--mine-bg); border: 1px solid rgba(96,165,250,.6); }
.legend .lg-P { background: rgba(248,113,113,.16); border: 1px solid rgba(248,113,113,.4); }
.legend .lg-O { background: var(--peach-soft); border: 1px solid var(--ss-orange); }

/* Booking sheet, modals, toasts */
.sheet, .modal { background: var(--ss-graphite); color: var(--ink); border: 1px solid var(--ss-steel); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.sheet-handle { background: var(--ss-steel); }
.sheet-backdrop, .modal-backdrop { background: rgba(0,0,0,.7); }
.method { border-color: var(--ss-steel); border-radius: 4px; }
.method:has(input:checked) { border-color: var(--ss-orange); background: var(--peach-soft); }
.toast { background: var(--ss-chalk); color: var(--ss-black); border-radius: 4px; }
.toast.success { background: var(--ss-orange); color: var(--ss-black); }
.toast.error { background: #DC2626; color: #fff; }

/* Pay page: the QR must stay on white so phones can scan it */
.qr-box { background: #fff; color: #121212; border: 2px solid var(--ss-orange); }
.qr-box .muted { color: #4A4947; }
.qr-box b { color: #121212; }
.qr-box .btn-ghost { background: #F2F2F2; color: #121212; border-color: #D6D4D1; }
.countdown { font-style: italic; font-stretch: 112%; }
.qr-preview { background: #fff; }

/* Footer */
.site-footer { background: #0C0C0C; color: var(--ink-3); border-top: 2px solid var(--ss-orange); }
.site-footer a { color: var(--ink); }
.site-footer h4 { color: var(--ink); border-bottom-color: var(--ss-orange); }
.site-footer .bottom { border-top-color: var(--ss-steel); }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.footer-brand h4 { margin: 0; }
.footer-seal { width: 72px; height: 72px; flex: none; }
.endorse { color: var(--ink-3); display: block; margin-top: 6px; }

/* Admin */
.admin-nav { background: #0C0C0C; border-right: 1px solid var(--ss-steel); }
.admin-nav button { color: var(--ink-3); border-radius: 4px; }
.admin-nav button:hover { color: var(--ink); background: var(--ss-graphite); }
.admin-nav button[aria-current=page] { background: var(--peach-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--ss-orange); }
.admin-main { background: var(--ss-black); }
.kpi .v { font-style: italic; font-stretch: 112%; }
.kpi .l { color: var(--ink-3); }

/* The calendar box used overflow:hidden, which makes it its own scroll box, so the sticky
   court-name row was pushed down over the first time slot. overflow:clip keeps the rounded
   corners without breaking sticky. */
.cal-wrap { overflow: clip; }

/* The uppercase, spaced-out menu needs more room than the old one: keep link text on one line
   and use the menu button until the screen is wide enough for the full menu. */
.nav a { white-space: nowrap; }
@media (min-width: 860px) and (max-width: 1079px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav.open { display: grid; }
}
