/* ==========================================================================
   FOR FRIENDS — Pilates con Dalma
   Identidad "Resortes": los cuatro colores de los resortes del reformer
   (rojo, azul, verde, amarillo) son el sistema de color y siempre significan
   algo: disponibilidad, tensión, estado. Base ciruela y tiza rosada.
   La capa "MARCA FOR FRIENDS" (al final) aplica el manual de marca.
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}


:root {
  /* Ciruela (tinta y acción principal). Se mantiene el nombre --sage-* */
  --sage-950: #1d1220;
  --sage-900: #2a1b2e;
  --sage-800: #3a2740;
  --sage-700: #4b3452;
  --sage-600: #634869;
  --sage-500: #7f6385;
  --sage-400: #a389a8;
  --sage-300: #c5b1c8;
  --sage-200: #e1d4e2;
  --sage-100: #efe6ef;
  --sage-50:  #f7f1f6;

  /* Color de texto (en modo oscuro se aclara; los fondos ciruela no cambian) */
  --ink-950: #1d1220;
  --ink-900: #2a1b2e;
  --ink-800: #3a2740;

  /* Tiza rosada (superficies). Se mantiene el nombre --sand-* */
  --sand-900: #3b2a31;
  --sand-800: #5a4650;
  --sand-700: #6a5660;
  --sand-600: #75626b;
  --sand-400: #bba9b1;
  --sand-300: #dccbd1;
  --sand-200: #ebdfe2;
  --sand-150: #f2e9eb;
  --sand-100: #f6eff0;
  --sand-50:  #fbf7f7;
  --paper:    #ffffff;

  /* Resorte rojo: completo, urgente, turno fijo */
  --terra-800: #8e2a1c;
  --terra-700: #b23a27;
  --terra-600: #cc4632;
  --terra-500: #e0533d;
  --terra-400: #ec8170;
  --terra-200: #f7c6bd;
  --terra-100: #fce5e0;
  --terra-50:  #fef4f2;

  /* Resorte verde: hay lugar, asistió */
  --emerald-800: #1f5a33;
  --emerald-700: #2b6e41;
  --emerald-600: #3a8653;
  --emerald-500: #4c9e66;
  --emerald-200: #c4e3cd;
  --emerald-100: #e2f2e6;
  --emerald-50:  #f2f9f4;

  /* Resorte amarillo: quedan pocos, cumpleaños */
  --amber-700: #8a5b00;
  --amber-500: #f0b847;
  --amber-100: #fdf0d2;

  /* Resorte azul: reservado, información */
  --blue-700: #2f45a8;
  --blue-500: #4a63d0;
  --blue-100: #e5e9fa;

  --line: rgba(42, 27, 46, 0.09);
  --line-strong: rgba(42, 27, 46, 0.16);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-subtle: none;
  --shadow-card:   0 1px 2px rgba(42, 27, 46, 0.05), 0 10px 24px -14px rgba(42, 27, 46, 0.22);
  --shadow-hover:  0 2px 4px rgba(42, 27, 46, 0.05), 0 20px 40px -20px rgba(42, 27, 46, 0.35);
  --shadow-drawer: 0 16px 40px -16px rgba(29, 18, 32, 0.55);
  --shadow-modal:  0 40px 90px -24px rgba(29, 18, 32, 0.5);
  --shadow-primary: none;

  --font-serif: "Instrument Sans", system-ui, sans-serif;
  --font-sans:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Capas */
  --z-topbar: 30;
  --z-sidebar: 40;
  --z-bottomnav: 50;
  --z-demobar: 60;
  --z-toast: 90;
  --z-grain: 100;

  --demo-h: 0px;

  color-scheme: light;
  font-family: var(--font-sans);
  color: var(--ink-950);
  background-color: var(--sand-50);
  scroll-behavior: smooth;
}

:root:has(.demo-bar) {
  --demo-h: 52px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink-950);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--sand-100);
}

/* Grano de papel muy sutil sobre toda la interfaz */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .24 0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection {
  background: var(--sage-200);
  color: var(--ink-950);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    opacity 0.25s var(--ease-out);
}

button:disabled,
.btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--sage-600);
  outline-offset: 3px;
  border-radius: 6px;
}

a {
  color: var(--sage-700);
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  text-wrap: balance;
  color: var(--ink-950);
}

h1 {
  font-weight: 400;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--sage-600);
}

h2 {
  font-weight: 450;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  color: var(--ink-950);
}

p {
  text-wrap: pretty;
}

svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

strong {
  font-weight: 650;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--sage-500);
  display: block;
}

.muted {
  color: var(--sand-600);
}

.small {
  font-size: 0.85rem;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes grow-x {
  from { width: 0; }
}

@keyframes slow-zoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.06); opacity: 0.55; }
}

@keyframes bed-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(205, 116, 81, 0.5); }
  100% { box-shadow: 0 0 0 8px rgba(205, 116, 81, 0); }
}

/* Al cambiar de sección: un fundido corto, nada más */
.page.enter {
  animation: fade 0.28s ease both;
}

/* ==========================================================================
   BOTONES Y ETIQUETAS
   ========================================================================== */
.btn {
  min-height: 44px;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-subtle);
  position: relative;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover {
  background: var(--sand-100);
  border-color: var(--sand-300);
  transform: translateY(-1px);
}

.btn:hover > svg:last-child:not(:first-child) {
  transform: translateX(2px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

.btn.primary {
  background: linear-gradient(180deg, var(--sage-600), var(--sage-700));
  color: #fff;
  border-color: var(--sage-700);
  box-shadow: var(--shadow-primary);
}

.btn.primary:hover {
  background: linear-gradient(180deg, var(--sage-700), var(--sage-800));
  border-color: var(--sage-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 14px 28px -10px rgba(43, 64, 53, 0.6);
}

.btn.soft {
  background: var(--sage-100);
  color: var(--ink-800);
  border-color: transparent;
  box-shadow: none;
}

.btn.soft:hover {
  background: var(--sage-200);
}

.btn.danger {
  color: var(--terra-700);
  border-color: var(--terra-200);
  background: var(--terra-50);
  box-shadow: none;
}

.btn.danger:hover {
  background: var(--terra-100);
  border-color: var(--terra-400);
}

.btn.text {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 14px;
  color: var(--sand-700);
}

.btn.text:hover {
  color: var(--ink-900);
  background: var(--sand-150);
  transform: none;
}

.btn.compact {
  min-height: 36px;
  padding: 6px 15px;
  font-size: 0.8rem;
}

.btn.pill {
  border-radius: var(--radius-pill);
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  position: relative;
  color: var(--ink-800);
  box-shadow: var(--shadow-subtle);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn:hover {
  background: var(--sand-100);
  border-color: var(--sand-300);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.93);
}

.badge {
  font-size: 0.71rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--sage-100);
  color: var(--ink-800);
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.5;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.badge.warm {
  background: var(--terra-100);
  color: var(--terra-700);
}

.badge.gray {
  color: var(--sand-700);
  background: var(--sand-150);
}

.badge.emerald {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.badge.amber {
  background: var(--amber-100);
  color: var(--amber-700);
}

.badge.on-dark {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(6px);
}

.badge.on-dark.alert {
  background: var(--terra-500);
}

.dot-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  background: var(--terra-700);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 750;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  animation: pulse-dot 1.8s var(--ease-out) 3;
}

.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--sand-200);
  color: var(--sand-900);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.avatar.alt {
  background: linear-gradient(140deg, var(--sage-100), var(--sage-200));
  color: var(--ink-800);
  box-shadow: 0 0 0 1px rgba(58, 84, 70, 0.08) inset;
}

.avatar.sm {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  font-size: 0.72rem;
}

/* ==========================================================================
   CAMILLAS (VISUALIZADOR DE CUPO)
   ========================================================================== */
.reformer-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.reformer-bed {
  display: inline-block;
  width: 24px;
  height: 14px;
  border-radius: 5px;
  border: 1.5px solid var(--sand-300);
  background: var(--sand-50);
  color: var(--sand-400);
  position: relative;
  transition: transform 0.3s var(--ease-spring);
}

.reformer-bed::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.45;
}

.reformer-bed.filled {
  border-color: var(--sage-600);
  background: var(--sage-200);
  color: var(--sage-700);
}

.reformer-bed.filled::after {
  opacity: 1;
}

.reformer-bed.blocked {
  border-color: var(--terra-400);
  background: repeating-linear-gradient(-45deg, var(--terra-100) 0 3px, var(--terra-50) 3px 6px);
  color: var(--terra-600);
}

.reformer-bed.my-spot {
  border-color: var(--emerald-600);
  background: var(--emerald-500);
  color: #fff;
  box-shadow: 0 0 0 3px var(--emerald-100);
  animation: bed-pop 0.5s var(--ease-spring) both 0.25s;
}

.reformer-bed.my-spot::after {
  opacity: 0.9;
}

.class-row-card:hover .reformer-bed:not(.filled):not(.blocked):not(.my-spot) {
  border-color: var(--sage-400);
}

/* ==========================================================================
   BARRA DEMO
   ========================================================================== */
.demo-bar {
  height: var(--demo-h);
  background: var(--sage-950);
  color: #fff;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: var(--z-demobar);
  display: flex;
  align-items: center;
}

.demo-bar-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(205, 116, 81, 0.18);
  color: var(--terra-200);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0;
}

.demo-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra-400);
  animation: pulse-dot 1.8s var(--ease-out) infinite;
}

.demo-bar-text {
  color: var(--sage-300);
}

.demo-switch-pills {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--sage-300);
}

.demo-pill svg {
  width: 15px;
  height: 15px;
}

.demo-pill:hover {
  color: #fff;
}

.demo-pill.active {
  background: var(--paper);
  color: var(--ink-900);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Variante clara (selector Día / Semana) */
.segmented {
  display: inline-flex;
  background: var(--sand-150);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 2px;
}

.segmented .demo-pill {
  color: var(--sand-700);
  padding: 6px 16px;
}

.segmented .demo-pill:hover {
  color: var(--ink-900);
}

.segmented .demo-pill.active {
  background: var(--paper);
  color: var(--ink-900);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   SIDEBAR Y CARCASA
   ========================================================================== */
.sidebar {
  position: fixed;
  top: var(--demo-h);
  bottom: 0;
  left: 0;
  width: 256px;
  background: rgba(255, 254, 251, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(150deg, var(--sage-600), var(--sage-800));
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.95rem;
  line-height: 1;
  padding-bottom: 5px;
  box-shadow: 0 10px 20px -10px rgba(43, 64, 53, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  flex-shrink: 0;
}

.brand strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink-950);
}

.brand small {
  display: block;
  color: var(--sand-600);
  font-size: 0.64rem;
  letter-spacing: 0;
  margin-top: 4px;
  font-weight: 650;
}

.sidebar .brand {
  margin: 0 6px 36px;
}

.nav-label {
  margin: 0 14px 12px;
  color: var(--sand-400);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--sand-700);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 550;
  border-radius: 14px;
  min-height: 46px;
  position: relative;
}

.nav button svg {
  width: 19px;
  height: 19px;
  transition: transform 0.4s var(--ease-spring);
}

.nav button:hover {
  background: var(--sand-100);
  color: var(--ink-950);
}

.nav button:hover svg {
  transform: scale(1.1) rotate(-4deg);
}

.nav button.active {
  background: var(--paper);
  color: var(--ink-900);
  font-weight: 650;
  box-shadow: var(--shadow-card);
}

.nav button.active svg {
  color: var(--sage-600);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sage-600);
}

.nav-count {
  margin-left: auto;
  background: var(--terra-700);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 750;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 18px;
  line-height: 1.6;
  font-size: 0.76rem;
  color: var(--sand-700);
  background: var(--sand-100);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.sidebar-bottom::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -40px;
  top: -40px;
  border-radius: 50%;
  border: 1px solid var(--sand-300);
  box-shadow: 0 0 0 16px rgba(214, 203, 189, 0.18);
  animation: breathe 7s ease-in-out infinite;
}

.sidebar-bottom strong {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  color: var(--ink-800);
  font-size: 1rem;
  margin-bottom: 4px;
}

.workspace {
  margin-left: 256px;
  min-height: calc(100dvh - var(--demo-h));
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 242, 0.78);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: var(--demo-h);
  z-index: var(--z-topbar);
}

.top-context {
  font-size: 0.86rem;
  color: var(--sand-700);
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-context svg {
  width: 18px;
  height: 18px;
  color: var(--sage-500);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  padding: 4px 14px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid var(--line);
}

.user-mini .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.user-info {
  line-height: 1.2;
}

.user-name {
  font-weight: 650;
  color: var(--ink-950);
}

.user-mini small {
  display: block;
  font-size: 0.7rem;
  color: var(--sand-600);
}

.mobile-brand {
  display: none;
}

.page {
  padding: 36px 40px 72px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.desktop-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.desktop-split-main {
  min-width: 0;
}

.desktop-split-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: calc(var(--demo-h) + 96px);
}

/* ==========================================================================
   ENCABEZADOS DE PÁGINA
   ========================================================================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-head > div:first-child {
  min-width: 0;
  max-width: 640px;
}

.page-head h1 {
  margin: 10px 0 10px;
}

.page-head p {
  color: var(--sand-700);
  font-size: 0.95rem;
  max-width: 58ch;
}

.page-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   ALUMNA: SALUDO Y SALDO
   ========================================================================== */
.student-top-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.student-greeting h1 {
  margin: 8px 0 12px;
}

.fixed-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--terra-700);
  background: var(--terra-50);
  border: 1px solid var(--terra-100);
  padding: 5px 12px 5px 10px;
  border-radius: var(--radius-pill);
}

.fixed-slot-pill svg {
  width: 15px;
  height: 15px;
}

