/* ============================================================
   auth.css — Karate Sınav Platformu  (v2 — Ultra Premium)
   Giriş, Kayıt, Şifremi Unuttum, Şifre Sıfırlama sayfaları

   Yol Haritası: Adım 3 — CSS Tema Sistemi (Bölüm 9.1, 9.2)
   Tüm sınıflar login.php / register.php HTML'i ile birebir eşleşir.
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   §0  KEYFRAME ANİMASYONLAR
   ══════════════════════════════════════════════════════════════ */

@keyframes auth-bg-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

@keyframes float-shape {
  0%   { transform: translateY(0)   rotate(0deg)   scale(1); }
  33%  { transform: translateY(-18px) rotate(4deg)  scale(1.03); }
  66%  { transform: translateY(-8px)  rotate(-3deg) scale(0.98); }
  100% { transform: translateY(0)   rotate(0deg)   scale(1); }
}

@keyframes float-shape-b {
  0%   { transform: translateY(0)    rotate(0deg); }
  50%  { transform: translateY(14px) rotate(-6deg); }
  100% { transform: translateY(0)    rotate(0deg); }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer-sweep {
  0%   { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(250%)  skewX(-12deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(214, 40, 40, 0.35); }
  70%  { box-shadow: 0 0 0 10px rgba(214, 40, 40, 0); }
  100% { box-shadow: 0 0 0 0   rgba(214, 40, 40, 0); }
}

@keyframes strength-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes check-draw {
  from { stroke-dashoffset: 20; }
  to   { stroke-dashoffset: 0; }
}

/* ══════════════════════════════════════════════════════════════
   §1  SAYFA ARK PLANI  (.auth-page)
   ══════════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center kaldırıldı — flex center + min-height:100vh içerik uzun
     olduğunda scroll başlangıcını kırıyor; bunun yerine auth-wrapper margin:auto ile
     hem kısa hem uzun içerikte doğru çalışıyor */
  justify-content: flex-start;
  padding: var(--space-6) var(--space-4);
  position: relative;

  /* Hareketli degrade arka plan */
  background: linear-gradient(
    -45deg,
    #0f0f23 0%,
    #1A1A2E 20%,
    #2D0B0B 45%,
    #8B1515 65%,
    #D62828 85%,
    #1A1A2E 100%
  );
  background-size: 400% 400%;
  animation: auth-bg-shift 18s ease infinite;
}

/* ── Yüzen Dekoratif Şekiller ── */
.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.auth-page::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(214, 40, 40, 0.12) 0%, transparent 70%);
  top: -160px;
  right: -160px;
  animation: float-shape 12s ease-in-out infinite;
}

.auth-page::after {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation: float-shape-b 16s ease-in-out infinite;
}

/* Ekstra yüzen şekiller — .auth-shape ile eklenebilir */
.auth-shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.auth-shape--1 {
  width: 200px;
  height: 200px;
  top: 15%;
  left: 8%;
  animation: float-shape 9s ease-in-out infinite;
  animation-delay: -3s;
}

.auth-shape--2 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  right: 10%;
  border-radius: var(--radius);
  transform: rotate(30deg);
  animation: float-shape-b 11s ease-in-out infinite;
  animation-delay: -5s;
}

/* ══════════════════════════════════════════════════════════════
   §2  ANA SARMALAYICI  (.auth-wrapper)
   ══════════════════════════════════════════════════════════════ */

.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  /* margin:auto — auth-page flex-start + wrapper margin:auto = kısa içerikte merkez,
     uzun içerikte scroll çalışır (canonical flex scroll fix) */
  margin: auto;
}

/* Geniş kayıt formu için override */
.auth-wrapper--wide {
  max-width: 680px;
}

/* ══════════════════════════════════════════════════════════════
   §3  LOGO BAŞLIK  (.auth-header / .auth-logo)
   ══════════════════════════════════════════════════════════════ */

.auth-header {
  text-align: center;
  animation: card-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}

.auth-logo:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.auth-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #D62828 0%, #7A0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow:
    0 4px 20px rgba(214, 40, 40, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  flex-shrink: 0;
  transition: box-shadow var(--transition);
}

