/* ============================================================
   FASMER — Pantalla de acceso (login / primer acceso)
   Mobile-first · design system de marca
   ============================================================ */

:root {
  --fs-orange: #F7941D;
  --fs-orange-dark: #DD7E0B;
  --fs-orange-soft: #FEF3E2;
  --fs-red: #E51A4B;
  --fs-red-soft: #FDE8EE;
  --ink: #1C2030;
  --ink-2: #555D73;
  --ink-3: #9AA1B5;
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --line: #ECEEF4;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-lg: 0 12px 40px rgba(28, 32, 48, .12);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body.auth {
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(1200px 600px at 15% -10%, var(--fs-orange-soft), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #FDEFE0, transparent 55%),
    var(--bg);
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { text-decoration: none; color: inherit; }
svg { display: block; }

/* ---------- Tarjeta ---------- */
.auth__card {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px 26px 24px;
  animation: auth-in .45s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth__card { animation: none; }
}

/* ---------- Marca ---------- */
.auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.auth__logo {
  width: 46px; height: 46px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(247, 148, 29, .25);
}
.auth__brand strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.auth__brand span { font-size: 12px; color: var(--ink-3); }

/* ---------- Títulos ---------- */
.auth__title { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.auth__lead  { color: var(--ink-2); font-size: 14.5px; margin-bottom: 20px; }

/* ---------- Chip de email ---------- */
.auth__email-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color .15s, color .15s;
}
.auth__email-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.auth__email-chip svg { width: 14px; height: 14px; color: var(--ink-3); }

/* ---------- Formulario ---------- */
.auth__form { display: flex; flex-direction: column; gap: 16px; }

.auth__field { display: flex; flex-direction: column; gap: 7px; }
.auth__field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.auth__input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.auth__input::placeholder { color: var(--ink-3); }
.auth__input:focus {
  border-color: var(--fs-orange);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, .15);
}

/* Campo de contraseña con botón mostrar/ocultar */
.auth__pass { position: relative; }
.auth__pass .auth__input { padding-right: 48px; }
.auth__toggle {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: var(--ink-3);
  transition: color .15s, background .15s;
}
.auth__toggle:hover { color: var(--ink-2); background: var(--bg); }
.auth__toggle svg { width: 20px; height: 20px; }
.auth__toggle.is-on { color: var(--fs-orange); }

/* ---------- Botón principal ---------- */
.auth__btn {
  height: 52px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  background: var(--fs-orange);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(247, 148, 29, .28);
  transition: background .15s, transform .08s, box-shadow .15s;
}
.auth__btn:hover { background: var(--fs-orange-dark); }
.auth__btn:active { transform: translateY(1px); }
.auth__btn:focus-visible { outline: 3px solid rgba(247, 148, 29, .4); outline-offset: 2px; }
.auth__btn svg { width: 19px; height: 19px; }

/* ---------- Alerta de error ---------- */
.auth__alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--fs-red-soft);
  border: 1px solid #F7C5D2;
  border-radius: var(--radius-sm);
  color: #B01539;
  font-size: 13.5px;
  font-weight: 500;
}
.auth__alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Enlace "¿Olvidaste tu contraseña?" ---------- */
.auth__forgot { display: flex; justify-content: center; margin-top: 14px; }
.auth__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 4px 6px;
  border-radius: 8px;
  transition: color .15s;
}
.auth__link:hover { color: var(--fs-orange); text-decoration: underline; }

/* ---------- Confirmación (solicitud enviada) ---------- */
.auth__ok-badge {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--fs-orange-soft);
  color: var(--fs-orange);
}
.auth__ok-badge svg { width: 30px; height: 30px; }

/* ---------- Pie ---------- */
.auth__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- Móvil ---------- */
@media (max-width: 420px) {
  .auth__card {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 8px 4px;
    max-width: 100%;
  }
  .auth__title { font-size: 21px; }
}
