/* ==========================================================================
   GestionaFitness Clubs — PWA de socios
   Móvil primero. Sobre 900px se centra en una columna tipo "teléfono ancho".
   ========================================================================== */

body {
  background: var(--bg);
  overscroll-behavior-y: none;
}

#app {
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 700px) {
  body { background: var(--bg-elev); }
  #app { box-shadow: 0 0 0 1px var(--border); background: var(--bg); }
}

/* ==========================================================================
   Pantalla de bienvenida / autenticación
   ========================================================================== */

.auth {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
}
.auth-hero {
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 12px; padding: 30px 0;
}
/* El símbolo de la marca, suelto: el aro ya es una forma cerrada y meterlo
   dentro de una pastilla de color le quitaba aire y tapaba el degradado. */
.auth-logo {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  filter: drop-shadow(0 10px 30px rgba(95, 226, 124, .34));
  margin-bottom: 6px;
}
.auth-hero h1 { font-size: 1.7rem; letter-spacing: -.025em; }
.auth-hero p  { color: var(--text-soft); max-width: 330px; margin: 0; }
.auth-actions { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.auth-legal { text-align: center; font-size: .7rem; color: var(--text-muted); margin-top: 16px; line-height: 1.55; }

.auth-form { padding-top: 8px; }
.auth-back {
  background: none; border: 0; color: var(--text-soft); font-size: .88rem; font-weight: 600;
  cursor: pointer; padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.auth-back:hover { color: var(--text); }

/* Pasos del alta */
.steps { display: flex; gap: 6px; margin: 4px 0 20px; }
.steps i {
  flex: 1; height: 4px; border-radius: 99px; background: var(--border);
  transition: background .3s;
}
.steps i.done { background: var(--accent); }
.step-label { font-size: .74rem; color: var(--text-muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

/* Tarjetas de tarifa en el alta */
.plan-pick { display: flex; flex-direction: column; gap: 10px; }
.plan-opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border: 1.5px solid var(--border); border-radius: var(--r);
  background: var(--bg-card); cursor: pointer; transition: all .16s; position: relative;
}
.plan-opt:hover { border-color: var(--border-strong); }
.plan-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt input { display: none; }
.plan-opt .p-radio {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--border-strong);
  flex: 0 0 auto; margin-top: 2px; display: grid; place-items: center; transition: all .16s;
}
.plan-opt.sel .p-radio { border-color: var(--accent); }
.plan-opt.sel .p-radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.plan-opt .p-name  { font-weight: 650; font-size: .95rem; }
.plan-opt .p-desc  { font-size: .78rem; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
.plan-opt .p-price { margin-left: auto; text-align: right; flex: 0 0 auto; }
.plan-opt .p-price b { font-size: 1.05rem; font-weight: 700; display: block; }
.plan-opt .p-price span { font-size: .7rem; color: var(--text-muted); }
.plan-opt .p-tag {
  position: absolute; top: -8px; right: 12px;
  background: var(--accent); color: var(--accent-text);
  font-size: .62rem; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ==========================================================================
   Cabecera de la app
   ========================================================================== */

.app-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--border-soft);
  padding: env(safe-area-inset-top, 0px) 16px 0;
}
.app-header .hd {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
}
.hd-logo {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  filter: drop-shadow(0 3px 10px rgba(95, 226, 124, .26));
}
.hd-club { font-size: .93rem; font-weight: 650; line-height: 1.15; }
.hd-sub  { font-size: .7rem; color: var(--text-muted); }
.hd-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-soft);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
  font-size: .95rem; transition: all .15s; position: relative;
}
.hd-btn:hover { background: var(--bg-card-hover); color: var(--text); }
.hd-btn .dot {
  position: absolute; top: 5px; right: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger); border: 2px solid var(--bg);
}

.view { padding: 16px; animation: gcFade .18s ease; }
.view-title { font-size: 1.32rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 3px; }
.view-sub   { font-size: .82rem; color: var(--text-muted); margin-bottom: 16px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 22px 0 10px;
}
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: .95rem; font-weight: 650; }
.section-head a  { font-size: .78rem; font-weight: 600; }

/* ==========================================================================
   Barra de pestañas inferior
   ========================================================================== */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  max-width: 620px; margin: 0 auto;
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar button {
  background: none; border: 0; cursor: pointer;
  height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-muted); font-size: .64rem; font-weight: 600;
  transition: color .15s; position: relative; padding: 0;
}
.tabbar button .ic { font-size: 1.24rem; line-height: 1; transition: transform .18s; }
.tabbar button.active { color: var(--accent); }
.tabbar button.active .ic { transform: translateY(-1px) scale(1.06); }
.tabbar button .badge {
  position: absolute; top: 9px; left: 50%; margin-left: 5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 99px;
  font-size: .6rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg-elev);
}

