/* Pantallas de acceso de APP Ferreaceros (ingresar, olvidé mi clave, elegir clave nueva). */
:root {
  --bg: #eef2f7; --panel: #ffffff; --panel-2: #f5f8ff; --border: #cbd5ea;
  --text: #163750; --muted: #4b5873; --accent: #1978b0; --accent-2: #135f8d;
  --accent-soft: rgba(25,120,176,0.14);
  --danger-bg: #fef2f2; --danger-text: #991b1b; --danger-line: #e03345; --warn: #92600a;
  --gradient: linear-gradient(135deg, #163750 0%, #1978b0 100%);
  --glow: 0 10px 26px rgba(25,120,176,0.30);
  --font-heading: 'Fira Sans', -apple-system, Segoe UI, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #07121c; --panel: #0d1b28; --panel-2: #122333; --border: #253a4e;
  --text: #f8fafc; --muted: #a3b1c6; --accent: #3b9ad9; --accent-2: #8cc8ef;
  --accent-soft: rgba(59,154,217,0.22);
  --danger-bg: rgba(239,68,68,0.12); --danger-text: #fecaca; --danger-line: #ef4444; --warn: #fbbf24;
  --gradient: linear-gradient(135deg, #1b4a6b 0%, #1978b0 100%);
  --glow: 0 10px 28px rgba(25,120,176,0.45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); padding: 24px 16px;
  background:
    radial-gradient(1100px 560px at 15% -10%, rgba(59,130,246,0.14), transparent 60%),
    radial-gradient(900px 480px at 100% 100%, rgba(34,211,238,0.07), transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; padding: 34px 30px 30px; border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border);
  box-shadow: 0 26px 64px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.04) inset;
  animation: auth-entra .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes auth-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.logo-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.logo-wrap img { max-width: 240px; width: 100%; height: auto; background: #fff; border-radius: 12px; padding: 8px 12px; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--gradient); }
h1 {
  font-family: var(--font-heading); font-weight: 800; font-size: 25px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 6px; text-align: center;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
p.sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 24px; text-align: center; }
.campo { margin-bottom: 16px; }
.campo label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.campo input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.campo input::placeholder { color: var(--muted); opacity: .7; }
.campo input:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.campo input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.campo-clave { position: relative; }
.campo-clave input { padding-right: 52px; }
.ojo {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s ease, background-color .15s ease;
}
.ojo:hover { color: var(--text); background: var(--accent-soft); }
.ojo:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; color: var(--text); }
.ojo svg { width: 21px; height: 21px; pointer-events: none; }
.ojo .ojo-tachado { display: none; }
.ojo[aria-pressed="true"] .ojo-abierto { display: none; }
.ojo[aria-pressed="true"] .ojo-tachado { display: block; }
.ayuda-campo { color: var(--muted); font-size: 12.5px; margin: -8px 0 16px; }
.mayus { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn); margin: -8px 0 14px; }
.mayus[hidden] { display: none; }
.btn-auth {
  width: 100%; min-height: 48px; padding: 12px; border-radius: 999px; border: 0; background: var(--gradient); color: #fff; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .01em; box-shadow: var(--glow);
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-auth:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-auth:active { transform: none; filter: brightness(.97); }
.btn-auth:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.btn-auth[disabled] { cursor: progress; opacity: .85; transform: none; }
.btn-auth[aria-busy="true"]::after { content: ''; display: inline-block; width: 15px; height: 15px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: auth-gira .7s linear infinite; }
@keyframes auth-gira { to { transform: rotate(360deg); } }
.error-auth, .aviso-auth { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; line-height: 1.45; }
.error-auth { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-text); }
.error-auth svg { flex: none; color: var(--danger-line); margin-top: 1px; }
.aviso-auth { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); }
.enlaces { text-align: center; }
a.olvide {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--text); text-decoration: none; border: 1px solid var(--border); background: color-mix(in srgb, var(--panel) 80%, transparent);
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
a.olvide:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
a.olvide:focus-visible, a.volver:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
a.olvide svg { width: 17px; height: 17px; color: var(--accent); }
a.volver { display: inline-block; text-align: center; margin-top: 18px; padding: 8px 12px; color: var(--muted); font-size: 14px; text-decoration: none; border-radius: 8px; }
a.volver:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pie-auth { color: var(--muted); font-size: 12px; text-align: center; margin: 0; }
@media (max-height: 640px) { body { justify-content: flex-start; } }
@media (max-width: 420px) { .auth-card { padding: 28px 20px 24px; border-radius: 20px; } h1 { font-size: 23px; } .campo input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } .btn-auth, .campo input, .ojo, a.olvide { transition: none; } .btn-auth[aria-busy="true"]::after { animation-duration: 2s; } }

/* En tema oscuro el título con degradado navy no se leería: va en claro. */
:root[data-theme="dark"] h1 { background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
