:root{
  --bg1:#061a2b;
  --bg2:#0b2b46;

  --card: rgba(255,255,255,.08);
  --cardBorder: rgba(255,255,255,.14);

  --text:#eaf2ff;
  --muted: rgba(234,242,255,.70);

  --primary:#00c2ff;   /* azul del logo */
  --accent:#ff8a2a;    /* naranja del logo */

  --dangerBg: rgba(255, 99, 71, .12);
  --dangerBorder: rgba(255, 99, 71, .35);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);

  background:
    radial-gradient(1200px 600px at 20% 20%, rgba(0,194,255,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(255,138,42,.14), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}

/* ====== Layout ====== */
.login-container{
  width:min(440px, 92vw);
  padding: 24px;
}

.login-box{
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--cardBorder);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 26px 24px 20px;
  backdrop-filter: blur(12px);
}

/* ====== Brand ====== */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 10px;
}

.brand-logo{
  width:52px;
  height:52px;
  object-fit:contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.3));
}

.brand-title{
  font-weight:700;
  letter-spacing:.2px;
  font-size: 16px;
}

.brand-subtitle{
  font-size: 12px;
  color: var(--muted);
  margin-top:2px;
}

.login-title{
  margin: 14px 0 14px;
  font-size: 20px;
  font-weight: 600;
}

/* ====== Inputs ====== */
.input-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);

  margin: 10px 0;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input-box .icon{
  opacity:.85;
}

.input-box input{
  width:100%;
  border:0;
  outline:0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.input-box input::placeholder{
  color: rgba(234,242,255,.55);
}

.input-box:focus-within{
  border-color: rgba(0,194,255,.55);
  box-shadow: 0 0 0 4px rgba(0,194,255,.12);
  background: rgba(0,0,0,.18);
}

/* Autofill Chrome (evitar blanco/amarillo) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color: #eaf2ff;
  -webkit-box-shadow: 0 0 0px 1000px rgba(10,15,31,0.85) inset;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: #eaf2ff;
}

/* ====== Options ====== */
.options{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin: 10px 2px 14px;
  font-size: 12px;
}

.options .muted{
  color: var(--muted);
}

.link{
  color: var(--primary);
  text-decoration: none;
}
.link:hover{ text-decoration: underline; }

/* ====== Button ====== */
.btn-primary{
  width:100%;
  border:0;
  cursor:pointer;
  padding: 12px 14px;
  border-radius: 12px;
  color: #061a2b;
  font-weight: 700;
  letter-spacing:.2px;

  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(0,194,255,.18);

  transition: transform .12s ease, filter .12s ease;
}
.btn-primary:hover{ filter: brightness(1.03); }
.btn-primary:active{ transform: translateY(1px); }

.footer-note{
  margin-top: 12px;
  font-size: 11px;
  color: rgba(234,242,255,.55);
  text-align:center;
}

/* ====== Messages ====== */
.error-message{
  background: var(--dangerBg);
  border: 1px solid var(--dangerBorder);
  color: rgba(255, 220, 215, .95);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0 12px;
  font-size: 13px;
  text-align: center;
}

/* ====== Loader ====== */
.loader{
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  background:
    radial-gradient(900px 500px at 30% 30%, rgba(0,180,255,.18), transparent 55%),
    radial-gradient(700px 420px at 70% 25%, rgba(255,140,58,.14), transparent 60%),
    linear-gradient(135deg, #070b17, #0b1733 60%, #071022);

  z-index: 9999;
}

.loader.hidden{ display:none; }

.loader-card{
  width: min(420px, 92vw);
  padding: 26px 24px;
  border-radius: 18px;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 55px rgba(0,0,0,0.35);

  text-align: center;
  backdrop-filter: blur(10px);
}

.loader-logo{
  width: 110px;
  margin: 0 auto 18px;
  display:block;
  filter: drop-shadow(0 0 18px rgba(0,180,255,.35));
}

/* ✅ más visible */
.progress-bar{
  width: 100%;
  height: 10px; /* antes 7px */
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}

.progress-bar span{
  display:block;
  height:100%;
  width:0%;
  background: linear-gradient(90deg, #00b4ff, #ff8c3a);

  /* ✅ transición más notoria */
  transition: width .20s linear;

  /* ✅ glow para que se note el avance */
  box-shadow: 0 0 16px rgba(0,180,255,.28);
}

#loaderMeta{
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(234,242,255,0.85);
}

/* Accesibilidad: reduce animaciones si el usuario lo pide */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}

/* redirect.php: centrar loader sin formulario */
.redirect-page{
  margin:0;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
/* Fade-out de mensajes flash (sin estilos inline) */
.error-message,
.success-message{
  transition: opacity .25s ease;
}

.fade-out{
  opacity: 0;
}
.debug-overlay{
  position: fixed;
  left: 12px;
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.95);
  font-size: 12px;
  z-index: 10000;
  max-width: 92vw;
  word-break: break-word;
}
/* ===== Password requirements (reset_password.php) ===== */
#password-requirements{
  margin: 10px 4px 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(255,255,255,.10);
}

#password-requirements .validation{
  margin: 8px 0;
  font-size: 13px;
  color: rgba(234,242,255,.72);
  display: flex;
  align-items: center;
  gap: 10px;
}

#password-requirements .validation::before{
  content: "✗";
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 99, 71, .18);
  border: 1px solid rgba(255, 99, 71, .35);
  color: rgba(255, 220, 215, .95);
}

#password-requirements .validation.valid{
  color: rgba(200, 255, 220, .95);
}

#password-requirements .validation.valid::before{
  content: "✓";
  background: rgba(0, 194, 255, .16);
  border: 1px solid rgba(0, 194, 255, .45);
  color: rgba(234, 242, 255, .98);
}
