/* =============================================================
   login.css — Autenticación · Paleta Mística
   Panel izquierdo morado oscuro · Formulario lila suave
   ============================================================= */

/* ── LAYOUT GENERAL ─────────────────────────────────────────── */
.login-body {
  background: #cc99ff;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.login-page {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── PANEL DECORATIVO IZQUIERDO — morado oscuro ─────────────── */
.login-panel {
  flex: 0 0 420px;
  background: #3d1f6e;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  border-right: 1px solid rgba(212,175,55,0.35);
}

.panel-orb {
  position: absolute;
  border-radius: 50%;
  animation: orbFloat 7s ease-in-out infinite;
}
.panel-orb-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #9966cc 0%, #6633aa 60%, transparent 100%);
  opacity: .30;
  top: -80px; left: -80px;
  animation-delay: 0s;
}
.panel-orb-2 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #D4AF37 0%, #a0660e 55%, transparent 100%);
  opacity: .18;
  bottom: -60px; right: -40px;
  animation-delay: 3.5s;
}
.panel-orb-3 {
  width: 140px; height: 140px;
  background: radial-gradient(circle, #cc99ff 0%, transparent 75%);
  opacity: .22;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 1.8s;
}

.panel-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.panel-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .4rem;
  color: #fff;
}
.panel-logo em { color: inherit; font-style: normal; }

.panel-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 2.8rem;
  letter-spacing: .03em;
}

.panel-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.panel-perks li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.2px;
}
.panel-perks svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  stroke: #D4AF37;
}

/* ── ZONA DEL FORMULARIO ─────────────────────────────────────── */
.login-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  background: #cc99ff;
}
.login-form-wrap::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102,51,170,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.login-form-wrap::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.back-link {
  position: absolute;
  top: 2rem; left: 2rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: rgba(45,17,85,0.70);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  transition: color .2s;
}
.back-link svg { width: 16px; height: 16px; transition: transform .2s; }
.back-link:hover { color: #2d1155; }
.back-link:hover svg { transform: translateX(-3px); }

/* ── TARJETA CENTRAL ────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 420px;
  border-top: 3px solid #D4AF37;
  padding-top: 1.6rem;
  background: #f0e6ff;
  border-radius: 8px;
  padding: 1.6rem 2rem 2rem;
  box-shadow: 0 8px 48px rgba(61,31,110,0.28);
}

.login-brand {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}
.lb-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #2d1155;
}
.lb-name em { color: inherit; font-style: normal; }
.lb-sub {
  font-size: .68rem;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: rgba(45,17,85,0.60);
  margin-top: .2rem;
  font-family: 'Poppins', sans-serif;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #2d1155;
  margin-bottom: .35rem;
  line-height: 1.15;
  letter-spacing: -0.3px;
}
.login-sub {
  font-size: .86rem;
  color: rgba(45,17,85,0.65);
  margin-bottom: 1.8rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

/* ── TABS ───────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(102,51,170,0.22);
  margin-bottom: 1.8rem;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: .7rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: rgba(45,17,85,0.55);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: 'Poppins', sans-serif;
  transition: color .2s, border-color .2s;
}
.auth-tab.active {
  color: #2d1155;
  border-bottom-color: #D4AF37;
  font-weight: 600;
}

/* ── CAMPOS ─────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.auth-form.hidden { display: none; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.field-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(45,17,85,0.78);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Poppins', sans-serif;
}

.field-wrap { position: relative; }

.field-ico {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: rgba(102,51,170,0.40);
  pointer-events: none;
  transition: stroke .2s;
}
.field-wrap:has(.field-ico) .field-in { padding-left: 2.6rem; }

.field-in {
  width: 100%;
  padding: .78rem 2.8rem .78rem 1rem;
  border: 1px solid rgba(102,51,170,0.30);
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 400;
  color: #2d1155;
  background: #ffffff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  box-sizing: border-box;
}
.field-in::placeholder { color: rgba(102,51,170,0.35); }
.field-in:focus {
  border-color: #6633aa;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(102,51,170,0.12);
}
.field-wrap:focus-within .field-ico { stroke: #6633aa; }

.toggle-pass {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: .2rem;
  color: rgba(102,51,170,0.40);
  display: flex;
  align-items: center;
  transition: color .2s;
}
.toggle-pass:hover { color: #2d1155; }
.toggle-pass svg { width: 17px; height: 17px; }

/* ── CONTRASEÑA: FORTALEZA ──────────────────────────────────── */
.pass-strength {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .4rem;
}
.strength-bar {
  flex: 1;
  height: 3px;
  background: rgba(102,51,170,0.18);
  border-radius: 2px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.strength-label {
  font-size: .72rem;
  font-weight: 500;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  color: rgba(45,17,85,0.55);
}

/* ── FILA RECUÉRDAME + OLVIDÉ ───────────────────────────────── */
.remember-row { display: flex; align-items: center; }

.forgot-link {
  font-size: .78rem;
  color: #6633aa;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  transition: color .2s;
}
.forgot-link:hover { color: #2d1155; }

/* ── CHECKBOX PERSONALIZADO ─────────────────────────────────── */
.check-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .84rem;
  color: rgba(45,17,85,0.75);
  cursor: pointer;
  user-select: none;
  font-family: 'Poppins', sans-serif;
}
.check-label input[type="checkbox"] { display: none; }
.check-box {
  width: 17px; height: 17px;
  border: 1px solid rgba(102,51,170,0.35);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0e6ff;
  transition: background .2s, border-color .2s;
}
.check-label input:checked + .check-box {
  background: #3d1f6e;
  border-color: #3d1f6e;
}
.check-label input:checked + .check-box::after {
  content: '';
  display: block;
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.terms-check { margin-top: -.3rem; }

#termsError {
  font-size: .75rem;
  color: #EF4444;
  margin-top: -.6rem;
  display: block;
  font-family: 'Poppins', sans-serif;
}
#termsError.hidden { display: none; }

.inline-link {
  color: #6633aa;
  text-decoration: none;
  font-weight: 500;
}
.inline-link:hover { text-decoration: underline; }

/* ── NOMBRE (2 columnas en registro) ────────────────────────── */
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

/* ── BOTÓN SUBMIT ───────────────────────────────────────────── */
.submit-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  padding: .88rem 1.5rem;
  background: #6633aa;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, color .25s, transform .15s, box-shadow .25s;
  margin-top: .4rem;
}
.submit-btn::after {
  content: '';
  position: absolute; top: -50%; left: -80%;
  width: 40%; height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease;
  pointer-events: none;
}
.submit-btn:hover {
  background: #D4AF37;
  color: #2d1155;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212,175,55,0.30);
}
.submit-btn:hover::after { left: 130%; }
.submit-btn:active { transform: translateY(0); }

.btn-arrow {
  width: 16px; height: 16px;
  transition: transform .2s;
}
.submit-btn:hover .btn-arrow { transform: translateX(3px); }

/* ── DIVISOR ────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: rgba(45,17,85,0.55);
  font-size: .75rem;
  letter-spacing: .05em;
  margin: .5rem 0;
  font-family: 'Poppins', sans-serif;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(102,51,170,0.22);
}

/* ── BOTONES SOCIALES ───────────────────────────────────────── */
.social-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
}
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .72rem 1rem;
  border: 1px solid rgba(102,51,170,0.30);
  border-radius: 4px;
  background: #f0e6ff;
  font-family: 'Poppins', sans-serif;
  font-size: .84rem;
  font-weight: 500;
  color: #2d1155;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.social-btn:hover {
  border-color: #6633aa;
  box-shadow: 0 2px 10px rgba(102,51,170,0.14);
  transform: translateY(-1px);
}

