/* Futsal DA private training: clickable demo, built on direction 1 (The Chair). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:root {
  --ink: oklch(18% 0.01 260);
  --muted: oklch(50% 0.01 260);
  --faint: oklch(72% 0.005 260);
  --line: oklch(91% 0.005 260);
  --bg: oklch(99% 0 0);
  --soft: oklch(96.5% 0.004 260);
  --accent: oklch(56% 0.21 35);
  --accent-hover: oklch(50% 0.21 35);
  --accent-soft: oklch(95% 0.03 35);
  --ok: oklch(55% 0.13 150);
  --ok-soft: oklch(95% 0.04 150);
  --warn: oklch(55% 0.13 70);
  --warn-soft: oklch(95% 0.06 85);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  color: var(--ink);
}

body {
  margin: 0;
  background: oklch(95% 0.005 260);
  min-height: 100dvh;
}

/* Stage: demo panel beside a phone */

.stage {
  display: grid;
  grid-template-columns: 320px auto;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  min-height: 100dvh;
  padding: 2rem;
}

.demo-panel {
  align-self: center;
  font-size: 0.875rem;

  h1 { font-size: 1.25rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
  > p { margin: 0 0 1.25rem; color: var(--muted); }
  h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1.25rem 0 0.5rem; }
  ol { margin: 0; padding-inline-start: 1.1rem; color: oklch(35% 0.01 260); }
  li + li { margin-top: 0.3rem; }
}

.who-list { display: grid; gap: 0.35rem; }
.who-btn {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.45rem 0.6rem; text-align: left;
  transition: border-color 150ms, scale 200ms var(--spring);
  img, .initials { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
  small { display: block; color: var(--muted); font-size: 0.75rem; }
  &:hover { border-color: var(--faint); }
  &:active { scale: 0.98; }
  &[aria-current] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
}
.initials { display: grid; place-items: center; background: oklch(88% 0.05 250); color: oklch(35% 0.1 250); font-weight: 700; font-size: 0.75rem; }

.clock {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  b { flex-basis: 100%; font-size: 0.9375rem; }
}
.mini-btn {
  border: 1px solid var(--line); background: white; border-radius: 999px;
  padding: 0.3rem 0.7rem; font-size: 0.8125rem;
  &:hover { border-color: var(--faint); }
  &.danger { color: var(--accent); }
}

.phone {
  width: 390px; height: 820px;
  border-radius: 48px;
  border: 11px solid oklch(15% 0 0);
  overflow: hidden; position: relative;
  box-shadow: 0 30px 60px -25px oklch(0% 0 0 / 0.4);
  display: flex;
  background: var(--bg);
}

.demo-toggle { display: none; }

@media (max-width: 760px) {
  .stage { display: block; padding: 0; min-height: 0; }
  .phone { width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .demo-panel {
    position: fixed; inset: auto 0 0; z-index: 50; background: oklch(98% 0 0);
    border-radius: 20px 20px 0 0; padding: 1.25rem 1.25rem 2rem; max-height: 85dvh; overflow: auto;
    box-shadow: 0 -10px 40px oklch(0% 0 0 / 0.2);
    translate: 0 105%; transition: translate 350ms var(--ease-out);
  }
  .demo-panel.open { translate: 0 0; }
  .demo-toggle {
    display: block; position: fixed; z-index: 49; right: 12px; top: max(12px, env(safe-area-inset-top));
    border: 0; border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.75rem; font-weight: 700;
    background: oklch(15% 0 0 / 0.85); color: white;
  }
}

/* App shell */

.app {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg); font-size: 15px; position: relative; overflow: hidden;
  font-variant-numeric: tabular-nums;
}

.bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 2.75rem 1.25rem 0.75rem; flex: none;
  h2 { margin: 0; font-size: 1.375rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .back { font-size: 1.75rem; line-height: 1; color: var(--muted); text-decoration: none; padding: 0 0.4rem 0.15rem 0; }
  .end { margin-inline-start: auto; }
}
@media (max-width: 760px) { .bar { padding-top: max(1rem, env(safe-area-inset-top)); padding-right: 4.5rem; } }

.scroll { flex: 1; overflow: auto; padding: 0 1.25rem 1.5rem; overscroll-behavior: contain; }

.tabs {
  display: flex; flex: none; border-top: 1px solid var(--line); background: var(--bg);
  padding: 0.4rem 0 1.4rem;
  a {
    flex: 1; display: grid; justify-items: center; gap: 0.1rem;
    font-size: 0.6875rem; color: var(--muted); text-decoration: none;
    transition: color 150ms;
  }
  svg { width: 24px; height: 24px; transition: scale 250ms var(--spring); }
  a:active svg { scale: 0.85; }
  a[aria-current] { color: var(--accent); font-weight: 600; }
}
@media (max-width: 760px) { .tabs { padding-bottom: max(0.6rem, env(safe-area-inset-bottom)); } }

.label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1.4rem 0 0.5rem; }
.label:first-child { margin-top: 0.25rem; }
.muted { color: var(--muted); }
.fine { font-size: 0.75rem; color: var(--muted); text-align: center; margin: 0.6rem 0 0; }
.empty { color: var(--muted); background: var(--soft); border-radius: 14px; padding: 1rem; text-align: center; font-size: 0.9375rem; }

