/* Reservame · sitio público de reservas */
.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: 20px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

/* ---- Barra superior ---- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--court); display: grid; place-items: center; flex: none; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 19px; line-height: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar nav a.link { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.topbar nav a.link:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 640px) { .topbar nav a.link { display: none; } }

/* ---- Portada ---- */
.hero { padding-block: 36px 26px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 560px) { .court-card { display: none; } .hero { padding-block: 24px 16px; } }
.hero-where { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.hero-where::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--turf); box-shadow: 0 0 0 4px var(--turf-soft); }
.hero h1 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: clamp(36px, 5.8vw, 66px); line-height: 1;
  letter-spacing: .01em; margin-top: 14px; }
.hero h1 .hl { color: var(--court); }
.hero-lema { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); margin-top: 14px; max-width: 34ch; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.court-card { position: relative; border-radius: 12px; padding: 18px; background: var(--court); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--court) 80%, #000); }
.court-card svg { width: 100%; height: auto; display: block; }
.court-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 12px; color: #fff; }
.court-meta .eyebrow { color: rgba(255,255,255,.7); }
.scoreboard { background: #151A22; color: #fff; border-radius: 10px; padding: 8px 14px; display: flex; gap: 14px; align-items: baseline; }
.scoreboard b { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--ball); font-variant-numeric: tabular-nums; }
.scoreboard span { font-size: 12px; line-height: 1.2; color: rgba(255,255,255,.75); max-width: 12ch; }
.ball { animation: bote 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes bote { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-46px, 18px); } }

/* ---- Tableros LED ---- */
.boards { padding-block: 8px 20px; }

/* ---- Cuerpo ---- */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; padding-bottom: 40px; }
@media (max-width: 960px) { .main-grid { grid-template-columns: 1fr; } }
.side { display: grid; gap: 16px; position: sticky; top: 76px; }
@media (max-width: 960px) { .side { position: static; } }

/* ---- Tablero de reserva ---- */
.booking { padding: 0; overflow: hidden; scroll-margin-top: 76px; }
.status-hero > div:first-child { flex: none; }
.status-hero .eyebrow { white-space: nowrap; }
.booking-head { padding: 22px 24px 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); }
.booking-head h2 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; font-size: 30px; line-height: 1; }
.progress { display: flex; gap: 4px; }
.progress i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.progress i.on { background: var(--court); }
.progress i.now { background: var(--ball); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

.step { border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 16px 24px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--font-display); background: var(--surface-2); color: var(--ink-3); }
.step.done .step-n { background: var(--court); color: var(--court-ink); }
.step.active .step-n { background: var(--ball); color: var(--ball-ink); }
.step-title { font-weight: 700; font-size: 16px; }
.step-value { color: var(--ink-2); font-size: 14px; }
.step.locked .step-title { color: var(--ink-3); }
.step-body { padding: 0 24px 22px 72px; }
@media (max-width: 560px) { .step-row { padding: 14px 16px; } .step-body { padding: 0 16px 18px; } }