.fixed-slot-pill.flexible {
  color: var(--sage-700);
  background: var(--sage-50);
  border-color: var(--sage-100);
}

.balance-capsule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.balance-capsule:hover {
  border-color: var(--sage-300);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.balance-capsule-badge {
  background: var(--emerald-700);
  color: #fff;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.balance-capsule-badge.alert {
  background: var(--terra-700);
}

.balance-capsule-text {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--ink-900);
}

/* Tarjeta del pack */
.pack-hero-card {
  background:
    radial-gradient(420px 220px at 110% 120%, rgba(142, 171, 154, 0.35), transparent 60%),
    radial-gradient(300px 180px at -10% -20%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(155deg, var(--sage-700) 0%, var(--sage-900) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(23, 34, 28, 0.6);
  margin-bottom: 22px;
  isolation: isolate;
}

.desktop-split-aside .pack-hero-card {
  margin-bottom: 0;
}

.pack-hero-card::before,
.pack-hero-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.pack-hero-card::after {
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -110px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.025), 0 0 0 56px rgba(255, 255, 255, 0.02);
  animation: breathe 8s ease-in-out infinite;
}

.pack-hero-card::before {
  width: 90px;
  height: 90px;
  right: 30px;
  top: -40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pack-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.pack-hero-numbers {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.pack-hero-big {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  font-weight: 350;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pack-hero-sub {
  font-size: 0.9rem;
  color: var(--sage-200);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 18px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage-300), #e9f2ec);
  border-radius: var(--radius-pill);
  animation: grow-x 1.1s var(--ease-out) both 0.2s;
}

.progress-fill.low {
  background: linear-gradient(90deg, var(--terra-500), var(--terra-200));
}

.pack-hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.76rem;
  color: var(--sage-200);
}

.pack-hero-cta {
  margin-top: 18px;
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.pack-hero-cta:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

/* ==========================================================================
   SELECTOR DE DÍAS
   ========================================================================== */
.date-selector-bar {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-subtle);
}

.date-selector-bar.flush {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
  box-shadow: none;
  padding: 16px 20px 12px;
}

.date-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.date-selector-header .eyebrow {
  margin: 0;
}

.date-selector-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, 1fr);
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 2px 6px;
  scroll-snap-type: x mandatory;
}

.date-selector-scroll::-webkit-scrollbar {
  display: none;
}

.date-pill {
  padding: 11px 8px 9px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--sand-50);
  color: var(--sand-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  scroll-snap-align: start;
}

.date-pill small {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--sand-600);
}

.date-pill strong {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 450;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.date-pill .pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s;
}

.date-pill:hover {
  background: var(--paper);
  border-color: var(--sand-300);
  transform: translateY(-2px);
}

.date-pill.active {
  background: linear-gradient(180deg, var(--sage-600), var(--sage-800));
  border-color: var(--sage-700);
  color: #fff;
  box-shadow: 0 12px 22px -10px rgba(43, 64, 53, 0.7);
  transform: translateY(-3px);
  transition: transform 0.45s var(--ease-spring), background 0.3s, box-shadow 0.3s;
}

.date-pill.active small {
  color: var(--sage-200);
}

.date-pill.today:not(.active) {
  border-color: var(--sage-400);
  background: var(--sage-50);
}

.date-pill.today .pill-dot {
  background: var(--sage-500);
}

.date-pill.active .pill-dot {
  background: rgba(255, 255, 255, 0.7);
}

.date-pill.has-booking .pill-dot {
  background: var(--terra-500);
}

/* Filtros de horario */
.time-filter-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.time-filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-pill-btn {
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.79rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--sand-800);
  white-space: nowrap;
}

.filter-pill-btn:hover {
  background: var(--paper);
  border-color: var(--sand-400);
}

.filter-pill-btn.active {
  background: var(--sage-900);
  color: #fff;
  border-color: var(--sage-900);
}

/* ==========================================================================
   TARJETAS DE CLASES
   ========================================================================== */
.schedule-grid,
.schedule-list {
  display: grid;
  gap: 12px;
}

.class-card,
.class-row-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.class-card:hover,
.class-row-card:hover {
  border-color: var(--sand-300);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.class-card.booked-by-me,
.class-row-card.booked-by-me {
  border-color: var(--emerald-200);
  background: linear-gradient(90deg, var(--emerald-50), var(--paper) 60%);
}

.class-row-card.booked-by-me::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--emerald-500);
}

.class-row-card.past {
  background: transparent;
  box-shadow: none;
  opacity: 0.6;
}

.class-row-card.past:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}

.class-card.cancelled,
.class-row-card.cancelled {
  opacity: 0.55;
  background: var(--sand-100);
}

.class-card-left,
.class-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.time-box,
.time-badge {
  background: var(--sand-100);
  border-radius: 14px;
  padding: 9px 12px;
  text-align: center;
  width: 74px;
  flex-shrink: 0;
  transition: background 0.3s;
}

.class-row-card:hover .time-badge {
  background: var(--sage-50);
}

.time-box strong,
.time-badge strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 450;
  color: var(--ink-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.time-box small,
.time-badge small {
  display: block;
  font-size: 0.68rem;
  color: var(--sand-600);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.class-card-details h3,
.class-details-group h3 {
  font-size: 1rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.class-card-meta,
.class-meta-group {
  font-size: 0.8rem;
  color: var(--sand-600);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.class-meta-group strong {
  color: var(--ink-800);
}

.class-card-action,
.class-right-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pestañas de alumna */
.student-subtabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
  background: var(--sand-150);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}

.student-subtabs::-webkit-scrollbar {
  display: none;
}

.student-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sand-700);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.student-subtab-btn:hover {
  color: var(--ink-900);
}

.student-subtab-btn.active {
  color: var(--ink-900);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  font-weight: 700;
}

.student-subtab-btn svg {
  width: 16px;
  height: 16px;
}

.student-subtab-btn .badge {
  padding: 1px 8px;
}

/* Mis reservas */
.booking-item-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.3s, box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.booking-item-card:last-child {
  margin-bottom: 0;
}

.booking-item-card:hover {
  border-color: var(--sand-300);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.booking-date-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.booking-item-info h3 {
  font-size: 1rem;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-item-info > p:not(.countdown-notice) {
  font-size: 0.85rem;
  color: var(--sand-800);
}

.countdown-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  margin-top: 8px;
}

.countdown-notice.can-refund {
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-200);
}

.countdown-notice.late-penalty {
  background: var(--terra-50);
  color: var(--terra-700);
  border: 1px solid var(--terra-200);
}

.countdown-notice svg {
  width: 14px;
  height: 14px;
}

.booking-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--sand-150);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row small {
  display: block;
  color: var(--sand-600);
  margin-top: 2px;
  font-size: 0.78rem;
}

/* ==========================================================================
   PROFESORA: AGENDA Y ASISTENCIA
   ========================================================================== */
.admin-class-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.3s, box-shadow 0.35s var(--ease-out);
}

.admin-class-card:hover {
  border-color: var(--sand-300);
  box-shadow: var(--shadow-card);
}

.admin-class-card.cancelled {
  opacity: 0.6;
  background: var(--sand-50);
}

.admin-class-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-class-time {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-class-time .hours {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--ink-950);
  font-variant-numeric: tabular-nums;
}

.admin-class-time .title {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--sage-600);
}

.admin-class-time svg {
  width: 18px;
  height: 18px;
  color: var(--sage-500);
  align-self: center;
}

.admin-class-capacity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--sand-600);
  flex-wrap: wrap;
}

.admin-class-capacity strong {
  color: var(--ink-800);
}

.roster-empty {
  font-size: 0.84rem;
  color: var(--sand-600);
  padding: 4px 0;
  font-style: italic;
  font-family: var(--font-serif);
}

.attendees-chips-list {
  display: grid;
  gap: 8px;
}

.attendee-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sand-50);
  border: 1px solid var(--sand-150);
  gap: 12px;
  transition: background 0.25s, border-color 0.25s;
}

.attendee-chip:hover {
  background: var(--paper);
  border-color: var(--sand-200);
}

.attendee-chip-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--ink-900);
  min-width: 0;
}

.attendee-chip-name small {
  display: block;
  color: var(--sand-600);
  font-size: 0.72rem;
  font-weight: 500;
}

.attendee-chip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-attendance-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
}

.quick-attendance-btn:active {
  transform: scale(0.94);
}

.quick-attendance-btn svg {
  width: 14px;
  height: 14px;
}

.quick-attendance-btn.attended {
  background: var(--paper);
  color: var(--emerald-700);
  border-color: var(--emerald-200);
}

.quick-attendance-btn.attended:hover {
  background: var(--emerald-100);
}

.quick-attendance-btn.attended.active {
  background: var(--emerald-600);
  color: #fff;
  border-color: var(--emerald-600);
  box-shadow: 0 6px 14px -6px rgba(47, 122, 81, 0.7);
}

.quick-attendance-btn.absent {
  background: var(--paper);
  color: var(--terra-700);
  border-color: var(--terra-200);
}

.quick-attendance-btn.absent:hover {
  background: var(--terra-100);
}

.quick-attendance-btn.absent.active {
  background: var(--terra-600);
  color: #fff;
  border-color: var(--terra-600);
  box-shadow: 0 6px 14px -6px rgba(187, 92, 58, 0.7);
}

/* Métricas */
.admin-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.metric-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.metric-tile:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.metric-tile:first-child {
  background:
    radial-gradient(240px 140px at 110% 120%, rgba(142, 171, 154, 0.35), transparent 60%),
    linear-gradient(155deg, var(--sage-700), var(--sage-900));
  border-color: transparent;
  color: #fff;
}

.metric-tile:first-child .metric-tile-header,
.metric-tile:first-child small {
  color: var(--sage-200);
}

.metric-tile:first-child .metric-tile-header svg {
  color: var(--sage-200);
  background: rgba(255, 255, 255, 0.1);
}

.metric-tile:first-child strong {
  color: #fff;
}

.metric-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sand-600);
  letter-spacing: 0.1em;
}

.metric-tile-header svg {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 10px;
  color: var(--sage-600);
  background: var(--sage-50);
}

.metric-tile strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 12px 0 4px;
  color: var(--ink-950);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-tile strong.alert {
  color: var(--terra-600);
}

.metric-tile small {
  font-size: 0.78rem;
  color: var(--sand-600);
}

/* Tarjetas laterales */
.live-alert-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-subtle);
}

.live-alert-card.soft {
  background: var(--sand-100);
  border-color: transparent;
  box-shadow: none;
}

.live-alert-card.highlight {
  border-color: var(--sage-200);
  background: linear-gradient(180deg, var(--sage-50), var(--paper));
}

.live-alert-card p {
  font-size: 0.84rem;
  color: var(--sand-800);
  line-height: 1.55;
}

.live-alert-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.live-alert-title {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--sage-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-alert-title svg {
  width: 16px;
  height: 16px;
}

.live-alert-title.warn {
  color: var(--terra-600);
}

.next-class-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 450;
  color: var(--ink-950);
  letter-spacing: -0.01em;
}

.next-class-when {
  margin: 4px 0 10px !important;
}

.next-class-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem !important;
  font-weight: 600;
  color: var(--sage-700) !important;
  margin-bottom: 14px;
}

.next-class-hint.late {
  color: var(--terra-600) !important;
}

.next-class-hint svg {
  width: 15px;
  height: 15px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rules-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--sand-800);
  line-height: 1.5;
}

.rules-list li {
  display: flex;
  gap: 10px;
}

.rules-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--sage-400);
}

.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sand-50);
  margin-bottom: 8px;
  font-size: 0.8rem;
  transition: background 0.25s, transform 0.3s var(--ease-out);
}

.alert-row:last-child {
  margin-bottom: 0;
}

.alert-row:hover {
  background: var(--sand-100);
  transform: translateX(2px);
}

.alert-row.urgent {
  background: var(--terra-50);
  border: 1px solid var(--terra-100);
}

.alert-row strong {
  display: block;
  color: var(--ink-900);
  font-size: 0.85rem;
}

.alert-row small {
  color: var(--sand-700);
  font-size: 0.74rem;
}

.alert-row-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.alert-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.empty-note {
  font-size: 0.82rem;
  color: var(--sand-600);
  padding: 4px 0;
}

.whatsapp-action-pill,
.whatsapp-link-btn {
  background: #25d366;
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: background 0.25s, transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.whatsapp-action-pill {
  padding: 6px 11px;
}

.whatsapp-action-pill svg,
.whatsapp-link-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.whatsapp-action-pill.icon-only {
  width: 32px;
  height: 32px;
  padding: 0;
}

.whatsapp-action-pill.block {
  width: 100%;
  padding: 11px;
  font-size: 0.82rem;
}

.whatsapp-link-btn {
  width: 36px;
  height: 36px;
}

.whatsapp-action-pill:hover,
.whatsapp-link-btn:hover {
  background: #1fb85a;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 16px -8px rgba(37, 211, 102, 0.8);
}

/* Barra de fecha dentro del panel de agenda */
.day-strip-head {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--sand-50);
  border-bottom: 1px solid var(--line);
}

.day-strip-head span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 450;
}

.panel-body {
  padding: 18px 20px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-tools .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

/* Vista semanal */
.week-scroll {
  overflow-x: auto;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 10px;
  padding: 18px 20px;
  min-width: 940px;
}

.week-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

.week-day-head {
  text-align: center;
  padding: 8px;
  background: var(--sand-100);
  border-radius: 14px;
}

.week-day-head.today {
  background: var(--sage-700);
  color: #fff;
}

.week-day-head small {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sand-600);
}

.week-day-head.today small {
  color: var(--sage-200);
}

.week-day-head strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: 1.25rem;
}

.week-class-btn {
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sage-400);
  display: grid;
  gap: 2px;
}