/* ==========================================================================
   INICIO
   ========================================================================== */

.greet { margin-bottom: 16px; }
.greet h1 { font-size: 1.45rem; letter-spacing: -.025em; }
.greet p  { color: var(--text-muted); font-size: .84rem; margin: 2px 0 0; }

/* Tarjeta destacada: próxima clase.
   Es el único sitio donde se usa el degradado del logotipo a toda superficie:
   así la pantalla de inicio tiene un solo golpe de marca y no cinco. Encima va
   tinta oscura, no blanca: sobre el verde claro del logo el blanco da 1,6:1 y
   la hora de la clase no se leería. */
.next-card {
  border-radius: var(--r-lg); padding: 16px;
  background: var(--brand-grad);
  color: var(--accent-text); position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(95, 226, 124, .22);
}
.next-card::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.18);
}
.next-card .nc-tag {
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  opacity: .82; margin-bottom: 7px;
}
.next-card h3 { font-size: 1.28rem; margin-bottom: 3px; }
.next-card .nc-meta { font-size: .84rem; opacity: .9; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.next-card .nc-count {
  margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(4,36,15,.22);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: .8rem; position: relative;
}
.next-card .nc-btn {
  background: rgba(4,36,15,.12); border: 1px solid rgba(4,36,15,.28); color: inherit;
  padding: 6px 12px; border-radius: 99px; font-size: .76rem; font-weight: 650; cursor: pointer;
}
.next-card .nc-btn:hover { background: rgba(4,36,15,.2); }

/* Aviso de cuota pendiente */
.alert-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px; border-radius: var(--r);
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 34%, transparent);
}
.alert-card.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 34%, transparent); }
.alert-card .a-ico { font-size: 1.15rem; flex: 0 0 auto; }
.alert-card .a-title { font-weight: 650; font-size: .88rem; margin-bottom: 2px; }
.alert-card .a-text  { font-size: .78rem; color: var(--text-soft); line-height: 1.45; }

/* Accesos rápidos */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.quick button {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 13px 6px 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: .68rem; font-weight: 600; color: var(--text-soft); transition: all .15s;
}
.quick button:hover { background: var(--bg-card-hover); border-color: var(--border-strong); color: var(--text); }
.quick button .q-ic { font-size: 1.3rem; }

/* Avisos del club */
.news {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg-card); padding: 14px; cursor: pointer; transition: all .15s;
}
.news:hover { background: var(--bg-card-hover); }
.news + .news { margin-top: 9px; }
.news .n-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.news h4 { font-size: .9rem; font-weight: 650; }
.news p  { font-size: .8rem; color: var(--text-soft); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news .n-date { font-size: .7rem; color: var(--text-muted); margin-top: 7px; }

/* ==========================================================================
   CLASES
   ========================================================================== */

.week-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 12px;
}
.week-nav .wn-label { font-size: .86rem; font-weight: 650; text-transform: capitalize; }

.day-strip {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-pill {
  flex: 0 0 auto; width: 50px; padding: 9px 0;
  border-radius: var(--r); border: 1px solid var(--border); background: var(--bg-card);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: all .15s;
}
.day-pill .dp-day { font-size: .64rem; font-weight: 650; text-transform: uppercase; color: var(--text-muted); letter-spacing: .04em; }
.day-pill .dp-num { font-size: 1.05rem; font-weight: 700; }
.day-pill .dp-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.day-pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.day-pill.active .dp-day { color: var(--accent-text); opacity: .85; }
.day-pill.active .dp-dot { background: var(--accent-text); }
.day-pill.today:not(.active) { border-color: var(--accent); }
.day-pill.past { opacity: .45; }

.filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

/* Tarjeta de clase */
.class-card {
  display: flex; gap: 12px; padding: 13px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  position: relative; overflow: hidden; transition: all .15s;
}
/* El hueco lo pone el envoltorio: la tarjeta ya no va sola, lleva debajo el
   desplegable de plazas. */
.class-item + .class-item { margin-top: 9px; }
.class-card { cursor: pointer; }
.class-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--act, var(--accent));
}
/* `background-color` y no `background`: el atajo borraría la foto de fondo */
.class-card.mine { border-color: color-mix(in srgb, var(--accent) 42%, transparent); background-color: var(--accent-soft); }
.class-card.blocked { opacity: .58; }
.class-card.cancelled { opacity: .6; }
.class-card.cancelled .cc-name { text-decoration: line-through; }