.auth-logo:hover .auth-logo-icon {
  box-shadow:
    0 6px 28px rgba(214, 40, 40, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.auth-logo-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.auth-logo-sub {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════
   §4  ANA KART  (.auth-card)
   ══════════════════════════════════════════════════════════════ */

.auth-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: var(--space-8);
  box-shadow:
    0 2px 0 rgba(214, 40, 40, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.22),
    0 40px 80px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;

  /* Üst kırmızı şerit */
  border-top: 4px solid transparent;
  background-image:
    linear-gradient(rgba(255,255,255,0.97), rgba(255,255,255,0.97)),
    linear-gradient(90deg, var(--primary-dark), var(--primary), #FF6B6B);
  background-origin: border-box;
  background-clip: padding-box, border-box;

  animation: card-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  position: relative;
  overflow: hidden;
}

/* Kart iç dekoratif ışık */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(214,40,40,0.4), transparent);
  pointer-events: none;
}

/* Geniş kart (kayıt sayfası) */
.auth-card--wide {
  max-width: 100%;
}

/* ── Kart Başlığı ── */
.auth-card__header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-card__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.auth-card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Kart Altı ── */
.auth-card__footer {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.auth-card__footer p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   §5  ALERT BİLEŞENİ  (.alert / .alert--* / .alert__icon)
   ══════════════════════════════════════════════════════════════ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  animation: fade-in-down 0.3s ease both;
}

.alert__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 1px;
}

.alert--info {
  background-color: #EFF6FF;
  border-color: #93C5FD;
  color: #1E40AF;
}

.alert--danger {
  background-color: var(--danger-light);
  border-color: #FCA5A5;
  color: #7F1D1D;
  animation: fade-in-down 0.3s ease both, shake 0.4s ease 0.3s;
}

.alert--success {
  background-color: var(--success-light);
  border-color: #86EFAC;
  color: #14532D;
}

.alert--warning {
  background-color: var(--warning-light);
  border-color: #FCD34D;
  color: #78350F;
}

/* ══════════════════════════════════════════════════════════════
   §6  FORM BİLEŞENLERİ
   ══════════════════════════════════════════════════════════════ */

/* ── Form Grubu ── */
.form-group {
  margin-bottom: var(--space-5);
  position: relative;
}

/* Hatalı alan state */
.form-group--error .form-input,
.form-group--error .form-select {
  border-color: var(--danger);
  background-color: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  animation: shake 0.35s ease;
}

.form-group--error .form-label {
  color: var(--danger);
}

/* ── Label ── */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: var(--space-2);
  transition: color var(--transition);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
  font-weight: 700;
}

/* Label satırı (label + şifremi unuttum linki yan yana) */
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.form-label-row .form-label {
  margin-bottom: 0;
}

/* ── Text / Email / Password / Tel Input ── */
.form-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  line-height: 1.5;
  color: var(--text-main);
  background-color: #FAFAFA;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  outline: none;
  appearance: none;
  transition:
    border-color 0.22s ease,
    box-shadow   0.22s ease,
    background-color 0.22s ease;
}

.form-input::placeholder {
  color: #A0AEC0;
  font-weight: 400;
}

.form-input:hover:not(:disabled) {
  border-color: #CBD5E1;
  background-color: #FFFFFF;
}

.form-input:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.12);
}

.form-input:disabled {
  background-color: var(--surface);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.65;
}

/* ── Select ── */
.form-select {
  display: block;
  width: 100%;
  padding: 0.75rem 2.8rem 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  line-height: 1.5;
  color: var(--text-main);
  background-color: #FAFAFA;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236B7280' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    box-shadow   0.22s ease,
    background-color 0.22s ease;
}

.form-select:hover:not(:disabled) {
  border-color: #CBD5E1;
  background-color: #FFFFFF;
}

.form-select:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.12);
}

/* ── Hint & Hata Metni ── */
.form-hint {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
  line-height: 1.4;
}

.field-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--danger);
  margin-top: var(--space-2);
  font-weight: 500;
  line-height: 1.4;
  animation: fade-in-down 0.25s ease both;
}