/* Buttons */

.cta {
  display: block; width: 100%; border: 0; border-radius: 14px;
  background: var(--accent); color: white; font-weight: 700; font-size: 1rem;
  padding: 0.95rem; text-align: center; margin-top: 1rem; text-decoration: none;
  transition: background 150ms, scale 200ms var(--spring);
  &:hover { background: var(--accent-hover); }
  &:active { scale: 0.97; }
  &:disabled { background: var(--line); color: var(--faint); cursor: default; scale: 1; }
  &.dark { background: var(--ink); }
  &.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
  &.ghost:hover { background: var(--accent-soft); }
  &.quiet { background: var(--soft); color: var(--ink); }
  &.small { display: inline-block; width: auto; margin: 0; padding: 0.5rem 0.9rem; font-size: 0.875rem; border-radius: 10px; }
}
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }

/* Coach list */

.coach {
  display: grid; grid-template-columns: 60px 1fr auto; gap: 0.15rem 0.875rem; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none;
  transition: background 150ms;
  img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; grid-row: span 3; }
  b { font-size: 1rem; }
  small { color: var(--muted); grid-column: 2; }
  .price { grid-row: 1; grid-column: 3; font-weight: 600; }
  .next { grid-column: 2 / -1; font-size: 0.8125rem; color: var(--ok); font-weight: 600; }
  .next.none { color: var(--muted); font-weight: 400; }
}

.upcoming {
  display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: inherit;
  background: var(--ink); color: white; border-radius: 16px; padding: 0.9rem 1rem; margin-top: 0.25rem;
  img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
  small { display: block; color: oklch(78% 0 0); font-size: 0.8125rem; }
  .chev { margin-inline-start: auto; opacity: 0.6; font-size: 1.25rem; }
}

/* Coach profile and booking */

.hero {
  display: flex; gap: 1rem; align-items: center;
  img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
  h3 { margin: 0; font-size: 1.25rem; }
  p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.875rem; }
}
.bio { margin: 0.9rem 0 0; color: oklch(35% 0.01 260); }

.offer {
  display: flex; justify-content: space-between; align-items: center;
  border: 1.5px solid var(--accent); background: var(--accent-soft);
  border-radius: 14px; padding: 0.8rem 1rem; margin-top: 1rem;
  small { display: block; color: var(--muted); }
}

.days { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1.25rem; padding: 0 1.25rem; scroll-snap-type: x proximity; }
.day {
  flex: none; width: 58px; border: 0; border-radius: 12px; padding: 0.5rem 0;
  background: var(--soft); font-size: 0.75rem; color: var(--muted); text-align: center; scroll-snap-align: start;
  transition: background 150ms, scale 200ms var(--spring);
  b { display: block; font-size: 1.0625rem; color: var(--ink); }
  &:active { scale: 0.94; }
  &[aria-pressed="true"] { background: var(--ink); color: oklch(80% 0 0); }
  &[aria-pressed="true"] b { color: white; }
  &.full { opacity: 0.45; }
}

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.slot {
  padding: 0.7rem 0; border-radius: 12px; border: 1px solid var(--line); background: white;
  font-weight: 600; font-size: 0.9375rem;
  transition: border-color 150ms, color 150ms, scale 200ms var(--spring);
  &:hover:not(:disabled) { border-color: var(--faint); }
  &:active:not(:disabled) { scale: 0.95; }
  &:disabled { color: oklch(75% 0 0); text-decoration: line-through; border-style: dashed; font-weight: 400; cursor: default; }
  &[aria-pressed="true"] { border: 2px solid var(--accent); color: var(--accent); }
}

/* Sheets */

