/* ==========================================================================
   ESQUELETO APP (config layout = 'app'). Solo usa tokens del motor.
   Celular (< 768 px): cabecera fija de 64 px + barra inferior de 64 px + safe area.
   Tablet (768–1024 px): menú lateral de 72 px (solo íconos).
   Escritorio (≥ 1025 px): menú lateral de 264 px; en el panel se pliega a 72 px.
   ========================================================================== */
html.layout-app { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html.layout-app { overflow-y: scroll; } }
.layout-app body { min-height: 100vh; background: var(--color-bg); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); }
.skip-link:focus { left: 8px; }
.icon { flex: none; }
.brand-text { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--color-text); }

.avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
}
.avatar--lg { width: 40px; height: 40px; font-size: 15px; }
.avatar--xl { width: 88px; height: 88px; font-size: 30px; }

/* ---------- Contenido ---------- */
.shell-main { min-width: 0; }
.shell-content { width: 100%; max-width: 1200px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); }
/* El contenido va centrado en el espacio libre: cada página puede ser más angosta (max-width en línea). */
.shell-content > * { margin-left: auto; margin-right: auto; }
.area-client .shell-content { max-width: 880px; }
.area-client .shell-content:has(> .acct) { max-width: 1120px; }
.area-client .shell-content:has(> .booking-flow) { max-width: 1120px; }
.avatar--ghost { background: var(--color-primary-soft); color: var(--color-primary); }
.shell-login { text-decoration: none; color: inherit; }
.shell-login:hover { border-color: var(--color-primary); }

/* ---------- Cabecera de celular ---------- */
.shell-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--space-3) 0 var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.shell-top__brand { display: flex; min-width: 0; align-items: center; }
.shell-logo { display: block; width: auto; height: 34px; }
.shell-top__actions { display: flex; align-items: center; gap: var(--space-1); }
.shell-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text);
}
.shell-count {
  position: absolute;
  top: 6px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.shell-capsule {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--color-control-border, var(--color-border));
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  list-style: none;
}
.shell-pop > summary { list-style: none; }
.shell-pop > summary::-webkit-details-marker { display: none; }
.shell-pop { position: relative; }

/* Menú de cuenta (cabecera ▾ y tarjeta del menú lateral ▴) */
.shell-menu {
  position: absolute;
  z-index: 40;
  width: 256px;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  box-shadow: var(--shadow-lg);
}
.shell-menu--down { top: calc(100% + 8px); right: 0; }
.shell-menu--up { bottom: calc(100% + 8px); left: 0; width: 240px; }
.shell-menu__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); padding: var(--space-2) var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); }
.shell-menu__head span:last-child { display: flex; min-width: 0; flex-direction: column; }
.shell-menu__head strong { font-size: 15px; font-weight: 600; }
.shell-menu__head small { font-size: 13px; color: var(--color-text-muted); }
.shell-menu a, .shell-menu button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.shell-menu a:hover, .shell-menu button:hover { background: var(--color-surface); }
.shell-menu form { margin: 0; }
.shell-menu .shell-menu__danger { color: var(--color-danger); font-weight: 500; }

/* ---------- Barra inferior de celular ---------- */
.shell-tabs {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr));
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.shell-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font: 700 11px / 14px var(--font-body);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}
.shell-tab[aria-current="page"], .shell-tab.is-active, .shell-more[open] > .shell-tab { color: var(--color-primary); }
.shell-more { display: contents; }
.shell-more > summary::-webkit-details-marker { display: none; }

/* Hoja inferior «Más» */
.shell-sheet__backdrop { position: fixed; inset: 0; z-index: 50; border: 0; padding: 0; background: rgb(14 10 13 / 0.55); cursor: pointer; }
.shell-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 51;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}
.shell-sheet__grip { display: block; width: 36px; height: 5px; margin: 0 auto var(--space-2); border-radius: var(--radius-full); background: var(--color-control-border, var(--color-border)); }
.shell-sheet .eyebrow { padding: 0 4px; color: var(--color-text-muted); }
.shell-sheet__list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); }
.shell-sheet__list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.shell-sheet__list a:last-child { border-bottom: 0; }
.shell-sheet__list a > .icon:first-child { color: var(--color-primary); }
.shell-sheet__list a > span { flex: 1; }
.shell-sheet__list a > .icon:last-child { color: var(--color-text-muted); }