/* ── PANEL VERIFICACIÓN DE CORREO ───────────────────────────── */
.verify-panel { display: flex; flex-direction: column; align-items: center; gap: .85rem; }
.verify-panel.hidden { display: none; }
.verify-icon svg { width: 48px; height: 48px; stroke: #D4AF37; display: block; }
.verify-title { font-family: 'Playfair Display', serif; font-size: 1.45rem; font-weight: 700; color: #2d1155; margin: 0; text-align: center; }
.verify-desc  { font-size: .85rem; color: rgba(45,17,85,0.70); line-height: 1.65; text-align: center; margin: 0; }
.verify-desc strong { color: #2d1155; }
.code-inputs  { display: flex; gap: .45rem; }
.code-in {
  width: 44px; height: 54px;
  border: 1.5px solid rgba(102,51,170,0.30); border-radius: 2px;
  font-size: 1.5rem; font-weight: 700; text-align: center; color: #2d1155;
  background: #ffffff; font-family: 'Poppins', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  caret-color: #6633aa;
}
.code-in:focus { border-color: #6633aa; box-shadow: 0 0 0 3px rgba(102,51,170,0.12); background: #fff; }
.verify-error  { font-size: .78rem; color: #EF4444; font-family: 'Poppins', sans-serif; text-align: center; margin: 0; }
.verify-error.hidden { display: none; }
.resend-row    { font-size: .78rem; color: rgba(45,17,85,0.62); font-family: 'Poppins', sans-serif; text-align: center; }
.resend-btn    { background: none; border: none; color: #6633aa; font-weight: 600; font-family: 'Poppins', sans-serif; font-size: .78rem; cursor: pointer; padding: 0; }
.resend-btn:hover { text-decoration: underline; }
.resend-btn:disabled { opacity: .45; cursor: default; text-decoration: none; }
.back-verify   { background: none; border: none; color: rgba(45,17,85,0.55); font-size: .73rem; font-family: 'Poppins', sans-serif; cursor: pointer; padding: 0; transition: color .2s; }
.back-verify:hover { color: #2d1155; }

/* ── PANEL RECUPERAR CONTRASEÑA ─────────────────────────────── */
.forgot-panel { display: flex; flex-direction: column; gap: 1rem; }
.forgot-panel.hidden { display: none; }

.back-forgot {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: none;
  font-size: .82rem;
  font-weight: 500;
  color: rgba(45,17,85,0.65);
  cursor: pointer;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  transition: color .2s;
  margin-bottom: .5rem;
}
.back-forgot svg { width: 15px; height: 15px; transition: transform .2s; }
.back-forgot:hover { color: #2d1155; }
.back-forgot:hover svg { transform: translateX(-3px); }

.forgot-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #2d1155;
  letter-spacing: -0.3px;
}
.forgot-desc {
  font-size: .86rem;
  color: rgba(45,17,85,0.68);
  line-height: 1.65;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
}

.forgot-error {
  font-size: .82rem;
  color: #dc2626;
  font-family: 'Poppins', sans-serif;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.22);
  border-radius: 4px;
  padding: 8px 12px;
  margin-top: -.25rem;
}
.forgot-error.hidden { display: none; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .login-panel { display: none; }
  .login-form-wrap { padding: 5rem 1.5rem 3rem; }
}
@media (max-width: 480px) {
  .login-form-wrap { padding: 4.5rem 1rem 2rem; }
  .social-row { grid-template-columns: 1fr; }
  .name-row { grid-template-columns: 1fr; }
  .back-link { top: 1.2rem; left: 1rem; }
}
