/* ==========================================================================
   Panel de usuario
   Usa la paleta de body.landing (landing.css): fondo profundo, acentos menta/cian.
   ========================================================================== */

.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 22px 14px;
  background: linear-gradient(180deg, rgba(10, 16, 21, 0.92), rgba(6, 10, 13, 0.92));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}
.sidebar .logo { padding: 4px 8px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 12px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--graphite);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.side-nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.04); transform: translateX(2px); }
.side-nav a[aria-current="page"] {
  color: var(--growth);
  background: linear-gradient(90deg, rgba(46, 242, 164, 0.14), rgba(46, 242, 164, 0.02));
  box-shadow: inset 0 0 0 1px rgba(46, 242, 164, 0.22);
}
.sidebar .side-nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--growth); box-shadow: 0 0 12px var(--growth);
}
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--gradient-mint, var(--gradient-ember)); color: #031a12; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 2px rgba(5, 8, 11, 1), 0 0 0 3px rgba(46, 242, 164, 0.45);
}
.user-chip div { min-width: 0; font-size: 13px; line-height: 1.35; }
.user-chip strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip span { color: var(--graphite); font-size: 12px; }

.main { min-width: 0; padding: 36px 40px 80px; }
.main-inner { max-width: 1040px; margin-inline: auto; display: grid; gap: 28px; }

.demo-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.06);
  font-size: 13px; color: var(--mist);
}
.demo-banner .icon { color: var(--signal); margin-top: 1px; width: 18px; height: 18px; }
.demo-banner code { font-family: var(--mono); font-size: 12px; background: var(--obsidian); padding: 1px 5px; border-radius: 4px; }

.page-head { display: grid; gap: 8px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.055em; line-height: 1.02; }
.page-head p { color: var(--graphite); max-width: 60ch; font-size: 17px; }

.view { display: grid; gap: 20px; }
.view:focus { outline: none; }
.view:not([hidden]) > * { animation: view-in 0.55s var(--ease) both; }
.view:not([hidden]) > *:nth-child(2) { animation-delay: 60ms; }
.view:not([hidden]) > *:nth-child(3) { animation-delay: 120ms; }
.view:not([hidden]) > *:nth-child(4) { animation-delay: 180ms; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pad { padding: 24px; }
.stack { display: grid; gap: 12px; align-content: start; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.card p { color: var(--graphite); font-size: 14px; }

/* ---------- Bienvenida ---------- */

.welcome {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px;
  border-color: rgba(46, 242, 164, 0.22);
}
.landing .welcome {
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(46, 242, 164, 0.16), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(56, 189, 248, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(14, 22, 28, 0.9), rgba(8, 13, 17, 0.9));
}
.welcome-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.45; pointer-events: none; }
.welcome-line path {
  fill: none; stroke: var(--growth); stroke-width: 2; stroke-linejoin: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  filter: drop-shadow(0 0 6px rgba(46, 242, 164, 0.8));
  animation: draw 2.4s var(--ease) 0.2s forwards;
}
.welcome-copy { display: grid; gap: 12px; justify-items: start; }
.welcome-copy .live-pill { animation-delay: 0s; }
.welcome h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.055em; line-height: 1; }
.welcome p { color: var(--mist); font-size: 17px; }

