/* ============================================================
   ASESORES INTEGRALES — login.css  (Rediseño Premium)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=Cinzel:wght@400;600&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #04111f;
  --navy2:   #081929;
  --navy3:   #0d2440;
  --navy4:   #162e50;
  --blue:    #1554a0;
  --blue2:   #1a6cc8;
  --gold:    #c8922a;
  --gold2:   #e8af3a;
  --gold3:   #f5d070;
  --gold4:   #fde99c;
  --white:   #f0f4f8;
  --grey1:   #7a8ea8;
  --grey2:   #b8cce0;
  --red:     #c0392b;
  --radius:  8px;
}

html, body {
  height: 100%; min-height: 100vh;
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--navy);
  overflow: hidden;
}

/* ═══════════════════════════════
   LAYOUT SPLIT
═══════════════════════════════ */
.split {
  display: grid;
  grid-template-columns: 1fr 500px;
  min-height: 100vh;
}

/* ──────────────────────────────
   LADO IZQUIERDO — visual
────────────────────────────── */
.side-visual {
  position: relative;
  background: var(--navy2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  padding: 60px 60px 80px;
}

/* Patrón hexagonal sutil de fondo */
.hex-pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(200,146,42,.06) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Líneas geométricas animadas */
.side-visual::before {
  content: '';
  position: absolute; inset: -50%;
  background:
    repeating-linear-gradient(
      55deg,
      transparent, transparent 70px,
      rgba(21,84,160,.05) 70px, rgba(21,84,160,.05) 71px
    ),
    repeating-linear-gradient(
      -55deg,
      transparent, transparent 70px,
      rgba(200,146,42,.04) 70px, rgba(200,146,42,.04) 71px
    );
  animation: gridMove 30s linear infinite;
  pointer-events: none;
}
@keyframes gridMove { to { transform: translate(71px, 71px); } }

/* Vignette en los bordes */
.side-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(4,17,31,.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Luces ambientales */
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(110px); pointer-events: none; z-index: 0;
}
.glow-a {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(21,84,160,.28) 0%, transparent 70%);
  top: -120px; left: -100px;
  animation: pulse 8s ease-in-out infinite;
}
.glow-b {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(200,146,42,.16) 0%, transparent 70%);
  bottom: -80px; right: -60px;
  animation: pulse 11s ease-in-out infinite reverse;
}
.glow-c {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(26,108,200,.2) 0%, transparent 70%);
  top: 50%; left: 55%; transform: translate(-50%,-50%);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: .5; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.1); }
}

/* Contenido principal centrado */
.vis-content {
  position: relative; z-index: 2;
  text-align: center; color: var(--white);
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) both;
  max-width: 420px;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* EMBLEMA SVG */
.vis-emblem {
  margin: 0 auto 28px;
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) .05s both;
  filter: drop-shadow(0 0 30px rgba(200,146,42,.35));
  transition: filter .4s;
}
.vis-emblem:hover {
  filter: drop-shadow(0 0 50px rgba(232,175,58,.55));
}
.vis-emblem svg {
  display: block; margin: 0 auto;
}

/* Título */
.vis-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px; letter-spacing: 6px;
  line-height: .95; color: var(--white);
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) .1s both;
}

/* Subtítulo */
.vis-sub {
  font-size: 11px; color: var(--grey1);
  letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 32px;
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) .15s both;
}

/* Ornamento decorativo */
.vis-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 26px;
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) .2s both;
}
.vis-orn-line {
  flex: 1; max-width: 70px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,146,42,.6));
}
.vis-ornament svg { flex-shrink: 0; }
.vis-orn-line:last-child {
  background: linear-gradient(to left, transparent, rgba(200,146,42,.6));
}

/* Tagline */
.vis-tagline {
  font-size: 14px; color: rgba(176,196,218,.75);
  line-height: 1.7; font-weight: 300;
  letter-spacing: .3px;
  margin-bottom: 40px;
  font-style: italic;
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) .25s both;
}

/* Stats decorativos */
.vis-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 12px;
  padding: 18px 30px;
  animation: fadeUp .9s cubic-bezier(.22,1,.36,1) .3s both;
  backdrop-filter: blur(8px);
}

