/* Login — AcuaMonitor — Split screen */

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

:root {
  --azul-prof: #0a1628;
  --azul-med:  #0d2847;
  --azul-vivo: #1565c0;
  --azul-clar: #1e88e5;
  --cyan:      #00e5ff;
  --blanco:    #ffffff;
  --b80:       rgba(255,255,255,0.80);
  --b50:       rgba(255,255,255,0.50);
  --b20:       rgba(255,255,255,0.20);
  --b10:       rgba(255,255,255,0.10);
  --b06:       rgba(255,255,255,0.06);
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--azul-prof);
}

body {
  display: flex;
  min-height: 100vh;
}

/* ===================================================
   PANEL IZQUIERDO — Publicidad
=================================================== */

.panel-izq {
  flex: 0 0 52%;
  position: relative;
  background: linear-gradient(155deg, var(--azul-prof) 0%, #0e2d50 45%, #0a3a6e 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ondas animadas de fondo */
.deco-ondas {
  position: absolute;
  bottom: -40px; left: -50%;
  width: 200%; height: 320px;
  pointer-events: none;
}

.deco-onda {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 43%;
  background: rgba(30, 136, 229, 0.10);
  animation: girarOnda 14s linear infinite;
}

.deco-onda:nth-child(2) {
  background: rgba(0, 229, 255, 0.06);
  animation-duration: 20s;
  animation-direction: reverse;
  border-radius: 47%;
}

.deco-onda:nth-child(3) {
  background: rgba(21, 101, 192, 0.08);
  animation-duration: 28s;
  border-radius: 40%;
}

@keyframes girarOnda {
  0%   { transform: rotate(0deg) translateY(16px); }
  100% { transform: rotate(360deg) translateY(16px); }
}

/* Partículas */
.deco-particulas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Contenido izquierdo */
.izq-contenido {
  position: relative;
  z-index: 1;
  padding: 48px 52px;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Logo superior */
.izq-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--blanco);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 44px;
}

.izq-logo svg {
  width: 36px; height: 36px;
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.5));
}

/* Hero */
.izq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--b06);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  width: fit-content;
}

.badge-punto {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulsoPunto 1.6s ease infinite;
  flex-shrink: 0;
}

@keyframes pulsoPunto {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(0,229,255,0); }
}

.izq-titulo {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--blanco);
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--blanco) 40%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.izq-desc {
  font-size: 0.9rem;
  color: var(--b50);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 380px;
}

/* Lista de funcionalidades */
.izq-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}

.izq-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feat-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
  filter: drop-shadow(0 1px 4px rgba(0,229,255,0.3));
}

.izq-features li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.izq-features li strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--b80);
}

.izq-features li span {
  font-size: 0.78rem;
  color: var(--b50);
  line-height: 1.5;
}

/* Stats */
.izq-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--b06);
  border: 1px solid var(--b10);
  border-radius: 14px;
  padding: 16px 24px;
  margin-bottom: 28px;
  width: fit-content;
}

.izq-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.izq-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}

.izq-stat-lbl {
  font-size: 0.68rem;
  color: var(--b50);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.izq-stat-sep {
  width: 1px;
  height: 30px;
  background: var(--b10);
}

/* Empresa */
.izq-empresa {
  font-size: 0.75rem;
  color: var(--b50);
}

.izq-empresa strong {
  color: var(--b80);
}

/* ===================================================
   PANEL DERECHO — Formulario
=================================================== */

.panel-der {
  flex: 1;
  background: #08121f;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

/* Logo visible solo en móvil */
.mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--blanco);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 32px;
}

.mobile-logo svg {
  width: 32px; height: 32px;
  filter: drop-shadow(0 0 8px rgba(21,101,192,0.6));
}

/* Header del form */
.login-header {
  margin-bottom: 32px;
}

.login-header h1 {
  color: #e3f2fd;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-subtitle {
  color: #546e7a;
  font-size: 0.85rem;
}

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

.campo label {
  display: block;
  color: #78909c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.campo input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 14px;
  color: #e3f2fd;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.campo input::placeholder { color: rgba(255,255,255,0.18); }

.campo input:focus {
  border-color: var(--azul-clar);
  background: rgba(21,101,192,0.08);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.18);
}

/* Contraseña */
.campo-pass { position: relative; }
.campo-pass input { padding-right: 44px; }

#toggle-pass {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #37474f;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

#toggle-pass:hover { color: #78909c; }
#toggle-pass svg { width: 18px; height: 18px; }

/* Error */
.error-msg {
  background: rgba(198,40,40,0.12);
  border: 1px solid rgba(198,40,40,0.35);
  border-radius: 8px;
  color: #ef9a9a;
  font-size: 0.83rem;
  padding: 10px 14px;
  margin-bottom: 18px;
  text-align: center;
}

/* Botón */
#btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--azul-vivo), var(--azul-clar));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  box-shadow: 0 6px 24px rgba(21,101,192,0.4);
  letter-spacing: 0.2px;
}

#btn-login:hover  { opacity: 0.9; box-shadow: 0 8px 30px rgba(21,101,192,0.5); }
#btn-login:active { transform: scale(0.98); }
#btn-login:disabled { background: #263238; box-shadow: none; cursor: not-allowed; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Footer del form */
.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  color: #37474f;
  font-size: 0.75rem;
}

.login-volver {
  color: #546e7a;
  text-decoration: none;
  transition: color 0.2s;
}

.login-volver:hover { color: #90a4ae; }

/* ===================================================
   RESPONSIVO — tablet / móvil
=================================================== */

@media (max-width: 900px) {
  body { flex-direction: column; }

  .panel-izq {
    flex: none;
    min-height: 280px;
    padding: 0;
  }

  .izq-contenido {
    padding: 32px 28px;
  }

  .izq-features { display: none; }
  .izq-stats    { display: none; }
  .izq-empresa  { display: none; }

  .izq-logo     { margin-bottom: 16px; }
  .izq-desc     { display: none; }

  .panel-der {
    flex: 1;
    padding: 36px 24px;
  }

  .mobile-logo { display: flex; }
}
