/* =========================================================
   The Golden Years Club — estilos
   Pensado para personas de 65+: letra grande, alto contraste,
   botones grandes y nada que dependa de pasar el mouse.
   ========================================================= */

:root {
  /* Colores tomados del logo */
  --navy: #1b3447;
  --navy-soft: #2f4b61;
  --orange: #ef7d22;
  --gold: #f5a623;
  --sky: #6cc4d6;
  --sky-soft: #e3f4f8;
  --cream: #fff8ef;
  --white: #ffffff;
  --line: #d9cfc2;
  --muted: #4a5b69;          /* texto secundario, contraste AA sobre crema */
  --green: #0b6b3a;          /* WhatsApp con contraste suficiente */
  --green-dark: #08552e;
  --danger: #a3261b;
  --ok-bg: #e4f4ea;
  --ok-text: #0b5a31;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 2px 0 rgba(27, 52, 71, .08), 0 8px 24px rgba(27, 52, 71, .08);

  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Nunito", var(--font);

  font-size: 18px;            /* mínimo 18px según el documento */
}
:root.text-large { font-size: 21px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* lo oculto siempre queda oculto */

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  line-height: 1.55;
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));     /* espacio para el botón de WhatsApp */
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }

/* Nunca partir una palabra a la mitad: solo se pasa a la línea siguiente entre palabras */
body { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.nowrap { white-space: nowrap; }
/* Correos: en una sola línea; en pantallas angostas la letra se achica un poco para que quepan */
.email { white-space: nowrap; font-size: min(1em, 3.8vw, 6.2cqi); }   /* se achica según su recuadro si hace falta */
/* Fechas: en una sola línea; en pantallas muy angostas se achican un poco */
.date { white-space: nowrap; font-size: min(1em, 5vw, 7.8cqi); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 3px; }

:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: var(--white); padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; }

/* ---------- Barra de demo ---------- */
.demo-bar {
  background: var(--navy);
  color: var(--white);
  font-size: .85rem;
  padding: .5rem 1rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center;
}
.demo-bar .demo-roles { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.demo-bar button {
  font: inherit; color: var(--white); background: transparent;
  border: 2px solid rgba(255,255,255,.5); border-radius: 999px;
  padding: .3rem .8rem; min-height: 44px; cursor: pointer;
}
.demo-bar button[aria-pressed="true"] { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }

/* ---------- Encabezado ---------- */
.site-header { background: var(--white); border-bottom: 3px solid var(--gold); }
.header-inner {
  /* El logo y el menú van al borde izquierdo de la ventana; los botones (idioma, letra, portal) al borde derecho */
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 58px; height: auto; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; }

.header-tools { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.toggle-group {
  display: inline-flex; border: 2px solid var(--navy); border-radius: 999px; overflow: hidden;
}
.toggle-group button {
  font: inherit; font-weight: 700; color: var(--navy); background: var(--white);
  border: 0; min-width: 52px; min-height: 48px; padding: 0 .9rem; cursor: pointer;
}
.toggle-group button + button { border-left: 2px solid var(--navy); }
.toggle-group button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
/* Cambio de portal: arriba a la derecha, junto a idioma y tamaño de letra */
.portal-switch {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 1.1rem;
  border-radius: 999px; border: 2px solid var(--navy); background: var(--gold); color: var(--navy);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
/* En teléfonos: ocupa su propia fila, centrado, y puede pasar a dos líneas entre palabras */
@media (max-width: 480px) {
  .portal-switch { flex: 1 1 100%; justify-content: center; text-align: center; white-space: normal; padding: .4rem 1rem; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.main-nav { background: var(--white); }
.main-nav:empty { display: none; }
.main-nav ul {
  list-style: none; margin: 0; padding: 0 1.5rem .75rem;
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.main-nav a {
  display: flex; align-items: center; gap: .5rem;
  min-height: 52px; padding: 0 1.1rem; border-radius: 999px;
  text-decoration: none; font-weight: 700; color: var(--navy);
  border: 2px solid var(--line); background: var(--white);
}
.main-nav a[aria-current="page"] { background: var(--gold); border-color: var(--gold); }
.main-nav .nav-icon { font-size: 1.3rem; }
/* Personal (admins e instructoras): menú más compacto para que quepan todas las páginas en una línea */
.staff-session .main-nav ul { gap: .4rem; }
.staff-session .main-nav a { min-height: 42px; padding: 0 .85rem; gap: .4rem; font-size: .92rem; }
.staff-session .main-nav .nav-icon { font-size: 1.1rem; }

/* ---------- Contenido ---------- */
.main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 2rem; outline: none; container: main / inline-size; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }

.card {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
/* Ningún recuadro termina con espacio de más abajo */
.card > :last-child, .notice > :last-child, .db-block > :last-child, .stat > :last-child, .legal > :last-child { margin-bottom: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none; text-align: center;
  min-height: 56px; padding: .6rem 1.5rem; border-radius: 999px; cursor: pointer;
  border: 3px solid var(--navy); background: var(--white); color: var(--navy);
}
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger.solid { background: var(--danger); color: var(--white); }
.btn-block { width: 100%; }
.btn-small { min-height: 44px; font-size: .95rem; padding: .3rem 1rem; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }

.link-btn {
  font: inherit; background: none; border: 0; color: var(--navy); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; padding: .5rem 0; min-height: 44px;
}

/* ---------- Formularios ---------- */
.field { margin-bottom: 1.25rem; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: .4rem; }
/* Las opciones (círculos y casillas) se alinean con su texto, aunque estén dentro de un campo */
.field label.choice, .field label.check { display: flex; margin-bottom: 0; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--navy);
  min-height: 56px; padding: .6rem .9rem;
  border: 2px solid var(--navy-soft); border-radius: 12px; background: var(--white);
}
textarea.input { min-height: 120px; resize: vertical; }
/* Contraseña con un botón pequeño "Mostrar / Ocultar" dentro del campo, a la derecha */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 6.5rem; }
.pw-toggle {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  min-height: 44px; padding: 0 .6rem; border: 0; border-radius: 8px; background: none;
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--navy-soft);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.pw-toggle:hover { color: var(--navy); background: var(--cream); }
.check { display: flex; align-items: center; gap: .75rem; min-height: 48px; cursor: pointer; }
.check input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--navy); }

.choice-list { display: grid; gap: .75rem; }
.choice {
  display: flex; align-items: center; gap: .9rem; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; min-height: 60px;
  background: var(--white);
}
.choice input { width: 28px; height: 28px; margin: 0; accent-color: var(--navy); flex: none; }
.choice:has(input:checked) { border-color: var(--navy); background: var(--sky-soft); }

.demo-login {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--white); border-radius: 12px; padding: .6rem .9rem;
}
.demo-login { flex-wrap: wrap; }
.demo-login > span { flex: 1 1 11rem; container-type: inline-size; min-width: 0; }
/* Mismo tamaño para todos los botones "Usar" / "Use", sin cortar la palabra */
.demo-login .btn { flex: none; width: 6.5rem; padding: .3rem .5rem; white-space: nowrap; }

/* ---------- Elegir perfil (como en las apps de streaming) ---------- */
.profiles-screen { text-align: center; padding: 1rem 0 2rem; }
.profiles-screen h1 { margin-bottom: 2rem; }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 2.5rem; }
.profile {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 11rem;
  font: inherit; color: var(--navy); background: none; border: 0; cursor: pointer; padding: .5rem; border-radius: var(--radius-lg);
}
.profile-avatar {
  display: grid; place-items: center; width: 8.5rem; height: 8.5rem; border-radius: 50%;
  font-family: var(--font-display); font-size: 3.4rem; color: var(--navy);
  border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--navy), var(--shadow);
}
.profile:hover .profile-avatar, .profile:focus-visible .profile-avatar { box-shadow: 0 0 0 5px var(--orange), var(--shadow); }
.profile:focus-visible { outline: none; }
.profile-name { font-family: var(--font-display); font-size: 1.4rem; }
.profile-role { color: var(--muted); font-size: .95rem; }
@media (max-width: 400px) { .profile { width: 9rem; } .profile-avatar { width: 7rem; height: 7rem; font-size: 2.8rem; } }