/* --------------------------------------------------------------------------
   Foto de la actividad de fondo
   --------------------------------------------------------------------------
   La foto se intuye; lo que manda es la información. Por eso va debajo de una
   capa que la atenúa —oscura en modo oscuro, clara en modo claro— más densa a
   la izquierda, que es donde está el texto, y más abierta a la derecha, donde
   solo hay un botón de color sólido.

   Lo demás no se toca: la franja de color de la actividad sigue siendo la
   misma, y el botón, las insignias y la barra de ocupación conservan sus
   colores. Solo cambia el fondo.
   -------------------------------------------------------------------------- */

.class-card.has-photo {
  background-image: var(--photo);
  background-size: cover;
  background-position: center;
  /* La foto se corta en el borde y no por debajo: si la deja pasar, el borde
     coge el color de la imagen y cada tarjeta acaba con un borde distinto.
     El borde es del conjunto de la tarjeta, no de la foto. */
  background-clip: padding-box;
}
.class-card.has-photo > * { position: relative; z-index: 1; }

.class-card.has-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg,
    rgba(10, 16, 28, .82) 0%,
    rgba(10, 16, 28, .74) 58%,
    rgba(10, 16, 28, .60) 100%);
  /* Desenfocar y bajar el color de la foto hace más por la lectura que subir
     la opacidad, y deja que la foto se vea. Donde no haya `backdrop-filter`,
     la capa sola ya basta para leer. */
  backdrop-filter: saturate(.75) blur(1.5px);
  -webkit-backdrop-filter: saturate(.75) blur(1.5px);
}
/* La franja de color por encima de la capa: es lo que identifica la actividad */
.class-card.has-photo::before { z-index: 2; }

/* Con foto, el texto apagado deja de leerse: pasa a blanco con algo de sombra.
   Solo dentro de `.has-photo`, para no tocar las tarjetas sin foto. */
.class-card.has-photo,
.class-card.has-photo .cc-name { color: #fff; }
.class-card.has-photo .cc-meta,
.class-card.has-photo .cc-time .t2,
.class-card.has-photo .cc-occ .o-txt { color: rgba(255, 255, 255, .92); }
.class-card.has-photo .cc-time .t1,
.class-card.has-photo .cc-name,
.class-card.has-photo .cc-meta,
.class-card.has-photo .cc-time .t2,
.class-card.has-photo .cc-occ .o-txt { text-shadow: 0 1px 3px rgba(0, 0, 0, .65); }
/* La barra de ocupación necesita más cuerpo para verse sobre la foto */
.class-card.has-photo .gc-bar { background: rgba(255, 255, 255, .22); }

/* Modo claro: la capa aclara en vez de oscurecer y el texto se queda oscuro,
   que es lo que se lee sobre un fondo claro. */
html[data-theme="light"] .class-card.has-photo::after {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .88) 0%,
    rgba(255, 255, 255, .82) 58%,
    rgba(255, 255, 255, .70) 100%);
}
html[data-theme="light"] .class-card.has-photo,
html[data-theme="light"] .class-card.has-photo .cc-name { color: var(--text); }
/* En claro el texto apagado sube un escalón (`--text-soft`, más oscuro que
   `--text-muted`): con la capa más transparente, el gris de siempre se pierde
   encima de la foto. */
html[data-theme="light"] .class-card.has-photo .cc-meta,
html[data-theme="light"] .class-card.has-photo .cc-time .t2,
html[data-theme="light"] .class-card.has-photo .cc-occ .o-txt { color: var(--text-soft); }
html[data-theme="light"] .class-card.has-photo .cc-time .t1,
html[data-theme="light"] .class-card.has-photo .cc-name,
html[data-theme="light"] .class-card.has-photo .cc-meta,
html[data-theme="light"] .class-card.has-photo .cc-time .t2,
html[data-theme="light"] .class-card.has-photo .cc-occ .o-txt { text-shadow: 0 1px 3px rgba(255, 255, 255, .95); }
html[data-theme="light"] .class-card.has-photo .gc-bar { background: rgba(15, 23, 42, .14); }

/* Reservada + foto: el verde de «es tuya» iría por debajo de la capa y no se
   vería, así que se tiñe la propia capa: un velo verde encima del de siempre.
   Son dos degradados apilados y no un `color-mix()` a propósito — de esta capa
   depende que el texto se lea, y no puede quedarse en nada donde `color-mix`
   no exista. */