.week-class-btn:hover {
  border-color: var(--sand-300);
  border-left-color: var(--sage-600);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.week-class-btn.full {
  border-left-color: var(--terra-500);
}

.week-class-btn.off {
  opacity: 0.5;
  border-left-color: var(--sand-300);
}

.week-class-btn strong {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.week-class-btn small {
  color: var(--sand-600);
  font-size: 0.7rem;
}

.week-empty {
  font-size: 0.74rem;
  color: var(--sand-400);
  text-align: center;
  padding: 10px;
  font-style: italic;
}

.att-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.att-btn.attended { background: var(--emerald-100); color: var(--emerald-700); }
.att-btn.attended.active { background: var(--emerald-600); color: #fff; }
.att-btn.absent { background: var(--terra-100); color: var(--terra-700); }
.att-btn.absent.active { background: var(--terra-600); color: #fff; }

/* ==========================================================================
   PANELES Y TABLAS
   ========================================================================== */
.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.panel + .panel {
  margin-top: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 1.2rem;
  text-transform: none;
}

.panel-head h2::first-letter {
}

.panel-head > svg {
  color: var(--sage-500);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

th {
  font-size: 0.68rem;
  letter-spacing: 0;
  color: var(--sand-600);
  font-weight: 700;
  padding: 14px 20px;
  background: var(--sand-50);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--sand-150);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 0.2s;
}

tbody tr:hover td {
  background: var(--sand-50);
}

td.empty-cell {
  text-align: center;
  padding: 36px;
  color: var(--sand-600);
}

.table-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-user-cell strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-900);
}

.table-user-cell small {
  display: block;
  font-size: 0.74rem;
  color: var(--sand-600);
  margin-top: 1px;
}

.table-user-cell small.alert {
  color: var(--terra-600);
  font-weight: 650;
}

.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--sand-600);
  font-size: 0.74rem;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

/* Buscador y filtros */
.search-filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-box {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}

.search-input-box svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--sand-600);
  pointer-events: none;
  transition: color 0.25s;
}

.search-input-box input {
  padding-left: 46px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  min-height: 46px;
  box-shadow: var(--shadow-subtle);
}

.search-input-box:focus-within svg {
  color: var(--sage-700);
}

.filter-pills-group {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--sand-150);
  border-radius: var(--radius-pill);
}

.filter-pills-group .btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--sand-700);
  min-height: 34px;
}

.filter-pills-group .btn:hover {
  color: var(--ink-900);
  transform: none;
}

.filter-pills-group .btn.primary {
  background: var(--paper);
  color: var(--ink-900);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   PACKS
   ========================================================================== */
.packs-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
  align-items: stretch;
}

.pack-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.3s;
}

.pack-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--sand-300);
}

.pack-card h2 {
  font-size: 1.6rem;
  margin: 10px 0 8px;
}

.pack-card p {
  font-size: 0.84rem;
  color: var(--sand-700);
  line-height: 1.55;
  margin-bottom: 20px;
}

.pack-card .muted {
  display: block;
  font-size: 0.74rem;
  margin-bottom: 18px;
}

.pack-card .btn {
  margin-top: auto;
  width: 100%;
}

.pack-price {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--ink-950);
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.pack-card.featured {
  background:
    radial-gradient(320px 200px at 110% 110%, rgba(142, 171, 154, 0.35), transparent 60%),
    linear-gradient(160deg, var(--sage-700), var(--sage-900));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 28px 50px -28px rgba(23, 34, 28, 0.7);
}

.pack-card.featured h2,
.pack-card.featured .pack-price {
  color: #fff;
}

.pack-card.featured .eyebrow {
  color: var(--sage-300);
}

.pack-card.featured p,
.pack-card.featured .muted {
  color: var(--sage-200);
}

.pack-card.featured .btn.primary {
  background: var(--paper);
  color: var(--ink-900);
  border-color: var(--paper);
}

.pack-card.featured .btn.primary:hover {
  background: var(--sand-100);
}

.pack-card.featured::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.pack-card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  background: var(--terra-500);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
}

/* ==========================================================================
   REPORTES Y AJUSTES
   ========================================================================== */
.reports-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.reports-layout .panel + .panel {
  margin-top: 0;
}

.report-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sand-150);
  font-size: 0.9rem;
  color: var(--sand-800);
}

.report-item-row:last-of-type {
  border-bottom: 0;
}

.report-item-row strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 450;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.report-item-row strong.good { color: var(--emerald-700); }
.report-item-row strong.bad  { color: var(--terra-700); }
.report-item-row strong.big  { font-size: 2rem; }

.occupancy-bar-track {
  height: 12px;
  background: var(--sand-150);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 4px 0 10px;
}

.occupancy-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--sage-400), var(--sage-700));
  animation: grow-x 1.2s var(--ease-out) both 0.25s;
}

.occupancy-note {
  display: block;
  color: var(--sand-600);
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.weekday-details {
  border-bottom: 1px solid var(--sand-150);
}

.weekday-details:last-child {
  border-bottom: 0;
}

.weekday-details summary {
  padding: 15px 22px;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.weekday-details summary::-webkit-details-marker {
  display: none;
}

.weekday-details summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.7px solid var(--sand-600);
  border-bottom: 1.7px solid var(--sand-600);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.3s var(--ease-out);
}

.weekday-details[open] summary::after {
  transform: rotate(225deg) translateY(-1px);
}

.weekday-details summary:hover {
  background: var(--sand-50);
}

.weekday-details summary .muted {
  font-weight: 500;
  font-size: 0.8rem;
  margin-left: auto;
  margin-right: 14px;
}

.weekday-details[open] .template-list {
  animation: rise 0.4s var(--ease-out);
}

.template-list {
  padding: 0 22px 14px;
}

.template-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--sand-100);
  font-size: 0.86rem;
}

.template-row small {
  display: block;
  color: var(--sand-600);
  font-size: 0.76rem;
}

/* ==========================================================================
   AVISOS
   ========================================================================== */
.notification-item {
  display: flex;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--sand-150);
  position: relative;
  transition: background 0.2s;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: var(--sand-50);
}

.notification-item.unread {
  background: linear-gradient(90deg, var(--sage-50), transparent 70%);
}

.notification-item.unread::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--terra-500);
}

.notification-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--sand-100);
  color: var(--sage-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.notification-item.unread .notification-icon-box {
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.notification-body {
  min-width: 0;
}

.notification-body h3 {
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.notification-body p {
  font-size: 0.86rem;
  color: var(--sand-800);
  line-height: 1.5;
}

.notification-body time {
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--sand-600);
}

/* ==========================================================================
   ESTADO VACÍO
   ========================================================================== */
.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--sand-600);
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--sand-100);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: var(--sage-600);
  position: relative;
}

.empty-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  border: 1px dashed var(--sand-300);
  animation: breathe 5s ease-in-out infinite;
}

.empty p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink-900);
  line-height: 1.45;
  max-width: 40ch;
  margin: 0 auto;
}

.empty p small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--sand-600);
  margin-top: 6px;
}

.holiday-notice {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--amber-100);
  border: 1px solid rgba(201, 138, 28, 0.2);
  margin-bottom: 18px;
}

.holiday-notice h3 {
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.holiday-notice p {
  color: var(--sand-800);
  font-size: 0.86rem;
}

/* ==========================================================================
   FORMULARIOS Y MODALES
   ========================================================================== */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--sand-800);
  letter-spacing: 0.01em;
}

input, select, textarea {
  display: block;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--sand-50);
  padding: 11px 15px;
  color: var(--ink-950);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease-out), background 0.2s;
}

input::placeholder,
textarea::placeholder {
  color: var(--sand-400);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--sand-400);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--sage-500);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(142, 171, 154, 0.25);
  outline: none;
}

input[readonly] {
  background: var(--sand-100);
}

label input, label select, label textarea {
  margin-top: 7px;
}

label small {
  display: block;
  font-size: 0.74rem;
  color: var(--sand-600);
  margin-top: 6px;
  font-weight: 450;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fields-grid .full {
  grid-column: 1 / -1;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 550;
  cursor: pointer;
  min-height: 40px;
}

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--sage-700);
  margin: 0;
  flex-shrink: 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
  margin-top: 4px;
}

.slot-grid .checkbox-row {
  background: var(--sand-50);
  border: 1px solid var(--sand-150);
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.slot-grid .checkbox-row:has(input:checked) {
  background: var(--sage-50);
  border-color: var(--sage-300);
  color: var(--ink-900);
}

.modal-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.modal-section h3 {
  margin-bottom: 10px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

dialog {
  border: 0;
  border-radius: var(--radius-xl);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: 90dvh;
  color: var(--ink-900);
  background: var(--paper);
  box-shadow: var(--shadow-modal);
  overflow-y: auto;
  overscroll-behavior: contain;
}

dialog[open] {
  animation: pop-in 0.45s var(--ease-out);
}

dialog[open]::backdrop {
  animation: fade 0.35s ease;
}

dialog::backdrop {
  background: rgba(23, 34, 28, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-head {
  padding: 22px 26px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 254, 251, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 1.5rem;
}

.modal-head .icon-btn {
  border-radius: 50%;
  width: 38px;
  height: 38px;
}

.modal-head .icon-btn:hover svg {
  transform: rotate(90deg);
}

.modal-head .icon-btn svg {
  transition: transform 0.35s var(--ease-out);
}

.modal-body {
  padding: 22px 26px 24px;
}

.modal-body > h3 {
  margin-bottom: 10px;
}

.modal-footer {
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 24px) scale(0.96);
  background: var(--sage-900);
  color: #fff;
  padding: 13px 22px 13px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 550;
  box-shadow: 0 20px 40px -14px rgba(23, 34, 28, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.5s var(--ease-spring);
  z-index: var(--z-toast);
  width: max-content;
  max-width: calc(100vw - 40px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toast::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--emerald-500) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12l4 4 8-8'/></svg>") center/12px no-repeat;
}

.toast.error::before {
  background: var(--terra-500) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'><path d='M12 7v6M12 17h.01'/></svg>") center/12px no-repeat;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.toast.error {
  background: var(--terra-800);
}

.error-text {
  font-size: 0.84rem;
  color: var(--terra-700);
  padding: 11px 14px;
  background: var(--terra-50);
  border: 1px solid var(--terra-200);
  border-radius: 14px;
  margin-bottom: 16px;
  display: none;
}

.error-text.show {
  display: block;
  animation: rise 0.35s var(--ease-out);
}

.notice {
  padding: 14px 18px;
  font-size: 0.86rem;
  line-height: 1.55;
  background: var(--sand-100);
  border-radius: 14px;
  color: var(--sand-800);
  margin-bottom: 18px;
}

.notice.green {
  background: var(--sage-50);
  color: var(--ink-800);
  box-shadow: 0 0 0 1px var(--sage-100) inset;
}

.notice strong {
  color: var(--ink-950);
}

.rule-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: transparent;
  border: 1px dashed var(--sand-300);
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--sand-800);
  line-height: 1.55;
}

.rule-banner svg {
  color: var(--sage-500);
  margin-top: 1px;
  width: 18px;
  height: 18px;
}

.spaced-top {
  margin-top: 18px;
}

/* ==========================================================================
   INGRESO
   ========================================================================== */
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.login-art {
  padding: 56px 64px;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--sage-900);
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/pilates_studio_hero.jpg') center/cover no-repeat;
  animation: slow-zoom 18s var(--ease-out) both;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(23, 34, 28, 0.25) 0%, rgba(23, 34, 28, 0.15) 35%, rgba(23, 34, 28, 0.88) 100%),
    linear-gradient(100deg, rgba(31, 46, 38, 0.72), rgba(31, 46, 38, 0.2));
}

.login-art .brand-mark {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.login-art .brand strong {
  color: #fff;
}

.login-art .brand small {
  color: var(--sage-200);
}

.login-art h1 {
  font-size: clamp(2.8rem, 2rem + 2.6vw, 4.6rem);
  line-height: 0.98;
  font-weight: 350;
  color: #fff;
  max-width: 560px;
  margin: auto 0 22px;
  letter-spacing: -0.035em;
  animation: rise 1s var(--ease-out) both 0.15s;
}

.login-art h1 em {
  color: var(--sage-200);
  font-weight: 300;
}

.login-art p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--sage-100);
  max-width: 380px;
  animation: rise 1s var(--ease-out) both 0.3s;
}

.login-art footer {
  margin-top: 44px;
  font-size: 0.7rem;
  color: var(--sage-300);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fade 1.2s ease both 0.6s;
}

.login-art footer::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.art-ring {
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  right: -260px;
  top: 12%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.015);
  animation: breathe 9s ease-in-out infinite;
  pointer-events: none;
}

.login-form-side {
  display: grid;
  place-content: center;
  padding: 48px 40px;
  position: relative;
}

.login-form-card {
  width: 380px;
  max-width: 100%;
  animation: rise 0.8s var(--ease-out) both 0.1s;
}

.login-form-card h2 {
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 10px 0 10px;
}

.login-form-card > p {
  font-size: 0.92rem;
  color: var(--sand-700);
  margin-bottom: 28px;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  font-size: 0.95rem;
  margin-top: 4px;
}

.login-help {
  font-size: 0.8rem;
  color: var(--sand-600);
  margin-top: 18px;
  line-height: 1.6;
}

.login-mobile-brand {
  margin-bottom: 32px;
}

.demo-entry {
  margin-top: 30px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.demo-entry p {
  font-size: 0.68rem;
  letter-spacing: 0;
  color: var(--sand-600);
  margin-bottom: 12px;
  font-weight: 700;
}

.demo-entry .inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.demo-entry .inline-actions .btn {
  flex: 1;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.boot-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
  padding: 20px;
}

.boot-screen .brand-mark {
  margin: 0 auto;
  animation: breathe 2.4s ease-in-out infinite;
}

.boot-screen p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--sage-700);
}