.field-error::before {
  content: "⚠";
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* ── İki Sütunlu Satır ── */
.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* ══════════════════════════════════════════════════════════════
   §7  ŞİFRE ALANI  (.input-password-wrap / .password-toggle)
   ══════════════════════════════════════════════════════════════ */

.input-password-wrap {
  position: relative;
}

.input-password-wrap .form-input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.05rem;
  transition: color var(--transition), transform var(--transition);
  padding: 0;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -3px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.eye-icon {
  display: block;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.eye-icon[hidden] {
  display: none;
}

/* ══════════════════════════════════════════════════════════════
   §8  ŞİFRE GÜÇ METREsi  (.password-strength)
   ══════════════════════════════════════════════════════════════ */

.password-strength {
  margin-top: var(--space-2);
}

.password-strength__bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.password-strength__bar {
  flex: 1;
  height: 4px;
  background-color: #E2E8F0;
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.password-strength__bar::after {
  content: "";
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
  transform-origin: left;
  animation: strength-fill 0.3s ease forwards;
}

.password-strength__bar--weak   { background-color: #FEE2E2; }
.password-strength__bar--fair   { background-color: var(--warning-light); }
.password-strength__bar--good   { background-color: #DCFCE7; }
.password-strength__bar--strong { background-color: #DCFCE7; }

.password-strength__bar--weak::after   { background: var(--danger); }
.password-strength__bar--fair::after   { background: var(--warning); }
.password-strength__bar--good::after   { background: var(--success); }
.password-strength__bar--strong::after { background: var(--success); }

.password-strength__label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  transition: color 0.3s ease;
}

.password-strength__label--weak   { color: var(--danger); }
.password-strength__label--fair   { color: var(--warning); }
.password-strength__label--good   { color: var(--success); }
.password-strength__label--strong { color: var(--success); }

/* ══════════════════════════════════════════════════════════════
   §9  BUTON SİSTEMİ  (.btn / .btn--* BEM)
   ══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.22s ease,
    color            0.22s ease,
    border-color     0.22s ease,
    box-shadow       0.22s ease,
    transform        0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Primary ── */
.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(214, 40, 40, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #C42020 0%, #8A1818 100%);
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(214, 40, 40, 0.45);
  transform: translateY(-1px);
}

/* Shimmer sweep efekti */
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 100%
  );
  transform: skewX(-12deg);
  opacity: 0;
  transition: opacity 0.1s;
}

.btn--primary:hover::after {
  opacity: 1;
  animation: shimmer-sweep 0.7s ease forwards;
}

/* ── Full Width ── */
.btn--full {
  width: 100%;
}

/* ── Large ── */
.btn--lg {
  padding: 1rem var(--space-8);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
  letter-spacing: 0.01em;
}

/* ── Small ── */
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

/* ── Secondary ── */
.btn--secondary {
  background-color: var(--white);
  color: var(--text-main);
  border-color: var(--border);
}

.btn--secondary:hover {
  background-color: var(--surface);
  border-color: #CBD5E1;
  color: var(--text-main);
  text-decoration: none;
}

/* ── Outline ── */
.btn--outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════
   §10  ROL KARTI SEÇİMİ  (.role-cards / .role-card / BEM)
   ══════════════════════════════════════════════════════════════ */

.role-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Gizli radio input */
.role-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Kart etiketi */
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border: 2px solid #E2E8F0;
  border-radius: var(--radius);
  cursor: pointer;
  background: #FAFAFA;
  transition:
    border-color  0.22s ease,
    background    0.22s ease,
    box-shadow    0.22s ease,
    transform     0.22s ease;
  user-select: none;
  overflow: hidden;
}

.role-card:hover {
  border-color: rgba(214, 40, 40, 0.4);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(214, 40, 40, 0.15);
}

/* Seçili state */
.role-card--selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow:
    0 0 0 3px rgba(214, 40, 40, 0.18),
    0 4px 16px rgba(214, 40, 40, 0.18);
  transform: translateY(-2px);
  animation: pulse-ring 1.2s ease;
}

.role-card__icon {
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.22s ease;
}

.role-card:hover .role-card__icon,
.role-card--selected .role-card__icon {
  transform: scale(1.15);
}

.role-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.role-card__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-main);
}

.role-card__desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.3;
}

/* Onay işareti */
.role-card__check {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0;
  transform: scale(0) rotate(-15deg);
  transition:
    opacity  0.22s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.role-card--selected .role-card__check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ══════════════════════════════════════════════════════════════
   §11  ADIM GÖSTERGESİ  (.auth-steps) — register.php
   ══════════════════════════════════════════════════════════════ */

.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-6);
  padding: 0 var(--space-4);
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.auth-step__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.3s ease,
    color            0.3s ease,
    box-shadow       0.3s ease;
  position: relative;
  z-index: 1;
}

.auth-step--active .auth-step__num {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.2);
}