.vis-stat {
  text-align: center; padding: 0 24px;
}
.vis-stat-num {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 2px;
  color: var(--gold2);
  line-height: 1.2;
}
.vis-stat-label {
  display: block;
  font-size: 9px; color: var(--grey1);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-top: 3px;
}
.vis-stat-divider {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, transparent, rgba(200,146,42,.35), transparent);
  flex-shrink: 0;
}

/* Copyright */
.vis-copy {
  position: absolute; bottom: 24px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: rgba(255,255,255,.2);
  letter-spacing: .6px;
}

/* ──────────────────────────────
   LADO DERECHO — formulario
────────────────────────────── */
.side-form {
  background: #ffffff;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
  box-shadow: -30px 0 80px rgba(0,0,0,.45);
}

/* Franja dorada superior */
.side-form::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold2) 50%, var(--gold3) 100%);
}

/* Marca de agua sutil en esquina */
.side-form::after {
  content: 'AI';
  position: absolute; bottom: 30px; right: 36px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 90px; color: rgba(200,146,42,.04);
  letter-spacing: 8px;
  pointer-events: none; user-select: none;
  line-height: 1;
}

/* Encabezado */
.form-header { margin-bottom: 38px; }

.form-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px; letter-spacing: 4px;
  color: var(--navy); margin-bottom: 6px;
  position: relative;
  display: inline-block;
}
/* Subrayado dorado animado */
.form-header h2::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 40px; height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold2));
  border-radius: 2px;
}

.form-header p {
  font-size: 13px; color: var(--grey1);
  margin-top: 10px; font-weight: 300;
}

/* Badge sesión segura */
.secure-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #f0f7ff, #e8f2ff);
  border: 1px solid #cde4f8;
  color: var(--blue); border-radius: 20px;
  padding: 6px 14px; font-size: 11px; font-weight: 700;
  letter-spacing: .5px; margin-bottom: 28px;
  width: fit-content;
}

/* Campos */
.field { margin-bottom: 20px; }

.field label {
  display: block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--navy3); margin-bottom: 7px;
}

.field-wrap {
  position: relative; display: flex; align-items: center;
}

.field-icon {
  position: absolute; left: 14px;
  color: var(--grey1); pointer-events: none;
  transition: color .2s;
}

.field-wrap:focus-within .field-icon {
  color: var(--blue2);
}

.field-wrap input {
  width: 100%; padding: 14px 44px 14px 42px;
  border: 1.5px solid #d8e4f0;
  border-radius: var(--radius);
  background: #fafcff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; color: var(--navy);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field-wrap input:focus {
  border-color: var(--blue2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26,108,200,.1);
}

.field-wrap input::placeholder {
  color: #c0cdd8; font-size: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
}

/* Toggle contraseña */
.toggle-pass {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--grey1); padding: 4px;
  transition: color .2s;
  border-radius: 4px;
}
.toggle-pass:hover { color: var(--gold); }

/* Botón login */
.btn-login {
  width: 100%; margin-top: 10px;
  padding: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 60%, var(--navy4) 100%);
  border: none; border-radius: var(--radius);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px; letter-spacing: 4px;
  color: var(--white); cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 6px 24px rgba(4,17,31,.35);
  position: relative; overflow: hidden;
}

/* Destello deslizante */
.btn-login::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.08), transparent);
  transition: left .6s ease;
}
.btn-login:hover::before { left: 150%; }

/* Borde dorado inferior */
.btn-login::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold2), var(--gold));
  border-radius: 2px;
  opacity: 0; transition: opacity .3s;
}
.btn-login:hover::after { opacity: 1; }

.btn-login:hover {
  box-shadow: 0 8px 32px rgba(4,17,31,.5);
  filter: brightness(1.06);
}
.btn-login:active { transform: scale(.985); }

/* Mensajes de error / éxito */
.login-error {
  background: #fdf0ef; border: 1.5px solid #f5c6c0;
  color: #922b21; border-radius: var(--radius);
  padding: 11px 16px; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 20px;
  animation: shake .45s ease;
}

@keyframes shake {
  0%,100% { transform: none; }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* Footer del formulario */
.form-footer {
  margin-top: 32px;
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: #aabbd0;
  padding-top: 20px;
  border-top: 1px solid #eef2f7;
  letter-spacing: .3px;
}
.form-footer svg { flex-shrink: 0; color: #c8922a; opacity: .7; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .side-visual { display: none; }
  .side-form { padding: 44px 28px; min-height: 100vh; }
  .side-form::after { display: none; }
}