.ring { position: relative; width: 132px; height: 132px; flex: none; --p: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .ring-bg { stroke: rgba(255, 255, 255, 0.08); }
.ring .ring-fg {
  stroke: var(--growth); stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 - 326.73 * var(--p) / 100);
  filter: drop-shadow(0 0 6px rgba(46, 242, 164, 0.7));
  transition: stroke-dashoffset 1s var(--ease);
}
.ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring strong { font-family: var(--mono); font-size: 28px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.ring span { font-size: 11px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.ring.complete { animation: ring-glow 2s ease-in-out infinite; border-radius: 50%; }
@keyframes ring-glow { 50% { box-shadow: 0 0 40px rgba(46, 242, 164, 0.35); } }

/* ---------- Métricas ---------- */

.stat { display: flex; align-items: center; gap: 16px; transition: transform 0.3s var(--ease); }
.stat:hover { transform: translateY(-3px); }
.stat > div { display: grid; gap: 4px; min-width: 0; }
.stat span { font-size: 12px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.06em; }
.stat strong { font-size: 20px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; }
.stat .stat-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(46, 242, 164, 0.18), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(46, 242, 164, 0.3); color: var(--growth);
  text-transform: none; letter-spacing: 0;
}

/* ---------- Primeros pasos ---------- */

.todo { display: grid; gap: 6px; }
.todo a {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.todo a:hover { background: rgba(46, 242, 164, 0.05); border-color: rgba(46, 242, 164, 0.18); transform: translateX(3px); }
.todo .n {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--line-strong);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  transition: all 0.4s var(--ease);
}
.todo .done .n { border-color: var(--growth); background: var(--growth); color: #031a12; box-shadow: 0 0 16px rgba(46, 242, 164, 0.55); font-size: 0; }
.todo .done .n::before {
  content: ""; width: 12px; height: 7px; margin-top: 0;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg);
}
.todo .t { flex: 1; font-size: 15px; font-weight: 600; }
.todo .done .t { color: var(--mist); }
.todo .t small { display: block; font-size: 13px; color: var(--graphite); font-weight: 400; }
.todo .arrow { color: var(--graphite); transition: transform 0.2s var(--ease), color 0.2s var(--ease); }
.todo a:hover .arrow { color: var(--growth); transform: translateX(3px); }

/* ---------- Guía (línea de tiempo) ---------- */

.guide { position: relative; display: grid; gap: 12px; }
.guide::before {
  content: ""; position: absolute; left: 41px; top: 36px; bottom: 36px; width: 2px;
  background: linear-gradient(180deg, var(--growth), var(--signal) 60%, rgba(56, 189, 248, 0.1));
  box-shadow: 0 0 10px rgba(46, 242, 164, 0.4);
}
.guide li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 22px; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease); }
.guide li:hover { transform: translateX(4px); border-color: rgba(46, 242, 164, 0.3); }
.guide .n {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); border: 2px solid var(--growth); color: var(--growth);
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  box-shadow: 0 0 0 5px rgba(46, 242, 164, 0.08), 0 0 20px rgba(46, 242, 164, 0.35);
}
.guide h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 4px; }
.guide p { font-size: 14px; }
.guide code, .kbd { font-family: var(--mono, ui-monospace), monospace; font-size: 12.5px; background: rgba(46, 242, 164, 0.08); border: 1px solid rgba(46, 242, 164, 0.2); padding: 1px 6px; border-radius: 6px; color: var(--growth); }

/* ---------- Curso ---------- */

.lessons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lesson { display: grid; gap: 10px; text-align: left; }
.lesson .media-thumb { aspect-ratio: 16 / 9; }
.lesson:hover .media-thumb { border-color: rgba(46, 242, 164, 0.45); box-shadow: 0 20px 50px -12px rgba(46, 242, 164, 0.3); transform: translateY(-5px); }
.lesson:hover .play { transform: translate(-50%, -50%) scale(1.12); }
.lesson-meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--growth); }
.lesson-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.lesson.locked { opacity: 0.55; }

/* ---------- Token ---------- */

