/* ══════════════════════════════════════════════════════════════════════════
   AUTH.CSS — Login & Multi-Step Registration page
   ════════════════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left panel – branding */
.auth-aside {
  background: linear-gradient(150deg, var(--primary-dark) 0%, #7c3aed 50%, #ec4899 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
}

.auth-aside-inner { position: relative; z-index: 1; }

.aside-brand { color: #fff; margin-bottom: 2.5rem; }
.aside-brand .brand-mark { -webkit-text-fill-color: rgba(255,255,255,0.8); background: none; }

.aside-headline {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.aside-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  max-width: 340px;
}

.aside-testimonial {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.aside-testimonial p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.testimonial-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
}

.testimonial-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.testimonial-role {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}

/* Decorative blobs */
.aside-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
  pointer-events: none;
}
.aside-blob-1 { width: 350px; height: 350px; background: #a78bfa; top: -80px; right: -80px; }
.aside-blob-2 { width: 250px; height: 250px; background: #f472b6; bottom: 60px; left: -60px; }

/* ── Right panel – forms ────────────────────────────────────────────────── */
.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-y: auto;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
}

.auth-form-inner {
  width: min(440px, 100%);
  animation: fadeUp 0.35s var(--ease) both;
}

/* ── Tab switcher: Login / Registrieren ──────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.3rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-xs);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--r-lg) - 0.3rem);
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  outline: none;
}

.auth-tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-tab-btn:focus-visible { box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── Auth step panels ────────────────────────────────────────────────────── */
.auth-panel { display: flex; flex-direction: column; gap: 1rem; }

.auth-panel-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.auth-panel-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* ── Step Indicator ──────────────────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.75rem;
}

.step-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--panel-2);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
  flex-shrink: 0;
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.step-dot.done {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.step-dot.done::after {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 700;
}
.step-dot.done span { display: none; }

.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.step-dot.active + .step-label,
.step-dot-wrap:has(.active) .step-label { color: var(--primary); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 0.25rem;
  margin-bottom: 1.3rem;
  transition: background var(--t) var(--ease);
  border-radius: 99px;
}

.step-line.done { background: var(--success); }

/* ── Password strength ───────────────────────────────────────────────────── */
.password-strength {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.25rem;
}

.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--line);
  transition: background 0.3s var(--ease);
}

.strength-bar.weak   { background: var(--danger); }
.strength-bar.medium { background: var(--warning); }
.strength-bar.strong { background: var(--success); }

.strength-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  text-align: right;
}

/* ── Plan selection cards ────────────────────────────────────────────────── */
.plan-select-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.plan-select-card {
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  transition:
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    background var(--t) var(--ease);
  user-select: none;
}

.plan-select-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }

.plan-select-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-sm);
}

.plan-select-card.recommended {
  border-color: var(--primary);
  position: relative;
}

.plan-recommended-badge {
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 0.15rem 0.6rem;
}

.plan-radio {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--t) var(--ease);
}

.plan-select-card.selected .plan-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.plan-select-card.selected .plan-radio::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #fff;
}

.plan-info { min-width: 0; }

.plan-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.plan-perks {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.plan-price-tag {
  text-align: right;
  flex-shrink: 0;
}

.plan-price-tag .amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.plan-price-tag .period {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
}

/* ── Payment step ────────────────────────────────────────────────────────── */
.payment-order {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-order-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.payment-order-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
}

.card-field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.35rem;
}

#card-element {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.9rem;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  min-height: 2.8rem;
}

#card-element.StripeElement--focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-xs);
}

#card-element.StripeElement--invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px #ef444420;
}

.payment-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.payment-trust .material-symbols-outlined { font-size: 0.9rem; color: var(--success); }

.payment-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.card-logo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Navigation buttons ───────────────────────────────────────────────────── */
.auth-nav {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.5rem;
}

.auth-nav .btn-back {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--muted);
  padding-left: 0;
}

.auth-nav .btn-back:hover { color: var(--text); background: transparent; }
.auth-nav .btn-next { flex: 1; justify-content: center; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-footer-link {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-footer-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer-link a:hover { text-decoration: underline; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.spinner.dark {
  border-color: rgba(99,102,241,0.2);
  border-top-color: var(--primary);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-form-wrap { padding: 2rem 1.25rem; }
  .auth-form-inner { width: 100%; }
}