.contact-strip {
  margin-top: 18px;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--sand-100);
  color: var(--ink-900);
  text-decoration: none;
  transition: background 0.25s, transform 0.3s var(--ease-out);
}

.contact-strip:active {
  transform: scale(0.98);
}

.contact-strip > span:nth-child(2) {
  flex: 1;
  font-size: 0.86rem;
}

.contact-strip small {
  display: block;
  color: var(--sand-700);
  font-size: 0.78rem;
}

.contact-strip > svg {
  color: var(--sand-600);
}

/* Punto final del logotipo en color arcilla */
.brand strong i,
.mobile-brand i {
  font-style: normal;
  color: var(--terra-500);
}

.mobile-only,
.contact-strip.mobile-only,
.install-card.mobile-only {
  display: none !important;
}

/* ==========================================================================
   IDENTIDAD FOR FRIENDS
   ========================================================================== */

/* Tipografía: una sola familia, con ancho y peso como herramienta */
body {
  font-weight: 400;
  font-optical-sizing: auto;
}

h1 {
  font-family: var(--font-serif);
  font-weight: 720;
  font-stretch: 94%;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-serif);
  font-weight: 680;
  font-stretch: 94%;
  letter-spacing: -0.025em;
}

h3 {
  font-weight: 650;
}

h1 em,
h2 em {
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

strong {
  font-weight: 680;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sand-700);
}

.page-date {
  display: block;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--sand-700);
}

.page-head h1 {
  margin: 6px 0 10px;
}

.page-head {
  margin-bottom: 26px;
}

/* Botones: sólidos, sin degradés */
.btn {
  font-weight: 620;
  box-shadow: none;
}

.btn.primary {
  background: var(--sage-900);
  border-color: var(--sage-900);
  box-shadow: none;
}

.btn.primary:hover {
  background: var(--sage-700);
  border-color: var(--sage-700);
  box-shadow: none;
}

.btn.soft {
  background: var(--sand-200);
  color: var(--ink-900);
}

.btn.soft:hover {
  background: var(--sand-300);
}

/* Logotipo */
.brand-mark {
  background: var(--sage-900);
  color: var(--sand-100);
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 800;
  font-stretch: 94%;
  font-size: 1.75rem;
  padding-bottom: 3px;
  border-radius: 14px;
  box-shadow: none;
}

.brand strong {
  font-family: var(--font-serif);
  font-weight: 780;
  font-stretch: 80%;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand small {
  font-size: 0.78rem;
  font-weight: 550;
  margin-top: 3px;
}

/* Barra lateral ciruela */
.sidebar {
  background: var(--sage-900);
  border-right: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar .brand-mark {
  background: var(--sand-100);
  color: var(--ink-900);
}

.sidebar .brand strong {
  color: #fff;
}

.sidebar .brand small {
  color: var(--sage-300);
}

.sidebar .nav-label {
  color: var(--sage-400);
  font-size: 0.8rem;
  font-weight: 550;
}

.nav button {
  color: var(--sage-300);
  font-weight: 520;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav button.active {
  background: var(--sand-100);
  color: var(--ink-900);
  box-shadow: none;
}

.nav button.active svg {
  color: var(--ink-900);
}

.nav button.active::before {
  content: none;
}

.sidebar-bottom {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sage-300);
}

.sidebar-bottom::after {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.03);
}

.sidebar-bottom strong {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 650;
  color: #fff;
  font-size: 0.92rem;
}

.topbar {
  background: rgba(246, 239, 240, 0.86);
}

.user-mini {
  border: 0;
}

/* Paneles y tarjetas: planos, la jerarquía la da el color de fondo */
.panel,
.live-alert-card,
.class-row-card,
.admin-class-card,
.booking-item-card,
.date-selector-bar,
.pack-card,
.metric-tile {
  border-color: transparent;
  box-shadow: none;
}

.panel {
  border-radius: var(--radius-lg);
}

.panel-head {
  border-bottom-color: var(--sand-150);
}

.panel-head h2 {
  font-size: 1.3rem;
}

.live-alert-card {
  border-radius: 22px;
}

.live-alert-card.soft {
  background: var(--sand-200);
}

.live-alert-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-900);
}

.live-alert-title svg {
  color: var(--sage-500);
}

.live-alert-title.warn,
.live-alert-title.warn svg {
  color: var(--terra-700);
}

th {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sand-700);
  background: var(--paper);
}

/* Frase del día (panel de Dalma) */
.today-statement {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 0.9rem + 1vw, 1.75rem);
  line-height: 1.42;
  font-weight: 480;
  font-stretch: 94%;
  letter-spacing: -0.015em;
  color: var(--sand-800);
  max-width: 980px;
  margin: 0 0 34px;
  text-wrap: pretty;
}

.today-statement .stat {
  display: inline-block;
  padding: 0 0.32em;
  margin: 0 0.04em;
  border-radius: 0.32em;
  background: var(--sage-900);
  color: #fff;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.today-statement .stat.green {
  background: var(--emerald-500);
}

.today-statement .stat.red {
  background: var(--terra-500);
}

/* Etiquetas de disponibilidad con un resorte dibujado */
.spring-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.spring-chip::before {
  content: "";
  width: 15px;
  height: 9px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px);
  opacity: 0.85;
}

.spring-chip.green {
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.spring-chip.yellow {
  background: var(--amber-100);
  color: var(--amber-700);
}

.spring-chip.yellow::before {
  width: 10px;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 3px);
}

.spring-chip.red {
  background: var(--terra-100);
  color: var(--terra-700);
}

.spring-chip.red::before {
  width: 7px;
  background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 2.5px);
}

/* Días */
.date-selector-bar {
  background: var(--paper);
}

.date-pill {
  background: transparent;
  border-color: transparent;
}

.date-pill small {
  font-size: 0.76rem;
  font-weight: 550;
  color: var(--sand-700);
}

.date-pill strong {
  font-family: var(--font-serif);
  font-weight: 760;
  font-stretch: 94%;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.date-pill:hover {
  background: var(--sand-100);
  border-color: transparent;
}

.date-pill.active {
  background: var(--sage-900);
  border-color: var(--sage-900);
  box-shadow: none;
  transform: none;
}

.date-pill.active small {
  color: var(--sage-300);
}

.date-pill.today:not(.active) {
  background: var(--sand-100);
  border-color: var(--sand-300);
}

.date-pill.has-booking .pill-dot {
  background: var(--blue-500);
}

.filter-pill-btn {
  border-color: transparent;
  background: var(--sand-200);
  color: var(--ink-900);
  font-weight: 560;
}

.filter-pill-btn:hover {
  background: var(--sand-300);
  border-color: transparent;
}

.filter-pill-btn.active {
  background: var(--sage-900);
}

/* Clases */
.class-row-card {
  border-radius: 22px;
  padding: 14px 18px 14px 12px;
}

.class-row-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-card);
}

.time-box,
.time-badge {
  background: transparent;
  padding: 4px 6px;
}

.class-row-card:hover .time-badge {
  background: transparent;
}

.time-box strong,
.time-badge strong {
  font-family: var(--font-serif);
  font-weight: 760;
  font-stretch: 94%;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.time-box small,
.time-badge small {
  font-size: 0.74rem;
}

.class-row-card.booked-by-me {
  background: var(--paper);
  border-color: var(--emerald-200);
}

.reformer-bed {
  border-color: var(--sand-300);
  background: transparent;
}

.reformer-bed.filled {
  border-color: var(--sage-800);
  background: var(--sage-200);
  color: var(--ink-800);
}

.admin-class-card {
  border-radius: 22px;
  background: var(--paper);
}

.admin-class-head {
  border-bottom: 1px solid var(--sand-150);
}

.admin-class-time {
  align-items: center;
}

.admin-class-time .hours {
  font-family: var(--font-serif);
  font-weight: 760;
  font-stretch: 94%;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.admin-class-time .title {
  color: var(--sand-700);
  font-weight: 550;
}

.roster-empty,
.empty p,
.boot-screen p {
  font-family: var(--font-sans);
  font-style: normal;
}

.day-strip-head span {
  font-family: var(--font-sans);
  font-weight: 650;
}

/* Próxima clase como ticket */
.next-ticket {
  --notch: 132px;
  background: var(--sage-900);
  color: #fff;
  border-radius: 26px;
  padding: 22px 22px 18px;
  position: relative;
  -webkit-mask:
    radial-gradient(circle 12px at 0 var(--notch), #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--notch), #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 12px at 0 var(--notch), #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at 100% var(--notch), #0000 97%, #000) right / 51% 100% no-repeat;
}

.next-ticket-label {
  font-size: 0.86rem;
  line-height: 20px;
  height: 20px;
  color: var(--sage-300);
  margin-bottom: 6px;
}

.next-ticket-main {
  height: 84px;
  padding-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.next-ticket-day {
  font-family: var(--font-serif);
  display: block;
  font-weight: 780;
  font-stretch: 94%;
  font-size: 2.5rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.next-ticket-date {
  color: var(--sage-300);
  font-size: 0.92rem;
}

.next-ticket-time {
  font-family: var(--font-serif);
  font-weight: 300;
  font-stretch: 94%;
  font-size: 2.6rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--amber-500);
}

.next-ticket-meta {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1.5px dashed rgba(255, 255, 255, 0.22);
  font-weight: 600;
}

.next-ticket .next-class-hint {
  color: var(--sage-300) !important;
  margin: 6px 0 14px;
  font-weight: 500;
}

.next-ticket .next-class-hint.late {
  color: var(--terra-200) !important;
}

.ticket-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #fff;
}

.ticket-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: transparent;
}

.ticket-cancel {
  color: var(--terra-200);
}

.ticket-cancel:hover {
  color: #fff;
  background: rgba(224, 83, 61, 0.35);
}

.next-ticket.empty-ticket {
  background: var(--sand-200);
  color: var(--ink-900);
  -webkit-mask: none;
  mask: none;
}

.next-ticket.empty-ticket .next-ticket-label {
  color: var(--sand-700);
}

.next-ticket-none {
  font-size: 1.05rem;
  font-weight: 560;
}

/* Pack como fichas de clases */
.pack-hero-card {
  background: var(--paper);
  color: var(--ink-900);
  box-shadow: none;
  border-radius: 26px;
}

.pack-hero-card::before,
.pack-hero-card::after {
  content: none;
}

.pack-hero-numbers {
  align-items: center;
  gap: 12px;
}

.pack-hero-big {
  font-family: var(--font-serif);
  font-weight: 780;
  font-stretch: 94%;
  font-size: 4.4rem;
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: var(--emerald-600);
}

.pack-hero-card.urgent .pack-hero-big {
  color: var(--terra-500);
}

.pack-hero-sub {
  color: var(--sand-700);
  font-size: 0.92rem;
  line-height: 1.3;
}

.pack-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 12px;
}

.pack-tally i {
  width: 20px;
  height: 30px;
  border-radius: 7px;
  background: var(--sand-200);
  transform-origin: bottom;
  animation: tally-in 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.pack-tally i.booked {
  background: var(--blue-500);
}

.pack-tally i.free {
  background: var(--emerald-500);
}

@keyframes tally-in {
  from { transform: scaleY(0.3); opacity: 0; }
}

.pack-tally.catalog {
  margin: 4px 0 14px;
  gap: 4px;
}

.pack-tally.catalog i {
  width: 10px;
  height: 18px;
  border-radius: 4px;
  animation: none;
}

.tally-legend {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: var(--sand-700);
}

.tally-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tally-legend li::before {
  content: "";
  width: 9px;
  height: 13px;
  border-radius: 3px;
  background: var(--sand-200);
}

.tally-legend .booked::before { background: var(--blue-500); }
.tally-legend .free::before { background: var(--emerald-500); }

.pack-hero-expiry {
  font-size: 0.86rem;
  color: var(--sand-800);
}

.pack-hero-expiry.alert {
  color: var(--terra-700);
  font-weight: 620;
}

.pack-hero-cta {
  background: var(--sand-100);
  color: var(--ink-900);
  border-color: transparent;
  backdrop-filter: none;
}

.pack-hero-cta:hover {
  background: var(--sand-200);
  color: var(--ink-900);
  border-color: transparent;
}

/* Catálogo de packs */
.pack-card {
  border-radius: 26px;
}

.pack-card h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-stretch: 94%;
  font-weight: 760;
  margin: 0 0 10px;
}

.pack-price {
  font-family: var(--font-serif);
  font-weight: 760;
  font-stretch: 94%;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
}

.pack-card.featured {
  background: var(--sage-900);
  box-shadow: none;
}

.pack-card.featured::after {
  content: none;
}

.pack-card-badge {
  background: var(--amber-500);
  color: var(--ink-900);
  font-size: 0.74rem;
  border-radius: var(--radius-pill);
}

.pack-card.featured .pack-tally i.free {
  background: var(--emerald-500);
}

/* Resorte 3D en estados vacíos */
.empty-spring,
.booked-spring {
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}

.empty-spring {
  display: block;
  width: 116px;
  height: 116px;
  margin: -10px auto 4px;
}

.empty-icon {
  display: none;
}

.empty p {
  font-weight: 560;
}

/* Ingreso */
.login-art {
  background: var(--sage-900);
  padding: 44px 56px 52px;
}

.login-art::before,
.login-art::after,
.art-ring {
  content: none;
  display: none;
}

.login-art .brand-mark {
  background: var(--sand-100);
  color: var(--ink-900);
  backdrop-filter: none;
  box-shadow: none;
}

.login-art .brand {
  position: relative;
  z-index: 2;
}

.login-springs {
  position: absolute;
  top: -3%;
  right: 2%;
  width: min(78%, 680px);
  height: auto;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 34%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 34%, #000 60%, transparent 100%);
  pointer-events: none;
  transform-origin: 50% 0;
  animation:
    springs-drop 1.5s cubic-bezier(0.22, 1.2, 0.36, 1) both 0.1s,
    springs-breathe 7s ease-in-out 1.7s infinite;
}

@keyframes springs-drop {
  0%   { transform: translateY(-105%); }
  100% { transform: translateY(0); }
}

/* Respiración: los resortes se estiran apenas, al ritmo de una inhalación */
@keyframes springs-breathe {
  0%, 100% { transform: scaleY(1); }
  45%      { transform: scaleY(1.035); }
}

.login-copy {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.login-art .login-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 2.4rem + 8vw, 11rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: var(--sand-100);
  margin: 0 0 26px;
  max-width: none;
  animation: none;
}

.login-art .login-wordmark::after {
  content: ".";
  color: var(--terra-500);
}

.login-art p {
  color: var(--sage-300);
  max-width: 36ch;
  font-size: 1.02rem;
  animation: none;
}

.login-form-card h2 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 780;
  font-stretch: 94%;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0 0 12px;
}