/* ---------- Elegir portal ---------- */
.portal-choices { display: grid; gap: 1rem; margin-top: 1.5rem; }
.portal-btn {
  display: flex; align-items: center; gap: 1.25rem; width: 100%; text-align: left;
  font: inherit; font-size: 1.2rem; color: var(--navy); cursor: pointer;
  background: var(--white); border: 3px solid var(--navy); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; min-height: 110px; box-shadow: var(--shadow);
}
.portal-btn.primary { background: var(--orange); border-color: var(--orange); }
.portal-btn strong { font-size: 1.35rem; }
.portal-hint { font-size: 1rem; }
.portal-ico { font-size: 2.6rem; flex: none; }


/* ---------- Instalar app ---------- */
.install-card { border: 3px solid var(--sky); }
.install-steps { margin: 1.25rem 0 0; padding-left: 1.6rem; display: grid; gap: .8rem; font-size: 1.1rem; }
/* Símbolos de menú (⋮ ⋯ ⊕) con una letra del sistema que sí los tiene */
.sym { font-family: -apple-system, 'Segoe UI Symbol', 'Segoe UI', system-ui, sans-serif; font-size: 1.2em; }
.install-steps li p { margin: 0 0 .6rem; }
.step-art {
  margin: 0 0 .5rem; padding: .9rem; background: var(--cream); border: 2px solid var(--line);
  border-radius: var(--radius); max-width: 400px;
}
.step-art .art { display: block; width: 100%; height: auto; font-family: var(--font); }
.step-result { margin: 1.25rem 0 .5rem; }
.install-steps li::marker { font-weight: 700; color: var(--orange); }
.share-ico {
  display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 6px;
  background: var(--sky-soft); border: 2px solid var(--sky); font-weight: 700; vertical-align: middle;
}

