:root {
  --lime: #d8f24f;
  --lime-2: #b6e236;
  --ink-lime: #1a2606;
  --bg: #160d09;
  --text: #f6efe8;
  --muted: rgba(246, 239, 232, 0.62);
  --faint: rgba(246, 239, 232, 0.4);
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(38, 24, 19, 0.26);
  --white-chip: #f4ece2;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100vh; color: var(--text); background: #0b0705; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; }
h1, h2, h3, p { margin: 0; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px 16px;
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(60% 50% at 70% 18%, rgba(214, 92, 36, 0.5), transparent 60%),
    radial-gradient(70% 60% at 20% 90%, rgba(120, 40, 20, 0.55), transparent 60%),
    url("assets/clay-texture.jpg") center/cover;
  filter: blur(26px) brightness(0.5) saturate(1.2);
  transform: scale(1.1);
  z-index: 0;
}

/* ---------- Phone ---------- */
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 412px;
  height: min(880px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 46px;
  background:
    linear-gradient(180deg, rgba(22, 10, 5, 0.62), rgba(13, 7, 4, 0.82)),
    url("assets/hero-clay.jpg") center top / cover no-repeat,
    var(--bg);
  box-shadow: 0 0 0 11px #0c0a09, 0 0 0 13px #2a2421, 0 40px 90px rgba(0, 0, 0, 0.65);
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 26px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
}
.notch { width: 108px; height: 28px; border-radius: 0 0 18px 18px; background: #0c0a09; margin-top: -18px; }
.indicators { display: flex; gap: 6px; }
.indicators svg { width: 16px; height: 16px; }

/* ---------- Wizard top ---------- */
.wiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 54px 18px 10px;
}
.wiz-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}
.wiz-back svg { width: 20px; height: 20px; }
.wiz-back[hidden] { visibility: hidden; }
.wiz-titles { flex: 1; min-width: 0; }
.wiz-eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}
.wiz-title {
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2px;
}
.wiz-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--lime);
  color: var(--ink-lime);
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.wiz-logo[hidden] { display: none; }

/* timer "hold" tipo cine */
.wiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 13px;
  background: rgba(216, 242, 79, 0.16);
  border: 1px solid rgba(216, 242, 79, 0.5);
  color: var(--lime);
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.wiz-timer[hidden] { display: none; }
.wiz-timer svg { width: 15px; height: 15px; }
.wiz-timer.low {
  background: rgba(224, 89, 77, 0.18);
  border-color: rgba(224, 89, 77, 0.6);
  color: #f0978e;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.55; } }

/* toast */
.toast {
  position: absolute;
  z-index: 50;
  top: 56px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(224, 89, 77, 0.95);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-130%);
  transition: transform 0.3s ease;
}
.toast[hidden] { display: none; }
.toast.show { transform: translateY(0); }
.toast svg { width: 18px; height: 18px; flex: 0 0 auto; }

.wiz-progress {
  height: 4px;
  margin: 2px 18px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.wiz-progress span {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime-2), var(--lime));
  transition: width 0.35s ease;
}

/* ---------- Wizard body / steps ---------- */
.wiz-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 16px 16px 18px;
}
.wiz-body::-webkit-scrollbar { display: none; }
.step { display: none; }
.step.active { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 10px;
  font-size: 0.95rem;
  font-weight: 600;
}
.step > .block-head:first-child { margin-top: 4px; }
.block-head > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.block-head svg { width: 16px; height: 16px; opacity: 0.85; }
.hint { font-size: 0.74rem; font-weight: 500; color: var(--muted); }