.token-card { padding: 32px; display: grid; gap: 22px; }
.token-box {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px 18px 20px 24px; border-radius: 16px;
  background:
    radial-gradient(80% 140% at 0% 50%, rgba(46, 242, 164, 0.1), transparent 60%),
    rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(46, 242, 164, 0.35);
  box-shadow: inset 0 0 30px rgba(46, 242, 164, 0.06), 0 0 40px -12px rgba(46, 242, 164, 0.4);
}
.token-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(46, 242, 164, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
}
.token-box.burst { animation: token-burst 1s var(--ease); }
.token-box.burst::after { animation: sweep 1s var(--ease); }
@keyframes token-burst { 0% { box-shadow: 0 0 0 0 rgba(46, 242, 164, 0.7); } 100% { box-shadow: 0 0 0 18px rgba(46, 242, 164, 0), 0 0 40px -12px rgba(46, 242, 164, 0.4); } }
@keyframes sweep { to { transform: translateX(100%); } }
.token-box code { font-family: var(--mono, ui-monospace), monospace; font-size: clamp(16px, 2.4vw, 22px); font-weight: 700; letter-spacing: 0.06em; word-break: break-all; color: var(--growth); text-shadow: 0 0 18px rgba(46, 242, 164, 0.45); }
.token-box .actions { display: flex; gap: 8px; }
.landing .token-box .icon-btn { background: rgba(255, 255, 255, 0.04); }
.landing .token-box .icon-btn:hover { color: var(--growth); border-color: rgba(46, 242, 164, 0.5); }
.token-empty {
  padding: 28px; border-radius: 16px; text-align: center;
  border: 1px dashed var(--line-strong); color: var(--graphite); font-size: 15px;
}
.resets-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--graphite); }
.reset-bars { display: inline-flex; gap: 6px; }
.reset-bars i { width: 32px; height: 6px; border-radius: 3px; background: var(--growth); box-shadow: 0 0 10px rgba(46, 242, 164, 0.6); transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.reset-bars i.used { background: var(--smoke); box-shadow: none; }
.token-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-card {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 20px; border-radius: 14px;
  border: 1px solid rgba(255, 161, 108, 0.35);
  background: rgba(255, 161, 108, 0.06);
}
.contact-card strong { display: block; font-weight: 600; }
.contact-card p { color: var(--mist); font-size: 14px; }

/* ---------- Descargas ---------- */

.download { padding: 26px; display: grid; gap: 18px; align-content: start; transition: transform 0.3s var(--ease); }
.download:hover { transform: translateY(-4px); }
.download-head { display: flex; gap: 14px; align-items: center; }
.download-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.03em; }
.download-head span { font-size: 13px; color: var(--graphite); }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 20px) scale(0.96); opacity: 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--white); color: var(--ink);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-halo);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}
.landing .toast { background: var(--gradient-mint); color: #031a12; box-shadow: 0 10px 40px -6px rgba(46, 242, 164, 0.6); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Diálogo de confirmación ---------- */

.confirm {
  width: min(440px, calc(100vw - 32px)); padding: 28px;
  border: 1px solid var(--line-strong); border-radius: 20px;
  background: var(--charcoal); color: var(--white);
  box-shadow: var(--shadow-halo);
}
.confirm[open] { animation: pop-in 0.3s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.95) translateY(8px); } }
.confirm::backdrop { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(6px); }
.confirm h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.035em; margin-bottom: 8px; }
.confirm p { color: var(--graphite); font-size: 14px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Barra superior móvil ---------- */

.topbar { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: grid; gap: 10px;
    position: sticky; top: 0; z-index: 40;
    padding: 12px 16px 0;
    background: rgba(5, 8, 11, 0.85);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar-row { display: flex; justify-content: space-between; align-items: center; }
  .topbar .side-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 10px; scrollbar-width: none; }
  .topbar .side-nav::-webkit-scrollbar { display: none; }
  .topbar .side-nav a { flex: none; min-height: 40px; }
  .main { padding: 24px 16px 64px; }
  .grid-3, .lessons { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .lessons { grid-template-columns: 1fr; }
  .token-card { padding: 20px; }
  .welcome { padding: 24px; }
  .ring { width: 108px; height: 108px; }
  .ring strong { font-size: 22px; }
  .guide::before { left: 37px; }
  .guide li { gap: 14px; padding: 18px; }
}

/* ---------- Pantalla de acceso ---------- */

.gate {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(45% 45% at 50% 100%, rgba(46, 242, 164, 0.18), transparent 70%),
    radial-gradient(35% 35% at 85% 10%, rgba(56, 189, 248, 0.12), transparent 70%);
}
.gate-line { position: absolute; inset: auto 0 0; width: 100%; height: 60%; z-index: -1; opacity: 0.5; pointer-events: none; }
.gate-line path {
  fill: none; stroke: url(#gate-grad); stroke-width: 3; stroke-linejoin: round;
  stroke-dasharray: 2000; stroke-dashoffset: 2000;
  filter: drop-shadow(0 0 8px rgba(46, 242, 164, 0.8));
  animation: draw 2.6s var(--ease) 0.2s forwards;
}
.gate-card { width: min(440px, 100%); padding: 40px 34px; display: grid; gap: 24px; box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(46, 242, 164, 0.35); animation: pop-in 0.6s var(--ease); }
.landing .gate-card { border-color: rgba(46, 242, 164, 0.22); }
.gate-card h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.055em; line-height: 1.05; }
.gate-card p { font-size: 15px; }
.gate-error { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255, 95, 109, 0.4); background: rgba(255, 95, 109, 0.08); color: var(--mist); font-size: 14px; }
.gate-foot { font-size: 14px; color: var(--graphite); text-align: center; }
.gate-foot a { color: var(--growth); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .welcome-line path, .gate-line path { stroke-dashoffset: 0; animation: none; }
  .view:not([hidden]) > * { animation: none; }
}
.gate-error.is-info { border-color: rgba(46, 242, 164, 0.4); background: rgba(46, 242, 164, 0.08); color: var(--mist); }

