/* Entrada al panel (login, registro y «Olvidé mi contraseña») sobre la base Coccoa.
   Se carga después de tokens.css y dashboard.css: reutiliza el puente de Bootstrap
   (body.cc-dash) y solo agrega el layout de estas páginas. Son rutas públicas sin
   marca: nunca llevan el tema de una marca, sí el estilo del panel de la plataforma. */

body.cc-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--c-bg-top) 0px, var(--c-bg) 700px);
}

.cc-auth-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--c-header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.cc-auth-header__bar {
  max-width: 1120px; margin: 0 auto; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 var(--c-gutter);
}
.cc-auth-header img { height: 24px; width: auto; display: block; }
.cc-auth-header__actions { display: flex; align-items: center; gap: 8px; }
.cc-auth-header__link { font-size: 14px; color: var(--c-muted); text-decoration: none; white-space: nowrap; }
.cc-auth-header__link strong { color: var(--c-ink); font-weight: 700; }
.cc-auth-header__link:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.cc-auth-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px var(--c-gutter) 56px; }

/* Tarjeta partida: formulario + panel de marca (oscuro con acento lima, como la landing) */
.cc-auth-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--c-radius-dialog); box-shadow: var(--c-shadow-card); overflow: hidden;
}
.cc-auth-form { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cc-auth-form h1 { margin: 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.1; font-weight: 800; letter-spacing: -0.8px; }
.cc-auth-form .cc-auth-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--c-muted); }
.cc-auth-form form { display: flex; flex-direction: column; gap: 14px; }
.cc-auth-form .form-control { padding-top: 0.7rem; padding-bottom: 0.7rem; font-size: 16px; }
.cc-auth-form .btn-lg { width: 100%; }
.cc-auth-alt { font-size: 14px; color: var(--c-muted); margin: 0; }
.cc-auth-forgot { display: flex; justify-content: flex-end; margin-top: 8px; font-size: 13.5px; }
.cc-auth-forgot a { color: var(--c-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* Una sola columna (Olvidé mi contraseña): la tarjeta del login sin el panel de marca. */
.cc-auth-card--single { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
.cc-auth-alt a { color: var(--c-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.cc-auth-panel {
  position: relative; padding: clamp(24px, 4vw, 48px);
  background: var(--c-night); color: #ffffff;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.cc-auth-panel .cc-eyebrow { color: var(--c-lime); }
.cc-auth-panel h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: -0.6px; color: #ffffff; }
.cc-auth-panel p { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1.55; }
.cc-auth-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cc-auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.9); }
.cc-auth-points .material-icons-outlined { color: var(--c-lime); font-size: 20px; flex: none; margin-top: 1px; }
.cc-auth-panel__dots { display: flex; gap: 6px; margin-top: 6px; }
.cc-auth-panel__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--c-pink); }
.cc-auth-panel__dots span + span { background: var(--c-lime); }
:root[data-theme="dark"] .cc-auth-panel { border-left: 1px solid var(--c-border); }

/* Registro: pasos a la izquierda, formulario a la derecha */
.cc-auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(20px, 4vw, 40px); align-items: start; }
.cc-auth-split .cc-auth-form { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-dialog); box-shadow: var(--c-shadow-card); }
.cc-steps { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-steps h2 { margin: 0 0 4px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -0.6px; line-height: 1.15; }
.cc-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--c-radius-card); }
.cc-step__num {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-night); color: var(--c-lime); font-weight: 800; font-size: 14px;
}
:root[data-theme="dark"] .cc-step__num { background: var(--c-hover); box-shadow: inset 0 0 0 1px var(--c-border-hover); }
.cc-step h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.cc-step p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--c-muted); }
.cc-step a { color: var(--c-brand-ink); font-weight: 600; }
.cc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 4px; }
.cc-fact { padding: 14px 16px; border-radius: var(--c-radius-card); background: var(--c-brand-soft); border: 1px solid var(--c-brand-border); }
.cc-fact > strong { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--c-ink); margin-bottom: 4px; }
.cc-fact > strong .material-icons-outlined { font-size: 18px; color: var(--c-brand-ink); }
.cc-fact p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--c-muted); }

.cc-auth-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  max-width: 1120px; width: 100%; margin: 0 auto;
  padding: 18px max(var(--c-gutter), 84px) 22px var(--c-gutter);
  border-top: 1px solid var(--c-border); font-size: 13px; color: var(--c-muted);
}
.cc-auth-footer a { color: var(--c-muted); text-decoration: none; }
.cc-auth-footer a:hover { color: var(--c-ink); }

@media (max-width: 860px) {
  .cc-auth-card, .cc-auth-split { grid-template-columns: 1fr; }
  .cc-auth-panel { order: 2; }
  /* En el registro el formulario va primero en móvil */
  .cc-auth-split .cc-auth-form { order: 1; }
  .cc-auth-split .cc-steps { order: 2; }
  .cc-auth-main { padding-top: 20px; }
  .cc-auth-header__link span { display: none; }
}