.sheet-dim { position: absolute; inset: 0; background: oklch(0% 0 0 / 0.4); z-index: 20; animation: fade 200ms both; }
.sheet {
  position: absolute; inset: auto 0 0; z-index: 21; background: var(--bg);
  border-radius: 22px 22px 0 0; padding: 0.6rem 1.25rem 1.75rem; max-height: 88%; overflow: auto;
  animation: rise 380ms var(--ease-out) both;
  &::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 0.9rem; }
  h3 { margin: 0 0 0.25rem; font-size: 1.25rem; }
  > p { margin: 0 0 0.75rem; color: var(--muted); }
}
@keyframes rise { from { translate: 0 100%; } }
@keyframes fade { from { opacity: 0; } }

/* Summary lines */

.sum { font-size: 0.9375rem; }
.sum > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; }
.sum > div > span:first-child { color: var(--muted); }
.sum .total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 0.3rem; padding-top: 0.6rem; }
.sum .total > span:first-child { color: var(--ink); }
.card { background: var(--soft); border-radius: 14px; padding: 0.875rem 1rem; }
.card + .card { margin-top: 0.6rem; }

/* Forms */

.field { margin-top: 0.875rem; }
.field label, .field .lbl { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.3rem; }
.input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; background: white;
  font-size: 1rem; transition: border-color 150ms, box-shadow 150ms;
}
.field textarea { min-height: 5.5rem; resize: vertical; }
.input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: white; padding-left: 0.8rem; }
.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.money-input span { font-weight: 700; }
.money-input input { border: 0; outline: none; padding: 0.7rem 0.8rem 0.7rem 0.2rem; width: 100%; font-weight: 700; font-size: 1rem; background: transparent; }

.rating { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.rating button {
  padding: 0.5rem 0; border-radius: 10px; border: 1px solid var(--line); background: white; font-size: 0.8125rem;
  transition: background 150ms, scale 200ms var(--spring);
  &:active { scale: 0.94; }
  &[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
}

.who { display: flex; gap: 0.75rem; align-items: center; }
.who small { display: block; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: oklch(88% 0.05 250); display: grid; place-items: center; font-weight: 700; color: oklch(35% 0.1 250); }

/* Hours editor */

.hours-row {
  display: grid; grid-template-columns: 2.75rem 1fr auto; gap: 0.6rem; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); min-height: 3.4rem;
  .d { font-weight: 600; }
  .off { color: var(--muted); font-size: 0.875rem; }
  .range { display: flex; align-items: center; gap: 0.3rem; font-size: 0.875rem; color: var(--muted); }
  select { border: 0; background: var(--soft); border-radius: 8px; padding: 0.3rem 0.35rem; font-size: 0.875rem; color: var(--ink); }
}
.toggle {
  width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; border: 0; padding: 0;
  transition: background 200ms;
  &::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: white; box-shadow: 0 1px 3px oklch(0% 0 0 / 0.2); transition: translate 300ms var(--spring); }
  &[aria-checked="true"] { background: var(--ok); }
  &[aria-checked="true"]::after { translate: 18px 0; }
}

/* Spots on the floor */

.spot-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); min-height: 3.6rem;
  .t { width: 3.5rem; flex: none; font-weight: 700; }
  .grow { flex: 1; min-width: 0; display: grid; gap: 0.15rem; }
  small { color: var(--muted); font-size: 0.8125rem; }
  &.mine { background: var(--ok-soft); margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; border-color: transparent; }
  &.mine small { color: oklch(42% 0.1 150); }
}
.faces { display: flex; }
.faces:empty { display: none; }
.faces img, .faces .initials { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; outline: 2px solid var(--bg); font-size: 0.625rem; }
.faces > * + * { margin-left: -6px; }
.faces.big { display: flex; gap: 0.4rem; }
.faces.big > * + * { margin-left: 0; }

.spot-btn {
  border: 1.5px solid var(--accent); color: var(--accent); background: white; border-radius: 999px;
  padding: 0.4rem 0.9rem; font-weight: 700; font-size: 0.875rem;
  transition: background 150ms, scale 200ms var(--spring);
  &:hover { background: var(--accent-soft); }
  &:active { scale: 0.93; }
  &.mine { background: var(--ok); border-color: var(--ok); color: white; }
}
.spot-full { font-size: 0.8125rem; color: var(--faint); font-weight: 600; padding: 0 0.6rem; }

.spot-face, .spot-empty { width: 38px; height: 38px; border-radius: 50%; flex: none; }
.spot-face {
  border: 0; padding: 0; background: none; transition: scale 200ms var(--spring);
  img, .initials { width: 38px; height: 38px; outline: 0; font-size: 0.75rem; }
  &:active { scale: 0.9; }
  &.over { box-shadow: 0 0 0 2.5px var(--accent); }
}
.spot-empty { border: 2px dashed var(--line); }
.over-text { color: var(--accent) !important; font-weight: 700; }