.demo-entry {
  background: var(--sand-200);
  border: 0;
  box-shadow: none;
}

.demo-entry p {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sand-800);
}

/* Barra demo */
.demo-bar {
  background: var(--sage-950);
}

.demo-tag {
  background: var(--amber-500);
  color: var(--ink-950);
  font-size: 0.72rem;
}

.demo-tag::before {
  content: none;
}

/* Detalles finales */
.toast {
  background: var(--sage-900);
}

.week-day-head.today {
  background: var(--sage-900);
}

.week-class-btn {
  border-left-color: var(--emerald-500);
}

.week-class-btn.full {
  border-left-color: var(--terra-500);
}

.segmented .demo-pill.active,
.filter-pills-group .btn.primary {
  box-shadow: none;
}

.metric-tile:first-child {
  background: var(--sage-900);
}

.notification-item.unread {
  background: linear-gradient(90deg, var(--sand-100), transparent 70%);
}

.fixed-slot-pill {
  background: var(--terra-100);
  border-color: transparent;
}

.fixed-slot-pill.flexible {
  background: var(--sand-200);
  color: var(--ink-900);
}

.balance-capsule {
  border: 0;
  box-shadow: none;
}

.balance-capsule-badge {
  font-weight: 760;
}

/* Reserva confirmada */
.booked-hero {
  text-align: center;
  padding: 4px 0 8px;
}

.booked-spring {
  display: block;
  width: 150px;
  height: 150px;
  margin: -14px auto 0;
  transform-origin: 50% 70%;
  animation: boing 1.1s cubic-bezier(0.3, 1.6, 0.5, 1) both 0.15s;
}

@keyframes boing {
  0%   { transform: translateY(-30px) scale(0.6, 1.25) rotate(-8deg); opacity: 0; }
  40%  { transform: translateY(0) scale(1.18, 0.82) rotate(0); opacity: 1; }
  70%  { transform: scale(0.94, 1.06); }
  100% { transform: none; }
}

.booked-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 780;
  font-stretch: 94%;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink-900);
}

.booked-sub {
  margin-top: 8px;
  font-size: 1.02rem;
  color: var(--sand-800);
}

.booked-actions {
  justify-content: center;
  margin-top: 20px;
}

.booked-note {
  margin-top: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--sand-700);
}

/* Constancia */
.streak-total {
  font-size: 0.95rem !important;
  color: var(--sand-800);
}

.streak-total strong {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 780;
  font-stretch: 94%;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin-right: 4px;
}

.streak-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  height: 92px;
  margin: 12px 0 10px;
}

.streak-bars span {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.streak-bars i {
  width: 100%;
  height: max(6px, var(--h));
  border-radius: 8px;
  background: var(--sage-200);
  transform-origin: bottom;
  animation: tally-in 0.6s var(--ease-spring) both;
}

.streak-bars span.now i {
  background: var(--emerald-500);
}

.streak-bars small {
  font-size: 0.72rem;
  color: var(--sand-600);
}

.streak-note {
  font-size: 0.84rem;
  font-weight: 560;
  color: var(--sage-700) !important;
}

.mine-streak {
  margin-bottom: 22px;
}

.mine-streak .streak-card {
  background: var(--paper);
}

/* Fotos del estudio en el ingreso: abanico de polaroids sobre el panel ciruela */
.login-photos {
  position: absolute;
  right: 6%;
  bottom: 33%;
  width: min(30%, 260px);
  aspect-ratio: 4 / 5;
  z-index: 1;
  pointer-events: none;
}

.login-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 6px solid var(--sand-100);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  transform: rotate(calc(4deg - var(--i) * 5deg)) translate(calc(var(--i) * -18%), calc(var(--i) * 6%));
  z-index: calc(3 - var(--i));
  animation: photo-in 0.9s var(--ease-out) both calc(0.9s + var(--i) * 0.12s);
}

@keyframes photo-in {
  from { opacity: 0; transform: rotate(0) translateY(40px) scale(0.9); }
}

.login-gallery {
  display: none;
}

/* Instalar en el celular */
.install-card {
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 12px;
  margin-bottom: 16px;
  border-radius: 22px;
  background: var(--paper);
  position: relative;
}

.install-card img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
}

.install-text {
  flex: 1;
  min-width: 0;
  padding-right: 18px;
}

.install-text strong {
  display: block;
  font-size: 0.92rem;
}

.install-text small {
  display: block;
  font-size: 0.8rem;
  color: var(--sand-700);
  line-height: 1.45;
}

.install-text small svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  color: var(--blue-500);
}

.install-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--sand-600);
}

.install-close svg {
  width: 14px;
  height: 14px;
}

.install-close:hover {
  background: var(--sand-100);
}

/* Lista de espera */
.wait-btn {
  border-color: transparent;
  background: var(--blue-100);
  color: var(--blue-700);
}

.wait-btn:hover {
  background: #d6dcf6;
  border-color: transparent;
}

.wait-btn svg {
  width: 15px;
  height: 15px;
}

.wait-pos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 620;
  color: var(--blue-700);
}

.wait-pos svg {
  width: 15px;
  height: 15px;
}

.spring-chip.blue {
  background: var(--blue-100);
  color: var(--blue-700);
}

.wait-list {
  margin: 0 0 6px;
  padding-left: 22px;
  display: grid;
  gap: 4px;
  font-weight: 560;
}

.wait-list li::marker {
  color: var(--blue-500);
  font-weight: 700;
}

.wait-hint {
  font-size: 0.8rem;
  color: var(--sand-700);
  margin-bottom: 18px;
}

/* Fotos en Ajustes */
.photos-panel {
  grid-column: 1 / -1;
}

.photos-panel .panel-body > p {
  max-width: 70ch;
  margin-bottom: 14px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.photo-thumb {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sand-150);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(42, 27, 46, 0.75);
  color: #fff;
}

.photo-delete svg {
  width: 14px;
  height: 14px;
}

.photo-delete:hover {
  background: var(--terra-600);
}

.photo-add {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  border: 2px dashed var(--sand-300);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--sage-700);
  font-weight: 620;
  transition: background 0.2s, border-color 0.2s;
}

.photo-add:hover {
  background: var(--sand-50);
  border-color: var(--sage-400);
}

.photo-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-add:focus-within {
  outline: 2px solid var(--sage-600);
  outline-offset: 3px;
}

.photo-add.busy {
  opacity: 0.5;
  pointer-events: none;
}

.photo-add.busy span::after {
  content: "…";
}

.credit-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: var(--amber-100);
}

.credit-notice strong {
  display: block;
}

.credit-notice small {
  display: block;
  color: var(--sand-800);
  font-size: 0.86rem;
}

/* Reserva en un toque */
.quick-book {
  margin-bottom: 18px;
}

.quick-book-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-900);
  margin-bottom: 10px;
}

.quick-book-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--emerald-100);
  color: var(--emerald-800);
  text-align: left;
}

.quick-slot span {
  font-size: 0.82rem;
  font-weight: 600;
}

.quick-slot strong {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 720;
  font-stretch: 94%;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--emerald-700);
}

.quick-slot:hover {
  background: var(--emerald-200);
  transform: translateY(-2px);
}

.quick-slot:active {
  transform: scale(0.97);
}

/* Agenda agrupada */
.schedule-group {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--sand-700);
  margin: 6px 4px -2px;
}

.schedule-group:first-child {
  margin-top: 0;
}

.schedule-finished {
  font-size: 0.82rem;
  color: var(--sand-600);
  text-align: center;
  margin-top: 4px;
}

.section-title {
  font-size: 1.35rem;
  margin: 8px 0 14px;
}

.reports-layout + .section-title {
  margin-top: 30px;
}

@media (min-width: 1025px) {
  .balance-capsule {
    display: none;
  }
}

/* Recuperar contraseña */
.link-btn {
  padding: 0;
  color: var(--sage-700);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--ink-900);
}

.forgot-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--sand-200);
}

.forgot-form label {
  flex: 1;
}

.forgot-form input {
  background: var(--paper);
}

.forgot-done {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--emerald-100);
  color: var(--emerald-800);
  font-size: 0.88rem;
}

/* Página pública (debajo del ingreso) */
.public {
  background: var(--sand-100);
  padding: 64px 40px 80px;
}

.public-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px 40px;
}

.public-block h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.public-lead {
  color: var(--sand-800);
  margin-bottom: 18px;
  max-width: 48ch;
}

.public-week {
  display: grid;
  gap: 8px;
}

.public-day {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--paper);
}

.public-day span {
  color: var(--sand-800);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.public-plans {
  display: grid;
  gap: 8px;
}

.public-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper);
}

.public-plan strong {
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.public-plan span {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
}

.public-plan small {
  grid-column: 1 / -1;
  color: var(--sand-700);
}

.public-block.trial {
  grid-column: 1 / -1;
  background: var(--sage-900);
  color: #fff;
  padding: 34px;
  border-radius: var(--radius-lg);
}

.public-block.trial h2 {
  color: #fff;
}

.public-block.trial .public-lead {
  color: var(--sage-200);
}

.public-block.trial label {
  color: var(--sage-200);
}

.public-block.trial input {
  background: rgba(255, 255, 255, 0.95);
}

.public-block.trial .form-stack {
  max-width: 680px;
}

.public-block.trial .btn.primary {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: #1d1220;
}

.public-block.trial .btn.primary:hover {
  background: #f5c766;
}

.public-block.trial .btn:not(.primary) {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.trial-done {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.trial-done strong {
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

/* Avisos en el celular */
.push-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  background: var(--blue-100);
  margin-bottom: 18px;
}

.push-card.on {
  background: var(--emerald-100);
}

.push-card strong {
  display: block;
}

.push-card small {
  display: block;
  color: var(--sand-800);
  font-size: 0.86rem;
}

/* Recordar por WhatsApp / mandar enlaces */
.remind-list {
  display: grid;
  gap: 8px;
}

.remind-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--sand-100);
  color: var(--ink-900);
  text-decoration: none;
  font-weight: 600;
}

.remind-row > span:not(.avatar) {
  flex: 1;
}

.remind-row em {
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  color: #128c4a;
}

.remind-row:hover {
  background: var(--sand-200);
}

.remind-row.sent {
  background: var(--emerald-100);
}

.remind-row.sent em::before {
  content: "Enviado · ";
}

.remind-row.off em {
  color: var(--sand-600);
}

.remind-btn svg {
  color: #25d366;
}

/* Pasar lista */
.roll-progress {
  font-weight: 650;
  color: var(--sand-800);
  margin-bottom: 12px;
}

.roll-list {
  display: grid;
  gap: 10px;
}

.roll-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--sand-100);
  flex-wrap: wrap;
}

.roll-row.attended {
  background: var(--emerald-100);
}

.roll-row.absent {
  background: var(--terra-100);
}

.roll-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 1.02rem;
}

.roll-actions {
  display: flex;
  gap: 6px;
}

.roll-btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  color: var(--ink-900);
}

.roll-btn svg {
  width: 17px;
  height: 17px;
}

.roll-btn.yes.on {
  background: var(--emerald-600);
  color: #fff;
}

.roll-btn.no.on {
  background: var(--terra-600);
  color: #fff;
}

/* Importar alumnos */
.import-preview {
  margin-top: 12px;
}

.import-rows {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
}

.import-row {
  display: grid;
  gap: 1px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--emerald-50);
  font-size: 0.86rem;
}

.import-row span {
  color: var(--sand-700);
}

.import-row.bad {
  background: var(--terra-50);
}

.import-row em {
  font-style: normal;
  font-weight: 650;
  color: var(--terra-700);
}

.import-errors {
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--sand-800);
}

textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

/* ==========================================================================
   NAVEGACIÓN MÓVIL Y RESPONSIVE
   ========================================================================== */
.bottom-nav {
  display: none;
}

