/**
 * Auth — giriş, kayıt, şifre, doğrulama, 2FA (modern shell)
 */

.auth-shell {
  min-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  padding-left: max(var(--space-lg), var(--safe-area-left));
  padding-right: max(var(--space-lg), var(--safe-area-right));
  background: radial-gradient(1200px 600px at 50% -20%, var(--accent-muted), transparent 55%),
    var(--bg-primary);
}

.auth-shell__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.auth-shell__card--wide {
  max-width: 480px;
}

.auth-shell__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent-gradient);
  opacity: 0.95;
}

.auth-shell__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

.auth-shell__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
}

.auth-shell__lead {
  margin: var(--space-sm) 0 var(--space-lg);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-muted);
}

.auth-shell__links {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-muted);
}

.auth-shell__links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-shell__links a:hover {
  text-decoration: underline;
}

.auth-shell__sep {
  margin: 0 var(--space-sm);
  opacity: 0.5;
}

/* Form */
.auth-shell .form-group {
  margin-bottom: var(--space-md);
}

.auth-shell .form-label {
  font-weight: 600;
  font-size: 0.8125rem;
}

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

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.auth-password-wrap .form-input {
  flex: 1;
  padding-right: 2.75rem;
}

.auth-password-toggle {
  position: absolute;
  right: var(--space-xs);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.auth-password-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-hint {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: var(--space-md);
}

.auth-checkbox input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-page__remember {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  cursor: pointer;
}

.auth-page__remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-page__submit,
.auth-shell .btn--block {
  width: 100%;
  justify-content: center;
}

/* Alerts */
.auth-alert {
  padding: var(--space-md);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.45;
  margin-bottom: var(--space-md);
}

.auth-alert--success {
  background: var(--success-muted, rgba(34, 197, 94, 0.12));
  border: 1px solid var(--success, #22c55e);
  color: var(--text-primary);
}

.auth-alert--error {
  background: var(--danger-muted, rgba(239, 68, 68, 0.1));
  border: 1px solid var(--danger, #ef4444);
  color: var(--text-primary);
}

.auth-alert--info {
  background: var(--accent-muted);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* 2FA code input */
.auth-code-input {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .auth-shell__row2 {
    grid-template-columns: 1fr;
  }

  .auth-shell__card {
    padding: var(--space-lg);
  }

  .auth-shell {
    min-height: calc(100vh - 4rem);
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }
}

[data-theme="light"] .auth-shell__card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Hızlı bağlantılar (tüm auth sayfaları) */
.auth-nav-strip {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  text-align: center;
}

.auth-nav-strip__inner {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  justify-content: center;
  align-items: center;
}

.auth-nav-strip a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.auth-nav-strip a:hover {
  color: var(--accent);
}

.auth-nav-strip__sep {
  color: var(--border-color);
  user-select: none;
}

/* Sosyal giriş */
.auth-social {
  margin: var(--space-lg) 0;
}

.auth-social__title {
  margin: 0 0 var(--space-md);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--text-muted);
}

.auth-social__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition:
    border-color var(--transition),
    background var(--transition),
    color var(--transition);
}

.auth-social__btn:hover {
  border-color: var(--accent-muted);
  background: var(--bg-hover);
  color: var(--accent);
}

.auth-social__emoji {
  font-size: 1.125rem;
  line-height: 1;
}

.auth-social__btn--google:hover {
  border-color: rgba(66, 133, 244, 0.45);
}

.auth-social__btn--facebook:hover {
  border-color: rgba(24, 119, 242, 0.45);
}

.auth-social__btn--github:hover {
  border-color: rgba(110, 118, 129, 0.5);
}