/* ---------- Menú lateral (tablet y escritorio) ---------- */
.shell-side { display: none; }
.shell-side__head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 80px; padding: 0 var(--space-3) 0 20px; }
.shell-side__brand { display: flex; min-width: 0; align-items: center; }
.shell-logo--full { height: 40px; }
.shell-logo--mini { display: none; height: 36px; }
.shell-collapse {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-control-border, var(--color-border));
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
}
.shell-side__nav { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4px; padding: 4px var(--space-3) var(--space-3); overflow-y: auto; }
.shell-group { display: block; padding: var(--space-4) 14px 6px; color: var(--color-text-muted); font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; }
.shell-pill {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-3);
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.shell-pill > .icon, .shell-bell { color: var(--color-text-muted); }
.shell-pill:hover { background: var(--color-surface-2); }
.shell-pill[aria-current="page"] { background: var(--color-primary-soft); font-weight: 600; }
.shell-pill[aria-current="page"] > .icon { color: var(--color-primary); }
.shell-pill--wa > .icon { color: var(--color-success); }
.shell-grow { flex: 1; }
.shell-bell { position: relative; display: flex; }
.shell-count--mini { display: none; top: -6px; right: -8px; }
.shell-count--pill { position: static; min-width: 22px; height: 22px; padding: 0 7px; font-size: 12px; line-height: 22px; }
.shell-side__foot { display: flex; flex: none; flex-direction: column; gap: 4px; padding: var(--space-3); border-top: 1px solid var(--color-border); }
.shell-user__card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: var(--space-2) 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.shell-user__text { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.shell-user__text strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.shell-user__text small { font-size: 12px; color: var(--color-text-muted); }
.shell-user .shell-label:last-child { color: var(--color-text-muted); }

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  .layout-app:not(.layout-bare) body { padding-top: calc(64px + env(safe-area-inset-top)); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .shell-tabs .shell-label { display: block; }
  /* El botón fijo de «Reservar cita» queda sobre la barra inferior, no debajo */
  .sticky-cta { bottom: calc(64px + env(safe-area-inset-bottom)); padding-bottom: var(--space-3); }
  /* KPI en dos columnas, como en la maqueta */
  .grid:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .grid:has(> .stat) .card { padding: var(--space-4); }
  .grid:has(> .stat) .stat__value--money { font-size: 22px; line-height: 28px; }
}

/* ---------- Tablet y escritorio: menú lateral ---------- */
@media (min-width: 768px) {
  .shell-top, .shell-tabs { display: none; }
  .shell-side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 72px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    transition: width 0.2s;
  }
  .shell-main { margin-left: 72px; transition: margin-left 0.2s; }
  .shell-content { padding: var(--space-7) var(--space-6) var(--space-8); }
  /* 72 px: solo íconos */
  .shell-side .shell-label, .shell-side .shell-logo--full, .shell-side .shell-collapse { display: none; }
  .shell-side .shell-logo--mini { display: block; }
  .shell-side__head { justify-content: center; padding: var(--space-4) 0 var(--space-2); }
  .shell-side .shell-pill, .shell-side .shell-user__card { justify-content: center; padding-left: 0; padding-right: 0; }
  .shell-side .shell-group { height: 1px; margin: 10px 8px; padding: 0; background: var(--color-border); }
  .shell-side .shell-count--mini { display: block; }
}
@media (min-width: 1025px) {
  .shell-side { width: 264px; }
  .shell-main { margin-left: 264px; }
  .shell-content { padding: var(--space-7) 48px 64px; }
  .shell-side .shell-label, .shell-side .shell-logo--full, .shell-side .shell-collapse { display: revert; }
  .shell-side .shell-user__text { display: flex; }
  .shell-side .shell-logo--full { display: block; }
  .shell-side .shell-collapse { display: flex; }
  .shell-side .shell-logo--mini { display: none; }
  .shell-side__head { justify-content: space-between; padding: 0 var(--space-3) 0 20px; }
  .shell-side .shell-pill { justify-content: flex-start; padding: 0 14px; }
  .shell-side .shell-user__card { justify-content: flex-start; padding: var(--space-2) 10px; }
  .shell-side .shell-group { height: auto; margin: 0; padding: var(--space-4) 14px 6px; background: none; }
  .shell-side .shell-count--mini { display: none; }
  /* Panel plegado a 72 px (estado en localStorage) */
  .side-col .shell-side { width: 72px; }
  .side-col .shell-main { margin-left: 72px; }
  .side-col .shell-side .shell-label, .side-col .shell-side .shell-logo--full { display: none; }
  .side-col .shell-side .shell-logo--mini { display: block; }
  .side-col .shell-side__head { flex-direction: column; justify-content: center; padding: var(--space-4) 0 var(--space-2); }
  .side-col .shell-side .shell-pill, .side-col .shell-side .shell-user__card { justify-content: center; padding-left: 0; padding-right: 0; }
  .side-col .shell-side .shell-group { height: 1px; margin: 10px 8px; padding: 0; background: var(--color-border); }
  .side-col .shell-side .shell-count--mini { display: block; }
}