/* ---------- Avisos (en vez de ventanas emergentes) ---------- */
.notice {
  border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0;
  background: var(--sky-soft); border-left: 6px solid var(--sky);
}
.notice.ok { background: var(--ok-bg); border-color: var(--ok-text); color: var(--ok-text); }
.notice.warn { background: #fff1dc; border-color: var(--gold); }
.notice.error { background: #fde8e6; border-color: var(--danger); color: var(--danger); }
.notice:empty { display: none; }
/* Aviso de la nube (cambios de otra persona o sin conexión): arriba, a todo lo ancho del contenido */
.sync-banner { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.sync-banner .notice { margin: 1rem 0 0; }
.sync-banner .notice p { margin: 0 0 .75rem; }

/* ---------- Bienvenida ---------- */
.hero {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1.2fr 1fr;
}
.hero-logo { width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.hero h1 { font-size: 2.6rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: .6rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: 1.1rem; }
.check-list li::before {
  content: "✓"; flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); font-weight: 700;
}

/* ---------- Planes ---------- */
.plans { display: grid; gap: 1.25rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.plan {
  position: relative; border: 3px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem 1.25rem; background: var(--white); display: flex; flex-direction: column; gap: .5rem;
}
.plan.selected { border-color: var(--navy); background: var(--sky-soft); }
.plan-name { font-family: var(--font-display); font-size: 1.3rem; }
.plan { container-type: inline-size; min-width: 0; }
.plan-price { font-size: min(2.2rem, 18cqi); font-weight: 700; line-height: 1.1; }
.plan-price small { font-size: 1rem; font-weight: 400; }
.plan-detail { color: var(--muted); }
.plan .btn { margin-top: auto; }
.badge {
  display: inline-block; font-weight: 700; font-size: .9rem;
  padding: .2rem .7rem; border-radius: 999px; background: var(--gold); color: var(--navy);
}
.plan .badge.top { position: absolute; top: -0.9rem; left: 1rem; }
.badge.save { background: var(--sky-soft); border: 2px solid var(--sky); }
.badge.active { background: var(--ok-bg); color: var(--ok-text); }
.badge.inactive { background: #f1e3e1; color: var(--danger); }
.badge.due { background: #fff1dc; color: #7a4b00; border: 2px solid var(--gold); }   /* por cobrar */
.badge.muted { background: var(--line); color: var(--navy); }                              /* sin correo de pago */

.steps { color: var(--muted); font-weight: 700; margin-bottom: .25rem; }

/* ---------- Biblioteca ---------- */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.chip {
  font: inherit; font-weight: 700; color: var(--navy); background: var(--white);
  border: 2px solid var(--navy); border-radius: 999px; min-height: 52px; padding: 0 1.2rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.class-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.class-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--navy);
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  border: 3px solid transparent;
}
.class-card:focus-visible { border-color: var(--orange); outline: none; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  font-size: 4rem;
}
.thumb .play-badge {
  position: absolute; right: .9rem; bottom: .9rem;
  width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: grid; place-items: center; font-size: 1.6rem; padding-left: 4px;
}
.thumb .progress-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: rgba(27,52,71,.2); }
.thumb .progress-strip span { display: block; height: 100%; background: var(--navy); }
.cat-balance  { background: #cdeef5; }
.cat-chair    { background: #fde3c8; }
.cat-strength { background: #ffe9b8; }
.cat-stretch  { background: #dcefe2; }
.class-body { padding: 1rem 1.25rem 1.25rem; }
.class-body h3 { margin-bottom: .3rem; }
.meta { color: var(--muted); display: flex; gap: .4rem 1rem; flex-wrap: wrap; }

.resume-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: center;
  text-decoration: none; color: var(--navy);
}
.resume-card .thumb { border-radius: var(--radius); }

/* ---------- Reproductor ---------- */
.player-wrap { background: #000; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.player-wrap video { width: 100%; display: block; aspect-ratio: 16 / 9; max-height: 62vh; background: #000; }
.player-wrap:fullscreen video { max-height: 100vh; }
.player-wrap:fullscreen { display: grid; place-items: center; border-radius: 0; }

.progress {
  height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 1rem 0 .4rem;
}
.progress span { display: block; height: 100%; background: var(--orange); width: 0; }
.time { display: flex; justify-content: space-between; font-weight: 700; font-variant-numeric: tabular-nums; }

.controls {
  display: grid; gap: .75rem; margin-top: 1rem;
  grid-template-columns: 1fr 1.6fr 1fr;
}
.ctrl {
  font: inherit; font-weight: 700; color: var(--navy); background: var(--white);
  border: 3px solid var(--navy); border-radius: var(--radius); min-height: 72px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; padding: .4rem;
}
.ctrl .ico { font-size: 1.6rem; line-height: 1; }
.ctrl.ctrl-play { background: var(--orange); border-color: var(--orange); min-height: 88px; font-size: 1.2rem; }
.ctrl.ctrl-play .ico { font-size: 2.2rem; }
.controls-secondary { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; }
.controls-secondary .btn { flex: 1 1 200px; }

/* ---------- Comunidad ---------- */
.chat-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.msg { background: var(--white); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.msg.mine { background: var(--sky-soft); }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .3rem; flex-wrap: wrap; }
.msg-author { font-weight: 700; }
.msg-time { color: var(--muted); font-size: .9rem; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: break-word; }   /* solo si alguien escribe un enlace muy largo */
.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); font-weight: 700; margin-right: .6rem; vertical-align: middle;
}

/* ---------- Cuenta ---------- */
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0 0 1.25rem; }
.info-list dt { font-weight: 700; }
.info-list dd { margin: 0; container-type: inline-size; min-width: 0; }

/* ---------- Administración ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
/* Con 4 recuadros: 4 en fila en pantallas anchas, 2 + 2 en medianas, 1 por fila en teléfonos */
.stats:has(> .stat:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Con 3 recuadros: 3 en fila, o uno debajo del otro (nunca 2 + 1) */
.stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container main (max-width: 44rem) { .stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: 1fr; } }
/* Se decide según el espacio real del contenido y el tamaño de letra (con letra grande pasa antes a 2 + 2) */
@container main (max-width: 56rem) { .stats:has(> .stat:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container main (max-width: 26rem) { .stats:has(> .stat:nth-child(4)) { grid-template-columns: 1fr; } }
.stat { background: var(--white); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow);
  container-type: inline-size; min-width: 0; }
/* Los números se ajustan al ancho de su recuadro: nunca se salen (ej. $1,353.95 en un recuadro angosto) */
.stat-value { font-size: min(2.2rem, 15cqi); font-weight: 700; line-height: 1.15; white-space: nowrap; }
.stat-label { color: var(--muted); }
.stat-label .date { font-size: min(1em, 6.4cqi); }   /* fechas dentro de los recuadros de números */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .75rem .5rem; border-bottom: 2px solid var(--line); vertical-align: middle; }
th { font-size: .95rem; color: var(--muted); }
td .btn-row { gap: .5rem; }

/* ---------- Base de datos (instructora) ---------- */
.db-list { display: grid; gap: 1rem; }
.db-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem 1.5rem; }
.db-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.db-head h3 { margin: 0; font-size: 1.3rem; }
.db-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.db-block { background: var(--cream); border-radius: var(--radius); padding: .9rem 1rem; container-type: inline-size; min-width: 0; }
.db-block.emergency { background: #fff1dc; border-left: 6px solid var(--gold); }
.db-block h4 { margin: 0 0 .4rem; font-size: .95rem; color: var(--muted); }
.db-block p { margin: 0 0 .6rem; }
.btn-wa { gap: .4rem; border-color: var(--green); color: var(--green); }
.btn-wa svg { width: 22px; height: 22px; }

.db-block.facts { grid-column: 1 / -1; order: 10; }   /* fila completa debajo de los contactos */
.db-facts { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: .35rem 1.25rem; margin: 0; }
/* Si el recuadro es angosto, cada dato va debajo de su título */
@container (max-width: 620px) { .db-facts { grid-template-columns: 1fr; gap: 0; } .db-facts dd { margin-bottom: .5rem; } }
.db-facts dt { font-weight: 700; font-size: .92rem; }
.db-facts dd { margin: 0; }
.ok-mark { color: var(--ok-text); font-weight: 700; }
.pending-mark { color: var(--danger); font-weight: 700; }

/* ---------- Descargo y términos en el registro ---------- */
.legal { background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; margin: .75rem 0 .25rem; }
.legal summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.legal p { margin: .5rem 0 .25rem; font-size: .95rem; }
.legal-check { align-items: flex-start; margin-bottom: .75rem; }
.legal-check input { margin-top: .1rem; }

/* ---------- GYC Presencial ---------- */
.progress.capacity { height: 22px; }
.progress.capacity span { background: var(--sky); }
.progress.capacity.full span { background: var(--danger); }
.cap-total { font-size: 1.2rem; margin-bottom: .5rem; }
/* Cupos por grupo */
.cap-list { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.cap-row { background: var(--cream); border-radius: var(--radius); padding: .8rem 1rem; min-width: 0; }
.cap-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cap-name { font-size: 1.1rem; }
.cap-row .plan-detail { margin: .35rem 0; }
.cap-row .progress.capacity { height: 14px; }
.att-count { font-size: 1.3rem; font-weight: 700; }
.att-list { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.att-item { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: .6rem; min-width: 0; }
.att-item .att-row { border: 0; padding: .3rem .4rem; min-height: 52px; }
.att-item .choice:has(input:checked) { border-radius: 10px; }
.att-row { justify-content: space-between; }
.att-note-label { display: block; font-weight: 700; font-size: .9rem; color: var(--muted); margin: .5rem .4rem .3rem; }
.att-note { min-height: 72px; font-size: .95rem; }
.att-note-status { min-height: 1.4em; margin: .3rem .4rem 0; font-size: .85rem; color: var(--ok-text); }
.att-note-status.pending { color: var(--danger); font-weight: 700; }
.att-save-bar { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.att-save-bar .btn-primary { min-height: 64px; font-size: 1.15rem; padding: .6rem 2rem; }
.att-unsaved { margin-top: 1rem; }
/* ---------- Horario ---------- */
:root { --cal-regular: #fbbd5c; --cal-off: #e46d6d; --cal-makeup: #3bb4ae; }
.main.main-wide { max-width: 1440px; }   /* el horario usa todo el ancho, como el Excel */
.badge.makeup { background: #d8f1ef; color: #0d5c58; border: 2px solid var(--cal-makeup); }
.sched-filters { margin-bottom: 1rem; }
.sched-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: .9rem 1.1rem; margin-bottom: 1rem; }
.sched-bar .plan-detail { flex: 1 1 16rem; margin: 0; }
.sched-bar [data-action="sched-pdf-team"] { margin-left: auto; }   /* el PDF siempre a la derecha */
.saved-pill { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 1.15rem; min-height: 52px;
  padding: .4rem 1.2rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok-text); border: 2px solid var(--ok-text); }
.sched-confirm p { margin: 0 0 .75rem; }
.sched-week { padding: 1.1rem; container: week / inline-size; }
.sched-week-head { display: flex; justify-content: space-between; align-items: center; gap: .25rem 1rem; flex-wrap: wrap; }
.sched-week-head h2 { margin: 0; }
.sched-range { font-family: var(--font); font-size: 1rem; font-weight: 400; }
.link-btn.small { font-size: .95rem; min-height: 40px; padding: .25rem 0; }

/* Portal de la instructora: sus próximas clases */
.my-classes { max-width: 52rem; }
.my-day + .my-day { margin-top: 1.1rem; }
.my-day h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.my-class { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; align-items: center; gap: .35rem 1rem;
  background: #fff7e8; border-left: 6px solid var(--cal-regular); border-radius: 8px; padding: .55rem .8rem; }
.my-class + .my-class { margin-top: .5rem; }
.my-class.makeup { background: #e7f6f4; border-left-color: var(--cal-makeup); }
.my-class.act { background: #f3eefc; border-left-color: #8b6fd1; }
.my-class p { margin: 0; }
.my-time { font-weight: 700; }
.my-info { min-width: 0; }
.my-att { gap: .5rem; justify-content: flex-end; }
@media (max-width: 700px) {
  .my-class { grid-template-columns: minmax(0, 1fr); }
  .my-att { justify-content: flex-start; }
}
.teacher-month-title { margin-top: 2rem; }
/* Su nombre, subrayado en el horario completo */
.t-line.me { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 3px; text-underline-offset: 3px; }

/* Instructoras (admins) */
.staff-card .info-list { margin-bottom: 1rem; }
.staff-card .notice p { margin: 0 0 .75rem; }
.staff-temp { border: 3px solid var(--gold); }
.staff-temp:focus { outline: none; }
.temp-pw { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .05em;
  background: var(--cream); border-radius: 8px; padding: .15rem .6rem; }

/* Cuadrícula de la semana: filas = horas, columnas = días (como el Excel) */
.wk-grid { display: grid; grid-template-columns: 7.5rem repeat(var(--cols), minmax(0, 1fr)); margin-top: .75rem;
  border: 2px solid var(--navy); border-radius: 12px; overflow: hidden; background: var(--white); }
.wk-corner, .wk-day { background: var(--navy); color: var(--white); font-weight: 700; padding: .6rem .5rem; text-align: center; min-width: 0; }
.wk-day.out { color: rgba(255,255,255,.55); }
.wk-date { font-family: var(--font-display); font-size: 1.15rem; }
.wk-time { font-weight: 700; padding: .6rem .5rem; border-top: 1px solid var(--line); background: var(--cream); text-align: center;
  display: flex; align-items: center; justify-content: center; min-width: 0; }
.wk-cell { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: .4rem; display: grid; gap: .4rem;
  align-content: start; min-width: 0; }
.wk-cell.out { background: repeating-linear-gradient(135deg, #f6f1ea 0 8px, #fbf8f3 8px 16px); }
.wk-add { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: .2rem .5rem; min-width: 0; }
.wk-none { display: none; }
.ses { background: #fff7e8; border-left: 6px solid var(--cal-regular); border-radius: 8px; padding: .45rem .55rem; min-width: 0;
  display: grid; gap: .3rem; align-content: start; }
.ses.off { background: #fdeeee; border-left-color: var(--cal-off); }
.ses.makeup { background: #e7f6f4; border-left-color: var(--cal-makeup); }
.ses.act { background: #f3eefc; border-left-color: #8b6fd1; }   /* actividad */
/* Todo lo de adentro de una clase se puede encoger, para que nunca se salga de su columna */
.ses > * { min-width: 0; }
.ses .badge { white-space: normal; font-size: .8rem; padding: .1rem .5rem; max-width: 100%; }
.ses .mini-btn { max-width: 100%; padding-inline: .5rem; }
.ses .teacher-row .input { min-width: 0; width: 100%; }
.ses-act-groups { font-weight: 700; line-height: 1.25; }
.cal-swatch.act { background: #f3eefc; border: 2px solid #8b6fd1; }
.group-checks { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.group-checks .check { min-width: 4.5rem; }
.ses.selected { outline: 3px solid var(--navy); outline-offset: 1px; }
.ses p { margin: 0; }
.ses .link-btn, .wk-add .link-btn { justify-self: start; text-align: left; }
.ses-name { line-height: 1.25; }
.ses-room { color: var(--muted); font-size: .9rem; }
.ses-time, .ses-act { font-size: .92rem; }
.ses-time.same { display: none; }   /* misma hora que la fila: no se repite (en teléfono sí se muestra) */
.ses-teachers { font-weight: 700; }
.ses-teachers .plan-detail { font-weight: 400; }
.ses-teachers .t-line { display: block; }   /* una instructora por línea */
.teacher-rows { display: grid; gap: .3rem; }
.ses-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.mini-btn { font: inherit; font-size: .88rem; font-weight: 700; color: var(--navy); background: var(--white); cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; min-height: 40px; padding: .2rem .7rem; }
.mini-btn:hover { border-color: var(--navy); }
.sched-legend { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .95rem; }
.sched-legend li { display: flex; align-items: center; gap: .45rem; }
.teacher-row { display: flex; gap: .3rem; align-items: center; }
.input.input-sm { min-height: 44px; padding: .3rem .5rem; font-size: .95rem; border-radius: 8px; min-width: 0; }
.teacher-row .input-sm { flex: 1; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 8px; border: 2px solid var(--line); background: var(--white);
  color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; }
.icon-btn:hover { border-color: var(--danger); }
.icon-btn.add { color: var(--navy); font-size: 1.3rem; }
.ses .icon-btn { width: 38px; height: 38px; border-radius: 8px; }
.ses .teacher-row { gap: .25rem; }
.ses .input.input-sm { padding: .3rem .35rem; }
.icon-btn.add:hover { border-color: var(--navy); }
.sched-panel { margin: 1rem 0 0; border: 3px solid var(--navy); }
.sched-panel h3 { margin-top: 0; }
.move-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.choice-list.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.pick-set { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.pick-set legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
/* Todo el mes en una sola tabla: días de la semana arriba (fijos al bajar) y una fila de fechas por semana */
.sched-month { padding: .6rem; container: week / inline-size; }
.mg-grid { margin-top: 0; overflow: clip;
  /* Los 7 días del mismo ancho */
  grid-template-columns: 5.2rem repeat(7, minmax(0, 1fr)); }
/* Vista de administradoras: letra y botones más pequeños para que todo quepa
   (lo grande y fácil de tocar es para las pantallas de las miembros) */
.mg-grid { font-size: .84rem; }
.mg-grid .mg-corner, .mg-grid .mg-head { padding: .45rem .25rem; }
.mg-grid .mg-week, .mg-grid .mg-date { padding: .2rem .35rem; }
.mg-grid .wk-date { font-size: 1.05rem; }
.mg-grid .wk-time { padding: .4rem .25rem; font-size: .8rem; }
.mg-grid .wk-cell { padding: .25rem; gap: .25rem; }
.mg-grid .ses { padding: .3rem .4rem; gap: .2rem; border-left-width: 4px; }
.mg-grid .ses-room, .mg-grid .ses-time { font-size: .78rem; }
.mg-grid .ses .input.input-sm { min-height: 32px; font-size: .8rem; padding: .15rem .3rem; border-width: 1.5px; border-radius: 6px; }
.mg-grid .ses .icon-btn { width: 30px; height: 30px; border-width: 1.5px; border-radius: 6px; font-size: .8rem; }
.mg-grid .ses .icon-btn.add { font-size: 1rem; }
.mg-grid .ses .mini-btn { min-height: 28px; font-size: .76rem; padding: .05rem .5rem; }
.mg-grid .ses .badge { font-size: .72rem; }
.mg-grid .link-btn.small { font-size: .8rem; min-height: 30px; }
.mg-grid .mg-copy { min-height: 28px; }
.mg-short { display: none; }
@container week (max-width: 1150px) { .mg-long { display: none; } .mg-short { display: inline; } }
.mg-corner, .mg-head { position: sticky; top: 0; z-index: 2; background: var(--navy); color: var(--white); font-weight: 700;
  padding: .65rem .5rem; text-align: center; min-width: 0; }
.mg-week, .mg-date { background: var(--sky-soft); border-top: 3px solid var(--navy); padding: .35rem .5rem; min-width: 0; }
.mg-date { text-align: center; border-left: 1px solid var(--line); }
.mg-date .wk-dayname { display: none; }
.mg-date .wk-date { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); }
.mg-date.out .wk-date { color: var(--muted); }
.mg-week { display: flex; align-items: center; justify-content: center; }
.mg-copy { min-height: 36px; padding: .1rem .55rem; }
.mg-copy { display: inline-flex; align-items: center; gap: .35rem; }
.copy-ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.mg-copy-text { display: none; }
.mg-panel { padding: .25rem .5rem .75rem; border-top: 1px solid var(--line); min-width: 0; }
.mg-panel .sched-panel { margin-top: .5rem; }
.mg-msg { margin: .5rem 0 0; }
/* En pantallas angostas: día por día, una clase debajo de otra */
@container week (max-width: 940px) {
  .wk-grid { display: block; border: 0; background: none; }
  .wk-corner, .wk-time, .wk-cell.empty, .wk-day.out, .wk-cell.out, .wk-add:empty { display: none; }
  .wk-day { text-align: left; border-radius: 10px; margin-top: .9rem; padding: .5rem .8rem; }
  .wk-cell, .wk-add { border: 0; padding: .4rem 0 0; }
  .wk-none { display: block; margin: .4rem 0 0; }
  .ses-time.same { display: block; }
  .mg-corner, .mg-head { display: none; }
  .mg-week { display: flex; justify-content: flex-start; background: none; border-top: 3px solid var(--navy); margin-top: 1.25rem; padding: .6rem 0 0; }
  .mg-week:empty { padding: 0; }
  .mg-copy-text { display: inline; }
  .mg-date { display: block; text-align: left; background: var(--navy); border: 0; border-radius: 10px; margin-top: .9rem; padding: .5rem .8rem; }
  .mg-date.out { display: none; }
  .mg-date .wk-dayname { display: inline; color: var(--white); font-weight: 700; }
  .mg-date .wk-date { color: var(--white); }
  .mg-add-gap { display: none; }
  .mg-panel { border: 0; padding: 0; }
}
.att-class { background: var(--white); border-left: 6px solid var(--cal-regular); border-radius: 12px; padding: .6rem 1rem; margin-bottom: 1rem; }
.att-class p { margin: .25rem 0; }

/* Calendario para miembros (como el de Canva) */
.cal-sheet { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1rem; container: calsheet / inline-size; }
.cal-top { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; margin-bottom: 1rem; }
.cal-logo { width: 110px; height: auto; flex: none; }
@container calsheet (max-width: 640px) { .cal-top { justify-content: center; } .cal-legend { order: 3; } .cal-titles { order: 2; flex-basis: 100%; } .cal-logo { order: 1; width: 90px; } }
.cal-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .95rem; }
.cal-legend li { display: flex; align-items: center; gap: .6rem; }
.cal-swatch { width: 1.4rem; height: 1.4rem; border-radius: 4px; flex: none; }
.cal-swatch.regular, .cal-cell.regular { background: var(--cal-regular); }
.cal-swatch.off, .cal-cell.off { background: var(--cal-off); }
.cal-swatch.makeup, .cal-cell.makeup { background: var(--cal-makeup); }
.cal-star { width: 1.4rem; text-align: center; flex: none; }
.cal-titles { flex: 1 1 18rem; text-align: center; min-width: 0; container-type: inline-size; }
.cal-month { font-family: var(--font-display); font-size: min(3.2rem, 11cqi); line-height: 1; margin: 0; color: #4a4a4a; letter-spacing: .04em; }
.cal-sub { font-family: var(--font-display); font-size: min(1.35rem, 6.5cqi); margin: .4rem 0 0; color: #4a4a4a; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid #444; border-radius: 6px; overflow: hidden; }
.cal-head { text-align: center; padding: .5rem .1rem; border-bottom: 2px solid #444; color: #4a4a4a; container-type: inline-size; min-width: 0; }
.cal-head span { font-size: min(1rem, 15cqi); }
.cal-head .cal-short { font-size: min(1rem, 30cqi); font-weight: 700; }
.cal-short { display: none; }
.cal-cell { min-height: 4.2rem; padding: .35rem .2rem; text-align: center; border-right: 1px solid #bbb; border-bottom: 1px solid #bbb;
  container-type: inline-size; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: #222; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-num { font-size: min(1.3rem, 38cqi); }
.cal-act > span[aria-hidden] { font-size: min(1.1rem, 34cqi); }
.cal-act { font-weight: 800; font-family: var(--font-display); font-size: min(.85rem, 13cqi); text-transform: uppercase; }
@container (max-width: 95px) { .cal-act-word { display: none; } }
@container calsheet (max-width: 640px) { .cal-long { display: none; } .cal-short { display: inline; } }

/* Grupos (A1, A2, B…) */
.field-title { font-weight: 700; margin: 0 0 .4rem; }
.db-period { margin-top: .5rem; }
.db-actions { margin-top: 1rem; }
.group-table .link-btn { font-weight: 700; padding: 0; }
/* Reporte: botones Mensual / Anual y selector de mes o año */
.report-bar { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end; margin: 1.25rem 0 1.5rem; }
.report-toggle button { min-height: 52px; padding: 0 1.2rem; font-size: 1.05rem; }
.report-pick { margin: 0; min-width: min(100%, 16rem); }
/* Título de un recuadro con un botón a la derecha (ej. "Pagos del mes" + Descargar Excel) */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }
.summary-table tfoot td { border-top: 3px solid var(--navy); border-bottom: 0; background: var(--sky-soft); }
/* "Ver todo": texto con flecha, sin recuadro de fondo */
.more-btn {
  font: inherit; font-weight: 700; color: var(--navy); background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: .5rem 0; margin-top: .25rem; text-decoration: underline; text-underline-offset: 4px;
}
.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.note-list li { background: var(--white); border-radius: 10px; padding: .6rem .8rem; border-left: 4px solid var(--sky); }
.att-row .att-name { flex: 1; font-weight: 700; }

/* ---------- WhatsApp (siempre visible) ---------- */
.whatsapp {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--green); color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.05rem;
  min-height: 60px; padding: 0 1.4rem 0 1rem; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); border: 3px solid var(--white);
}
body.no-whatsapp { padding-bottom: 2rem; }
.whatsapp:active { background: var(--green-dark); }
.whatsapp svg { width: 32px; height: 32px; flex: none; }

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo { max-width: 260px; order: -1; }
  .hero h1 { font-size: 2rem; }
  .resume-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-name { font-size: 1.05rem; }
  .brand img { width: 48px; height: auto; }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .ctrl.ctrl-play { grid-column: 1 / -1; order: -1; }
  .whatsapp { left: 1rem; justify-content: center; }
  .info-list { grid-template-columns: 1fr; gap: .1rem; }
  .info-list dd { margin-bottom: .6rem; }
  .card { padding: 1.25rem 1rem; }
  /* Encabezado más compacto en teléfono */
  .demo-bar { font-size: .78rem; padding: .35rem .75rem; }
  .header-inner { padding: .5rem 1rem; gap: .5rem; }
  .main-nav ul { padding: 0 1rem .75rem; }
  .toggle-group button { min-width: 46px; min-height: 46px; padding: 0 .6rem; }
  .main-nav a { min-height: 48px; padding: 0 .9rem; }
  .main { padding-top: 1.25rem; }
  h1 { font-size: 1.7rem; }
  .whatsapp { min-height: 56px; }
  .step-art { padding: .5rem; }   /* ilustraciones más grandes en teléfono */
  /* Tarjetas de la base de datos: menos margen interno para que quepan fechas y correos */
  .db-card { padding: 1rem .9rem; }
  .db-block { padding: .75rem .8rem; }
  .install-steps { padding-left: 1.3rem; }
}

/* Teléfonos muy pequeños (o con letra grande): todo un poco más compacto para que quepa */
@media (max-width: 400px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .card { padding: 1rem .8rem; }
  .notice { padding: .8rem .9rem; }
  .portal-btn { gap: .8rem; padding: 1rem; font-size: 1.05rem; }
  .portal-btn strong { font-size: 1.15rem; }
  .portal-ico { font-size: 2rem; }
}

/* Tabla de miembros: en tablet y teléfono se convierte en tarjetas con su etiqueta */
@media (max-width: 900px) {
  table thead { display: none; }
  table, tbody, tfoot, tr, td { display: block; }
  tr { border-bottom: 2px solid var(--line); padding: .9rem 0; }
  td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: 9rem 1fr; gap: .75rem; align-items: center; }
  td::before { content: attr(data-label); font-weight: 700; color: var(--muted); font-size: .9rem; }
}
@media (max-width: 480px) {
  td { grid-template-columns: 1fr; gap: .15rem; }
}
/* Resumen por grupo: en tablet y teléfono, cada grupo es un recuadro con sus números en columnas */
@media (max-width: 900px) {
  .group-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 7rem), 1fr)); gap: .4rem 1rem; }
  .group-table td { grid-template-columns: 1fr; gap: .1rem; align-items: start; }
  .group-table td:first-child { grid-column: 1 / -1; }
  .group-table td:first-child::before { content: none; }
  .group-table .link-btn { justify-self: start; font-size: 1.15rem; }
}

/* ---------- Vista del personal (admins e instructoras) ----------
   Limpia y compacta: sin emojis, letra base de 16px, botones y recuadros más delgados.
   Lo grande y fácil de tocar es para las miembros (65+). La clase "staff" la pone renderChrome. */
:root.staff {
  font-size: 16px;            /* las medidas del PDF de instructoras están hechas para esta letra */
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(27, 52, 71, .06), 0 4px 14px rgba(27, 52, 71, .06);
}
.staff h1 { font-size: 1.6rem; }
.staff h2 { font-size: 1.25rem; }
.staff h3 { font-size: 1.05rem; }
.staff .lead { font-size: 1rem; }
/* Encabezado y menú */
.staff .header-inner { padding: .5rem 1.5rem; }
.staff .brand img { width: 44px; }
.staff .brand-name { font-size: 1.1rem; }
.staff .portal-switch { min-height: 36px; padding: 0 .9rem; border-width: 1.5px; font-size: .9rem; }
.staff .main-nav ul { gap: .35rem; padding-bottom: .6rem; }
.staff .main-nav a { min-height: 36px; padding: 0 .9rem; border-width: 1.5px; font-size: .92rem; }
.staff .main { padding-top: 1.25rem; }
/* Recuadros y avisos */
.staff .card { padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.staff .notice { padding: .7rem 1rem; margin: .75rem 0; border-left-width: 4px; }
.staff .stats { gap: .75rem; margin-bottom: 1rem; }
.staff .stat { padding: 1rem; }
.staff .stat-value { font-size: min(1.8rem, 15cqi); }
.staff .badge { font-size: .8rem; padding: .15rem .55rem; }
.staff .badge.save, .staff .badge.due, .staff .badge.makeup { border-width: 1.5px; }
.staff th, .staff td { padding: .5rem; border-bottom-width: 1px; }
.staff th { font-size: .85rem; }
.staff .info-list { gap: .45rem 1.25rem; }
/* Botones */
.staff .btn { min-height: 38px; padding: .35rem 1rem; font-size: .92rem; border-width: 2px; gap: .4rem; }
.staff .btn-small { min-height: 32px; padding: .2rem .75rem; font-size: .85rem; }
.staff .btn-row { gap: .5rem; }
.staff .link-btn { min-height: 32px; padding: .25rem 0; }
.staff .more-btn { min-height: 36px; }
.staff .toggle-group { border-width: 1.5px; }
.staff .toggle-group button { min-height: 36px; min-width: 44px; padding: 0 .8rem; }
.staff .toggle-group button + button { border-left-width: 1.5px; }
.staff .report-toggle button { min-height: 35px; padding: 0 1rem; font-size: .92rem; }
.staff .chip { min-height: 36px; padding: 0 .9rem; border-width: 1.5px; font-size: .92rem; }
.staff .filters { gap: .4rem; }
.staff .btn-wa svg { width: 18px; height: 18px; }
/* Formularios */
.staff .field { margin-bottom: .9rem; }
.staff .field label, .staff .field .label { margin-bottom: .3rem; font-size: .92rem; }
.staff .field label.choice, .staff .field label.check { font-size: 1rem; }
.staff .input, .staff select.input, .staff textarea.input { min-height: 38px; padding: .35rem .65rem; border-width: 1.5px; border-radius: 8px; }
/* Misma altura para todos los campos de una línea (los de fecha son más altos por naturaleza) */
.staff input.input:not([type="file"], .input-sm), .staff select.input:not(.input-sm) { height: 38px; }
.staff textarea.input { min-height: 84px; }
.staff .pw-wrap .input { padding-right: 5.5rem; }
.staff .pw-toggle { min-height: 30px; font-size: .85rem; }
.staff .check { min-height: 32px; gap: .5rem; }
.staff .check input, .staff .choice input { width: 18px; height: 18px; }
.staff .choice-list { gap: .5rem; }
.staff .choice { min-height: 42px; padding: .5rem .75rem; gap: .6rem; border-width: 1.5px; }
/* Elegir portal (GYC at Home / GYC Presencial) */
.staff .portal-choices { gap: .75rem; margin-top: 1.25rem; }
.staff .portal-btn { min-height: 64px; padding: .9rem 1.2rem; font-size: 1.05rem; border-width: 2px; }
.staff .portal-btn strong { font-size: 1.1rem; }
/* Base de datos */
.staff .db-list { gap: .75rem; }
.staff .db-card { padding: 1rem 1.2rem; }
.staff .db-head h3 { font-size: 1.1rem; }
.staff .db-grid { gap: .75rem; }
.staff .db-block { padding: .75rem .85rem; }
.staff .db-block.emergency { border-left-width: 4px; }
.staff .db-block h4 { font-size: .85rem; }
/* Reporte, asistencia y horario */
.staff .report-bar { gap: .75rem 1rem; margin: 1rem 0 1.25rem; }
.staff .report-pick { margin: 0; }
.staff .cap-row { padding: .65rem .8rem; }
.staff .cap-name { font-size: 1rem; }
.staff .att-count { font-size: 1.15rem; }
.staff .att-item { border-width: 1.5px; padding: .5rem; }
.staff .att-item .att-row { min-height: 40px; }
.staff .att-note { min-height: 60px; }
.staff .att-save-bar { gap: .5rem; margin-top: 1.25rem; }
.staff .att-save-bar .btn-primary { min-height: 42px; padding: .4rem 1.4rem; font-size: 1rem; }
.staff .sched-bar { padding: .7rem .9rem; gap: .6rem .9rem; }
.staff .saved-pill { min-height: 38px; padding: .3rem .9rem; font-size: .95rem; border-width: 1.5px; }
.staff .sched-panel { border-width: 2px; }
.staff .mini-btn { min-height: 32px; font-size: .82rem; }
.staff .input.input-sm { min-height: 34px; }
.staff .icon-btn { width: 34px; height: 34px; border-width: 1.5px; }
/* Clases y comunidad (cuando entra una admin) */
.staff .class-grid { gap: 1rem; }
.staff .class-body { padding: .8rem 1rem 1rem; }
.staff .msg { padding: .75rem 1rem; }
.staff .avatar { width: 32px; height: 32px; }
.staff .ctrl { min-height: 48px; border-width: 2px; }
.staff .ctrl.ctrl-play { min-height: 52px; font-size: 1rem; }
.staff .ctrl .ico { display: none; }
.staff .install-card { border-width: 2px; }
.staff .install-steps { font-size: 1rem; }
@media (max-width: 560px) {
  .staff .header-inner { padding: .5rem 1rem; }
  .staff .card { padding: 1rem .85rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
