/* =============================================
   AUTH — Login & Registro
   ============================================= */
/* layout handled by page-center in layout.css */
.auth-wrapper {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  width: 100%;
  min-height: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.6s var(--ease) both;
}

/* ---- Brand left panel ---- */
.auth-brand {
  position: relative;
  background: var(--bg2);
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.brand-inner { position: relative; z-index: 1; }

.brand-logo svg {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
}

.brand-name {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1;
}

.brand-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 40px;
}

.brand-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
}

.feat-icon {
  color: var(--accent);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Decoración geométrica fondo */
.brand-deco {
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border: 1px solid var(--accent-dim);
  border-radius: 50%;
  animation: rotateSlow 20s linear infinite;
}
.brand-deco::after {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: rotateSlow 12s linear infinite reverse;
}

/* ---- Panel derecho formulario ---- */
.auth-panel {
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 32px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: calc(var(--r-md) - 2px);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--bg);
}

/* Formularios */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s var(--ease);
}
.auth-form.active { display: flex; }

.auth-form h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.form-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-switch {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Barra de fortaleza contraseña */
.pw-strength-bar {
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
#pw-strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: var(--error);
  transition: width 0.3s var(--ease), background 0.3s;
}

/* RESPONSIVE */
@media (max-width: 680px) {
  .auth-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-brand { display: none; }
  .auth-panel { padding: 36px 28px; }
}
