/* ══════════════════════════════════════
   CRÉDITOS JS — Login (index.php)
══════════════════════════════════════ */

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 1.5rem;
}

/* ── FONDO ANIMADO ── */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}
.bg-glow {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,128,.07) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none; z-index: 0;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  50%     { transform: translate(-50%,-50%) scale(1.15); opacity: .6; }
}
.particle {
  position: fixed;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  pointer-events: none; z-index: 0;
  animation: float linear infinite;
}
@keyframes float {
  0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
  10%  { opacity: .4; }
  90%  { opacity: .2; }
  100% { transform: translateY(-10vh) translateX(30px); opacity: 0; }
}

/* ── CARD ── */
.login-card {
  position: relative; z-index: 1;
  background: rgba(13,15,20,0.25);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  width: 100%; max-width: 380px;
  box-shadow: 0 25px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(74,222,128,.05);
  animation: cardIn .6s cubic-bezier(.34,1.26,.64,1) both;
}
@keyframes cardIn {
  from { opacity:0; transform: translateY(30px) scale(.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.login-card::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 99px;
}

/* ── LOGO ── */
.logo-wrap {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeUp .5s ease .1s both;
}
@keyframes fadeUp {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: none; }
}
.logo-sub {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .4rem;
}

/* ── FORM ── */
.form-group {
  display: flex; flex-direction: column; gap: .35rem;
  margin-bottom: 1rem;
  animation: fadeUp .5s ease both;
}
.form-group:nth-child(1) { animation-delay: .15s; }
.form-group:nth-child(2) { animation-delay: .22s; }

label {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.input-wrap { position: relative; }
.input-wrap .field-icon {
  position: absolute; left: .75rem; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: color .2s;
}
.input-wrap input {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: .88rem;
  padding: .7rem .75rem .7rem 2.35rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,222,128,.1); }
.input-wrap input::placeholder { color: var(--border); }
.eye-btn {
  position: absolute; right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  padding: 0; display: flex; align-items: center;
  transition: color .15s;
}
.eye-btn:hover { color: var(--text); }
.eye-btn svg { width: 16px; height: 16px; }

/* ── ERROR ── */
.error-msg {
  display: none;
  font-family: var(--mono); font-size: .68rem;
  color: var(--red);
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: 1rem;
  text-align: center;
  white-space: pre-line;
  animation: shake .35s ease;
}
.error-msg.show { display: block; }
/* Problema técnico del sistema (BD caída, etc.) — no es un error del
   usuario, así que se distingue con un tono ámbar en vez de rojo, y sin
   la animación de "shake" que sugiere que algo se hizo mal. */
.error-msg.error-msg-tecnico {
  color: #f59e0b;
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.25);
  animation: none;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ── BOTÓN ── */
.submit-btn {
  width: 100%;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(212,175,55,.45);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: var(--sans); font-weight: 700;
  font-size: .9rem; padding: .8rem; cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  animation: fadeUp .5s ease .3s both;
  letter-spacing: .04em;
  box-shadow: 0 0 10px rgba(212,175,55,.08);
}
.submit-btn:hover {
  background: rgba(0,0,0,.7);
  border-color: rgba(212,175,55,.7);
  box-shadow: 0 0 16px rgba(212,175,55,.18);
  color: #fbe28a;
  transform: translateY(-1px);
}
.submit-btn:active { transform: scale(.98); }
.submit-btn.loading { pointer-events: none; opacity: .8; }
.submit-btn svg { width: 17px; height: 17px; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.submit-btn.loading .btn-spinner    { display: block; }
.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon       { display: none; }

/* ── BOTÓN HUELLA (círculo, separado de Ingresar) ── */
.huella-circle-wrap {
  flex-direction: column; align-items: center; gap: .5rem;
  margin-top: 1.6rem; animation: fadeUp .5s ease .4s both;
}
.huella-circle-btn {
  width: 50px; height: 50px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(212,175,55,.5);
  color: #d4af37;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.huella-circle-btn:hover {
  background: rgba(212,175,55,.1);
  border-color: #d4af37;
  color: #fbe28a;
  transform: translateY(-1px);
}
.huella-circle-btn:active { transform: scale(.96); }
.huella-circle-btn.loading { pointer-events: none; opacity: .7; }
.huella-circle-btn .btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(212,175,55,.25);
  border-top-color: #d4af37; border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.huella-circle-btn.loading svg          { display: none; }
.huella-circle-btn.loading .btn-spinner { display: block; }
.huella-circle-label { font-size: .72rem; color: #888; letter-spacing: .02em; }

.card-footer {
  margin-top: 1.5rem; text-align: center;
  font-family: var(--mono); font-size: .6rem;
  color: var(--border); letter-spacing: .06em;
  animation: fadeUp .5s ease .4s both;
}

/* ── SUCCESS ── */
.success-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .4s;
}
.success-overlay.show { opacity: 1; pointer-events: all; }
.success-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(74,222,128,.1);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  animation: popIn .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.success-check svg { width: 30px; height: 30px; color: var(--accent); }
.success-text {
  font-family: var(--mono); font-size: .75rem;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase;
}