.opts { display: grid; gap: 10px; }
.opts.sports { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt { position: relative; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 12px 14px;
  cursor: pointer; display: grid; gap: 2px; transition: border-color .12s, transform .12s, box-shadow .12s; }
.opt:hover { border-color: var(--court); transform: translateY(-1px); }
.opt.sel { border-color: var(--court); box-shadow: inset 0 0 0 1.5px var(--court); background: var(--court-soft); }
.opt[disabled] { opacity: .45; cursor: not-allowed; transform: none; border-style: dashed; }
.opt .t { font-weight: 700; }
.opt .s { font-size: 13px; color: var(--ink-2); }
.opt .emoji { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.opt .price { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--court); }
.opts.courts { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.days { display: grid; grid-auto-flow: column; grid-auto-columns: 78px; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.day { scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 4px 8px; text-align: center; cursor: pointer; }
.day .dw { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.day .dn { font: 600 28px/1 var(--font-display); margin: 2px 0; }
.day .dl { font-size: 11.5px; color: var(--turf); font-weight: 700; }
.day.sel { background: var(--court); color: #fff; border-color: var(--court); }
.day.sel .dw, .day.sel .dl { color: var(--ball); }
.day[disabled] { opacity: .4; cursor: not-allowed; }
.day[disabled] .dl { color: var(--ink-3); }

.durs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dur-blocks { display: flex; gap: 3px; margin: 6px 0 4px; }
.dur-blocks i { flex: 1; max-width: 16px; height: 8px; border-radius: 2px; background: var(--court); opacity: .85; }
.opt.sel .dur-blocks i { background: var(--court); }

.times { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.time { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 10px 10px 8px; cursor: pointer; text-align: center; }
.time b { display: block; font: 600 21px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.time span { font-size: 12.5px; color: var(--ink-2); }
.time:hover { border-color: var(--court); }
.time.sel { background: var(--court); color: var(--court-ink); border-color: var(--court); }
.time.sel span { color: inherit; opacity: .85; }

.phone { display: grid; grid-template-columns: 76px 1fr; }
.phone .pre { display: grid; place-items: center; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-2); font-weight: 700; color: var(--ink-2); }
.phone .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.otp { display: flex; gap: 8px; }
.otp input { width: 46px; height: 54px; text-align: center; font: 600 21px/1 var(--font-display); border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.otp input:focus { outline: none; border-color: var(--court); box-shadow: 0 0 0 3px var(--court-soft); }
.verified { display: inline-flex; gap: 8px; align-items: center; color: var(--turf); font-weight: 700; }

.summary { background: var(--surface-2); border-radius: 8px; padding: 16px; display: grid; gap: 8px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.summary .row b { text-align: right; }
.summary .total { border-top: 1px dashed var(--ink-3); padding-top: 10px; margin-top: 4px; font-size: 16px; }
.summary .total b { font: 600 20px/1 var(--font-display); }
.summary .ade b { color: var(--court); }

/* ---- Entrada / ticket ---- */
.ticket { display: grid; grid-template-columns: 1fr 250px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
@media (max-width: 720px) { .ticket { grid-template-columns: 1fr; } }
.ticket-main { padding: 24px; position: relative; }
.ticket-main::after { content: ""; position: absolute; right: -1px; top: 16px; bottom: 16px; border-right: 2px dashed var(--line); }
@media (max-width: 720px) { .ticket-main::after { right: 16px; left: 16px; top: auto; bottom: 0; border-right: 0; border-bottom: 2px dashed var(--line); } }
.ticket-stub { padding: 24px; background: var(--surface-2); display: grid; align-content: start; gap: 12px; justify-items: center; text-align: center; }
.ticket h2 { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; font-size: 32px; line-height: 1; margin-top: 8px; }
.ticket .when { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.ticket .when div { display: grid; gap: 2px; }
.ticket .when b { font: 600 25px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.code-big { font: 600 24px/1 var(--font-mono); letter-spacing: .12em; background: var(--court); color: #fff; padding: 10px 14px; border-radius: 10px; }
.qr-box { background: #fff; border-radius: 12px; padding: 10px; width: 100%; max-width: 210px; border: 1px solid var(--line); }
.countdown { font: 600 40px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--warn); }
.countdown.low { color: var(--bad); }
.status-hero { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 8px; margin-top: 18px; }
.status-hero.wait { background: var(--court-soft); }
.status-hero.ok { background: var(--turf-soft); }
.status-hero.bad { background: var(--bad-soft); }
.status-hero.pay { background: var(--warn-soft); }
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--court) calc(var(--p) * 1%), var(--line) 0); }
.ring::after { content: attr(data-label); width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font: 600 12px/1 var(--font-display); }
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload label.btn { cursor: pointer; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }

/* ---- Información ---- */
.info-card { padding: 18px; display: grid; gap: 12px; }
.info-card h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: 500; letter-spacing: .03em; font-size: 19px; }
.hours { display: grid; gap: 4px; font-size: 14px; }
.hours div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.hours div.today { font-weight: 700; color: var(--court); }
.hours span:last-child { font-variant-numeric: tabular-nums; }
.amen { display: flex; flex-wrap: wrap; gap: 6px; }
.section-title { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.05; }
.courts-info { display: block; margin-top: 16px; }
.court-tile { padding: 16px; display: grid; gap: 8px; }
.court-tile .mini { height: 70px; border-radius: 10px; background: var(--court); position: relative; overflow: hidden; }
.court-tile .mini.turf { background: var(--turf); }
.court-tile .mini.wood { background: #C98B4B; }
.court-tile .mini::before { content: ""; position: absolute; inset: 10px; border: 2px solid var(--court-line); border-radius: 2px; }
.court-tile .mini::after { content: ""; position: absolute; top: 10px; bottom: 10px; left: 50%; border-left: 2px solid var(--court-line); }
.court-tile h4 { font-size: 17px; }
.court-tile .price { font: 600 18px/1 var(--font-display); color: var(--court); }
.info-band { padding-block: 10px 48px; }
.footer { border-top: 1px solid var(--line); padding-block: 22px; color: var(--ink-3); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.resume { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px;
  background: var(--warn-soft); margin-bottom: 16px; border-radius: 10px; }
/* Dentro del grid de dos columnas ocupa la fila entera: si no, empuja
   el tablero de reserva a la columna del costado. */
.main-grid > .resume { grid-column: 1 / -1; margin-bottom: 0; }
.skeleton { height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ===== Carrusel de canchas ===== */
.carrusel { position: relative; }
.car-pista { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(255px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 6px; }
.car-pista::-webkit-scrollbar { display: none; }
.car-pista > .court-tile { scroll-snap-align: start; }
.court-tile .btn { margin-top: 10px; justify-self: start; }
.car-nav { position: absolute; top: 50%; transform: translateY(-60%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); display: none; z-index: 2; }
.car-nav:hover { border-color: var(--court); color: var(--court); }
.car-nav[disabled] { opacity: .35; cursor: default; }
.car-nav.prev { left: -8px; }
.car-nav.next { right: -8px; }
.car-puntos { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.car-puntos button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: width .2s, background .2s; }
.car-puntos button.on { width: 22px; background: var(--court); }
@media (min-width: 900px) { .car-nav { display: grid; place-items: center; } }

/* ===== Lista de complejos (enlace sin complejo) ===== */
body.directorio .boards, body.directorio .side, body.directorio .info-band { display: none; }
body.directorio .main-grid { grid-template-columns: 1fr; }
.dir-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; padding: 22px 22px 0; }
.dir-grid { display: grid; gap: 12px; padding: 16px 22px 24px; }
.dir-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, box-shadow .15s; }
.dir-card:hover { border-color: var(--court); transform: translateY(-1px); box-shadow: var(--shadow); }
.dir-card h4 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.dir-mini { width: 54px; height: 54px; border-radius: var(--radius); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-size: 24px; overflow: hidden; }
.dir-mini img { width: 100%; height: 100%; object-fit: cover; }
.dir-precio { text-align: right; display: grid; }
.dir-precio b { font-family: var(--font-display); font-size: 22px; color: var(--court); }
@media (max-width: 620px) { .dir-card { grid-template-columns: auto 1fr; } .dir-precio { grid-column: 2; text-align: left; } }

/* ===== Verificaciones bloqueadas por abuso ===== */
.aviso-bloqueo { display: grid; gap: 8px; justify-items: start; padding: 14px; border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); }
.aviso-bloqueo b { font-family: var(--font-display); font-size: 17px; }
.aviso-bloqueo p { margin: 0; }
body.directorio .topbar nav .link { display: none; }

/* ===== Carrusel de canchas en la portada ===== */
.hero-car { position: relative; border-radius: 10px; overflow: hidden; }
.hc-pista { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hc-pista::-webkit-scrollbar { display: none; }
.hc-slide { position: relative; scroll-snap-align: start; cursor: pointer; }
.hc-slide svg, .hc-slide img { width: 100%; display: block; }
.hc-slide svg { height: auto; }
.hc-slide img { aspect-ratio: 400 / 210; object-fit: cover; border-radius: 8px; }
.hc-precio { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; font-family: var(--font-display); font-size: 18px; padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(2px); }
.hc-precio i { font-family: var(--font-body); font-style: normal; font-size: 12px; opacity: .8; }
.hc-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 999px; border: 0; background: rgba(255,255,255,.85); color: #111; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.court-card:hover .hc-nav, .hc-nav:focus-visible { opacity: 1; }
.hc-nav.prev { left: 8px; }
.hc-nav.next { right: 8px; }
.hc-puntos { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.hc-puntos button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.4); cursor: pointer; transition: width .2s, background .2s; }
.hc-puntos button.on { width: 20px; background: var(--ball); }
.court-card.una .hc-nav, .court-card.una .hc-puntos { display: none; }

/* ===== Banda del código QR para compartir ===== */
.qr-band { padding: 56px 0; background: var(--surface-2); border-top: 1px solid var(--line); }
.qr-wrap { display: flex; gap: 40px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.qr-texto { flex: 1 1 320px; max-width: 46ch; }
.qr-texto p { margin: 10px 0 20px; color: var(--ink-2); }
.qr-caja { margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
           box-shadow: 0 10px 30px rgba(15, 23, 42, .07); text-align: center; flex: 0 0 auto; }
.qr-caja svg { display: block; border-radius: 6px; }
.qr-caja figcaption { margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 720px) { .qr-band { padding: 40px 0; } .qr-wrap { justify-content: center; text-align: center; } .qr-texto { max-width: none; } }

/* ===== Contacto opcional cuando el complejo no tiene bot ===== */
.opc { font-weight: normal; font-size: .85em; color: var(--ink-3); }
.hint.falta { color: var(--ball-ink, var(--warn)); font-weight: 600; }

/* =====================================================================
   Portal de Reservame (la lista de complejos).
   Identidad propia: no es ninguno de los temas que elige un complejo,
   para que nadie confunda la plataforma con un cliente.
   ===================================================================== */
:root[data-tema="PORTAL"] {
  --court: #101C33;            /* tinta más profunda que el azul de fábrica */
  --court-ink: #FFFFFF;
  --court-soft: #E2E8F4;
  --ball: #FF6B3D;             /* coral, distinto del ámbar de Cancha azul */
  --ball-ink: #2A0C00;
  --turf: #0E8F6F;
  --turf-soft: #DDF2EC;
  --ground: #F2F4F8;
  --surface: #FFFFFF;
  --surface-2: #E7EBF2;
  --line: #D3DAE5;
  --ink: #0C1524;
  --ink-2: #4A5668;
  --ink-3: #7B869A;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, sans-serif;
}
body.directorio .hero-car { background: linear-gradient(140deg, #101C33 0%, #1B2E4F 100%); }
body.directorio .section-title, body.directorio #heroTitle { letter-spacing: -.02em; }
body.directorio .hl { color: var(--ball); }