/* ---------- Soporte 1:1 ---------- */

.sp-offer { display: grid; grid-template-columns: 1fr 260px; gap: 28px; padding: 28px; align-items: center; border-color: rgba(46, 242, 164, 0.22); }
.landing .sp-offer { background: radial-gradient(70% 140% at 100% 0%, rgba(46, 242, 164, 0.12), transparent 60%), linear-gradient(180deg, rgba(14, 22, 28, 0.9), rgba(8, 13, 17, 0.9)); }
.sp-offer-main { display: grid; gap: 16px; justify-items: start; }
.sp-offer .live-pill { animation-delay: 0s; }
.sp-price { display: flex; align-items: baseline; gap: 10px; }
.sp-price strong { font-size: 56px; font-weight: 800; letter-spacing: -0.06em; line-height: 1; background: var(--gradient-mint); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-price span { color: var(--graphite); font-size: 15px; }
.sp-price b { color: var(--white); font-weight: 600; }
.sp-points { display: grid; gap: 8px; }
.sp-points li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--mist); }
.sp-points .icon { color: var(--growth); }
.sp-credits {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  padding: 22px 18px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px dashed var(--line-strong);
  font-size: 14px; color: var(--graphite);
}
.sp-credits.has { border: 1px solid rgba(46, 242, 164, 0.45); box-shadow: 0 0 30px -10px rgba(46, 242, 164, 0.5); }
.sp-credits-n { font-family: var(--mono); font-size: 44px; font-weight: 700; line-height: 1; color: var(--white); }
.sp-credits.has .sp-credits-n { color: var(--growth); text-shadow: 0 0 20px rgba(46, 242, 164, 0.5); }
.sp-credits .btn { margin-top: 10px; }
.sp-credits small { font-size: 12px; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.sp-booking { padding: 24px; display: grid; gap: 18px; }
.sp-tz { font-size: 12px; color: var(--graphite); font-family: var(--mono); }
.sp-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sp-day {
  flex: none; width: 74px; padding: 10px 6px; border-radius: 14px;
  display: grid; justify-items: center; gap: 2px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  font-size: 12px; color: var(--graphite);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.sp-day strong { font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -0.03em; line-height: 1.1; }
.sp-day small { font-size: 10.5px; color: var(--growth); margin-top: 2px; }
.sp-day:hover { border-color: rgba(46, 242, 164, 0.4); transform: translateY(-2px); }
.sp-day[aria-selected="true"] { background: rgba(46, 242, 164, 0.14); border-color: var(--growth); box-shadow: 0 0 20px -6px rgba(46, 242, 164, 0.6); }
.sp-day[aria-selected="true"] span { color: var(--mist); }
.sp-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sp-slot {
  height: 44px; border-radius: 10px; font-family: var(--mono); font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-strong); color: var(--mist);
  transition: all 0.2s var(--ease);
}
.sp-slot:hover { border-color: rgba(46, 242, 164, 0.5); color: var(--white); }
.sp-slot[aria-selected="true"] { background: var(--growth); border-color: var(--growth); color: #031a12; box-shadow: 0 0 20px -4px rgba(46, 242, 164, 0.7); }
.sp-empty { color: var(--graphite); font-size: 14px; }

.sp-confirm { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); animation: view-in 0.4s var(--ease); }
.sp-summary { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(46, 242, 164, 0.08); border: 1px solid rgba(46, 242, 164, 0.3); }
.sp-summary .icon { color: var(--growth); width: 24px; height: 24px; }
.sp-summary strong { display: block; font-size: 16px; }
.sp-summary span { font-size: 13px; color: var(--graphite); }
.sp-field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.sp-field textarea {
  width: 100%; resize: vertical; min-height: 84px; padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-strong); color: var(--white);
  font: 400 15px/1.5 var(--font);
}
.sp-field textarea:focus { outline: none; border-color: rgba(46, 242, 164, 0.6); box-shadow: 0 0 0 3px rgba(46, 242, 164, 0.15); }
.sp-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sp-hint { font-size: 13px; color: var(--graphite); }

