/* Fatima's Elite Sports Arena — booking app */
:root {
  --pitch: #0d3b2c;
  --pitch-2: #145c43;
  --grass: #1f7a55;
  --cream: #f7f4ec;
  --card: #ffffff;
  --ink: #17221d;
  --muted: #5d6b64;
  --line: #e2ddd0;
  --ball: #b3172e;
  --gold: #d9a520;
  --amber-bg: #fff4d6; --amber: #8a5a00;
  --blue-bg: #e4eefc;  --blue: #1c4d94;
  --green-bg: #dcf3e6; --green: #11643f;
  --red-bg: #fbe3e5;   --red: #a3192c;
  --grey-bg: #ecebe7;  --grey: #5f625f;
  --wa: #1a9e55;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 59, 44, .06), 0 4px 16px rgba(13, 59, 44, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
a { color: var(--grass); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* top bar */
.topbar { background: var(--pitch); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand strong { display: block; font-size: .95rem; line-height: 1.15; max-width: 15ch; }
@media (min-width: 560px) { .brand strong { max-width: none; } }
.brand small { display: block; font-size: .72rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }
.brand span { min-width: 0; }
.topnav { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.topnav a, .topnav .linkbtn { color: #fff; text-decoration: none; font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.topnav a:hover, .topnav .linkbtn:hover { background: rgba(255,255,255,.12); }
.topnav form { margin: 0; }

main.wrap { padding-top: 16px; padding-bottom: 120px; }

/* hero */
.hero {
  background: linear-gradient(135deg, var(--pitch-2), var(--pitch));
  color: #fff; border-radius: var(--radius); padding: 16px 16px 14px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.hero::after { /* crease lines */
  content: ""; position: absolute; right: -30px; top: -20px; width: 140px; height: 180px;
  border: 2px solid rgba(255,255,255,.12); border-radius: 8px; transform: rotate(12deg);
}
.hero h1 { font-size: 1.45rem; margin-bottom: .25rem; }
.hero p { opacity: .9; max-width: 32em; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 12px 0 0; flex-wrap: wrap; }
.steps li { font-size: .8rem; background: rgba(255,255,255,.1); padding: 4px 10px 4px 4px; border-radius: 99px; display: flex; align-items: center; gap: 6px; }
.steps span { background: var(--gold); color: var(--pitch); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .75rem; }

/* date strip */
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.dates::-webkit-scrollbar { height: 0; }
.date-chip {
  flex: 0 0 auto; scroll-snap-align: start; width: 62px; text-align: center; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 0; line-height: 1.2;
}
.date-chip span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date-chip strong { display: block; font-size: 1.3rem; }
.date-chip.active { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.date-chip.active span { color: rgba(255,255,255,.8); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.legend { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); }
.key-free { background: var(--card); }
.key-taken { background: repeating-linear-gradient(45deg, #e6e2d8 0 3px, #f2efe7 3px 6px); }
.key-taken { margin-left: 6px; }

.band { margin: 14px 0 8px; font-size: .95rem; display: flex; justify-content: space-between; color: var(--pitch); }
.band span { color: var(--muted); font-weight: 500; font-size: .85rem; }

/* slot grid */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 62px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; user-select: none; transition: transform .08s, background .15s, border-color .15s;
}
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot-time { font-weight: 700; font-size: 1rem; }
.slot-sub { font-size: .75rem; color: var(--muted); }
.slot:active { transform: scale(.97); }
.slot:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.slot.is-checked, .slot:has(input:checked) { background: var(--grass); border-color: var(--grass); color: #fff; }
.slot.is-checked .slot-sub, .slot:has(input:checked) .slot-sub { color: rgba(255,255,255,.85); }
.slot.is-checked::after, .slot:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 8px; font-size: .8rem; font-weight: 700; }
.slot.is-taken, .slot.is-past { cursor: not-allowed; color: #9a9d98; background: repeating-linear-gradient(45deg, #ebe7dd 0 4px, #f3f0e8 4px 8px); border-style: dashed; }
.slot.is-past { background: #f1efe9; }
.slot.is-maxed { opacity: .45; }

/* cards & forms */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; margin: 16px 0; }
.card.narrow { max-width: 420px; margin: 32px auto; }
.card.empty { text-align: center; color: var(--muted); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=date], select {
  width: 100%; font: inherit; padding: 12px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus { outline: none; border-color: var(--grass); box-shadow: 0 0 0 3px rgba(31,122,85,.15); }
.hold-note { background: var(--amber-bg); color: var(--amber); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 12px; padding: 13px 18px; min-height: 48px;
}
.btn-sm { padding: 8px 12px; min-height: 38px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--pitch); color: #fff; }
.btn-primary:hover { background: var(--pitch-2); }
.btn-primary:disabled { background: #9aa9a2; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--pitch); }
.btn-outline { background: #fff; color: var(--pitch); border-color: var(--line); }
.btn-wa { background: var(--wa); color: #fff; }
.btn.danger, .linkbtn.danger { color: var(--red); }
.linkbtn { background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; }

/* sticky selection bar */
.selbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--pitch); color: #fff; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .2s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
.selbar.has { transform: none; }
.selbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.no-js .selbar { display: none; }

/* flash */
.flash { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 500; }
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }

/* pills & status */
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-blue  { background: var(--blue-bg); color: var(--blue); }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red   { background: var(--red-bg); color: var(--red); }
.pill-grey  { background: var(--grey-bg); color: var(--grey); }
.status-card { border-top: 5px solid var(--grey); }
.status-card.tone-amber { border-top-color: var(--gold); }
.status-card.tone-blue  { border-top-color: var(--blue); }
.status-card.tone-green { border-top-color: var(--grass); }
.status-card.tone-red   { border-top-color: var(--red); }
.status-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ref { font: 700 1rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--cream); border: 1px dashed var(--line); padding: 4px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.countdown { font-variant-numeric: tabular-nums; color: var(--ball); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.kv-tight { gap: 4px 12px; }

.paylist { display: grid; gap: 10px; }
.pay { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pay h3 { margin-bottom: 6px; }
.copy { font: 600 .95rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; cursor: pointer; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.copy::after, .ref::after { content: " ⧉"; color: var(--muted); font-weight: 400; }
.copy.copied::after, .ref.copied::after { content: " ✓ copied"; color: var(--green); font-family: system-ui, sans-serif; font-size: .8rem; }

.methods { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.methods legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; }
.radio span { display: inline-block; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.radio input:checked + span { background: var(--pitch); border-color: var(--pitch); color: #fff; }
.radio input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.filedrop { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 22px 12px; text-align: center; cursor: pointer; margin-bottom: 12px; background: var(--cream); color: var(--muted); font-weight: 600; }
.filedrop input { display: block; margin: 0 auto 8px; max-width: 100%; font-size: .85rem; }
.filedrop.has-file { border-color: var(--grass); color: var(--green); background: var(--green-bg); }
details summary { cursor: pointer; font-weight: 600; color: var(--grass); }
details[open] summary { margin-bottom: 12px; }
.actions-card { text-align: center; }
.actions-card .btn { margin-bottom: 10px; }

.mylist { list-style: none; padding: 0; margin: 0; }
.mylist a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mylist li:last-child a { border-bottom: 0; }

/* footer */
.footer { color: var(--muted); font-size: .85rem; padding: 8px 0 40px; }
.footer a { color: var(--muted); }

/* ---------- admin ---------- */
.is-admin main.wrap { max-width: 1000px; padding-bottom: 60px; }
.is-admin .wrap { max-width: 1000px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.stat span { display: block; font-size: 1.6rem; font-weight: 800; color: var(--pitch); }
.search { display: flex; gap: 8px; margin: 8px 0 4px; }
.search input { flex: 1; }
.section-title { margin-top: 22px; }
.bgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.bcard { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; }
.bcard header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.bcard p { margin-bottom: 4px; }
.bwhen { font-size: .95rem; }
.bactions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.bforms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.bforms .note { flex: 1 1 140px; padding: 8px 10px; font-size: .9rem; }
.schedule { margin-top: 24px; }
.sched-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sched-date { flex: 1; margin: 0; }
.sched { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: .92rem; }
.sched td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sched td.t { white-space: nowrap; color: var(--muted); width: 1%; padding-right: 12px; font-variant-numeric: tabular-nums; }
.sched .row-confirmed td:first-child { box-shadow: inset 4px 0 var(--grass); }
.sched .row-review td:first-child { box-shadow: inset 4px 0 var(--blue); }
.sched .row-pending td:first-child { box-shadow: inset 4px 0 var(--gold); }
.sched .row-blocked td { background: #f3f1ec; }
.freecheck { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.freecheck input { width: 18px; height: 18px; }
.blockbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.blockbox legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .row2 { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 700px) {
  .hero { padding: 28px 28px 22px; }
  .hero h1 { font-size: 2rem; }
  .paylist { grid-template-columns: 1fr 1fr; }
}