.class-card.has-photo.mine::after {
  background:
    linear-gradient(90deg, rgba(95, 226, 124, .17) 0%, rgba(95, 226, 124, 0) 62%),
    linear-gradient(90deg,
      rgba(10, 16, 28, .82) 0%,
      rgba(10, 16, 28, .74) 58%,
      rgba(10, 16, 28, .60) 100%);
}
html[data-theme="light"] .class-card.has-photo.mine::after {
  background:
    linear-gradient(90deg, rgba(13, 119, 37, .13) 0%, rgba(13, 119, 37, 0) 62%),
    linear-gradient(90deg,
      rgba(255, 255, 255, .88) 0%,
      rgba(255, 255, 255, .82) 58%,
      rgba(255, 255, 255, .70) 100%);
}

.cc-time { flex: 0 0 52px; padding-left: 6px; }
.cc-time .t1 { font-size: .96rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc-time .t2 { font-size: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cc-body { flex: 1 1 auto; min-width: 0; }
.cc-name { font-size: .95rem; font-weight: 650; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cc-meta { font-size: .74rem; color: var(--text-muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 3px 10px; }
.cc-occ  { margin-top: 9px; display: flex; align-items: center; gap: 9px; }
.cc-occ .gc-bar { flex: 1 1 auto; }
.cc-occ .o-txt { font-size: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-action { flex: 0 0 auto; display: flex; align-items: center; }
.cc-btn {
  min-width: 82px; padding: 8px 12px; border-radius: 99px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-text);
  font-size: .78rem; font-weight: 650; cursor: pointer; transition: all .15s;
}
.cc-btn:hover:not(:disabled) { background: var(--accent-hover); }
.cc-btn.out { background: transparent; color: var(--accent); }
.cc-btn.wl  { background: var(--warn); border-color: var(--warn); color: #3a2500; }
.cc-btn:disabled { opacity: .5; cursor: not-allowed; background: var(--bg-card); border-color: var(--border); color: var(--text-muted); }

/* ==========================================================================
   RESERVAS / PAGOS — filas
   ========================================================================== */

.row-card {
  display: flex; align-items: center; gap: 12px; padding: 13px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  transition: all .15s;
}
.row-card + .row-card { margin-top: 9px; }
.row-card .rc-ico {
  width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 1.05rem;
  background: var(--accent-soft); color: var(--accent);
}
.row-card .rc-title { font-size: .89rem; font-weight: 620; }
.row-card .rc-sub   { font-size: .74rem; color: var(--text-muted); margin-top: 2px; }
.row-card .rc-right { margin-left: auto; text-align: right; flex: 0 0 auto; }
.row-card .rc-amount { font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tarjeta de cuota (pagos) */
.plan-card {
  border-radius: var(--r-lg); padding: 18px;
  background: linear-gradient(150deg, #1e293b, #0f172a);
  border: 1px solid var(--border-strong); color: #f1f5f9;
  position: relative; overflow: hidden;
}
html[data-theme="light"] .plan-card { background: linear-gradient(150deg, #1e293b, #334155); }
.plan-card::after {
  content: ""; position: absolute; right: -50px; bottom: -60px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(95,226,124,.28), transparent 70%);
}
.plan-card .pc-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; font-weight: 700; }
.plan-card .pc-name  { font-size: 1.32rem; font-weight: 700; margin: 4px 0 2px; }
.plan-card .pc-price { font-size: .88rem; opacity: .82; }
.plan-card .pc-foot  {
  margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; position: relative;
}
.plan-card .pc-foot .pf-label { opacity: .68; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.plan-card .pc-foot b { display: block; margin-top: 2px; font-size: .88rem; }

/* Método de pago */
.pay-method {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
}
.pay-method .pm-brand {
  width: 46px; height: 30px; border-radius: 6px; flex: 0 0 auto;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: grid; place-items: center; color: #fff; font-size: .6rem; font-weight: 700; letter-spacing: .04em;
}
/* Verde oscuro, no el de marca: encima va la palabra SEPA en blanco y sobre el
   verde claro del logo no se leería. */
.pay-method .pm-brand.sepa { background: linear-gradient(135deg, #06301a, #0D7725); }
.pay-method .pm-brand.cash { background: linear-gradient(135deg, #78350f, #f59e0b); }

/* ==========================================================================
   PERFIL
   ========================================================================== */

.profile-head {
  display: flex; align-items: center; gap: 14px; padding: 4px 0 18px;
}
.profile-head .ph-name { font-size: 1.15rem; font-weight: 700; }
.profile-head .ph-mail { font-size: .8rem; color: var(--text-muted); }

/* .menu-list / .menu-item viven en shared/css/tokens.css: los usan también los
   modales del panel (ficha del socio, menú de la cuenta). */

.menu-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin: 20px 0 8px;
}

/* Info del centro */
.info-row { display: flex; gap: 12px; padding: 12px 0; }
.info-row + .info-row { border-top: 1px solid var(--border-soft); }
.info-row .ir-ic { width: 22px; flex: 0 0 auto; text-align: center; color: var(--text-muted); }
.info-row .ir-label { font-size: .72rem; color: var(--text-muted); }
.info-row .ir-value { font-size: .87rem; font-weight: 550; }

.hours-table { width: 100%; font-size: .84rem; }
.hours-table td { padding: 6px 0; }
.hours-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-soft); }
.hours-table tr.today td { color: var(--accent); font-weight: 650; }

/* Checkout simulado */
.checkout-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 16px;
}
.checkout-total .ct-label { font-size: .8rem; color: var(--text-muted); }
.checkout-total .ct-amount { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-visual {
  border-radius: var(--r); padding: 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-strong); color: #e2e8f0;
}
.card-visual .cv-num { font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: .12em; margin: 18px 0 12px; }
.pay-ok {
  text-align: center; padding: 14px 0;
}
.pay-ok .po-ic {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 1.9rem;
  animation: gcPop .34s cubic-bezier(.2,.9,.3,1.4);
}

/* Utilidad de sección compacta */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px; text-align: center;
}
.stat-box .sb-val { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-box .sb-lab { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }

@media (max-width: 380px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   MENÚ LATERAL (drawer)
   --------------------------------------------------------------------------
   Sustituye a la pestaña "Perfil": se abre con el botón de tres líneas de la
   cabecera y se cierra pulsando fuera, con Escape o arrastrando hacia la
   izquierda. El arrastre sigue el dedo en tiempo real, que es lo que hace que
   se sienta nativo y no como una web.
   ========================================================================== */

.gc-drawer-overlay {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(9, 14, 26, .55);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .24s ease;
}
.gc-drawer-overlay.open { opacity: 1; }

.gc-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  width: min(310px, 84vw);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  box-shadow: 6px 0 28px rgba(0, 0, 0, .34);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.2, .8, .25, 1);
  overscroll-behavior: contain;
}
.gc-drawer.open { transform: translateX(0); }
/* Durante el arrastre manda el dedo, no la transición */
.gc-drawer.dragging { transition: none; }

.gc-drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.gc-drawer-head .dh-name { font-size: 1rem; font-weight: 700; letter-spacing: -.015em; }
.gc-drawer-head .dh-sub  { font-size: .74rem; color: var(--text-muted); margin-top: 2px; }

.gc-drawer-body {
  flex: 1 1 auto; overflow-y: auto; padding: 12px 12px 20px;
  -webkit-overflow-scrolling: touch;
}
.gc-drawer-foot {
  flex: 0 0 auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-soft);
  font-size: .68rem; color: var(--text-muted); text-align: center; line-height: 1.6;
}

/* Asa visual: indica que el panel se puede arrastrar */
.gc-drawer::after {
  content: ""; position: absolute; right: 3px; top: 50%;
  width: 3px; height: 46px; margin-top: -23px; border-radius: 99px;
  background: var(--border-strong); opacity: .5;
}

/* Secciones y entradas del menú lateral */
.gc-dsection {
  font-size: .67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  padding: 14px 10px 6px;
}
.gc-ditem {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text); font-size: .89rem; font-weight: 550;
  text-align: left; cursor: pointer; transition: background .13s;
  text-decoration: none;
}
.gc-ditem:hover { background: var(--bg-card-hover); text-decoration: none; }
.gc-ditem:active { background: var(--accent-soft); }
.gc-ditem .di-ico { color: var(--text-muted); flex: 0 0 auto; }
.gc-ditem:hover .di-ico { color: var(--accent); }
.gc-ditem .di-label { flex: 1 1 auto; min-width: 0; }
.gc-ditem .di-value { font-size: .78rem; color: var(--text-muted); flex: 0 0 auto; }
.gc-ditem .di-arrow { color: var(--text-muted); opacity: .6; flex: 0 0 auto; }
.gc-ditem.danger { color: var(--danger); }
.gc-ditem.danger .di-ico { color: var(--danger); }
.gc-ditem .di-badge {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: .64rem; font-weight: 700;
  display: grid; place-items: center; flex: 0 0 auto;
}

/* Interruptores dentro del menú */
.gc-dtoggle {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; font-size: .89rem; font-weight: 550;
}
.gc-dtoggle .di-ico { color: var(--text-muted); }
.gc-dtoggle .di-label { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) {
  .gc-drawer { transition: none; }
  .gc-drawer-overlay { transition: none; }
}

/* ==========================================================================
   Ajustes para iconos vectoriales
   Los contenedores estaban dimensionados con font-size para emoji; con SVG
   hay que alinear con flex y quitar el tamaño de fuente.
   ========================================================================== */

.quick button .q-ic,
.gc-notice .n-ico,
.gc-empty .e-ico,
.info-row .ir-ic,
.row-card .rc-ico,
.recibo .rc-ico,
.inst-card .ic-ico,
.menu-item .mi-ic,
.feed-item .feed-ic,
.stat-line > span:first-child,
.attendee .gc-avatar,
.pay-ok .po-ic {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 0;
}
.quick button .q-ic   { font-size: 0; color: var(--accent); }
.gc-notice .n-ico     { font-size: 0; margin-top: 1px; }
.gc-empty .e-ico      { font-size: 0; color: var(--text-muted); opacity: .75; margin-bottom: 12px; }
.info-row .ir-ic      { font-size: 0; margin-top: 2px; }
.pay-ok .po-ic        { font-size: 0; }
.auth-logo            { font-size: 0; }
.hd-logo              { font-size: 0; }
.hd-btn               { font-size: 0; }
.tabbar button .ic    { font-size: 0; }

/* Los badges con icono necesitan alinear el SVG con el texto */
.gc-badge .gc-i, .gc-regimen .gc-i, .gc-chip .gc-i { margin-right: 1px; }
.gc-btn .gc-i { margin-right: -2px; }
.gc-btn.icon .gc-i { margin: 0; }

/* Base del propio SVG: suelto dentro de un texto necesita bajar un poco
   respecto a la línea base, y nunca debe encogerse dentro de un flex. */
.gc-i { vertical-align: -0.18em; flex: 0 0 auto; }
.gc-i * { vector-effect: non-scaling-stroke; }
.tabbar button.active .ic .gc-i { stroke-width: 2.1; }
.gc-ditem .di-ico, .gc-dtoggle .di-ico {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0; line-height: 0; width: 22px;
}
.menu-item .mi-ic {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0; line-height: 0;
}

/* ==========================================================================
   QUIÉN VA A LA CLASE
   --------------------------------------------------------------------------
   Se despliega bajo la tarjeta al tocarla. Una plaza por hueco del aforo, con
   la cara de quien la ocupa: lo que se busca es reconocer a un conocido de un
   vistazo, así que manda la foto y el nombre va debajo, pequeño.
   ========================================================================== */

.cc-chevron {
  display: inline-flex; color: var(--text-muted); flex: 0 0 auto;
  transition: transform .18s;
}
.class-card.open .cc-chevron { transform: rotate(180deg); }
.class-card.has-photo .cc-chevron { color: rgba(255, 255, 255, .8); }
html[data-theme="light"] .class-card.has-photo .cc-chevron { color: var(--text-soft); }

.cc-roster {
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--r) var(--r);
  background: var(--bg-elev);
  padding: 13px 14px 12px;
  margin-top: -7px;               /* se pega a la tarjeta, que tiene radio */
  animation: gcFade .16s ease;
}

.ros-head { font-size: .76rem; color: var(--text-soft); margin-bottom: 10px; }
.ros-load { font-size: .8rem; color: var(--text-muted); padding: 4px 0; }

.seats {
  display: grid; gap: 10px 6px;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
}

.seat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0;
}
.seat .s-photo, .seat .s-ini, .seat .s-ic {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
}
.seat .s-photo { background-size: cover; background-position: center; }
.seat .s-ini {
  background: var(--accent-soft); color: var(--accent);
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.seat .s-ic { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.seat .s-name {
  font-size: .64rem; color: var(--text-soft); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Tu plaza, para encontrarte en la parrilla sin leer todos los nombres */
.seat.you .s-photo, .seat.you .s-ini {
  box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent);
}
.seat.you .s-name { color: var(--accent); font-weight: 700; }

/* Hueco libre: se ve que está y que está vacío */
.seat.free {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px dashed var(--border-strong);
  margin-bottom: calc(.64rem + 4px);   /* ocupa lo mismo que una con nombre */
}

.ros-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft);
  font-size: .68rem; color: var(--text-muted); line-height: 1.5;
}
.ros-foot .gc-i { flex: 0 0 auto; opacity: .7; }

/* Foto del socio en «Mis datos» y en la cabecera del menú */
.gc-avatar.lg.foto { background-size: cover; background-position: center; }

.perfil-foto { display: flex; align-items: center; gap: 13px; }
.perfil-foto .pf-prev { flex: 0 0 auto; }
.perfil-foto .pf-img, .perfil-foto .pf-ini {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
}
.perfil-foto .pf-img { background-size: cover; background-position: center; }
.perfil-foto .pf-ini {
  background: var(--accent-soft); color: var(--accent);
  font-size: 1.05rem; font-weight: 700;
}
.perfil-foto label.gc-btn { cursor: pointer; }

/* El interruptor de privacidad lleva una línea de explicación debajo */
.gc-dtoggle .dt-hint {
  display: block; font-size: .68rem; color: var(--text-muted);
  font-weight: 400; line-height: 1.45; margin-top: 2px; padding-right: 8px;
}
.gc-dtoggle { align-items: flex-start; }
.gc-dtoggle .di-ico { margin-top: 1px; }
.gc-dtoggle .gc-switch { margin-top: 2px; }

/* ==========================================================================
   WOD · el entrenamiento del día
   --------------------------------------------------------------------------
   El botón va bajo la hora, pequeño y discreto: no compite con «Reservar»,
   que es la acción principal de la tarjeta. Solo aparece si la actividad
   publica WOD y ese día hay uno publicado.
   ========================================================================== */

.cc-wod {
  margin-top: 6px;
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft); color: var(--accent);
  font-size: .58rem; font-weight: 800; letter-spacing: .06em;
  cursor: pointer; transition: all .15s;
}
.cc-wod:hover { background: var(--accent); color: var(--accent-text); }
/* Sobre la foto de la actividad hay que despegarlo del fondo */
.class-card.has-photo .cc-wod {
  background: rgba(10, 16, 28, .55); border-color: rgba(255, 255, 255, .45); color: #fff;
}
html[data-theme="light"] .class-card.has-photo .cc-wod {
  background: rgba(255, 255, 255, .75); border-color: var(--accent); color: var(--accent);
}

.wod-sheet .ws-head { margin-bottom: 12px; }
.wod-sheet .ws-when  { font-size: .72rem; color: var(--text-muted); }
.wod-sheet .ws-title { font-size: 1.12rem; font-weight: 700; margin: 3px 0 5px; }
.wod-sheet .ws-kind {
  display: inline-block; font-size: .64rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em;
}

/* Monoespaciada y respetando los saltos: un WOD se lee en columna, y con la
   proporcional las repeticiones y los pesos se descuadran. */
.wod-sheet .wod-body {
  margin: 0; padding: 13px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84rem; line-height: 1.62; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}

.wod-sheet .wod-pdf embed {
  width: 100%; height: 58vh; min-height: 320px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
}
.wod-sheet .wod-pdf p { margin: 7px 0 0; }

/* ==========================================================================
   INVITACIONES
   ========================================================================== */

.inv-quota {
  padding: 11px 13px; border-radius: 10px;
  background: var(--accent-soft); color: var(--text);
  font-size: .84rem; line-height: 1.5;
}
.inv-quota b { color: var(--accent); font-size: 1.05rem; }
.inv-quota.agotado { background: var(--warn-soft); }

.inv-list { display: flex; flex-direction: column; gap: 7px; margin-top: 7px; }
.inv-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card);
}

