/* ============================================================
   Reset
============================================================ */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   Fondo general con iluminación suave
============================================================ */
body.login-page {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;

  background: radial-gradient(
      circle at 50% 25%,
      #ffffff 0%,
      #f3f5f7 40%,
      #e9ecf1 100%
  );
  color: #111;

  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   Card premium
============================================================ */
.login-card {
  width: 100%;
  max-width: 440px;

  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  border-radius: 18px;
  padding: 2.75rem 2.4rem;

  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.09);

  animation: cardEnter .65s ease;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.12);
  transition: .3s ease;
}

/* ============================================================
   Logo
============================================================ */
.login-logo {
  width: 72px;
  display: block;
  margin: 0 auto 1.6rem;
  opacity: 0;
  transform: translateY(8px);
  animation: logoIn .6s ease forwards;
}

@keyframes logoIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Títulos
============================================================ */
.login-card h1 {
  text-align: center;
  font-weight: 700;
  color: #222;
}

.login-card .subtitle {
  text-align: center;
  color: #6e6e6e;
  margin-top: -2px;
  margin-bottom: 1.5rem;
  font-size: .95rem;
}

/* ============================================================
   Inputs minimalistas premium
============================================================ */
.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #8a8a8a;
  pointer-events: none;
}

.input-icon input {
  width: 100%;
  padding-left: 2.6rem !important;
  padding-block: .70rem;

  border-radius: 12px;
  border: 1px solid #d9dbe0;
  background: #fdfdfd;

  font-size: 1rem;
  transition: all .18s ease;
}

.input-icon input:hover {
  border-color: #c7c9cf;
}

.input-icon input:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.20);
  outline: none;
}

/* ============================================================
   Password input — eye button INSIDE the input
============================================================ */

.password-field {
  position: relative;
}

/* Botón del ojo */
.password-field .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  border: none;
  background: none;
  padding: 0;
  margin: 0;

  width: 28px;
  height: 28px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  color: #777;

  border-radius: 50%;
  transition: background .18s ease, color .18s ease;
}

.password-field .password-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #444;
}

.password-field .password-toggle i {
  font-size: 1.15rem;
}

/* Extra padding para que el texto no choque con el ojo */
.password-field input {
  padding-right: 42px !important;
}

/* DARK MODE */
html[data-bs-theme="dark"] .password-field .password-toggle {
  color: #c7c7c7;
}

html[data-bs-theme="dark"] .password-field .password-toggle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}


/* ============================================================
   Botón principal estilizado
============================================================ */
.btn-primary {
  border: none;
  border-radius: 12px;

  padding: .75rem 1rem;
  font-weight: 600;
  font-size: 1.05rem;

  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;

  transition: all .22s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 4px 16px rgba(37, 99, 235, .28);
}

/* ============================================================
   Footer texto
============================================================ */
.footer-login {
  text-align: center;
  margin-top: 1.8rem;
  font-size: .87rem;
  color: #6d6d6d;
}


/* ============================================================
   🌙 MODO OSCURO — sin tokens globales
============================================================ */

html[data-bs-theme="dark"] body.login-page {
  background: radial-gradient(
      circle at 50% 20%,
      #1a1c22 0%,
      #111318 70%,
      #0c0d10 100%
  );
  color: #e6e6e6;
}

html[data-bs-theme="dark"] .login-card {
  background: rgba(28, 30, 37, 0.75);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 22px 60px rgba(0,0,0,.55);
}

html[data-bs-theme="dark"] h1 {
  color: #f2f2f2;
}

html[data-bs-theme="dark"] .subtitle {
  color: #b9b9b9;
}

html[data-bs-theme="dark"] .input-icon input {
  background: #1f2127;
  border-color: #2b2e36;
  color: #f0f0f0;
}

html[data-bs-theme="dark"] .input-icon input:hover {
  border-color: #3a3d47;
}

html[data-bs-theme="dark"] .input-icon input:focus {
  background: #22242b;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96,165,250,0.35);
}

html[data-bs-theme="dark"] .input-icon i {
  color: #9ca3af;
}

html[data-bs-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 3px 15px rgba(0,0,0,.55);
}

html[data-bs-theme="dark"] .footer-login {
  color: #a1a1a1;
}


/* ============================================================
   Caps Lock Hint — Premium style
============================================================ */
.caps-hint {
  margin-top: 4px;
  padding: 6px 10px;

  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  background: rgba(255, 170, 0, 0.12);
  color: #b26a00;

  border: 1px solid rgba(255, 170, 0, 0.25);
  border-radius: 8px;

  animation: fadeInCaps .25s ease-out;
}

@keyframes fadeInCaps {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.caps-hint i {
  font-size: 1rem;
}

html[data-bs-theme="dark"] .caps-hint {
  background: rgba(255, 190, 90, 0.16);
  border-color: rgba(255, 200, 120, 0.25);
  color: #ffd091;
}