.auth-step--done .auth-step__num {
  background-color: var(--success);
  color: var(--white);
}

.auth-step__label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.auth-step--active .auth-step__label {
  color: var(--primary);
  font-weight: 700;
}

.auth-step--done .auth-step__label {
  color: var(--success);
}

.auth-step__line {
  flex: 1;
  height: 2px;
  background-color: #E2E8F0;
  min-width: 40px;
  margin: 0 var(--space-2);
  margin-bottom: 18px; /* adım numarasıyla hizala */
  transition: background-color 0.4s ease;
}

.auth-step__line--done {
  background-color: var(--success);
}

/* ══════════════════════════════════════════════════════════════
   §12  LİNKLER  (.link / .link--* BEM)
   ══════════════════════════════════════════════════════════════ */

.link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.link--sm {
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.link--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.link--muted:hover {
  color: var(--text-main);
}

/* ══════════════════════════════════════════════════════════════
   §13  GERİ LİNKİ  (.auth-back-link)
   ══════════════════════════════════════════════════════════════ */

.auth-back-link {
  text-align: center;
  margin: 0;
}

.auth-back-link a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.auth-back-link a:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════
   §14  FORM AUTH WRAPPER  (.auth-form)
   ══════════════════════════════════════════════════════════════ */

.auth-form {
  /* Görsel boşluk düzeni burada tanımlanır */
}

.auth-form .form-group:last-of-type {
  margin-bottom: 0;
}

/* Form içindeki submit butonu — form-group'tan sonra nefes aldır */
.auth-form > .btn,
.auth-form > button[type="submit"] {
  margin-top: var(--space-5);
}

/* ══════════════════════════════════════════════════════════════
   §15  LOGIN SPLIT LAYOUT  (.auth-split)
   ══════════════════════════════════════════════════════════════ */

/* Masaüstünde yan yana iki panel */
.auth-split {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  animation: card-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

/* Sol dekoratif hero panel */
.auth-split__hero {
  flex: 0 0 42%;
  background: linear-gradient(160deg, #2D0B0B 0%, #8B1515 50%, #D62828 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hero arka plan dekorasyon */
.auth-split__hero::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  top: -80px;
  right: -80px;
  animation: float-shape 14s ease-in-out infinite;
}

.auth-split__hero::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -60px;
  left: -60px;
  animation: float-shape-b 18s ease-in-out infinite;
}

.auth-split__hero-content {
  position: relative;
  z-index: 1;
}

.auth-split__big-icon {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: var(--space-6);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  animation: float-shape 6s ease-in-out infinite;
}

.auth-split__hero-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.auth-split__hero-sub {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

/* Hero özellik listesi */
.auth-split__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: left;
  width: 100%;
}

.auth-split__feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.auth-split__feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Sağ form paneli */
.auth-split__form {
  flex: 1;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-12) var(--space-10);
  overflow-y: auto;
}

.auth-split__form-inner {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Split layout içindeki auth-header */
.auth-split__form .auth-header {
  animation: none;
  margin-bottom: var(--space-6);
}

/* Masaüstünde hero paneli zaten logo içerdiğinden form tarafındaki
   logo bloğu gizlenir; yalnızca mobilde (hero kaybolunca) gösterilir */
@media (min-width: 768px) {
  .auth-header--mobile-only {
    display: none;
  }
}

@media (max-width: 767px) {
  .auth-header--mobile-only {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-6);
    animation: card-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* ── Mobil Hero Başlık (.auth-mobile-hero) ──────────────────────────────── */
/* Sol hero panelindeki büyük ikon + başlığın mobil eşdeğeri:
   masaüstünde hero paneli zaten gösterdiğinden burada gizlenir,
   mobilde koyu arka plan üzerinde beyaz, ortalanmış şekilde gösterilir. */

.auth-mobile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  text-decoration: none;
  transition: opacity var(--transition);
}

.auth-mobile-hero:hover {
  opacity: 0.88;
  text-decoration: none;
}

/* Dekoratif kutu — ikon arkasında yumuşak kare zemin */
.auth-mobile-hero__icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(214,40,40,0.18) 0%, rgba(160,30,30,0.10) 100%);
  border: 1.5px solid rgba(214, 40, 40, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(214, 40, 40, 0.2),
    0 0 0 1px rgba(255,255,255,0.06) inset;
  transition: box-shadow var(--transition), transform var(--transition);
  animation: float-shape 7s ease-in-out infinite;
}

.auth-mobile-hero:hover .auth-mobile-hero__icon-wrap {
  box-shadow:
    0 6px 28px rgba(214, 40, 40, 0.32),
    0 0 0 1px rgba(255,255,255,0.1) inset;
  transform: translateY(-2px);
}

.auth-mobile-hero__icon {
  font-size: 3.2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
  /* Animasyon parent wrapper'da — ikon sabit durur */
}

.auth-mobile-hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.auth-mobile-hero__title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--primary);       /* Karate kırmızısı — koyu arka planda okunur */
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.auth-mobile-hero__sub {
  font-size: var(--font-size-sm);
  color: rgba(214, 40, 40, 0.75); /* Karate kırmızısının şeffaf tonu */
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ══════════════════════════════════════════════════════════════
   §16  KİLİT SAYACI  (.lockout-display)
   ══════════════════════════════════════════════════════════════ */

.lockout-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.lockout-display__icon {
  font-size: 3rem;
  animation: pulse-ring 2s ease infinite;
}

.lockout-display__title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--danger);
}