/* ---------- Páginas sin menú (login, instalación) ---------- */
.shell-bare { min-height: 100vh; }
.shell-bare > .alert { max-width: 400px; margin: var(--space-4) auto; }
.bare-card { max-width: 440px; margin: 0 auto; padding: var(--space-7) var(--space-4); }

/* ---------- Login: zona de marca oscura + hoja clara ---------- */
.login { display: flex; min-height: 100vh; flex-direction: column; background: var(--color-bg); }
.login__brand { display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); min-height: 300px; padding: var(--space-8) var(--space-6) var(--space-6); background: var(--color-bg); color: var(--color-text); text-align: center; }
.login__monogram { width: auto; height: 120px; }
.login__tagline { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 32px; }
.login__categories { color: var(--color-accent); }
.login__panel-title, .login__script, .login__panel-categories { display: none; }
.login__sheet {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: 28px var(--space-5) calc(var(--space-7) + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--color-surface);
  color: var(--color-text);
}
.login__form-wrap { display: flex; width: 100%; max-width: 400px; margin: 0 auto; flex-direction: column; gap: var(--space-5); }
.login__logo { display: none; }
.login__head { display: flex; flex-direction: column; gap: 6px; }
.login__head h1 { margin: 0; }
.login__head p { margin: 0; color: var(--color-text-muted); }
.login__links { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; font-size: 14px; color: var(--color-text-muted); text-align: center; }
.login__brand, .login__sheet { position: relative; }
.login__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.login__back--brand { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; justify-content: center; width: 44px; border-radius: 50%; background: var(--color-surface-2); }
.login__back--sheet { display: none; }
.login__phone { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full); background: var(--color-surface-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.login__note { display: none; }
.login__links a { font-weight: 600; }
.pin-extras { font-size: 14px; }
.pin-extras a { font-weight: 600; }
/* Paso del PIN en celular: monograma más chico y sin título, para que quepa el teclado */
@media (max-width: 1024px) {
  .login--pin .login__brand { min-height: 0; gap: var(--space-3); padding-top: var(--space-7); padding-bottom: var(--space-5); }
  .login--pin .login__monogram { height: 72px; }
  .login--pin .login__tagline { font-size: 22px; line-height: 28px; }
  .login--pin .login__sheet { gap: var(--space-4); padding-top: 24px; }
  .login--pin .login__head { display: none; }
}
@media (min-width: 1025px) {
  .login { flex-direction: row; }
  .login__back--brand { display: none; }
  .login__phone { display: none; }
  .login__back--sheet { display: inline-flex; position: absolute; top: 24px; left: 32px; }
  .login__note { display: flex; gap: var(--space-2); max-width: 480px; margin: var(--space-5) 0 0; color: var(--color-text-muted); font-size: 13px; line-height: 20px; }
  .login__note .icon { flex: none; margin-top: 2px; }
  /* Como Nación Emprende: panel de marca a la izquierda, formulario a la derecha (mitad y mitad). */
  .login__brand { order: 1; flex: 1 1 50%; align-items: flex-start; justify-content: flex-end; padding: 48px clamp(40px, 6vw, 96px); text-align: left; }
  .login__sheet { order: 2; flex: 1 1 50%; justify-content: center; padding: 96px 48px 48px; border-radius: 0; }
  .login__logo { display: block; width: auto; height: 56px; align-self: flex-start; }
  .login__monogram { height: 160px; margin-bottom: auto; }
  .login__tagline { display: none; }
  .login__panel-title { display: block; margin: 0; font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 46px; }
  .login__script { display: block; margin: 0; }
  .login__categories { display: none; }
  .login__panel-categories { display: block; margin-top: var(--space-2); color: var(--color-accent); }
}

/* ---------- Perfil (Ajustes de iPhone en celular; pestañas verticales en escritorio) ---------- */
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4) 0; text-align: center; }
.profile-hero h1 { margin: 0; }
.profile-hero p { margin: 0; color: var(--color-text-muted); }
.settings-group { display: flex; flex-direction: column; gap: var(--space-2); }
.settings-group .eyebrow { padding: 0 var(--space-4); color: var(--color-text-muted); }
.settings-list { overflow: hidden; margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.settings-list li + li { border-top: 1px solid var(--color-border); }
.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 60px;
  padding: var(--space-2) var(--space-4);
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.settings-row:hover { background: var(--color-surface-2); }
.settings-row > .icon:first-child { color: var(--color-primary); }
.settings-row__text { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.settings-row__text strong { font-size: 16px; font-weight: 500; }
.settings-row__text small { font-size: 13px; color: var(--color-text-muted); }
.settings-row > .icon:last-child { color: var(--color-text-muted); }
.settings-row[aria-current="page"] { background: var(--color-primary-soft); }
.settings-row--danger, .settings-row--danger > .icon:first-child { justify-content: center; color: var(--color-danger); font-weight: 500; }
.profile-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--color-primary); font-weight: 500; text-decoration: none; }
.profile { display: flex; flex-direction: column; gap: var(--space-5); }
.profile__nav { display: flex; flex-direction: column; gap: var(--space-5); }
.profile--section .profile__nav { display: none; }
.profile:not(.profile--section) .profile__section { display: none; }
@media (min-width: 1025px) {
  .profile { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: var(--space-6); }
  .profile--section .profile__nav, .profile__nav { display: flex; }
  .profile:not(.profile--section) .profile__section { display: flex; }
  .profile-back { display: none; }
  .profile-hero { align-items: flex-start; text-align: left; }
}
.profile__section { display: flex; flex-direction: column; gap: var(--space-4); }

