/* ============================================================
   LOGIN PAGE - Split-screen modern design
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.login-page {
  min-height: 100vh;
  background: #09090b;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Split layout ─────────────────────────────────────────── */
.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Left brand panel ─────────────────────────────────────── */
.login-brand {
  flex: 0 0 54%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem;
  background: #09090b;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 25%, rgba(37,99,235,.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 75%, rgba(37,99,235,.13) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.login-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.25rem;
  animation: brandFadeIn .6s cubic-bezier(.16,1,.3,1) .1s both;
}

@keyframes brandFadeIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.login-brand-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255,255,255,.07);
  padding: 6px;
  flex-shrink: 0;
}
.login-brand-logo-info {}
.login-brand-logo-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.2;
}
.login-brand-logo-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .1rem;
}

.login-brand-headline { max-width: 420px; }
.login-brand-title {
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.04em;
  margin: 0 0 .8rem;
}
.login-brand-title .accent {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-brand-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.4);
  line-height: 1.65;
  margin: 0;
}

.login-brand-features {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.login-brand-feature {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.login-brand-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(37,99,235,.16);
  border: 1px solid rgba(37,99,235,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  font-size: .88rem;
  flex-shrink: 0;
}
.login-brand-feature-text {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  font-weight: 500;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  font-size: .7rem;
  color: rgba(255,255,255,.18);
}
.login-brand-divider {
  position: absolute;
  right: 0; top: 8%; bottom: 8%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.07), transparent);
  z-index: 2;
}

/* ── Right form panel ─────────────────────────────────────── */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2.5rem;
  background: rgba(255,255,255,.015);
}

.login-card {
  width: 100%;
  max-width: 380px;
  animation: loginSlide .45s cubic-bezier(.16,1,.3,1) .05s both;
}

@keyframes loginSlide {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.login-card-header { margin-bottom: 2rem; }
.login-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin: 0 0 .3rem;
}
.login-card-subtitle {
  font-size: .82rem;
  color: rgba(255,255,255,.3);
  margin: 0;
}

/* Flash info block */
.login-flash {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
  border-radius: 10px;
  padding: .7rem 1rem;
  font-size: .8rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Fields */
.login-field { margin-bottom: 1.15rem; }
.login-label {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  margin-bottom: .45rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Inputs — always white text regardless of browser/theme */
.login-input {
  width: 100%;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.login-input:focus {
  border-color: rgba(37,99,235,.65);
  background: rgba(255,255,255,.1) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.16);
}
.login-input::placeholder {
  color: rgba(255,255,255,.22) !important;
  -webkit-text-fill-color: rgba(255,255,255,.22) !important;
}
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #131720 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #fff;
}

.login-password-wrap { position: relative; }
.login-password-wrap .login-input { padding-right: 2.75rem; }
.login-toggle-pass {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.28);
  cursor: pointer;
  padding: .2rem;
  font-size: 1rem;
  line-height: 1;
  transition: color .15s;
}
.login-toggle-pass:hover { color: rgba(255,255,255,.65); }

.login-submit {
  width: 100%;
  padding: .8rem 1.5rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: .5rem;
  transition: background .18s, transform .14s, box-shadow .18s;
  box-shadow: 0 4px 18px rgba(37,99,235,.4);
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.login-submit:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,.5);
}
.login-submit:active { transform: translateY(0); }
.login-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Recordar usuario ──────────────────────────────────────── */
.login-remember {
  display: flex; align-items: center; margin: -.2rem 0 .6rem;
}
.login-remember-label {
  display: flex; align-items: center; gap: .45rem;
  font-size: .78rem; color: rgba(255,255,255,.55);
  cursor: pointer; user-select: none;
}
.login-remember-label input[type="checkbox"] {
  accent-color: #2563eb; width: 15px; height: 15px;
}

/* ── Botón biométrico ──────────────────────────────────────── */
.login-biometric {
  background: transparent !important;
  border: 1.5px solid rgba(37,99,235,.5) !important;
  color: #93b4f8 !important;
  margin-top: .5rem;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.login-biometric:hover {
  background: rgba(37,99,235,.12) !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: none !important;
}
.login-biometric .bi-fingerprint { font-size: 1.2rem; }

/* ── Botón secundario ──────────────────────────────────────── */
.login-secondary {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.7) !important;
  margin-top: .5rem;
}
.login-secondary:hover {
  background: rgba(255,255,255,.1) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* ── Avatar biométrico ─────────────────────────────────────── */
.bio-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff; font-weight: 700; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ── Separador "o" ─────────────────────────────────────────── */
.bio-separator {
  display: flex; align-items: center; gap: .75rem;
  margin: .75rem 0;
}
.bio-separator::before, .bio-separator::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,.1);
}
.bio-separator span {
  font-size: .75rem; color: rgba(255,255,255,.35);
  text-transform: uppercase; letter-spacing: .05em;
}

/* ── Link button ───────────────────────────────────────────── */
.login-link-btn {
  display: block; width: 100%; margin-top: .75rem;
  background: none; border: none; color: rgba(255,255,255,.4);
  font-size: .78rem; cursor: pointer; text-align: center;
  padding: .4rem;
}
.login-link-btn:hover { color: #93b4f8; text-decoration: underline; }

.login-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.18);
  line-height: 1.7;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-split { flex-direction: column; }

  .login-brand {
    flex: 0 0 auto;
    padding: 1.5rem;
  }
  .login-brand::after { display: none; }
  .login-brand-divider { display: none; }
  .login-brand-content {
    gap: .75rem;
    justify-content: flex-start;
  }
  .login-brand-headline,
  .login-brand-features,
  .login-brand-footer { display: none; }
  .login-brand-logo-img { width: 40px; height: 40px; }
  .login-brand-logo-name { font-size: 1rem; }

  .login-form-panel {
    flex: 1;
    padding: 1.5rem 1.25rem 2.5rem;
    align-items: flex-start;
    background: transparent;
  }
  .login-card { max-width: 100%; }
  .login-card-header { margin-bottom: 1.5rem; }
}