.lockout-display__timer {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════════════════════════
   §17  AUTOCOMPLETE DATALIST ÖZEL STİL
   ══════════════════════════════════════════════════════════════ */

/* Datalist doğal browser görünümüyle sunulur;
   input içinde bir ikon ekleyerek iyileştirilir */
.form-input--with-icon {
  padding-left: 2.5rem;
}

.form-input-icon-wrap {
  position: relative;
}

.form-input-icon-wrap .form-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: color var(--transition);
}

.form-input-icon-wrap .form-input:focus ~ .form-input-icon {
  color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   §18  ERİŞİLEBİLİRLİK  focus-visible
   ══════════════════════════════════════════════════════════════ */

.form-input:focus-visible,
.form-select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.role-card:focus-within {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Aria-live bölgesi — görsel değil, ekran okuyucu içindir */
[aria-live] {
  /* Stil gerektirmez, ekran okuyucu için */
}

/* ══════════════════════════════════════════════════════════════
   §19  RESPONSİVE  — Mobil Önce
   ══════════════════════════════════════════════════════════════ */

/* ── Tüm mobil (< 768px) — Register premium kompakt görünüm ── */
@media (max-width: 767px) {

  /* Auth wrapper: dar ekranda yan boşluk + yuvarlatılmış kart */
  .auth-wrapper {
    gap: var(--space-4);
    padding: var(--space-4) var(--space-3) var(--space-6);
  }

  /* Geniş wrapper (kayıt formu): yatay padding sıfır — auth-page'in
     16px padding'i kenarlarda zaten nefes payı sağlar */
  .auth-wrapper--wide {
    max-width: 100%;
    padding: var(--space-4) 0 var(--space-6);
  }

  /* Kart: sıkıştırılmış padding + yumuşak köşeler + yan boşluk (arka plan görünür) */
  .auth-card {
    padding: var(--space-5) var(--space-4);
    border-radius: 20px;
    margin: 0 var(--space-2);  /* Sağ-sol arka plan şeridi */
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.2),
      0 0 0 1px rgba(255,255,255,0.06) inset;
  }

  /* Geniş kart (kayıt formu): yatay margin sıfır, auth-page padding yeterli */
  .auth-card--wide {
    margin: 0;
    border-radius: 16px;
  }

  /* Başlık küçültme */
  .auth-card__title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-1);
  }

  .auth-card__subtitle {
    font-size: var(--font-size-xs);
  }

  /* Kart header boşluğu */
  .auth-card__header {
    margin-bottom: var(--space-4);
  }

  /* Form grup arası boşluk azalt */
  .form-group {
    margin-bottom: var(--space-3);
  }

  /* 2 sütun → 1 sütun */
  .form-row--2col {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* Input yüksekliği kompakt */
  .form-input,
  .form-select {
    padding: 0.65rem 0.9rem;
    font-size: var(--font-size-sm);
  }

  /* Buton */
  .btn--lg {
    padding: 0.85rem var(--space-6);
    font-size: var(--font-size-base);
  }

  /* Adım göstergesi kompakt */
  .auth-steps {
    margin-bottom: var(--space-4);
    padding: 0 var(--space-2);
  }

  .auth-step__num {
    width: 26px;
    height: 26px;
    font-size: var(--font-size-xs);
  }

  .auth-step__label {
    font-size: 0.65rem;
  }

  .auth-step__line {
    min-width: 24px;
    margin: 0 var(--space-1);
    margin-bottom: 14px;
  }

  /* Rol kartları: 1 sütun + kompakt iç boşluk */
  .role-cards {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .role-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .role-card__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
  }

  .role-card__body {
    flex: 1;
  }

  .role-card__check {
    position: static;
    margin-left: auto;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  }

  .role-card--selected .role-card__check {
    opacity: 1;
    transform: scale(1);
  }

  /* Şifre güç metresi kompakt */
  .password-strength {
    margin-top: var(--space-1);
  }

  /* Alert kompakt */
  .alert {
    padding: var(--space-3) var(--space-3);
    font-size: var(--font-size-xs);
    margin-bottom: var(--space-3);
  }

  /* Kart footer */
  .auth-card__footer {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
  }

  /* Logo üstte kompakt */
  .auth-header {
    margin-bottom: var(--space-4);
  }

  .auth-logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .auth-logo-title {
    font-size: var(--font-size-base);
  }

  .auth-logo-sub {
    font-size: 0.65rem;
  }
}