/* ---------- Chips de categoría y tarjeta de Academia ---------- */
.cat-chips { display: flex; gap: var(--space-2); margin: 0 calc(-1 * var(--space-4)); padding: 4px var(--space-4) var(--space-2); overflow-x: auto; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-control-border, var(--color-border));
  border-radius: var(--radius-full);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.cat-chip svg { color: var(--color-text-muted); }
.cat-chip:hover { border-color: var(--color-primary); }
.cat-chip[aria-current="page"] { background: var(--color-primary-soft); border-color: var(--color-primary); box-shadow: var(--glow-neon, none); }
.cat-chip[aria-current="page"] svg { color: var(--color-primary); }
.academy-card { display: flex; align-items: center; gap: var(--space-4); padding: 20px; border-radius: var(--radius-lg); background: var(--color-surface-2); }
.academy-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; color: var(--color-accent); box-shadow: inset 0 0 0 1.5px var(--color-accent); }
.academy-eyebrow { color: var(--color-accent); }
.academy-title { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 28px; }
.academy-go { display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--color-accent); border-radius: 50%; color: var(--color-accent); }

/* ==========================================================================
   Login estilo Yape (celular y tablet con JS), como el de academia-ne:
   zona de marca oscura y compacta, hoja blanca con el número en grande y un
   teclado propio en los dos pasos; todo cabe en la pantalla sin desplazar.
   ========================================================================== */
