/* ============================================================
   Auth pages — login, forgot, reset, change password
   ============================================================ */

@import "base/_variables-OfGrahZ.css";
@import "base/_reset-Fouj94n.css";
@import "base/_typography-n2CWT56.css";
@import "base/_theme-LpjUAhZ.css";

.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

/* Ambient glows */
.auth-page::before {
  content: '';
  position: absolute;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(255,120,0,.18), transparent 65%);
  top: -180px;
  right: -80px;
  border-radius: 50%;
  animation: ambientFloat 9s ease-in-out infinite;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255,120,0,.09), transparent 65%);
  bottom: -80px;
  left: 8%;
  border-radius: 50%;
  animation: ambientFloat 11s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes ambientFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-28px) scale(1.04); }
}

/* ── Left panel (hero) ──────────────────────────────────────── */
.auth-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 72px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 56px;
}

.auth-brand-text {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}

.auth-brand-text span { color: var(--primary); }

.auth-left h1 {
  font-size: 42px;
  color: #fff;
  line-height: 1.14;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.auth-left h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-left > p {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.65;
  max-width: 460px;
}

.auth-features {
  display: flex;
  gap: 28px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
}

.auth-feature i { color: var(--primary); font-size: 15px; }

/* ── Right panel (card) ─────────────────────────────────────── */
.auth-right {
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: 44px 38px;
}

.auth-card-logo {
  text-align: center;
  margin-bottom: 26px;
}

.auth-card h2 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 6px;
}

.auth-card .auth-subtitle {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 30px;
}

/* ── Auth form elements ─────────────────────────────────────── */
.auth-label {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.auth-input-group {
  position: relative;
  margin-bottom: 20px;
}

.auth-input-group > i {
  position: absolute;
  left: 16px;
  width: 18px;
  text-align: center;
  line-height: 1;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.72);
  font-size: 14px;
  pointer-events: none;
  transition: var(--transition);
  /* z-index necesario: replaced elements (input) se pintan encima de
     position:absolute siblings en WebKit/Blink sin z-index explícito */
  z-index: 2;
}

/* Icono se ilumina cuando el input tiene foco */
.auth-input-group:focus-within > i {
  color: var(--primary-light);
}

.auth-input {
  width: 100%;
  padding: 13px 15px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14.5px;
  font-family: inherit;
  transition: var(--transition);
  text-indent: 0;
}

.auth-input::placeholder { color: rgba(255,255,255,.3); }

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255,120,0,.07);
  box-shadow: 0 0 0 3px rgba(255,120,0,.15);
}

/* Override autofill — el navegador fuerza fondo azul claro que hace
   invisible el icono y el texto. box-shadow inset es el único override
   que respetan Chrome/Safari para el color de fondo del autofill. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #1a1a28 inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  border-color: rgba(255,255,255,.22);
  transition: background-color 5000s ease-in-out 0s;
}

.auth-forgot {
  text-align: right;
  margin-bottom: 24px;
  margin-top: -12px;
}

.auth-forgot a {
  color: var(--primary-light);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot a:hover { text-decoration: underline; }

.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: rgba(255,255,255,.35);
  font-size: 12.5px;
}

/* ── Auth error / info alerts ───────────────────────────────── */
.auth-alerts {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-alert {
  --auth-alert-accent: #64748b;
  --auth-alert-soft: rgba(100, 116, 139, .14);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 23, 42, .12);
  border-left: 3px solid var(--auth-alert-accent);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  padding: 11px 11px;
  font-size: 13px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  animation: authAlertEnter .2s ease-out;
}

.auth-alert:last-child {
  margin-bottom: 0;
}

.auth-alert > i:first-child {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  color: var(--auth-alert-accent);
  background: var(--auth-alert-soft);
}

.auth-alert-message {
  margin: 0;
  line-height: 1.45;
  color: #1f2937;
}

.auth-alert-close {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(31, 41, 55, .55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}

.auth-alert-close:hover {
  background: rgba(15, 23, 42, .08);
  color: rgba(17, 24, 39, .92);
}

.auth-alert.is-leaving {
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.auth-alert-error {
  --auth-alert-accent: #dc2626;
  --auth-alert-soft: rgba(220, 38, 38, .14);
}

.auth-alert-success {
  --auth-alert-accent: #15803d;
  --auth-alert-soft: rgba(21, 128, 61, .14);
}

.auth-alert-info {
  --auth-alert-accent: #1d4ed8;
  --auth-alert-soft: rgba(29, 78, 216, .14);
}

html.dark .auth-alert {
  background: rgba(16, 16, 16, .96);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .36);
}

html.dark .auth-alert-message {
  color: #f3f3f3;
}

html.dark .auth-alert-close {
  color: rgba(255, 255, 255, .58);
}

html.dark .auth-alert-close:hover {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .9);
}

@keyframes authAlertEnter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Standalone auth pages (forgot, reset, change) ──────────── */
/* When the page has no left panel (simple centered card) */
.auth-page.centered {
  align-items: center;
  justify-content: center;
}

.auth-page.centered .auth-right {
  width: 100%;
  max-width: 460px;
}

/* Back link */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 22px;
}

.auth-back:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
}

/* ── Toggle mostrar/ocultar contraseña ──────────────────────── */
.auth-input-group .pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.5);
  font-size: 15px;
  padding: 4px;
  line-height: 1;
  transition: color .2s;
}
.auth-input-group .pw-toggle:hover { color: rgba(255,255,255,.9); }
.auth-input-group .auth-input {
  padding-left: 52px !important;
  padding-right: 44px !important;
}
