/* ============================================================
   Ok.station — Estilos de cuentas (login / registro / perfil)
   Reutiliza los design tokens de styles.css. Campos en tema CLARO
   (los .field de styles.css son para fondo oscuro del wizard).
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(6, 108, 255, 0.10), transparent 60%),
    radial-gradient(55% 50% at 90% 20%, rgba(6, 108, 255, 0.10), transparent 60%),
    var(--surface-page);
}

/* Barra superior simple */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  /* En móvil el logo + los botones (Inicio · Tienda · Cerrar sesión) no caben en una
     sola fila: se acomodan en dos en vez de desbordarse. */
  flex-wrap: wrap;
  row-gap: var(--space-3);
  padding: var(--space-4) clamp(16px, 4vw, 40px);
}
.auth-top .logo { font-size: 1.4rem; }
.auth-back {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}
.auth-back:hover { color: var(--brand-blue); }
.auth-back svg { width: 16px; height: 16px; }

/* Contenedor central */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 4vw, 40px);
}
.auth-card--wide { max-width: 760px; }
/* cuenta.html: tarjeta más ancha para que correo y teléfono (fila de 2 columnas)
   muestren completo lo que el usuario escribe y evitar errores de captura */
.auth-card--account { max-width: 620px; }

.auth-head { text-align: center; margin-bottom: var(--space-7); }
.auth-head h1 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-head p { font-size: 0.9rem; color: var(--text-secondary); }

/* Tabs login / registro */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-6);
}
.auth-tab {
  padding: 10px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.auth-tab.is-active {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.auth-tab:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }

/* Campos (tema claro) */
.auth-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--space-5); }
.auth-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.auth-field input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 13px 15px;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-field input::placeholder { color: var(--text-faint); }
.auth-field input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(6, 108, 255, 0.15);
}
.auth-field input[aria-invalid="true"] {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.auth-field__hint { font-size: 0.75rem; color: var(--text-muted); }
.auth-field__error { font-size: 0.78rem; font-weight: 500; color: var(--color-error, #DC2626); }

.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* Mensajes */
.auth-alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--space-5);
  line-height: 1.5;
}
.auth-alert--error   { background: rgba(220, 38, 38, 0.08); color: #B91C1C; border: 1px solid rgba(220,38,38,0.2); }
.auth-alert--success { background: rgba(22, 163, 74, 0.08); color: #15803D; border: 1px solid rgba(22,163,74,0.2); }

/* Pie de formulario */
.auth-foot { margin-top: var(--space-5); text-align: center; font-size: 0.85rem; color: var(--text-secondary); }
.auth-foot a { color: var(--brand-blue); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }
.auth-inline-link { background: none; border: none; font: inherit; color: var(--brand-blue); font-weight: 600; cursor: pointer; padding: 0; }

/* Botón ocupa el ancho dentro del card */
.auth-card .btn--block { margin-top: var(--space-2); }

/* ── Perfil ── */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-6); align-items: start; }
.profile-side {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  text-align: center;
  position: sticky;
  top: 24px;
}
.profile-avatar {
  width: 84px; height: 84px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-brand);
  color: #fff; font-size: 1.8rem; font-weight: 800;
}
.profile-side h2 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.profile-side p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; word-break: break-word; }
.profile-nav { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-5); }
.profile-nav a {
  text-align: left; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.profile-nav a:hover { background: var(--brand-blue-light); color: var(--brand-blue); }
/* Pestaña activa (la que se está mostrando) */
.profile-nav a.is-active { background: var(--brand-blue-light); color: var(--brand-blue); font-weight: 600; }

/* "Datos personales" 🔒 — apartado sensible, separado al fondo de la barra. */
.profile-nav__datos {
  display: flex; align-items: center; gap: 8px;
  margin-top: var(--space-4);
  padding-top: var(--space-4) !important;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted) !important;
}
.profile-nav__datos svg { width: 16px; height: 16px; flex: 0 0 auto; }
.profile-nav__datos:hover { color: var(--brand-blue) !important; }
.profile-nav__datos[aria-expanded="true"] { color: var(--brand-blue) !important; background: var(--brand-blue-light); }

.profile-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: var(--space-6);
}
.profile-panel h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: var(--space-5); padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 768px) {
  .auth-row { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  /* iOS: evita el ZOOM automático al enfocar (exige ≥16px). El 15px de
     .auth-field input ganaba en especificidad al arreglo global de styles.css. */
  .auth-field input, .auth-field select, .auth-field textarea { font-size: 16px; }
}


/* ══ MODO OSCURO — html[data-theme="dark"] ══════════════════════════════════ */
html[data-theme="dark"] .auth-alert--error { background: rgba(220,38,38,.14); border-color: #7A2233; color: #FCA5A5; }
