/* YaQu — estilos compartidos de autenticación (login + register).
   Los tokens (color, radio, sombra, foco) viven en tokens.css; cada página de
   auth debe enlazar tokens.css ANTES que este archivo. Un único origen evita
   que login y register vuelvan a divergir en forma de botón, radios o color. */

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11","ss01";
  background: var(--bg);
  color: var(--body);
  display: flex;
  min-height: 100vh;
  padding: 24px 16px;
}

/* margin:auto centra el grupo (card + franja de confianza) en pantallas altas
   sin dejar hueco muerto, y si el contenido desborda cae a tope arriba con
   scroll (nunca recorta). Reemplaza el viejo align:flex-start + clamp. */
.auth-wrap {
  margin: auto;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);            /* 16px = token lg (antes 20px, fuera de sistema) */
  padding: 32px 28px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

/* Franja de confianza bajo la card: llena el fold en móvil alto y refuerza la
   conversión (PRODUCT.md — confianza primero). Texto a token, separadores suaves. */
.auth-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
}
.auth-trust .sep { opacity: .5; }

.logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg,#22c55e,#22d3ee);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--brand-ink);
}
.logo-text { font-weight: 700; font-size: 20px; color: var(--ink); }

h1 { margin: 0 0 6px; font-size: 22px; color: var(--ink); letter-spacing: -.02em; }
p  { margin: 0 0 24px; font-size: 14px; color: var(--muted); line-height: 1.5; }

.field { margin-bottom: 14px; }
label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--body); margin-bottom: 6px;   /* token --body (antes #333c37, fuera de sistema) */
}

input, select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  font-family: inherit; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--input-border);    /* mismo borde visible en ambas páginas */
  border-radius: var(--r-md);               /* 12px = token md (antes 10px) */
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--muted); }
input:focus, select:focus { border-color: var(--brand); box-shadow: var(--ring); }

.btn {
  width: 100%; padding: 14px; font-size: 16px; font-weight: 700;
  background: var(--brand); color: #fff;
  border: none; border-radius: var(--r-full);   /* píldora, como el landing y DESIGN.md */
  cursor: pointer; margin-top: 8px;
  transition: background .15s, box-shadow .15s, transform .08s ease;
  box-shadow: 0 1px 2px rgba(5,46,22,.18);
}
.btn:hover:not(:disabled) { background: var(--brand-700); box-shadow: 0 4px 12px -2px rgba(16,24,40,.12); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .6; cursor: default; }

/* Badge de prueba: verde positivo (es un mensaje de recompensa, no info) */
.trial-badge {
  background: var(--brand-tint); color: var(--brand-tint-ink);
  font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--r-md); margin-bottom: 20px;
}

.alert { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; line-height: 1.5; }
.alert.ok    { background: var(--ok-bg);    color: var(--ok-ink); }
.alert.error { background: var(--danger-bg); color: var(--danger-ink); }

.resend-row { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.resend-row a { color: var(--brand-700); font-weight: 600; text-decoration: none; cursor: pointer; }
.resend-row a:hover { text-decoration: underline; }

.auth-link, .register-link, .login-link {
  text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted);
}
.auth-link a, .register-link a, .login-link a {
  color: var(--brand-700); font-weight: 600; text-decoration: none;
}
.auth-link a:hover, .register-link a:hover, .login-link a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: background .15s, box-shadow .15s; }
}
