/* ══════════════════════════════════════════════════════════════════════════
   Sistema visual · Autismo en el Radar
   Los tokens son los mismos que marca Views/Home/Landing.cshtml. Si allí
   cambia la paleta, cambiar aquí los mismos seis valores.

   Todo está bajo clases .auth-* y no hay selectores de elemento sueltos
   (nada de `body {}`), así que enlazar esta hoja no altera ninguna vista
   que no use estas clases.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --ink:      #0D3B2C;   /* verde bosque */
  --ink-2:    #17553F;
  --cyan:     #1F7A5C;   /* esmeralda */
  --magenta:  #C6F24E;   /* lima, acento */
  --yellow:   #7ED9A7;   /* menta */
  --paper:    #FFFFFF;
  --paper-2:  #E7F0EB;   /* salvia */
  --page:     #F6FAF8;
  --body-ink: #3B5A4E;
  --hair:     rgba(13,59,44,0.12);
  --soft:     0 18px 40px rgba(13,59,44,0.10);
  --soft-sm:  0 8px 24px rgba(13,59,44,0.08);
  --display:  'Space Grotesk', system-ui, sans-serif;
  --body:     'Manrope', system-ui, sans-serif;
  --mono:     'JetBrains Mono', ui-monospace, monospace;
}

/* ── Estructura de página ────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  font-family: var(--body);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-shell { width: 100%; max-width: 440px; }
.auth-shell--wide { max-width: 520px; }

.auth-card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 24px;
  box-shadow: var(--soft);
  padding: 40px 36px 36px;
  animation: authIn .45s ease-out;
}
@keyframes authIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Cabecera con el isotipo del radar ───────────────────────────────── */
.auth-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; }
.auth-mark { width: 48px; height: 48px; display: block; margin-bottom: 14px; }
.auth-mark .lm-ring   { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.auth-mark .lm-ring-out { stroke-width: 2.2; }
.auth-mark .lm-sector { fill: var(--magenta); }
.auth-mark .lm-dot    { fill: var(--ink); }
.auth-title { font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -0.025em; margin: 0; color: var(--ink); }
.auth-sub { font-size: 14px; color: var(--body-ink); margin: 8px 0 0; max-width: 34ch; }

/* ── Formulario ──────────────────────────────────────────────────────── */
.auth-fields { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-family: var(--body); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.auth-input {
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #8AA79A; }
.auth-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(31,122,92,0.15);
}
/* el autorrelleno de Chrome pintaba el campo de azul */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
}
.auth-err { font-size: 12.5px; color: #B3261E; }

/* ── Avisos ──────────────────────────────────────────────────────────── */
.auth-alert { font-size: 14px; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid; }
.auth-alert:empty { display: none; }
.auth-alert--err  { color: #B3261E; background: #FDF2F2; border-color: #F5CFCB; }
.auth-alert--info { color: var(--ink); background: var(--paper-2); border-color: var(--hair); }

/* ── Botones (píldora, como en la landing) ───────────────────────────── */
.auth-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--display); font-weight: 600; font-size: 15px;
  padding: 13px 22px;
  border-radius: 99px;
  border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.auth-btn:hover { background: var(--magenta); color: var(--ink); border-color: var(--magenta); transform: translateY(-2px); }
.auth-btn svg { width: 17px; height: 17px; }
.auth-btn--ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.auth-btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: none; }

.auth-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-link { color: var(--cyan); font-size: 13px; text-decoration: none; }
.auth-link:hover { color: var(--ink); text-decoration: underline; }
.auth-center { text-align: center; margin-top: 16px; }

/* ── Separador ───────────────────────────────────────────────────────── */
.auth-sep { display: flex; align-items: center; gap: 14px; margin: 26px 0 20px; color: var(--ink); }
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.auth-sep span { font-family: var(--body); font-weight: 600; font-size: 13px; }

/* ── Pie ─────────────────────────────────────────────────────────────── */
.auth-foot {
  text-align: center; margin: 22px 0 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: rgba(13,59,44,0.45);
}
.auth-foot a { color: inherit; text-decoration: none; }
.auth-foot a:hover { color: var(--cyan); }

@media (max-width: 520px) {
  .auth-card { padding: 32px 24px 28px; border-radius: 20px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Páginas legales (Aviso Legal · Privacidad · Cookies)
   Antes cada vista repetía este mismo bloque con la paleta antigua, y por eso
   se descolgaban del resto. Todo va bajo .legal-page: no afecta a nada más.
   El acento de cada página lo marca su segunda clase de body.
   ══════════════════════════════════════════════════════════════════════════ */

.legal-page {
  margin: 0;
  font-family: var(--body);
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.legal-page *, .legal-page *::before, .legal-page *::after { box-sizing: border-box; }
.legal-page a { color: var(--ink); text-decoration: none; }

.legal-page .topbar {
  background: var(--ink); color: var(--paper);
  padding: 14px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.legal-page .topbar .brand { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--paper); }
.legal-page .topbar .brand em { color: var(--magenta); font-style: normal; }
.legal-page .topbar a.back { font-size: 13px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; transition: color .2s; }
.legal-page .topbar a.back:hover { color: var(--magenta); }

.legal-page .wrap { max-width: 860px; margin: 0 auto; padding: 64px 32px 96px; }

.legal-page .badge {
  display: inline-block;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 99px; margin-bottom: 24px;
  background: var(--magenta); color: var(--ink);
}
.legal-privacidad .badge { background: var(--cyan); color: var(--paper); }
.legal-cookies    .badge { background: var(--yellow); color: var(--ink); }

.legal-page h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(36px, 5vw, 64px); line-height: 1;
  letter-spacing: -.03em; margin: 0 0 12px;
}
.legal-page .meta {
  font-size: 13px; color: var(--body-ink);
  margin-bottom: 48px; padding-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}
.legal-page h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 40px 0 12px; letter-spacing: -.01em; }
.legal-page p { margin: 0 0 16px; max-width: 72ch; }
.legal-page ul { padding-left: 20px; margin: 0 0 16px; }
.legal-page li { margin-bottom: 8px; }
.legal-page strong { color: var(--ink); }

/* Aviso destacado: verde esmeralda por defecto, menta en Cookies */
.legal-page .highlight {
  background: rgba(31,122,92,.10);
  border-left: 4px solid var(--cyan);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0;
}
.legal-cookies .highlight { background: rgba(126,217,167,.22); border-left-color: var(--yellow); }

/* Tabla de cookies */
.legal-page table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.legal-page th {
  background: var(--ink); color: var(--paper);
  padding: 11px 14px; text-align: left;
  font-family: var(--display); font-weight: 600;
}
.legal-page th:first-child { border-radius: 10px 0 0 0; }
.legal-page th:last-child  { border-radius: 0 10px 0 0; }
.legal-page td { padding: 11px 14px; border-bottom: 1px solid var(--hair); }
.legal-page tr:last-child td { border-bottom: none; }
.legal-page tr:nth-child(even) td { background: var(--paper-2); }

.legal-page .footer-note {
  margin-top: 64px; padding: 24px;
  background: var(--paper-2); border-radius: 16px;
  font-size: 14px; color: var(--body-ink);
}

/* ── Estados (confirmaciones, errores) ───────────────────────────────── */
.auth-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.auth-icon svg { width: 30px; height: 30px; }
.auth-icon--ok   { background: rgba(198,242,78,0.30); color: var(--ink); }
.auth-icon--info { background: var(--paper-2);        color: var(--cyan); }
.auth-icon--warn { background: #FDF2F2;               color: #B3261E; }
.auth-text {
  font-size: 15px; line-height: 1.6; color: var(--body-ink);
  margin: 0 0 12px; text-align: center;
}
.auth-text:last-child { margin-bottom: 0; }
.auth-text strong { color: var(--ink); font-weight: 600; }
.auth-btn:disabled,
.auth-btn[disabled] {
  background: var(--paper-2); color: #8AA79A; border-color: var(--hair);
  cursor: not-allowed; transform: none;
}
.auth-check {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 14px; line-height: 1.5; color: var(--body-ink);
  text-align: left; margin-top: 4px;
}
.auth-check input { width: 18px; height: 18px; accent-color: var(--cyan); flex-shrink: 0; margin-top: 1px; }
.auth-list { text-align: left; margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--body-ink); }
.auth-actions--row { flex-direction: row; }
.auth-actions--row .auth-btn { flex: 1; }
@media (max-width: 460px) { .auth-actions--row { flex-direction: column-reverse; } }
.auth-terms {
  background: var(--paper-2); border: 1px solid var(--hair); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 22px;
  font-size: 14.5px; line-height: 1.65; color: var(--body-ink);
  max-height: 320px; overflow-y: auto;
}
.auth-terms p { margin: 0; }
.auth-alert--ok { color: var(--ink); background: rgba(198,242,78,0.22); border-color: rgba(198,242,78,0.55); }
.auth-input[readonly] { background: var(--paper-2); color: var(--body-ink); }