.stepper {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.4rem; color: var(--ink);
  button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: white; line-height: 1; padding: 0; }
  b { min-width: 1ch; text-align: center; }
}
.hours-row .range { flex-wrap: wrap; row-gap: 0.3rem; }

/* Lists */

.row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none;
  .grow { flex: 1; min-width: 0; }
  small { display: block; color: var(--muted); font-size: 0.8125rem; }
  img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
  .chev { color: var(--faint); font-size: 1.25rem; }
}
a.row:active, a.coach:active { background: var(--soft); }
.row.due { background: var(--warn-soft); margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; border-color: transparent; }
.time-col { width: 4.25rem; flex: none; font-weight: 700; }
.time-col small { font-weight: 400; }

.pill { font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: oklch(42% 0.1 150); }
.pill.wait { background: var(--warn-soft); color: oklch(45% 0.1 70); }
.pill.go { background: var(--ink); color: white; }
.pill.red { background: var(--accent-soft); color: var(--accent); }

/* Receipt */

.done-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--ok); color: white; display: grid; place-items: center; margin: 0.75rem auto 0.75rem; animation: pop 500ms var(--spring) both; }
.done-mark svg { width: 30px; height: 30px; }
.done-mark.wait { background: var(--warn); }
.done-mark.booked { background: var(--ink); }
@keyframes pop { from { scale: 0.4; opacity: 0; } }
.center { text-align: center; }
.center h3 { margin: 0; font-size: 1.375rem; }
.center p { margin: 0.25rem 0 0; color: var(--muted); }
.recap { margin-top: 1.25rem; }
.recap h4 { margin: 0 0 0.25rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.recap p { margin: 0 0 0.875rem; }
.recap p:last-child { margin: 0; }

/* Player log */

.entry { position: relative; padding: 0 0 1.1rem 1.25rem; border-left: 2px solid var(--line); margin-left: 0.4rem; }
.entry::before { content: ""; position: absolute; left: -7px; top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.entry .meta { font-size: 0.8125rem; color: var(--muted); }
.entry p { margin: 0.2rem 0 0; }

/* Stats */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.stat { background: var(--soft); border-radius: 14px; padding: 0.8rem 0.9rem; }
.stat small { color: var(--muted); font-size: 0.8125rem; }
.stat b { display: block; font-size: 1.5rem; margin-top: 0.1rem; }
.stat.hot b { color: var(--ok); }
.stat.warn b { color: var(--warn); }

.choice {
  display: block; width: 100%; text-align: left; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0.7rem 0.85rem; background: white; margin-top: 0.5rem;
  small { display: block; color: var(--muted); }
  &[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
}

/* Landing */

.landing { flex: 1; overflow: auto; padding: 3.5rem 1.5rem 2rem; display: flex; flex-direction: column; background: linear-gradient(oklch(14% 0 0), oklch(14% 0 0) 46%, var(--bg) 46%); }
.landing .brand { color: white; text-align: center; }
.landing .brand img { width: 96px; margin: 0 auto 1rem; }
.landing .brand h1 { margin: 0; font-size: 1.625rem; letter-spacing: -0.01em; }
.landing .brand p { margin: 0.35rem 0 0; color: oklch(78% 0 0); }
.landing .panel { background: var(--bg); border-radius: 20px; padding: 1.1rem; margin-top: 2rem; box-shadow: 0 10px 30px -10px oklch(0% 0 0 / 0.25); }
.landing .who-btn { border-radius: 14px; padding: 0.6rem 0.7rem; }
.landing .who-btn img, .landing .who-btn .initials { width: 36px; height: 36px; }

/* Stripe-like connect step */

.stripe-box { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; display: grid; gap: 0.6rem; }
.stripe-box b { color: oklch(50% 0.2 280); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid oklch(100% 0 0 / 0.4); border-top-color: white; display: inline-block; vertical-align: -3px; animation: spin 700ms linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.steps { display: flex; gap: 0.35rem; margin: 0.25rem 0 1rem; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--accent); }

/* Toast */

.toast {
  position: absolute; z-index: 40; left: 1rem; right: 1rem; bottom: 5.5rem;
  background: var(--ink); color: white; border-radius: 14px; padding: 0.75rem 1rem; font-size: 0.875rem;
  box-shadow: 0 10px 30px -10px oklch(0% 0 0 / 0.5);
  animation: toast-in 400ms var(--spring) both;
}
@keyframes toast-in { from { translate: 0 20px; opacity: 0; } }

.screen-in { animation: screen-in 260ms var(--ease-out) both; }
@keyframes screen-in { from { opacity: 0; translate: 12px 0; } }

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

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