.sp-list { display: grid; gap: 10px; }
.sp-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.sp-item.past { opacity: 0.6; }
.sp-date { display: grid; justify-items: center; padding: 8px 0; border-radius: 12px; background: rgba(46, 242, 164, 0.1); border: 1px solid rgba(46, 242, 164, 0.3); text-transform: uppercase; }
.sp-date span { font-size: 11px; font-weight: 700; color: var(--growth); letter-spacing: 0.06em; }
.sp-date strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.sp-info { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.sp-info strong { font-size: 15px; }
.sp-info p { font-size: 14px; color: var(--graphite); overflow-wrap: anywhere; }
.sp-item-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sp-item-actions .btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.sp-cancel:hover { color: var(--loss); }
.sp-policy { font-size: 13px; color: var(--graphite); }

@media (max-width: 760px) {
  .sp-offer { grid-template-columns: 1fr; padding: 22px; }
  .sp-item { grid-template-columns: 56px 1fr; }
  .sp-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- Navegación móvil: barra inferior + hoja "Más" ---------- */

.tabbar, .sheet, .sheet-overlay { display: none; }

@media (max-width: 960px) {
  body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { padding-bottom: 12px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(8, 13, 17, 0.92);
    backdrop-filter: saturate(140%) blur(18px); -webkit-backdrop-filter: saturate(140%) blur(18px);
    border-top: 1px solid var(--line-strong);
  }
  .gate:not([hidden]) ~ .tabbar { display: none; }
  .tabbar a, .tabbar button {
    position: relative;
    display: grid; justify-items: center; align-content: center; gap: 3px;
    min-height: 56px; border-radius: 14px;
    font-size: 11px; font-weight: 600; color: var(--graphite);
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"], .tabbar .tab-more.active, .tabbar .tab-more[aria-expanded="true"] { color: var(--growth); }
  .tabbar a[aria-current="page"]::before {
    content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--growth); box-shadow: 0 0 12px var(--growth);
  }
  .tabbar a:active, .tabbar button:active { background: rgba(255, 255, 255, 0.05); }

  .sheet-overlay { display: block; position: fixed; inset: 0; z-index: 61; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.25s var(--ease); }
  .sheet-overlay.open { opacity: 1; }
  .sheet-overlay[hidden], .sheet[hidden] { display: none; }
  .sheet {
    display: grid; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 62;
    max-height: 82vh; overflow-y: auto;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #0a1015; border-top: 1px solid var(--line-strong);
    box-shadow: 0 -30px 80px -20px #000;
    transform: translateY(100%); transition: transform 0.28s var(--ease);
  }
  .sheet.open { transform: none; }
  .sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); justify-self: center; }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; }
  .sheet-head strong { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sheet-grid a {
    display: grid; justify-items: center; gap: 8px; padding: 16px 6px; border-radius: 16px; text-align: center;
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
    font-size: 12.5px; font-weight: 600; color: var(--mist);
  }
  .sheet-grid a .icon { width: 24px; height: 24px; color: var(--growth); }
  .sheet-grid a[aria-current="page"] { background: rgba(46, 242, 164, 0.12); border-color: rgba(46, 242, 164, 0.45); color: var(--white); }
  .sheet-links { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
  .sheet-links a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px; border-radius: 12px; font-size: 15px; color: var(--mist); }
  .sheet-links a:active { background: rgba(255, 255, 255, 0.05); }

  .has-tabbar .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 600px) {
  /* Días de la agenda en cuadrícula en lugar de desplazarse de lado */
  .sp-days { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .sp-day { width: auto; }
  .sp-slots { grid-template-columns: repeat(3, 1fr); }
  .sp-item-actions .btn { flex: 1 1 auto; }
}

/* Mensajes de validación junto al campo */
.field-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--graphite); font-weight: 400; }
.field-meta [data-sp-count], .field-meta .counter { margin-left: auto; font-variant-numeric: tabular-nums; }
.field-error { color: #f08a8a; font-weight: 500; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: rgba(240, 138, 138, 0.8) !important; box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.15) !important; }

/* ---------- Acceso (iniciar sesión / crear cuenta) ---------- */
.auth-card { gap: 20px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--graphite); font: 600 14px var(--font); cursor: pointer; transition: background 0.2s, color 0.2s; }
.auth-tabs button[aria-selected="true"] { background: var(--charcoal); color: var(--white); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
.auth-tabs button:focus-visible { outline: 2px solid var(--growth); outline-offset: 2px; }
.auth-social { display: grid; gap: 18px; }
.btn-google { background: var(--white); color: #1f1f1f; gap: 12px; }
.btn-google:hover { background: #ececec; }
.g-logo { width: 20px; height: 20px; flex: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--graphite); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.field-row { display: flex; justify-content: space-between; gap: 12px; }
.field-row a, .check a { color: var(--growth); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.field input, .pw input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-strong); color: var(--white);
  font: 400 16px/1.4 var(--font);
}
.field input:focus { outline: none; border-color: rgba(46, 242, 164, 0.6); box-shadow: 0 0 0 3px rgba(46, 242, 164, 0.15); }
.field input[aria-invalid="true"] { border-color: rgba(255, 95, 109, 0.7); }
.pw { position: relative; display: block; }
.pw input { padding-right: 48px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--graphite); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--white); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--mist); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--growth); }
.check input[aria-invalid="true"] { outline: 2px solid rgba(255, 95, 109, 0.7); outline-offset: 2px; }
.auth-sent { display: grid; gap: 14px; text-align: center; justify-items: center; }
.auth-sent p { font-size: 15px; }
.auth-sent-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(46, 242, 164, 0.1); border: 1px solid rgba(46, 242, 164, 0.3); color: var(--growth); }
.auth-sent-icon .icon { width: 26px; height: 26px; }
.auth-sent-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
@media (max-width: 480px) { .gate-card.auth-card { padding: 28px 20px; } }