/* ── Küçük ekran (< 480px) — ekstra sıkıştırma ── */
@media (max-width: 479px) {
  .auth-card {
    padding: var(--space-4) var(--space-3);
    margin: 0 var(--space-1);
  }

  .auth-card--wide {
    margin: 0 var(--space-1);
  }

  .form-group {
    margin-bottom: var(--space-2);
  }
}

/* ── Tablet (480px–767px) ── */
@media (min-width: 480px) and (max-width: 767px) {
  .role-cards {
    grid-template-columns: 1fr 1fr;
  }

  .role-card {
    flex-direction: column;
    text-align: center;
    padding: var(--space-4) var(--space-3);
  }

  /* 3. kart tam genişlik */
  .role-card:last-child {
    grid-column: 1 / -1;
  }
}

/* ── Split layout mobil gizle ── */
@media (max-width: 767px) {
  /* Yatay taşmayı engelle — auth-page'deki overflow:clip zaten şekilleri keser,
     html/body'e overflow vermek yeni scroll context açar ve dikey scroll kırılır */
  html,
  body {
    max-width: 100%;
  }

  /* Split layout sayfalar (login): üstten başla, padding sıfırla */
  .auth-page:has(.auth-split) {
    padding: 0;
  }

  .auth-split {
    min-height: auto;          /* Fazla dikey scroll yok */
    height: auto;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .auth-split__hero {
    display: none;             /* Hero paneli mobilde gizle */
  }

  .auth-split__form {
    padding: var(--space-6) var(--space-5) var(--space-10);
    min-height: auto;          /* 100vh kaldırıldı — içerik kadar yükseklik */
    border-radius: 20px;       /* 4 köşe de yuvarlatıldı */
    background: rgba(255,255,255,0.97);
    box-shadow:
      0 -4px 24px rgba(0,0,0,0.15),
      0 4px 24px rgba(0,0,0,0.12);
    /* Sağ-sol boşluk: arka planın kırmızı gradyanı kenarlarda görünür */
    margin: var(--space-2) var(--space-3) var(--space-4);
    /* overflow gizle — radius içinde kalsın */
    overflow: hidden;
  }

  .auth-split__form-inner {
    max-width: 100%;
  }
}

/* ── Masaüstü (768px+) ── */
@media (min-width: 768px) {
  .auth-page {
    padding: var(--space-8);
  }

  .auth-split {
    min-height: min(80vh, 700px);
  }
}

/* ── Geniş masaüstü (1024px+) ── */
@media (min-width: 1024px) {
  .auth-page {
    padding: var(--space-12) var(--space-8);
  }
}

/* ══════════════════════════════════════════════════════════════
   §20  REDUCED MOTION — Animasyon erişilebilirliği
   ══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .auth-page {
    animation: none;
    background: linear-gradient(135deg, #1A1A2E 0%, #2D0B0B 50%, #A01E1E 100%);
  }

  .btn--primary::after {
    display: none;
  }

  .auth-split__big-icon,
  .auth-split__hero::before,
  .auth-split__hero::after {
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   §21  KOYU MOD (prefers-color-scheme: dark) — Temel destek
   ══════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
  /* Auth sayfası zaten koyu; kart beyaz kalmalı —
     kullanıcı tercihi olarak override edilebilir */
}