/* --------------------------------------------------------------------------
   La pantalla del invitado (invitacion.html)
   --------------------------------------------------------------------------
   Es una página suelta, sin menú ni pestañas: la abre alguien que no es socio
   y solo tiene una cosa que hacer.
   -------------------------------------------------------------------------- */

.inv-page {
  min-height: 100vh; display: flex; align-items: flex-start; justify-content: center;
  padding: 26px 18px calc(30px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
.inv-card {
  width: 100%; max-width: 460px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px 22px;
  text-align: center;
}
.inv-card h1 { font-size: 1.5rem; letter-spacing: -.025em; margin: 2px 0 6px; }
.inv-card > p { color: var(--text-soft); font-size: .9rem; line-height: 1.6; margin: 0; }

.inv-ico {
  width: 62px; height: 62px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.inv-ico.ok   { background: var(--ok-soft, var(--accent-soft)); }
.inv-ico.warn { background: var(--warn-soft); color: var(--warn); }

.inv-kicker {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-muted); font-weight: 700;
}
.inv-what { font-size: .95rem; color: var(--text-soft); line-height: 1.6; }
.inv-what b { color: var(--text); }

.inv-form { text-align: left; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.inv-form .gc-btn.lg { width: 100%; padding: 13px; font-size: .95rem; }

.inv-doc {
  border: 1px solid var(--border); border-radius: 12px; padding: 13px;
  background: var(--bg-card);
}
.inv-doc-body {
  max-height: 210px; overflow-y: auto; margin: 8px 0 12px;
  font-size: .78rem; line-height: 1.62; color: var(--text-soft);
  white-space: pre-wrap;
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px;
}
.inv-pdf {
  width: 100%; height: 240px; margin: 8px 0 12px;
  border: 1px solid var(--border-soft); border-radius: 8px; background: #fff;
}
.inv-sign { margin-top: 4px; }

.inv-where {
  margin: 18px 0 14px; padding: 13px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
}
.inv-legal { font-size: .66rem; color: var(--text-muted); line-height: 1.55; margin: 4px 0 0; }

/* --------------------------------------------------------------------------
   Avisos del club a este socio
   --------------------------------------------------------------------------
   Van arriba del todo en Inicio y en ámbar: son cosas que hay que atender
   —«tu hijo sale de la cuota familiar el mes que viene»—, no novedades.
   -------------------------------------------------------------------------- */

.notice-card {
  display: flex; gap: 11px; padding: 13px;
  background: var(--warn-soft); border: 1px solid transparent;
  border-radius: var(--r); cursor: pointer; transition: opacity .15s;
}
.notice-card:active { opacity: .7; }
.notice-card .nc-ico { color: var(--warn); flex: 0 0 auto; display: inline-flex; }
.notice-card .nc-title { font-size: .88rem; font-weight: 650; }
.notice-card .nc-body  { font-size: .78rem; color: var(--text-soft); line-height: 1.55; margin-top: 3px; }
.notice-card .nc-when  { font-size: .66rem; color: var(--text-muted); margin-top: 6px; }

/* ==========================================================================
   ENCUESTAS DEL CLUB
   ========================================================================== */

/* La tarjeta va en el color de acento, no en ámbar como los avisos: un aviso
   es algo que hay que atender y una encuesta es una invitación. Si las dos
   gritaran igual, se acabarían ignorando las dos. */
.survey-card {
  display: flex; gap: 11px; align-items: center; padding: 13px;
  background: var(--accent-soft); border: 1px solid transparent;
  border-radius: var(--r); cursor: pointer; transition: opacity .15s;
}
.survey-card:active { opacity: .7; }
.survey-card .sc-ico { color: var(--accent); flex: 0 0 auto; display: inline-flex; }
.survey-card .sc-title { font-size: .88rem; font-weight: 650; }
.survey-card .sc-body  { font-size: .78rem; color: var(--text-soft); line-height: 1.5; margin-top: 3px; }
.survey-card .sc-when  { font-size: .66rem; color: var(--text-muted); margin-top: 6px; }

.enc-preg { margin-bottom: 20px; }
.enc-preg .ep-text { font-weight: 600; margin-bottom: 10px; line-height: 1.45; }
/* Se apoya en `.gc-textarea` para el fondo y el borde: sin eso salía un
   recuadro blanco en modo oscuro. Aquí solo el alto, que dos líneas bastan. */
.enc-preg .ep-com { margin-top: 10px; min-height: 62px; }

/* Diez botones que tienen que caber en un móvil y poder pulsarse con el
   pulgar sin fallar: se reparten en dos filas de cinco por debajo de 360 px. */
.nps-fila { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.nps-b {
  aspect-ratio: 1; min-height: 34px; border-radius: 8px; padding: 0;
  border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text-soft); font-size: .8rem; font-weight: 650; cursor: pointer;
}
.nps-b:active { transform: scale(.94); }
.nps-b.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.nps-guia {
  display: flex; justify-content: space-between;
  font-size: .64rem; color: var(--text-muted); margin-top: 5px;
}
@media (max-width: 380px) {
  .nps-fila { grid-template-columns: repeat(5, 1fr); }
}

.star-fila { display: flex; gap: 6px; }
.star-b {
  border: 0; background: transparent; padding: 4px; cursor: pointer;
  color: var(--border-strong); line-height: 0;
}
.star-b:active { transform: scale(.9); }
/* La estrella marcada se rellena, no solo cambia de color: el contorno a
   secas se confunde con la que no está puesta cuando hay prisa. */
.star-b.on { color: var(--warn); }
.star-b.on svg { fill: currentColor; }