/* chips */
.chip-row, .date-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar, .date-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip.active { background: var(--white-chip); color: #20140e; border-color: transparent; }

/* segmented */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.seg-btn svg { width: 17px; height: 17px; }
.seg-btn.active { background: var(--white-chip); color: #20140e; }

/* date pills */
.date-pill {
  flex: 0 0 auto;
  width: 86px;
  padding: 12px 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}
.date-pill .d-dow { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.date-pill .d-num { display: block; margin-top: 3px; font-size: 1.45rem; font-weight: 700; line-height: 1; }
.date-pill .d-mon { display: block; margin-top: 2px; font-size: 0.64rem; text-transform: capitalize; color: var(--faint); }
.date-pill.sel { background: var(--white-chip); color: #20140e; }
.date-pill.sel .d-dow, .date-pill.sel .d-mon { color: #8a5a3f; }

/* slots as grid */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.slot {
  padding: 13px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}
.slot.sel { background: var(--white-chip); color: #20140e; }
.slot.full { opacity: 0.38; text-decoration: line-through; }

/* field */
.field-input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 0.92rem;
}
.field-input::placeholder { color: var(--faint); }
.field-input:focus { outline: none; border-color: rgba(216, 242, 79, 0.5); }

/* member picker (padrón de socios) */
.picker { position: relative; }
.suggest {
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 10, 6, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.suggest:empty { display: none; }
.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.suggest-item:first-child { border-top: none; }
.suggest-item .num {
  flex: 0 0 auto;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--ink-lime);
  background: var(--lime);
  padding: 3px 8px;
  border-radius: 999px;
}
.suggest-item .nm { flex: 1; font-size: 0.88rem; font-weight: 600; }
.suggest-item .add { color: var(--lime); display: grid; place-items: center; }
.suggest-item .add svg { width: 18px; height: 18px; }
.suggest-empty { padding: 12px 14px; color: var(--muted); font-size: 0.82rem; }

.guests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
}
.guest-chip .gnum { color: var(--lime); font-weight: 700; font-size: 0.72rem; }
.guest-chip button {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.guest-chip button svg { width: 12px; height: 12px; }

/* auto pill */
.auto-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(216, 242, 79, 0.5);
  background: rgba(216, 242, 79, 0.14);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
}
.auto-pill svg { width: 17px; height: 17px; color: var(--lime); }
.auto-pill > span {
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.auto-pill.sel { background: var(--lime); color: var(--ink-lime); border-color: transparent; }
.auto-pill.sel svg { color: var(--ink-lime); }
.auto-pill.sel > span { color: rgba(26, 38, 6, 0.7); }

/* legend + micro grid */
.micro-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 4px 2px 10px;
  font-size: 0.66rem;
  color: var(--muted);
}
.micro-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #888; }
.dot.available { background: var(--lime); }
.dot.reserved { background: #e3a857; }
.dot.maintenance { background: #d98032; }
.dot.weather { background: #5aa6d0; }
.dot.broken { background: #e0594d; }

.micro-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.micro {
  position: relative;
  min-height: 50px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: transform 0.1s ease;
}
.micro:active { transform: scale(0.94); }
.micro .m-name { font-size: 0.78rem; font-weight: 700; }
.micro .m-dot { position: absolute; top: 5px; left: 6px; width: 7px; height: 7px; border-radius: 50%; background: #888; }
.micro .m-dot.available { background: var(--lime); }
.micro .m-dot.reserved, .micro .m-dot.event { background: #e3a857; }
.micro .m-dot.maintenance { background: #d98032; }
.micro .m-dot.weather { background: #5aa6d0; }
.micro .m-dot.broken { background: #e0594d; }
.micro .m-ic { position: absolute; bottom: 4px; right: 6px; }
.micro .m-ic svg { width: 11px; height: 11px; opacity: 0.75; }
.micro.available { border-color: rgba(216, 242, 79, 0.42); }
.micro[disabled] { opacity: 0.4; cursor: not-allowed; }
.micro.maintenance .m-name { color: #efb27a; }
.micro.weather .m-name { color: #9cd0ea; }
.micro.broken .m-name { color: #f0978e; }
.micro.reserved .m-name, .micro.event .m-name { color: var(--muted); }
.micro.sel { background: var(--white-chip); color: #20140e; border-color: transparent; }
.micro.sel .m-name { color: #20140e; }

/* coach card */
.coach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.coach-card img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.coach-text { flex: 1; min-width: 0; }
.coach-text strong { display: block; font-size: 0.92rem; }
.coach-text span { font-size: 0.76rem; color: var(--muted); }
.switch { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); transition: 0.2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.2s; }
.switch input:checked + .track { background: var(--lime); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* summary card (paso 3) */
.summary-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 16px;
}
.sum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.sum-row:first-child { border-top: none; }
.sum-row span { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.sum-row span svg { width: 15px; height: 15px; opacity: 0.8; }
.sum-row strong { font-weight: 700; text-align: right; }

/* ---------- Action bar ---------- */
.wiz-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(16, 9, 6, 0.55);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.wiz-mini { flex: 1; min-width: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.wiz-mini strong { display: block; color: var(--text); font-size: 0.9rem; }
.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--lime), var(--lime-2));
  color: var(--ink-lime);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(182, 226, 54, 0.3);
}
.cta:disabled { opacity: 0.4; box-shadow: none; }
.cta svg { width: 18px; height: 18px; }
.cta.full { flex: 1; }

/* ---------- Boleto / ticket ---------- */
.ticket {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(28, 16, 11, 0.66);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.ticket-hero { position: relative; height: 118px; overflow: hidden; }
.ticket-hero img { width: 100%; height: 100%; object-fit: cover; }
.ticket-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 8, 4, 0.2), rgba(28, 16, 11, 0.92)); }
.ticket-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink-lime);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticket-badge svg { width: 13px; height: 13px; }
.ticket-hero .t-brand {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 12px;
  color: #fff;
}
.ticket-hero .t-brand b {
  display: block;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.ticket-hero .t-brand small { font-size: 0.64rem; letter-spacing: 0.2em; opacity: 0.8; }

.ticket-rows { padding: 8px 18px; }
.t-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.t-row:first-child { border-top: none; }
.t-row .t-k { font-size: 0.78rem; color: var(--muted); }
.t-row .t-v { font-size: 0.95rem; font-weight: 700; text-align: right; }
.t-big .t-v { font-size: 1.15rem; }

.ticket-perf {
  position: relative;
  height: 24px;
  margin: 0 0;
}
.ticket-perf::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 18px;
  right: 18px;
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
}
.ticket-perf .notch {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: #140a06;
  transform: translateY(-50%);
}
.ticket-perf .notch.l { left: -11px; }
.ticket-perf .notch.r { right: -11px; }

.ticket-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 18px 20px;
}
.qr {
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}
.qr svg { width: 100%; height: 100%; display: block; }
.ticket-foot .t-info { flex: 1; min-width: 0; }
.ticket-foot .t-folio { font-family: "Chakra Petch", sans-serif; font-size: 1.05rem; letter-spacing: 0.1em; }
.ticket-foot .t-note { margin-top: 6px; font-size: 0.74rem; color: var(--muted); line-height: 1.45; }

.ticket-actions { display: flex; gap: 10px; margin-top: 16px; }
.ticket-actions button { flex: 1; min-height: 52px; border-radius: 16px; font-weight: 700; font-size: 0.92rem; }
.btn-primary { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--ink-lime); }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text); }

/* warning inline (horario lleno) */
.notice {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(243, 199, 90, 0.4);
  background: rgba(243, 199, 90, 0.12);
  font-size: 0.84rem;
  line-height: 1.5;
}
.notice strong { color: #f3c75a; }

@media (max-width: 480px) {
  .stage { padding: 0; }
  .stage::before { display: none; }
  .phone { max-width: none; height: 100vh; border-radius: 0; box-shadow: none; }
}