.phone-display { display: none; align-items: baseline; justify-content: center; gap: 10px; height: 44px; }
.phone-display__prefix { font-weight: 700; color: var(--color-text-muted); }
[data-phone-digits] { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
[data-phone-digits].is-empty { color: var(--color-border); }
.login__submit:disabled { background: var(--color-surface-2); border-color: var(--color-surface-2); color: var(--color-text-muted); box-shadow: none; opacity: 1; cursor: default; }
@media (max-width: 1024px) {
  .js .phone-display { display: flex; }
  .js .phone-native { display: none; }
  .js .phone-form .pin-pad { display: grid; }
  .js .login { height: 100dvh; min-height: 0; overflow: hidden; }
  .login--oscuro .login__brand { background: var(--login-dark); color: #fff; }
  .login--oscuro .login__back--brand { background: rgb(255 255 255 / .12); color: #fff; }
  .login--oscuro .login__phone { background: rgb(255 255 255 / .14); color: #fff; }
  .js .login__brand { flex: 1 1 auto; min-height: 0; gap: var(--space-3); padding: max(56px, env(safe-area-inset-top)) var(--space-6) 40px; }
  .js .login__monogram { height: 76px; }
  .js .login__tagline { max-width: 280px; font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 22px; opacity: .9; }
  .js .login--pin .login__tagline { font-family: var(--font-display); font-size: 24px; font-weight: 700; opacity: 1; }
  .js .login__sheet { flex: 0 0 auto; margin-top: -24px; gap: var(--space-4); padding: 26px var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom)); }
  .js .login__form-wrap { gap: var(--space-4); }
  .js .login__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .js .phone-form, .js .pin-form { gap: var(--space-4); }
  .js .login .alert-error { margin: -6px 0 -6px !important; padding: 0; border: 0; background: none; color: var(--color-danger); font-size: 14px; font-weight: 600; text-align: center; }
  .js .login__links { font-size: 14px; }
  .pin-pad button { height: 58px; font-size: 24px; font-weight: 700; }
}
@media (max-width: 1024px) and (max-height: 700px) {
  .pin-pad button { height: 48px; }
  .js .login__brand { padding-top: max(48px, env(safe-area-inset-top)); padding-bottom: 32px; }
  .js .login__monogram { height: 56px; }
  .js .login__sheet, .js .phone-form, .js .pin-form, .js .login__form-wrap { gap: var(--space-3); }
}
/* Zona de marca oscura en todas las pantallas (en escritorio es el panel izquierdo) */
.login--oscuro .login__brand { background: var(--login-dark); color: #fff; }
.login--oscuro .login__note { color: rgb(255 255 255 / .72); }
.login--oscuro .login__back--brand { background: rgb(255 255 255 / .12); color: #fff; }

/* Pestaña principal (Reservar): botón redondo al centro, como el dock de la portada */
.shell-tab--main { color: var(--color-primary); }
.shell-tab--main .icon { box-sizing: content-box; width: 24px; height: 24px; margin-top: -26px; padding: 14px; border: 4px solid var(--color-surface); border-radius: 50%; background: var(--color-primary); color: var(--color-primary-contrast); box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--color-primary) 75%, transparent); }
.shell-tab--main[aria-current="page"] .icon { background: var(--color-primary-hover); }

/* ==========================================================================
   Mi cuenta (como academia-ne): escritorio = título y pestañas a la izquierda,
   la sección en una tarjeta a la derecha. Celular = lista de secciones y, al
   entrar a una, «‹ Mi cuenta» con la tarjeta a pantalla completa.
   ========================================================================== */
.acct { display: flex; flex-direction: column; gap: var(--space-5); width: 100%; max-width: 1040px; }
.acct__nav { display: flex; flex-direction: column; gap: var(--space-4); }
.acct__title { margin: 0; font-size: var(--text-3xl); }
.acct__me { display: flex; align-items: center; gap: var(--space-3); }
.acct__me strong { display: block; font-size: var(--text-lg); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__me small { color: var(--color-text-muted); }
.acct__tabs { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.acct-tab { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--space-4); color: inherit; text-decoration: none; border-top: 1px solid var(--color-border); }
.acct-tab:first-child { border-top: 0; }
.acct-tab > .icon:first-child { flex: none; color: var(--color-primary); }
.acct-tab > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acct-tab strong { font-weight: 600; }
.acct-tab small { font-size: 13px; color: var(--color-text-muted); }
.acct-tab > .icon:last-child { flex: none; color: var(--color-text-muted); }
.acct-tab:hover { background: var(--color-surface-2); }
.acct__help { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; text-decoration: none; }
.acct__logout { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0; border: 0; background: none; color: var(--color-danger); font: 600 var(--text-md) var(--font-body); cursor: pointer; }
.acct__panel { display: flex; flex-direction: column; gap: var(--space-4); }
.acct__panel-title { margin: 0; font-size: var(--text-2xl); }
.acct--section .acct__nav { display: none; }
.acct:not(.acct--section) .acct__panel { display: none; }
.input--locked { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); background: var(--color-primary-soft); color: var(--color-text); font-weight: 600; cursor: not-allowed; }
.input--locked .icon { color: var(--color-text-muted); }
.acct-nudge { display: flex; align-items: center; gap: var(--space-2); margin: -6px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface)); font-size: var(--text-sm); }
.acct-nudge .icon { flex: none; color: var(--color-accent); }
.acct__actions { display: flex; justify-content: flex-end; }
.acct__actions .btn:disabled { background: var(--color-surface-2); color: var(--color-text-muted); box-shadow: none; opacity: 1; cursor: default; }
.acct-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.acct-box--col { flex-direction: column; align-items: stretch; }
.acct-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.acct-list li { display: flex; gap: var(--space-2); align-items: flex-start; }
.acct-list .icon { flex: none; margin-top: 2px; color: var(--color-success); }
.acct-list li:last-child .icon { color: var(--color-text-muted); }
@media (min-width: 900px) {
  .acct { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: var(--space-6); }
  .acct--section .acct__nav, .acct__nav { display: flex; position: sticky; top: var(--space-5); }
  .acct:not(.acct--section) .acct__panel { display: flex; }
  .acct__panel { padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
  .acct__panel .profile-back { display: none; }
  .acct-tab > .icon:last-child { display: none; }
  .acct-tab[aria-current="page"] { background: var(--color-primary-soft); box-shadow: inset 3px 0 0 var(--color-primary); }
}