@media (max-width: 1180px) {
  .admin-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    padding: 24px 14px;
  }
  .nav button.active::before {
    left: -14px;
  }
  .workspace {
    margin-left: 220px;
  }
  .topbar {
    padding: 0 24px;
  }
  .page {
    padding: 28px 24px 64px;
  }
  .desktop-split-layout {
    grid-template-columns: 1fr;
  }
  .desktop-split-aside {
    display: none;
  }
  .mobile-only {
    display: block !important;
    margin-bottom: 18px;
  }
  .contact-strip.mobile-only,
  .install-card.mobile-only {
    display: flex !important;
  }
  .desktop-split-aside.admin-aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    position: static;
    margin-top: 4px;
  }
  .reports-layout {
    grid-template-columns: 1fr;
  }
  .reports-layout .panel + .panel {
    margin-top: 0;
  }
  .login-art {
    padding: 44px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14.5px;
  }

  :root:has(.demo-bar) {
    --demo-h: 48px;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .demo-bar {
    padding: 0 10px;
  }

  .demo-bar-left {
    display: none;
  }

  .demo-bar-inner {
    justify-content: center;
  }

  .demo-pill {
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 66px;
    padding: 6px;
    margin-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(42, 27, 46, 0.94);
    backdrop-filter: saturate(1.5) blur(20px);
    -webkit-backdrop-filter: saturate(1.5) blur(20px);
    border: 1px solid var(--line);
    border-radius: 24px;
    z-index: var(--z-bottomnav);
    justify-content: space-around;
    align-items: stretch;
    box-shadow: var(--shadow-drawer), 0 10px 30px -12px rgba(23, 34, 28, 0.25);
  }

  .bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--sage-300);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 18px;
    position: relative;
  }

  .bottom-nav button svg {
    width: 21px;
    height: 21px;
    transition: transform 0.45s var(--ease-spring);
  }

  .bottom-nav button:active svg {
    transform: scale(0.85);
  }

  .bottom-nav button.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }

  .bottom-nav button.active svg {
    color: #fff;
    transform: translateY(-1px) scale(1.06);
  }

  .bottom-nav .nav-dot {
    position: absolute;
    top: 8px;
    left: calc(50% + 6px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--terra-500);
    border: 2px solid var(--sage-900);
  }

  .topbar {
    height: 62px;
    padding: 0 16px;
  }

  .top-context,
  .user-info,
  .user-mini {
    display: none;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: var(--ink-950);
  }

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 1.5rem;
    border-radius: 11px;
    padding-bottom: 4px;
  }

  .page {
    padding: 20px 16px calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .page-head-actions {
    width: 100%;
  }

  .page-head-actions .btn {
    flex: 1;
  }

  .admin-metrics-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .metric-tile {
    padding: 14px;
  }

  .metric-tile-header {
    font-size: 0.62rem;
    letter-spacing: 0;
  }

  .metric-tile-header svg {
    width: 26px;
    height: 26px;
    padding: 5px;
  }

  .today-statement {
    margin-bottom: 24px;
  }

  .metric-tile strong {
    font-size: 1.6rem;
    margin: 8px 0 2px;
  }

  .metric-tile small {
    font-size: 0.72rem;
  }

  .class-row-card {
    padding: 14px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .class-left-group {
    gap: 12px;
    flex: 1 1 100%;
  }

  .class-right-action {
    width: 100%;
    justify-content: flex-end;
  }

  .class-right-action .btn {
    flex: 1;
  }

  .time-badge {
    padding: 8px 6px;
    width: 64px;
  }

  .time-badge strong {
    font-size: 1.5rem;
  }

  .panel-head {
    padding: 16px 18px;
  }

  .panel-body {
    padding: 14px;
  }

  .admin-class-card {
    padding: 16px;
  }

  .login-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-art {
    display: flex;
    min-height: 46dvh;
    padding: 22px 22px 26px;
  }
  .login-photos {
    display: none;
  }
  .public {
    padding: 40px 18px 120px;
  }
  .public-inner {
    grid-template-columns: 1fr;
  }
  .public-block h2 {
    font-size: 1.7rem;
  }
  .public-block.trial {
    padding: 24px 20px;
  }
  .forgot-form {
    flex-direction: column;
    align-items: stretch;
  }
  .push-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .roll-actions {
    width: 100%;
  }
  .roll-btn {
    flex: 1;
    justify-content: center;
  }
  .login-gallery {
    display: block;
    margin-top: 28px;
  }
  .login-gallery p {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--sand-800);
    margin-bottom: 10px;
  }
  .login-gallery-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -22px;
    padding: 0 22px 4px;
    scrollbar-width: none;
  }
  .login-gallery-strip img {
    flex: 0 0 72%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    scroll-snap-align: start;
  }
  .login-art .login-wordmark {
    font-size: clamp(4.2rem, 22vw, 6rem);
    margin-bottom: 14px;
  }
  .login-art p {
    font-size: 0.92rem;
    max-width: 24ch;
  }
  .login-form-card .mobile-brand.login-mobile-brand {
    display: none;
  }

  .login-form-side {
    padding: 30px 22px 40px;
    display: block;
  }
  .login-form-card h2 {
    font-size: 2.3rem;
  }

  .login-form-card {
    width: 100%;
  }

  .login-form-card h2 {
    font-size: 2.1rem;
  }

  .login-form-card .mobile-brand {
    display: flex;
  }

  .fields-grid,
  .slot-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }

  dialog[open] {
    animation: sheet-up 0.45s var(--ease-out);
  }

  .modal-head,
  .modal-body,
  .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .modal-footer .btn {
    flex: 1;
  }

  /* Tabla → tarjetas */
  .student-table-mobile thead {
    display: none;
  }
  .student-table-mobile,
  .student-table-mobile tbody,
  .student-table-mobile tr,
  .student-table-mobile td {
    display: block;
    width: 100%;
  }
  .student-table-mobile tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sand-150);
  }
  .student-table-mobile tr:last-child {
    border-bottom: 0;
  }
  .student-table-mobile td {
    padding: 3px 0;
    border-bottom: 0;
  }
  .student-table-mobile td:not(:first-child):not(:last-child) {
    display: inline-block;
    width: auto;
    margin-right: 8px;
  }
  .student-table-mobile td:first-child {
    margin-bottom: 6px;
  }
  .student-table-mobile td:last-child {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--sand-200);
    text-align: left !important;
  }
  .student-table-mobile .row-actions {
    display: flex;
    width: 100%;
  }
  .student-table-mobile .row-actions .btn {
    flex: 1;
  }
  tbody tr:hover td {
    background: transparent;
  }

  .search-input-box {
    max-width: none;
    flex-basis: 100%;
  }

  .booking-item-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }
  .booking-actions {
    padding-top: 12px;
    border-top: 1px dashed var(--sand-200);
  }
  .booking-actions .btn {
    flex: 1;
  }
  .admin-class-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-class-head .btn {
    width: 100%;
  }
  .attendee-chip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .attendee-chip-actions {
    justify-content: flex-end;
  }
  .attendee-chip-actions .quick-attendance-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
  }
  .student-subtabs {
    display: none;
  }
  .date-selector-bar {
    padding: 14px 12px 10px;
  }
  .date-selector-bar.flush {
    padding: 14px 12px 10px;
  }
  .date-selector-scroll {
    grid-auto-columns: minmax(0, 1fr);
    gap: 5px;
    overflow: visible;
  }
  .date-pill {
    padding: 9px 2px 7px;
    border-radius: 13px;
  }
  .date-pill small {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
  .date-pill strong {
    font-size: 1.15rem;
  }
  .pack-hero-big {
    font-size: 3rem;
  }
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

@media (max-width: 380px) {
  .demo-pill svg {
    display: none;
  }
}


/* ==========================================================================
   MODO OSCURO (sigue la preferencia del celular o la computadora)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink-950: #f6eff4;
    --ink-900: #efe5ee;
    --ink-800: #ddd0df;

    --sand-900: #f2eaf3;
    --sand-800: #ddd1df;
    --sand-700: #c5b6c9;
    --sand-600: #ab9bb0;
    --sand-400: #7b6a80;
    --sand-300: #4e3d55;
    --sand-200: #3a2b40;
    --sand-150: #2f2235;
    --sand-100: #1c1220;
    --sand-50:  #24182a;
    --paper:    #2a1d30;

    --sage-200: #4a3a52;
    --sage-100: #3a2c42;
    --sage-50:  #2e2236;

    --terra-50:  #3a1d1a;
    --terra-100: #4a2420;
    --terra-200: #6e3329;
    --terra-700: #f2a596;
    --terra-800: #f7b9ad;
    --emerald-50:  #18291f;
    --emerald-100: #1f3a2a;
    --emerald-200: #2c5a3d;
    --emerald-700: #8fd2a5;
    --emerald-800: #a8e0b9;
    --amber-100: #45360f;
    --amber-700: #f3cf7a;
    --blue-100: #26305c;
    --blue-700: #b4c1f7;

    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 20px 40px -20px rgba(0, 0, 0, 0.7);
  }

  body::after { opacity: 0.12; mix-blend-mode: screen; }
  .topbar { background: rgba(28, 18, 32, 0.86); }
  .sidebar { background: #150d18; }
  .nav button.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
  .nav button.active svg { color: #fff; }

  /* Lo que en claro es ciruela sobre tiza, en oscuro pasa a tiza sobre ciruela */
  .btn.primary,
  .date-pill.active,
  .filter-pill-btn.active,
  .segmented .demo-pill.active,
  .filter-pills-group .btn.primary,
  .week-day-head.today { background: #f2e8f0; border-color: #f2e8f0; color: #2a1b2e; }
  .btn.primary:hover { background: #ffffff; border-color: #ffffff; }
  .date-pill.active small { color: #6a5660; }
  .brand-mark { background: #f2e8f0; color: #2a1b2e; }
  .sidebar .brand-mark,
  .login-art .brand-mark { background: #f2e8f0; color: #2a1b2e; }

  .next-ticket,
  .pack-card.featured,
  .public-block.trial,
  .today-statement .stat:not(.green):not(.red) { background: #3a2741; }
  .pack-card.featured .btn.primary { background: #f2e8f0; color: #2a1b2e; }
  .metric-tile:first-child small { color: var(--sage-300); }
  .public-block.trial .public-lead,
  .public-block.trial label { color: var(--sage-300); }
  .public-block.trial input { background: var(--paper); }

  .avatar.alt { background: var(--sage-100); color: var(--ink-800); }
  .avatar { background: var(--sand-200); color: var(--ink-900); }
  .reformer-bed.filled { background: var(--sage-200); border-color: var(--sage-400); color: var(--sage-300); }
  .quick-slot strong { color: var(--emerald-700); }
  .wait-btn:hover { background: #303b70; }
  .dot-count { border-color: var(--paper); }
  .demo-bar { background: #0f0911; }
  .login-art { background: #160e19; }
  .toast { background: #f2e8f0; color: #2a1b2e; }
  .empty-spring, .booked-spring { filter: brightness(0.92); }
  .balance-capsule-badge { color: #10261a; }
  .balance-capsule-badge.alert, .nav-count, .dot-count { color: #3a1410; }
}



/* ==========================================================================
   MARCA FOR FRIENDS (según el Manual de Marca de EchoStd*)
   Paleta: amarillo pastel F9F1AC, celeste AEC2DD, azul viejo 5A6579,
   beige arena CFC7B4, grafito suave 514F4F, negro sombra 333333.
   Una sola familia tipográfica (Regesto Grotesk en el manual; mientras no haya
   licencia web se usa Instrument Sans: cambiar sólo --font-marca y el @font-face).
   Recursos: logos originales, grilla tipo crucigrama y texto en círculo.
   ========================================================================== */
:root {
  --font-marca: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: var(--font-marca);
  --font-sans: var(--font-marca);

  --amarillo: #F9F1AC;
  --celeste: #AEC2DD;
  --azul: #5A6579;
  --beige: #CFC7B4;
  --grafito: #514F4F;
  --negro: #333333;

  --accent: var(--azul);
  --accent-hover: #4a5466;
  --on-accent: #ffffff;
  --accent-tint: #E9EEF5;
  --accent-tint-2: #D7E1EE;
  --accent-line: #C3CFE0;
  --accent-ink: #465063;

  --ink-950: #333333;
  --ink-900: #3a3a3a;
  --ink-800: #514F4F;

  --sand-900: #333333;
  --sand-800: #514F4F;
  --sand-700: #5f5d5c;
  --sand-600: #6b6967;
  --sand-400: #a9a291;
  --sand-300: #CFC7B4;
  --sand-200: #e5e0d4;
  --sand-150: #eeebe3;
  --sand-100: #F5F3EE;
  --sand-50: #faf9f6;
  --paper: #ffffff;

  /* Los antiguos "verdes" pasan a la familia azul/celeste de la marca */
  --emerald-50: #f1f5fa;
  --emerald-100: #e3ebf5;
  --emerald-200: #c9d7e9;
  --emerald-500: #7d93b4;
  --emerald-600: #5A6579;
  --emerald-700: #4a5466;
  --emerald-800: #3d4656;
  --amber-100: #fbf6cf;
  --amber-500: #F9F1AC;
  --amber-700: #5A6579;
  --blue-100: #e3ebf5;
  --blue-500: #AEC2DD;
  --blue-700: #465063;
  --sage-950: #2b313c;
  --sage-900: #333a47;
  --sage-800: #424a59;
  --sage-700: #4f5869;
  --sage-600: #5A6579;
  --sage-500: #77829a;
  --sage-400: #9aa4b8;
  --sage-300: #bcc5d4;
  --sage-200: #d6dde8;
  --sage-100: #e8edf3;
  --sage-50: #f3f6f9;
  /* Sólo para errores y avisos importantes (cancelación tardía, pack vencido) */
  --terra-50: #fbf1ee;
  --terra-100: #f6e1db;
  --terra-200: #ebc1b5;
  --terra-400: #d08f7d;
  --terra-500: #c0705c;
  --terra-600: #ad5a46;
  --terra-700: #94473a;
  --terra-800: #7a3a2f;

  --line: rgba(51, 51, 51, 0.09);
  --line-strong: rgba(51, 51, 51, 0.16);
  --shadow-card: 0 1px 2px rgba(51, 51, 51, 0.04), 0 10px 26px -16px rgba(90, 101, 121, 0.28);
  --shadow-hover: 0 2px 4px rgba(51, 51, 51, 0.05), 0 18px 36px -20px rgba(90, 101, 121, 0.38);
}

body { color: var(--ink-950); background: var(--sand-100); font-family: var(--font-marca); }
body::after { opacity: 0.1; }

/* Tipografía: titulares en bold y apretados, textos en regular (como el manual) */
h1, h2, h3, .booked-title, .next-ticket-day, .pack-hero-big, .pack-price, .login-form-card h2,
.date-pill strong, .time-badge strong, .time-box strong, .admin-class-time .hours, .quick-slot strong,
.streak-total strong, .public-plan strong, .public-plan span {
  font-family: var(--font-marca);
  font-stretch: 100%;
}
h1 { font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
h2 { font-weight: 700; letter-spacing: -0.03em; }
h3 { font-weight: 600; }
.next-ticket-day, .booked-title, .login-form-card h2, .pack-hero-big { font-weight: 700; letter-spacing: -0.035em; }
.date-pill strong, .time-badge strong, .time-box strong, .admin-class-time .hours, .pack-price, .quick-slot strong { font-weight: 600; letter-spacing: -0.02em; }

/* Logos del manual: el SVG es la forma, el color lo da el texto que lo rodea */
.logo {
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: var(--logo) no-repeat center / contain;
  mask: var(--logo) no-repeat center / contain;
}
.logo-primario { --logo: url("/marca/primario.svg"); aspect-ratio: 1512 / 396; height: 26px; }
.logo-secundario { --logo: url("/marca/secundario.svg"); aspect-ratio: 1530 / 504; height: 40px; }
.logo-terciario { --logo: url("/marca/terciario.svg"); aspect-ratio: 1080 / 576; height: 60px; }
.logo-isotipo { --logo: url("/marca/isotipo.svg"); aspect-ratio: 1; height: 28px; }

.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--azul); }
.brand .logo-primario { height: 28px; }
.brand small { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grafito); margin: 0; }
.mobile-brand { color: var(--azul); }
.mobile-brand .logo-primario { height: 22px; }
.boot-screen .logo-isotipo { height: 56px; color: var(--azul); }

/* Sello "frnds." del manual */
.frnds {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px 3px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Botones */
.btn { font-weight: 600; }
.btn.primary { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.soft { background: var(--sand-150); color: var(--ink-950); border-color: transparent; }
.btn.soft:hover { background: var(--sand-200); }
/* Reservar: amarillo pastel con azul, como los casilleros del manual */
.class-right-action .btn.primary,
.quick-slot { background: var(--amarillo); border-color: transparent; color: var(--azul); }
.class-right-action .btn.primary:hover { background: #f4e991; color: var(--azul); }
.card-actions .btn.primary { background: var(--accent-tint); border-color: transparent; color: var(--accent-ink); }
.card-actions .btn.primary:hover { background: var(--accent-tint-2); }

/* Chips de estado (sin rojo ni verde: paleta de la marca) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--sand-150);
  color: var(--grafito);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip.few, .chip.warn { background: var(--amarillo); color: var(--azul); }
.chip.full { background: var(--beige); color: var(--negro); }
.chip.ok { background: var(--accent-tint); color: var(--accent-ink); }
.badge.emerald { background: var(--accent-tint); color: var(--accent-ink); }

/* Barra demo */
.demo-bar { background: var(--azul); }
.demo-bar-text { color: #e9eef5; }
.demo-switch-pills { background: rgba(255, 255, 255, 0.12); border-color: transparent; }
.demo-pill { color: #e9eef5; }
.demo-pill:hover { color: #fff; }
.demo-pill.active { background: var(--amarillo); color: var(--azul); box-shadow: none; }

/* Barra lateral */
.sidebar { background: var(--paper); border-right: 1px solid var(--line); }
.sidebar .nav-label { color: var(--sand-600); }
.nav button { color: var(--grafito); }
.nav button:hover { background: var(--sand-150); color: var(--negro); }
.nav button.active { background: var(--amarillo); color: var(--azul); box-shadow: none; }
.nav button.active svg { color: var(--azul); }
.nav-count { background: var(--azul); color: #fff; }
.sidebar-bottom { background: var(--sand-100); color: var(--grafito); }
.sidebar-bottom strong { color: var(--negro); }
.sidebar-bottom::after { content: none; }
.topbar { background: rgba(245, 243, 238, 0.9); }
.dot-count { background: var(--azul); color: #fff; animation: none; }

/* Días y filtros */
.date-pill.active,
.filter-pill-btn.active,
.week-day-head.today { background: var(--azul); border-color: var(--azul); color: var(--amarillo); }
.date-pill.active small, .week-day-head.today small { color: #e9eef5; }
.date-pill.today:not(.active) { background: var(--amber-100); border-color: var(--amarillo); }
.date-pill.has-booking .pill-dot { background: var(--azul); }
.date-pill.active .pill-dot { background: var(--amarillo); }
.segmented .demo-pill.active,
.filter-pills-group .btn.primary { background: var(--paper); color: var(--azul); }
.reformer-bed.filled { border-color: var(--azul); background: var(--accent-tint-2); color: var(--azul); }
.schedule-group { color: var(--sand-600); }
.class-row-card.booked-by-me { border-color: var(--accent-line); }
.class-row-card.booked-by-me::before { background: var(--azul); }

/* Próxima clase: ticket celeste */
.next-ticket { background: var(--celeste); color: var(--negro); }
.next-ticket-label, .next-ticket-date { color: var(--negro); opacity: 0.8; }
.next-ticket-time { color: var(--azul); font-weight: 600; }
.next-ticket-meta { border-top-color: rgba(90, 101, 121, 0.35); }
.next-ticket .next-class-hint { color: var(--negro) !important; }
.next-ticket .next-class-hint.late { color: var(--terra-800) !important; }
.ticket-btn { background: rgba(255, 255, 255, 0.7); color: var(--negro); }
.ticket-btn:hover { background: #fff; color: var(--negro); }
.ticket-cancel { color: var(--negro); text-decoration: underline; text-underline-offset: 3px; }
.ticket-cancel:hover { background: rgba(255, 255, 255, 0.4); color: var(--negro); }
.next-ticket.empty-ticket { background: var(--sand-150); }

/* Saludo de Dalma: cifras en casilleros de color */
.today-statement { color: var(--grafito); font-weight: 400; }
.today-statement .stat { background: var(--amarillo); color: var(--azul); font-weight: 700; }
.today-statement .stat.green { background: var(--celeste); color: var(--negro); }
.today-statement .stat.red { background: var(--beige); color: var(--negro); }

/* Pack */
.pack-hero-big { color: var(--azul); }
.pack-hero-card.urgent .pack-hero-big { color: var(--terra-700); }
.pack-tally i { background: var(--sand-200); }
.pack-tally i.booked { background: var(--celeste); }
.pack-tally i.free { background: var(--azul); }
.tally-legend .booked::before { background: var(--celeste); }
.tally-legend .free::before { background: var(--azul); }
.pack-card.featured { background: var(--azul); color: #fff; box-shadow: none; }
.pack-card.featured h2, .pack-card.featured .pack-price { color: var(--amarillo); }
.pack-card.featured p, .pack-card.featured .muted { color: #e9eef5; }
.pack-card.featured .btn.primary { background: var(--amarillo); border-color: var(--amarillo); color: var(--azul); }
.pack-card-badge { background: var(--amarillo); color: var(--azul); }
.pack-card.featured .pack-card-badge { background: var(--celeste); color: var(--negro); }
.pack-card.featured .pack-tally i.free { background: var(--amarillo); }
.fixed-slot-pill { background: var(--amarillo); color: var(--azul); border-color: transparent; }
.fixed-slot-pill.flexible { background: var(--sand-150); color: var(--grafito); }
.balance-capsule-badge { background: var(--azul); color: #fff; }
.balance-capsule-badge.alert { background: var(--terra-100); color: var(--terra-800); }
.quick-slot span { color: var(--azul); }
.quick-slot strong { color: var(--azul); }
.quick-slot:hover { background: #f4e991; }

/* Asistencia */
.quick-attendance-btn.attended.active,
.roll-btn.yes.on { background: var(--azul); color: #fff; border-color: var(--azul); box-shadow: none; }
.quick-attendance-btn.absent.active,
.roll-btn.no.on { background: var(--beige); color: var(--negro); border-color: var(--beige); box-shadow: none; }
.roll-row.attended { background: var(--accent-tint); }
.roll-row.absent { background: var(--sand-150); }

/* Estado vacío y reserva confirmada */
.empty-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--amarillo);
  color: var(--azul);
}
.empty-mark .logo-isotipo { height: 30px; }

/* Texto en círculo alrededor del isotipo (recurso gráfico del manual) */
.circle-badge {
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--azul);
  color: var(--amarillo);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.circle-badge:active { cursor: grabbing; }
.circle-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.circle-badge text { fill: currentColor; font-family: var(--font-marca); font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em; }
.circle-badge .logo-isotipo { height: 34%; }
.booked-badge { width: 140px; margin: 0 auto 6px; cursor: default; animation: badge-in 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both 0.1s; }
.booked-badge svg { animation: girar 30s linear infinite; }
@keyframes badge-in { from { transform: scale(0.6) rotate(-40deg); opacity: 0; } }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------------- Portada ---------------- */
.login-art {
  background-color: var(--azul);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
  color: #fff;
  padding: 32px 44px 36px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
}
.art-top { display: flex; align-items: center; justify-content: space-between; color: var(--amarillo); }
.art-top .logo-primario { height: 34px; }
.hero-photo {
  margin: 0;
  justify-self: end;
  align-self: center;
  height: min(44vh, 440px);
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-art .circle-badge { position: absolute; left: 44px; top: 42%; width: 156px; box-shadow: 0 0 0 10px var(--azul); }
.login-copy { position: relative; z-index: 1; }
.login-art .tiles { display: grid; gap: 0; margin: 0 0 16px; font-size: 16px; letter-spacing: 0; line-height: 1; max-width: none; animation: none; color: var(--azul); }
.tile-row { display: flex; }
.tile {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--azul);
  background: var(--amarillo);
  box-shadow: inset 0 0 0 1px rgba(90, 101, 121, 0.35);
}
.tile.hueco { background: transparent; box-shadow: none; }
.tile { position: relative; }
.tile-punct { position: absolute; right: 4px; bottom: 2px; font-weight: 700; font-size: 0.8em; line-height: 1; color: var(--azul); }
.login-art p { color: #e9eef5; max-width: 40ch; font-size: 1rem; }
.login-form-card h2 { color: var(--negro); }
.link-btn { color: var(--azul); }
.demo-entry { background: var(--sand-150); }
.forgot-form { background: var(--sand-150); }
.forgot-done { background: var(--accent-tint); color: var(--accent-ink); }

/* Sección pública */
.public { background: var(--sand-100); }
.public-block h2 { color: var(--negro); }
.gallery-block { grid-column: 1 / -1; }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; display: block; }
.public-block.trial { background: var(--amarillo); color: var(--azul); }
.public-block.trial h2 { color: var(--azul); }
.public-block.trial .public-lead, .public-block.trial label { color: var(--azul); }
.public-block.trial input { background: #fff; }
.public-block.trial .btn.primary { background: var(--azul); border-color: var(--azul); color: #fff; }
.public-block.trial .btn:not(.primary) { border-color: rgba(90, 101, 121, 0.4); color: var(--azul); background: transparent; }
.trial-done { background: rgba(255, 255, 255, 0.6); }
.credit-notice { background: var(--amber-100); }
.push-card { background: var(--accent-tint); }
.push-card.on { background: var(--accent-tint); }
.install-card img { border-radius: 12px; }

@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .login-art { padding: 22px 20px 26px; gap: 18px; min-height: auto; background-size: 34px 34px; }
  .art-top .logo-primario { height: 26px; }
  .hero-photo { width: 100%; height: auto; aspect-ratio: 16 / 11; justify-self: stretch; }
  .login-art .circle-badge { left: auto; right: 26px; top: 150px; width: 112px; box-shadow: 0 0 0 7px var(--azul); }
  .circle-badge text { font-size: 14px; }
  .tile { width: 30px; height: 30px; font-size: 1rem; }
  .login-art p { font-size: 0.92rem; }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
  .gallery img { flex: 0 0 70%; scroll-snap-align: start; aspect-ratio: 4 / 5; }
  .bottom-nav { background: rgba(255, 255, 255, 0.95); border-color: var(--line); box-shadow: 0 10px 30px -14px rgba(90, 101, 121, 0.35); }
  .bottom-nav button { color: var(--sand-600); }
  .bottom-nav button.active { background: var(--amarillo); color: var(--azul); }
  .bottom-nav button.active svg { color: var(--azul); }
  .bottom-nav .nav-dot { background: var(--azul); border-color: #fff; }
}

/* Oscuro: azul viejo y negro sombra, sin negros ni blancos puros */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #AEC2DD;
    --accent-hover: #c3d2e6;
    --on-accent: #2b313c;
    --accent-tint: #353e4c;
    --accent-tint-2: #3f4959;
    --accent-line: #4b5568;
    --accent-ink: #dfe7f1;
    --ink-950: #eef0f3;
    --ink-900: #e4e7eb;
    --ink-800: #c9ced6;
    --sand-900: #eef0f3;
    --sand-800: #cfd3d9;
    --sand-700: #bcc2ca;
    --sand-600: #aeb4bd;
    --sand-400: #7d8592;
    --sand-300: #4a5260;
    --sand-200: #3d4450;
    --sand-150: #353b45;
    --sand-100: #262a31;
    --sand-50: #2b3038;
    --paper: #30353e;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
  }
  body { background: var(--sand-100); }
  .topbar { background: rgba(38, 42, 49, 0.9); }
  .brand, .mobile-brand { color: var(--celeste); }
  .brand small, .nav button { color: var(--sand-700); }
  .nav button:hover { color: var(--ink-950); }
  .btn.primary { background: var(--celeste); border-color: var(--celeste); color: #2b313c; }
  .btn.primary:hover { background: #c3d2e6; border-color: #c3d2e6; }
  .login-art { background-color: #3f4757; }
  .next-ticket { background: #3f4a5c; color: var(--ink-950); }
  .next-ticket-label, .next-ticket-date, .next-ticket .next-class-hint { color: var(--ink-950) !important; }
  .next-ticket-time { color: var(--amarillo); }
  .ticket-btn, .ticket-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--ink-950); }
  .ticket-cancel, .ticket-cancel:hover { color: var(--ink-950); }
  .chip.full, .today-statement .stat.red { background: #5b5547; color: #f2eee4; }
  .today-statement .stat.green { background: #3f4a5c; color: var(--ink-950); }
  .quick-attendance-btn.absent.active, .roll-btn.no.on { background: #5b5547; color: #f2eee4; border-color: #5b5547; }
  .bottom-nav { background: rgba(48, 53, 62, 0.95); }
  .bottom-nav button.active { color: var(--azul); }
  .sidebar { background: var(--paper); }
  .public-block.trial input { background: #fff; color: #333; }
  .date-pill.today:not(.active) { background: #3d3a2a; border-color: #6b6340; }
  .toast { background: var(--celeste); color: #2b313c; }
  .next-ticket .next-class-hint.late { color: #f2b8a8 !important; }
  .quick-slot, .class-right-action .btn.primary, .fixed-slot-pill, .chip.few, .chip.warn, .today-statement .stat { background: #4d4936; color: var(--amarillo); }
  .quick-slot span, .quick-slot strong { color: var(--amarillo); }
  .quick-slot:hover, .class-right-action .btn.primary:hover { background: #5a5540; color: var(--amarillo); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   FOTOS DEL ESTUDIO: portada que rota, galería en mosaico y visor
   ========================================================================== */
.hero-photo { position: relative; background: #4b5465; }
.hero-photo img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity 1.8s ease, transform 9s linear;
}
.hero-photo img.on { opacity: 1; transform: scale(1); }

/* Mosaico: la primera foto manda y el resto acompaña, según cuántas haya */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 12px; }
.gallery-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--sand-150);
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 432px; }
.gallery[data-n="2"] .gallery-item:first-child { grid-column: auto; grid-row: auto; }
.gallery[data-n="3"] { grid-template-columns: 2fr 1fr; }
.gallery[data-n="3"] .gallery-item:first-child { grid-column: auto; }
.gallery[data-n="4"] .gallery-item:nth-child(2) { grid-row: span 2; }
.gallery[data-n="6"] .gallery-item:first-child { grid-column: auto; }
.gallery[data-n="6"] .gallery-item:last-child { grid-row: span 2; grid-column: 4; grid-row-start: 1; }

/* Visor a pantalla completa */
dialog.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: #1e2229;
  color: #fff;
  box-shadow: none;
  overflow: hidden;
}
dialog.lightbox[open] { display: grid; place-items: center; animation: fade 0.3s ease; }
dialog.lightbox::backdrop { background: rgba(30, 34, 41, 0.6); }
.lb-figure { margin: 0; display: grid; gap: 14px; justify-items: center; padding: 0 84px; }
.lb-figure img {
  display: block;
  max-width: min(100%, 1100px);
  max-height: calc(100dvh - 120px);
  border-radius: 14px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.lb-figure figcaption { display: flex; gap: 14px; align-items: baseline; color: #e9eef5; font-size: 0.95rem; text-align: center; }
.lb-figure small { color: var(--amarillo); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s, color 0.2s;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:hover, .lb-btn:focus-visible { background: var(--amarillo); color: var(--azul); }
.lb-close { top: max(18px, env(safe-area-inset-top)); right: 18px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Ajustes: cuál es la portada */
.photo-thumb.cover { box-shadow: 0 0 0 3px var(--amarillo); }
.photo-cover, .photo-cover-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--azul);
  background: rgba(255, 255, 255, 0.92);
}
.photo-cover-tag { background: var(--amarillo); }
.photo-cover svg, .photo-cover-tag svg { width: 13px; height: 13px; }
.photo-cover:hover { background: var(--amarillo); }

/* Dónde estamos */
.public-col { display: grid; gap: 28px; align-content: start; }
.visit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s;
}
.visit-row svg { width: 22px; height: 22px; flex: none; color: var(--azul); }
.visit-row span { display: grid; gap: 2px; }
.visit-row small { color: var(--sand-700); }
.visit-row:hover { box-shadow: inset 0 0 0 1.5px var(--azul); }

@media (max-width: 1024px) {
  .gallery { grid-auto-rows: 170px; }
  .gallery[data-n="2"] { grid-auto-rows: 340px; }
}

@media (max-width: 768px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
  .gallery-item { flex: 0 0 72%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
  .gallery-item:hover img { transform: none; }
  .lb-figure { padding: 76px 12px 96px; }
  .lb-figure img { max-height: calc(100dvh - 260px); border-radius: 10px; }
  .lb-figure figcaption { flex-direction: column; align-items: center; gap: 4px; padding: 0 12px; font-size: 0.9rem; }
  .lb-prev, .lb-next { top: auto; bottom: max(22px, env(safe-area-inset-bottom)); transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

@media (prefers-color-scheme: dark) {
  .hero-photo { background: #2c313a; }
  .public-block:not(.trial) h2 { color: var(--ink-900); }
  .visit-row svg { color: var(--celeste); }
  .visit-row:hover { box-shadow: inset 0 0 0 1.5px var(--celeste); }
  .photo-cover { background: rgba(38, 42, 49, 0.9); color: #fff; }
  .photo-cover-tag { color: var(--azul); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo img { transition: none; transform: none; }
  .gallery-item img { transition: none; }
}

/* ==========================================================================
   PORTADA: collage de fotos, llamados a la acción y "primera vez"
   ========================================================================== */
.login-art .hero-collage {
  position: relative;
  justify-self: end;
  align-self: center;
  margin: 8px 6% 34px 0;
}
.login-art .hero-collage.no-photo { justify-self: start; margin: 0; }
.login-art .hero-collage.no-photo .circle-badge { position: relative; inset: auto; }
.login-art .hero-photo.main { height: min(46vh, 430px); }
.login-art .hero-photo.side {
  position: absolute;
  left: -36%;
  bottom: -26px;
  width: 50%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  box-shadow: 0 0 0 8px var(--azul), 0 24px 40px -24px rgba(0, 0, 0, 0.6);
}
.login-art .hero-collage .circle-badge { left: auto; top: -34px; right: -58px; width: 132px; box-shadow: 0 0 0 9px var(--azul); }
.hero-dots { position: absolute; left: 0; right: 0; bottom: -30px; display: flex; justify-content: flex-end; gap: 6px; }
.hero-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.3s ease, background 0.3s ease;
}
.hero-dots button[aria-current="true"] { width: 22px; background: var(--amarillo); }
.hero-dots button:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; }
.hero-actions { display: none; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn.hero-cta { background: var(--amarillo); border-color: var(--amarillo); color: var(--azul); font-weight: 700; }
.btn.hero-cta:hover { background: #fff6c2; }
.btn.hero-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.first-time {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.first-time strong { display: block; color: var(--negro); margin-bottom: 10px; }
.first-time ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.first-time li { display: flex; align-items: center; gap: 10px; color: var(--sand-800); font-size: 0.92rem; }
.first-time li svg { width: 18px; height: 18px; color: var(--azul); flex: none; }

/* Botones de arrepentimiento y de baja: a la vista desde el primer acceso */
.consumer-mini { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 0.8rem; }
.consumer-mini a { color: var(--sand-700); text-decoration: underline; text-underline-offset: 3px; }
.consumer-mini a:hover { color: var(--azul); }

.form-note { font-size: 0.82rem; color: inherit; opacity: 0.85; }
.form-note a { color: inherit; text-decoration: underline; }

/* Pie de página */
.site-footer { background: var(--azul); color: #e9eef5; padding: 44px 40px calc(28px + env(safe-area-inset-bottom)); }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  gap: 28px 40px;
  align-items: start;
}
.footer-brand { display: grid; gap: 8px; }
.footer-brand .logo-primario { height: 28px; color: var(--amarillo); margin-bottom: 6px; }
.footer-brand p { margin: 0; font-size: 0.9rem; }
.footer-brand a, .footer-links a { color: #fff; }
.consumer-buttons { display: grid; gap: 10px; }
.consumer-btn {
  display: inline-flex;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--amarillo);
  color: var(--azul);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.consumer-btn:hover { background: #fff6c2; }
.consumer-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.footer-links { display: grid; gap: 10px; font-size: 0.92rem; }
.footer-legal { max-width: 1120px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.8rem; color: #cfd7e3; }

/* Páginas legales y formularios de pedido */
dialog.legal-page {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--sand-100);
  box-shadow: none;
  overflow-y: auto;
}
dialog.legal-page[open] { animation: fade 0.25s ease; }
.legal-top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 24px 14px;
  background: var(--azul);
  color: var(--amarillo);
}
.legal-top .logo-primario { height: 24px; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}
.legal-back svg { width: 18px; height: 18px; }
.legal-back:hover, .legal-back:focus-visible { background: var(--amarillo); color: var(--azul); }
.legal-doc { max-width: 720px; margin: 0 auto; padding: 40px 24px 24px; color: var(--ink-900); line-height: 1.65; }
.legal-doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; color: var(--negro); margin: 0 0 8px; }
.legal-doc h2 { font-size: 1.15rem; color: var(--negro); margin: 30px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--sand-800); }
.legal-doc ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal-doc a { color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.legal-meta { font-size: 0.85rem; color: var(--sand-600) !important; }
.legal-lead { font-size: 1.05rem; }
.legal-legend { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--paper); font-size: 0.88rem; }
.legal-more { max-width: 720px; margin: 0 auto; padding: 8px 24px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }
.legal-more a { color: var(--azul); }
.request-form { margin-top: 22px; padding: 22px; border-radius: 18px; background: var(--paper); }
.request-form textarea { width: 100%; resize: vertical; }
.request-done { margin-top: 22px; padding: 26px; border-radius: 18px; background: var(--amarillo); color: var(--azul); text-align: center; }
.request-done span { display: block; font-size: 0.85rem; font-weight: 600; }
.request-done strong { display: block; margin: 6px 0 10px; font-size: 1.8rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.request-done p { margin: 0; color: var(--azul) !important; }
.check-row { display: grid !important; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-weight: 400 !important; font-size: 0.86rem; line-height: 1.45; color: var(--sand-800); }
.check-row input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--azul); }
.check-row a { color: var(--azul); text-decoration: underline; }

/* Ajustes y Mi pack */
.legal-fields-head { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.legal-fields-head small { color: var(--sand-700); }
.legal-missing { color: var(--terra-800); font-weight: 600; }
.request-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.request-row small { display: block; color: var(--sand-700); }
.request-row p { margin: 6px 0 0; font-size: 0.9rem; }
.request-row.done { opacity: 0.6; }
.your-data .inline-actions { flex-wrap: wrap; }

@media (max-width: 1100px) {
  .login-art .hero-photo.side { left: -24%; width: 42%; }
  .login-art .hero-collage .circle-badge { right: -30px; width: 116px; }
}

@media (max-width: 768px) {
  .login-art .hero-collage { justify-self: stretch; margin: 6px 0 30px; }
  .login-art .hero-photo.main { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .login-art .hero-photo.side { left: auto; right: 14px; bottom: -22px; width: 32%; box-shadow: 0 0 0 6px var(--azul), 0 18px 30px -18px rgba(0, 0, 0, 0.6); }
  .login-art .hero-collage .circle-badge { top: -18px; right: -10px; left: auto; width: 104px; box-shadow: 0 0 0 7px var(--azul); }
  .hero-dots { justify-content: flex-start; bottom: -24px; }
  .hero-actions { display: flex; }
  .hero-actions .btn { flex: 1 1 140px; min-height: 48px; }
  .first-time { display: none; }
  .site-footer { padding: 36px 20px calc(24px + env(safe-area-inset-bottom)); }
  .footer-inner { grid-template-columns: 1fr; }
  .consumer-buttons { grid-template-columns: 1fr; }
  .footer-links { grid-auto-flow: column; justify-content: start; gap: 18px; }
  .legal-doc { padding: 28px 18px 18px; }
  .legal-top { padding-left: 14px; padding-right: 14px; }
  .request-form { padding: 18px 16px; }
  .request-row { flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  .first-time strong, .legal-doc h1, .legal-doc h2 { color: var(--ink-900); }
  .first-time li svg, .check-row a, .legal-doc a, .legal-more a { color: var(--celeste); }
  .consumer-mini a:hover { color: var(--celeste); }
  .site-footer { background: #2c313a; }
  .legal-top { background: #2c313a; }
  .legal-missing { color: #f2b8a8; }
}

/* Cobro por transferencia, cuenta por aprobar y página pública */
.transfer-box, .pending-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--amarillo);
  color: var(--azul);
}
.transfer-box svg, .pending-banner svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.transfer-box > div, .pending-banner > div { display: grid; gap: 4px; }
.transfer-box b { font-variant-numeric: tabular-nums; user-select: all; }
.transfer-box small, .pending-banner span { color: var(--azul); opacity: 0.85; }
.public-note { margin-top: 10px; font-size: 0.9rem; color: var(--sand-700); }
.public-plan.featured { box-shadow: inset 0 0 0 2px var(--amarillo); }
@media (prefers-color-scheme: dark) {
  .transfer-box, .pending-banner { background: #4d4936; color: #fff6c2; }
  .transfer-box small, .pending-banner span { color: #fff6c2; }
}
