/* ─────────────────────────────────────────────────────────────────────
   login.css — Login del panel de fundaciones (autocontenido, sobrio).
   Tarjeta central sobre fondo teal MUY sutil. Teal solo como acento; el resto
   neutro (tinta/gris/blanco). Sin ilustraciones ni personajes. NO usa admin.css.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --ink:       #16201d;  /* texto principal (tinta verdosa casi negra) */
  --ink-soft:  #5c6b66;  /* texto secundario */
  --ink-faint: #93a09b;  /* placeholders, hints */
  --brand:     #128c7e;  /* teal TouchPaaw — solo acento */
  --brand-2:   #15a38e;  /* teal claro (gradiente del botón) */
  --brand-deep:#0c5f56;
  --stone:     #f5f7f6;  /* fondo casi neutro */
  --line:      #e6ebe9;  /* hairlines */
  --paper:     #ffffff;
  --danger:    #c4453d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  /* Fondo teal con CARÁCTER: degradado profundo + brillo superior. La tarjeta
     blanca flota encima con fuerte contraste. La textura de huellas la pone
     .login::before (conecta con el rescate/mapa del producto). */
  background:
    radial-gradient(120% 90% at 50% -10%, var(--brand-2), var(--brand-deep) 70%, #094640);
}

/* ── Overlay de carga ── */
.page-loading {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 24px;
  background: rgba(245, 247, 246, .88);
  backdrop-filter: blur(10px);
}
.page-loading-card {
  width: min(340px, 100%); padding: 30px;
  border-radius: 20px; background: var(--paper);
  box-shadow: 0 20px 50px rgba(22, 32, 29, .12);
  display: grid; gap: 10px; justify-items: center; text-align: center;
}
.page-loading-card strong { font-family: "Sora", sans-serif; font-size: 16px; }
.page-loading-card span { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid rgba(18, 140, 126, .14);
  border-top-color: var(--brand);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Layout: tarjeta centrada sobre fondo teal ── */
.login {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}
/* Textura de puntos sobre el teal — pareja, se desvanece en anillo alrededor de
   la tarjeta (transparente al centro) para no competir con ella. Evoca el
   rastreo de mascotas (mapa/SOS) sin gritar. */
.login::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .11) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(46% 60% at 50% 50%, transparent 55%, #000 90%);
          mask-image: radial-gradient(46% 60% at 50% 50%, transparent 55%, #000 90%);
}

.login-card {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border-radius: 22px;
  /* sombra marcada para que "flote" sobre el teal con fuerte contraste */
  box-shadow: 0 40px 80px -24px rgba(6, 50, 45, .5), 0 8px 24px -12px rgba(6, 50, 45, .3);
  padding: 40px 38px 32px;
  overflow: hidden;
}
/* Franja superior de marca */
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

/* ── Cabecera ── */
.login-brand {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 26px;
}
.login-brand img { width: 38px; height: 38px; }
.login-brand b {
  font-family: "Sora", sans-serif; font-weight: 800;
  font-size: 19px; letter-spacing: -.02em; color: var(--ink);
}
.login-head { display: grid; margin-bottom: 28px; }
.login-head h1 {
  font-family: "Sora", sans-serif; font-weight: 800;
  font-size: 25px; letter-spacing: -.02em; margin: 0;
}
.login-head .eyebrow {
  display: block; margin: 0 0 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--brand);
}
.login-head p { margin: 8px 0 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

/* ── Formulario ── */
.login-form { display: grid; gap: 17px; }
.login-field { display: grid; gap: 7px; }
.login-field-top { display: flex; justify-content: space-between; align-items: baseline; }
.login-field label { font-size: 13px; font-weight: 800; }
.login-toggle {
  background: none; border: 0; padding: 0;
  font-size: 12px; font-weight: 800; color: var(--brand); cursor: pointer;
}
.login-toggle:hover { color: var(--brand-deep); }

.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-wrap > svg {
  position: absolute; left: 14px; width: 17px; height: 17px;
  color: var(--ink-faint); pointer-events: none;
}
.login-input {
  width: 100%; height: 50px;
  padding: 0 16px 0 42px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--stone); color: var(--ink);
  font-size: 15px; font-weight: 600;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-input::placeholder { color: var(--ink-faint); font-weight: 500; }
.login-input:focus {
  outline: none; background: var(--paper);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(18, 140, 126, .12);
}
/* Neutraliza el amarillo del autocompletado de Chrome/Safari: rompía la paleta.
   El truco del inset shadow "pinta" el fondo; transition larga evita el flash. */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--stone) inset;
  box-shadow: 0 0 0 1000px var(--stone) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}
.login-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset, 0 0 0 4px rgba(18, 140, 126, .12);
  box-shadow: 0 0 0 1000px var(--paper) inset, 0 0 0 4px rgba(18, 140, 126, .12);
}

.login-submit {
  margin-top: 4px;
  height: 52px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 10px 24px rgba(18, 140, 126, .26);
  transition: transform .14s ease, box-shadow .16s, opacity .16s;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(18, 140, 126, .32); }
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { opacity: .65; cursor: progress; transform: none; }
.login-submit svg { width: 17px; height: 17px; }

.login-msg {
  margin: 2px 0 0; padding: 11px 14px; border-radius: 11px;
  font-size: 13.5px; font-weight: 700; line-height: 1.45;
  background: rgba(196, 69, 61, .09); color: #9a352e;
  border: 1px solid rgba(196, 69, 61, .22);
}

/* ── Pie ── */
.login-foot {
  margin: 26px 0 0; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; text-align: center;
}
.login-foot a { color: var(--brand); font-weight: 700; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 460px) {
  .login-card { padding: 32px 24px 26px; border-radius: 18px; }
  .login-head h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-submit, .login-input { transition: none; }
}
