/* =========================================================
   AUTH PAGES — auth.css
   Login, Registro, Mi Cuenta
   Requiere checkout.css cargado antes (variables :root)
   ========================================================= */

/* ── Centrado vertical de la página ── */
.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 48px;
}

.auth-wrap {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ── Marca ── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.auth-brand strong { color: var(--text); }
.auth-brand-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5278f5, #4169ea);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}

/* ── Tarjeta principal ── */
.auth-card {
  width: 100%;
  padding: 32px 30px 28px;
  margin-bottom: 0;
}

.auth-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 0 0 6px;
  color: var(--text);
}
.auth-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.5;
}

/* ── Grid de 2 columnas dentro del form ── */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

/* ── Botón enviar ── */
.auth-btn {
  width: 100%;
  margin-top: 20px;
}

/* ── Checkbox "Recordarme" ── */
.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }

/* ── Password con botón toggle ── */
.pass-wrap {
  position: relative;
}
.pass-wrap input {
  padding-right: 42px;
}
.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  padding: 2px;
  line-height: 1;
}
.pass-toggle:hover { color: var(--blue); }

/* ── Indicador de fortaleza ── */
.strength-bar {
  height: 4px;
  background: var(--line2);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width .3s, background .3s;
}
.strength-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
  display: block;
}

/* ── Divisor "¿Ya tienes cuenta?" ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Botón alternativo (sin fondo) ── */
.auth-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 43px;
  border: 1.5px solid var(--line2);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  color: var(--blue);
  background: var(--white);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.auth-link-btn:hover {
  border-color: var(--blue);
  background: var(--soft);
  color: var(--blue);
}

/* ── Texto legal ── */
.auth-legal {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}
.auth-legal a { color: var(--blue); font-weight: 600; }

/* ── Mi Cuenta ── */
.cuenta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 21px;
  align-items: start;
}
.cuenta-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5278f5, #14b88d);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 22px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.cuenta-nombre {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 4px;
}
.cuenta-correo {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}
.cuenta-rol-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(77,114,242,.1);
  color: var(--blue);
}
.cuenta-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cuenta-stat b {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
}
.cuenta-stat small { font-size: 11px; color: var(--muted); }

/* Logout form inline */
.logout-form { margin-top: 18px; }
.btn-logout {
  height: 38px;
  padding: 0 16px;
  border: 1.5px solid var(--line2);
  border-radius: 9px;
  background: var(--white);
  color: #ef4444;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-logout:hover { border-color: #ef4444; background: rgba(239,68,68,.04); }

/* ── Responsive ── */
@media (max-width: 560px) {
  .auth-page   { padding-top: 80px; }
  .auth-card   { padding: 24px 18px 20px; border-radius: 14px; }
  .auth-row    { grid-template-columns: 1fr; }
  .cuenta-grid { grid-template-columns: 1fr; }
}