/* ---------- Suscripción y cuenta ---------- */
.gate-plan { display: grid; gap: 18px; padding: 20px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.gate-price { display: flex; align-items: baseline; gap: 6px; }
.gate-price strong { font-size: 40px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.gate-price span { color: var(--graphite); font-size: 15px; }
.gate-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--graphite); }
.gate-note .icon { color: var(--growth); }
.billing-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 161, 108, 0.4); background: rgba(255, 161, 108, 0.08); font-size: 14px; color: var(--mist); }
.billing-banner .icon { color: var(--ember); width: 18px; height: 18px; flex: none; }
.billing-banner span { flex: 1; }
.billing-banner .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--graphite); }
.kv dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.hint { font-size: 13px; color: var(--graphite); }
.hint.is-warn { color: var(--ember); }
.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.invoice-list { display: grid; }
.invoice { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.invoice:last-child { border-bottom: 0; }
.invoice strong { font-variant-numeric: tabular-nums; }
.invoice a { color: var(--growth); text-decoration: underline; text-underline-offset: 3px; }
.invoice small { display: block; color: var(--graphite); }
@media (max-width: 560px) { .billing-banner { flex-wrap: wrap; } .invoice { grid-template-columns: 1fr auto; } .invoice a { grid-column: 1 / -1; } }
.badge-warn { border-color: rgba(250, 178, 25, 0.5); color: #fab219; }

/* Insignia de marca en las tarjetas de acceso */
.gate-brand { justify-self: center; display: block; width: 112px; height: 112px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(160, 220, 255, 0.18), 0 18px 50px -12px rgba(56, 189, 248, 0.55), 0 0 80px -20px rgba(167, 139, 250, 0.5); transition: transform 0.4s var(--ease); }
.gate-brand:hover { transform: scale(1.03); }
.gate-brand img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.gate-tag { justify-self: center; margin: -12px 0 0; }
@media (max-width: 480px) { .gate-brand { width: 92px; height: 92px; } }
