/* ══════════════════════════════════════════════════════════
   OMNIXA AUTH — auth.css
   Pantalla de login + overlays de sesión
══════════════════════════════════════════════════════════ */

/* ── Overlay raíz que bloquea la app ─────────────────────── */
#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

/* ── Layout split en PC ──────────────────────────────────── */
.auth-split {
  display: flex;
  width: 100%;
  height: 100%;
}

.auth-left {
  display: none;
  flex: 1;
  background: linear-gradient(145deg, var(--marca) 0%, #3b82f6 60%, #38bdf8 100%);
  padding: 48px;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -100px; right: -100px;
}
.auth-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -80px; left: -80px;
}

.auth-left-logo {
  font-size: 32px;
  font-weight: 900;
  color: var(--blanco);
  letter-spacing: -1px;
}
.auth-left-tagline {
  font-size: 36px;
  font-weight: 800;
  color: var(--blanco);
  line-height: 1.2;
  max-width: 340px;
}
.auth-left-sub {
  font-size:var(--fs-15);
  color: rgba(255,255,255,.75);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 320px;
}
.auth-left-dots {
  display: flex;
  gap: 8px;
}
.auth-left-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.auth-left-dots span.active { background: var(--blanco); }

@media (min-width: 800px) {
  .auth-left { display: flex; }
}

/* ── Panel derecho / único en móvil ─────────────────────── */
.auth-right {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--blanco);
  overflow-y: auto;
}

@media (min-width: 800px) {
  .auth-right {
    min-width: 420px;
    max-width: 480px;
    padding: 48px 40px;
    border-left: 1px solid var(--fondo-suave);
  }
}

/* ── Logo móvil ──────────────────────────────────────────── */
.auth-logo-mobile {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--marca), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 8px;
  display: block;
}

@media (min-width: 800px) {
  .auth-logo-mobile { display: none; }
}

/* ── Formulario ──────────────────────────────────────────── */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-title {
  font-size:var(--fs-26);
  font-weight: 900;
  color: var(--texto);
  margin-bottom: 4px;
}
.auth-sub {
  font-size:var(--fs-14);
  color: var(--texto-medio);
  margin-bottom: 8px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-label {
  font-size:var(--fs-12);
  font-weight: 700;
  color: var(--texto-fuerte);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input {
  width: 100%;
  padding: 13px 44px 13px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--borde);
  font-size:var(--fs-15);
  color: var(--texto);
  outline: none;
  background: var(--fondo-claro);
  transition: border-color .2s, background .2s;
  box-sizing: border-box;
  font-family: inherit;
}
.auth-input:focus {
  border-color: var(--marca);
  background: var(--blanco);
  box-shadow: 0 0 0 3px rgba(108,53,255,.1);
}
.auth-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texto-suave);
  cursor: pointer;
  display: flex;
}
.auth-input-icon:hover { color: var(--marca); }

/* ── Botón principal ─────────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--marca), #3b82f6);
  color: var(--blanco);
  font-size:var(--fs-16);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s, transform .1s;
  font-family: inherit;
}
.auth-btn:hover { opacity: .92; }
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Links y auxiliares ──────────────────────────────────── */
.auth-link {
  background: none;
  border: none;
  color: var(--marca);
  font-size:var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
}
.auth-link:hover { text-decoration: underline; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--texto-suave);
  font-size:var(--fs-12);
  font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--borde);
}

/* ── Mensajes de error/éxito ─────────────────────────────── */
.auth-msg {
  padding: 12px 14px;
  border-radius: 12px;
  font-size:var(--fs-14);
  font-weight: 600;
  display: none;
}
.auth-msg.error  { background: var(--peligro-fondo); color: var(--peligro); border: 1px solid #fecaca; display: block; }
.auth-msg.success{ background: var(--ok-fondo); color: var(--ok); border: 1px solid #bbf7d0; display: block; }

/* ── Animación de entrada ────────────────────────────────── */
@keyframes auth-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-form { animation: auth-fade-in .4s ease; }
