/* ==================== ADIM 109/N — Giriş ekranı ====================
   Bilgisayar (≥ 960 px): iki bölme — solda logo, tanıtım, ıstakada taşlar ve rozetler; sağda form.
   Telefon / tablet: tek sütun — logo ve kısa yazı üstte, form ortada, alt bilgi en altta.
   Yalnızca pages/login.php yükler; diğer sayfaları etkilemez. */

body.auth-page { padding: 0; }

.auth-layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Sol bölme ---------- */
.auth-side {
  flex: 1.15 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 56px 64px;
  color: #f4f1e8;
  background: radial-gradient(ellipse at 30% 30%, #17684a 0%, #0f4a35 45%, #0a2f22 100%);
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 34px);
  pointer-events: none;
}
.auth-side > * { position: relative; }

.auth-hero { display: flex; flex-direction: column; gap: 14px; }
.auth-brand { display: flex; align-items: center; gap: 16px; }
.auth-brand h1 { font-size: 42px; font-weight: 800; margin: 0; letter-spacing: 0; line-height: 1.1; }
.auth-page .auth-brand .brand-logo.brand-logo-101 { height: 74px; margin: 0; }
.auth-page .auth-brand .brand-logo:not(.brand-logo-101) { width: 70px; height: 70px; margin: 0; }
.auth-tagline { margin: 0; font-size: 17px; line-height: 1.5; color: rgba(244,241,232,0.8); max-width: 520px; }

/* Istaka ve taşlar (süs; ekran okuyucudan gizli) */
.auth-rack { position: relative; width: 100%; max-width: 560px; height: 118px; }
.auth-rack-board {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; border-radius: 8px;
  background: linear-gradient(#c79a5b, #8a5f2e);
  box-shadow: 0 10px 22px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.25);
}
.auth-rack-tiles { position: absolute; left: 18px; right: 18px; bottom: 22px; display: flex; gap: 4px; z-index: 1; }
.auth-tile {
  width: 38px; height: 54px; flex-shrink: 0; border-radius: 6px;
  background: linear-gradient(#fffaf0, #efe3c4);
  border: 1px solid #d9c79c;
  box-shadow: 0 4px 0 #b3945a, 0 6px 10px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; line-height: 1;
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  animation: auth-tile-in 0.45s ease both;
}
.auth-tile i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-top: 4px; }
.auth-tile-gap { width: 14px; flex-shrink: 0; }
.auth-tile.t-r { color: #c8322b; }
.auth-tile.t-b { color: #1f5fae; }
.auth-tile.t-k { color: #1d2b3a; }
.auth-tile.t-y { color: #c98a12; }
.auth-rack-tiles > :nth-child(2)  { animation-delay: .04s; }
.auth-rack-tiles > :nth-child(3)  { animation-delay: .08s; }
.auth-rack-tiles > :nth-child(4)  { animation-delay: .12s; }
.auth-rack-tiles > :nth-child(6)  { animation-delay: .20s; }
.auth-rack-tiles > :nth-child(7)  { animation-delay: .24s; }
.auth-rack-tiles > :nth-child(8)  { animation-delay: .28s; }
.auth-rack-tiles > :nth-child(10) { animation-delay: .36s; }
.auth-rack-tiles > :nth-child(11) { animation-delay: .40s; }
.auth-rack-tiles > :nth-child(12) { animation-delay: .44s; }
@keyframes auth-tile-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

.auth-side .auth-hero-badges { justify-content: flex-start; }
.auth-side .ahb { font-size: 12.5px; padding: 6px 14px; }

/* ---------- Sağ bölme ---------- */
.auth-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 40px 32px;
  background: rgba(4, 18, 12, 0.55);
}
.auth-card.wizard-card { width: 100%; max-width: 420px; margin: 0; padding: 30px 30px 24px; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.auth-main .auth-card:has(#registerForm.active) { max-width: 520px; }

/* 3) boş mesaj kutusu yer kaplamasın (butonun üstündeki boşluk) */
.auth-form .test-result:empty { display: none; }
.auth-form .test-result { margin-top: 0; }

/* Alanlar: telefonda yakınlaştırma olmasın diye 16 px */
.auth-page .auth-form .form-field input { font-size: 16px; min-height: 46px; border-radius: 11px; }
.auth-page .auth-field label { font-size: 13px; }

/* 4) Şifreyi göster düğmesi */
.auth-pw-wrap { position: relative; display: block; }
.auth-page .auth-pw-wrap input { padding-right: 46px !important; }
.auth-pw-toggle {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; cursor: pointer; color: #6b746f; border-radius: 0 11px 11px 0;
  -webkit-tap-highlight-color: transparent;
}
.auth-pw-toggle:hover { color: var(--ok-green, #0b6e4f); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--ok-green, #0b6e4f); outline-offset: -3px; }
.auth-pw-toggle svg { width: 20px; height: 20px; }
.auth-pw-toggle .eye-off { display: none; }
.auth-pw-toggle.on .eye-on { display: none; }
.auth-pw-toggle.on .eye-off { display: block; }

/* 5) Büyük harf uyarısı */
.auth-caps-hint {
  display: none; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 12.5px; font-weight: 600; color: #8a5200;
  background: #fff4dc; border: 1px solid #f1d49a; border-radius: 8px; padding: 6px 10px;
}
.auth-caps-hint.show { display: flex; }

/* 6) Hatalar ilgili alanın altında */
.auth-field-err { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--ok-red, #c0392b); }
.auth-field-err.show { display: block; }
.auth-page .auth-field.has-err input { border-color: var(--ok-red, #c0392b); box-shadow: 0 0 0 3px rgba(192,57,43,0.12); }
.auth-form.shake { animation: auth-shake 0.32s ease; }
@keyframes auth-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Gönderilirken */
.auth-submit.is-busy { opacity: 0.85; cursor: progress; }
.auth-submit.is-busy::before {
  content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-switch-note { margin: 2px 0 0; text-align: center; font-size: 13.5px; color: var(--ok-muted, #6b7d74); }
.auth-switch-link { color: var(--ok-green, #0b6e4f); font-weight: 700; text-decoration: none; }
.auth-switch-link:hover { text-decoration: underline; }
.auth-remember-label span { font-weight: 700; }
.auth-page .auth-forgot-link-inline { color: var(--ok-green, #0b6e4f); font-weight: 700; }

/* 10) Alt bilgi */
.auth-foot { margin-top: 22px; text-align: center; font-size: 12.5px; line-height: 1.9; color: rgba(244,241,232,0.62); max-width: 420px; }
.auth-age-badge { display: inline-block; border: 1px solid rgba(255,255,255,0.4); border-radius: 6px; padding: 0 6px; margin-right: 4px; font-weight: 800; color: #fff; line-height: 1.5; }
.auth-foot-links a { color: rgba(244,241,232,0.85); text-decoration: none; }
.auth-foot-links a:hover { color: #fff; text-decoration: underline; }
.auth-foot-dot { margin: 0 7px; opacity: 0.6; }
.auth-page .ok-site-footer { position: relative; z-index: 1; }
.auth-page .maintenance-login-banner { position: relative; z-index: 2; margin-top: 16px; }

/* ---------- Tablet ve telefon: tek sütun ---------- */
@media (max-width: 959px) {
  .auth-layout { flex-direction: column; min-height: 0; }
  .auth-side { flex: none; background: none; padding: 58px 18px 0; gap: 10px; text-align: center; overflow: visible; }
  .auth-side::before { display: none; }
  .auth-hero { align-items: center; gap: 6px; }
  .auth-brand { flex-direction: column; gap: 6px; }
  .auth-brand h1 { font-size: 28px; }
  .auth-page .auth-brand .brand-logo.brand-logo-101 { height: 58px; }
  .auth-page .auth-brand .brand-logo:not(.brand-logo-101) { width: 56px; height: 56px; }
  .auth-tagline { font-size: 14px; max-width: 420px; }
  .auth-rack { display: none; }
  .auth-side .auth-hero-badges { justify-content: center; gap: 6px; }
  .auth-side .ahb { font-size: 11px; padding: 4px 10px; }
  .auth-main { flex: none; background: none; padding: 18px 16px 28px; justify-content: flex-start; }
  .auth-card.wizard-card { padding: 22px 20px 20px; }
}
/* 7) Küçük telefonlar: rozetler gizlenir, form hemen görünür */
@media (max-width: 520px) {
  .auth-side .auth-hero-badges { display: none; }
  .auth-side { padding-top: 54px; }
  .auth-brand h1 { font-size: 26px; }
  .auth-page .auth-brand .brand-logo.brand-logo-101 { height: 52px; }
  .auth-main { padding-top: 14px; }
}
@media (max-width: 380px) {
  .auth-card.wizard-card { padding: 18px 14px 16px; }
  .auth-remember-row { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-tile, .auth-form.shake, .auth-submit.is-busy::before { animation: none; }
}
/* Kayıt formu: bilgisayarda sağ bölme dar kalınca (960–1199 px) alanlar tek sütun olsun */
@media (min-width: 960px) and (max-width: 1199px) {
  .auth-page .auth-form .auth-form-grid { grid-template-columns: 1fr; }
}

/* ==================== ADIM 111/N — Kayıt formu ==================== */
.auth-page [hidden] { display: none !important; }
.auth-main .auth-card:has(#registerForm.active) { max-width: 460px; }

/* 9) Hediye şeridi en üstte */
.reg-gift {
  display: block; text-align: center; line-height: 1.4;
  background: linear-gradient(90deg, #fbf0cf, #f6e3a8); color: #5a4204; border: 1px solid #ecd48b;
  border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600;
}
.reg-gift strong { color: #3d2c00; font-weight: 800; }

/* 8) Adım göstergesi */
.reg-progress { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.reg-steps { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: #8a948e; }
.reg-step { display: flex; align-items: center; gap: 7px; }
.reg-step i {
  font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #e5e9e6; color: #6b746f; font-size: 12px; font-weight: 800; transition: background .2s, color .2s;
}
.reg-step.active { color: #10261c; }
.reg-step.active i { background: var(--ok-green, #0b6e4f); color: #fff; }
.reg-step.done i { background: #cfe5d8; color: #0b6e4f; font-size: 0; }
.reg-step.done i::before { content: "✓"; font-size: 12px; }
.reg-bar { height: 4px; background: #e5e9e6; border-radius: 999px; overflow: hidden; }
.reg-bar span { display: block; height: 100%; width: 50%; background: var(--ok-green, #0b6e4f); border-radius: 999px; transition: width .3s ease; }
#registerForm[data-step="2"] .reg-bar span { width: 100%; }
.reg-page { display: flex; flex-direction: column; gap: 14px; animation: reg-in .25s ease; }
@keyframes reg-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* 2, 3, 7) Alan altı hata / uygun / açıklama */
.auth-field-ok { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #0b6e4f; }
.auth-field-ok.show { display: block; }
.auth-page .auth-field.is-ok input { border-color: #7fbf9d; }
.reg-hint { display: block; margin-top: 6px; font-size: 12px; color: #7b877f; line-height: 1.4; }
.auth-field.has-err .reg-hint, .auth-field.is-ok .reg-hint { display: none; }
.auth-page .auth-field.has-err select { border-color: var(--ok-red, #c0392b); }
#re_terms_err { margin-top: -6px; }

/* 4) Şifre gücü */
.reg-meter { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.reg-meter span { flex: 1; max-width: 56px; height: 5px; border-radius: 999px; background: #e5e9e6; transition: background .2s; }
.reg-meter em { font-style: normal; font-size: 12px; font-weight: 700; color: #7b877f; margin-left: 6px; flex: 1 0 auto; }
.reg-meter[data-level="1"] span:nth-child(-n+1) { background: #d0492f; }
.reg-meter[data-level="2"] span:nth-child(-n+2) { background: #e08a1e; }
.reg-meter[data-level="3"] span:nth-child(-n+3) { background: #5aa55f; }
.reg-meter[data-level="4"] span:nth-child(-n+4) { background: #0b6e4f; }
.reg-meter[data-level="1"] em { color: #b43c25; }
.reg-meter[data-level="2"] em { color: #a4620f; }
.reg-meter[data-level="3"] em, .reg-meter[data-level="4"] em { color: #0b6e4f; }

/* 6) Telefon: ülke kodu + numara tek satır */
.reg-phone { display: flex; gap: 8px; }
.reg-cc { position: relative; flex: 0 0 104px; }
.reg-cc-view {
  display: flex; align-items: center; justify-content: center; gap: 4px; height: 100%; min-height: 46px; box-sizing: border-box;
  border: 1.5px solid var(--ok-border, #e3e8e4); border-radius: 11px; background: #fff; font-size: 15px; font-weight: 700; color: #1f2a24;
  padding-right: 16px; pointer-events: none;
}
.reg-cc-view::after { content: "▾"; position: absolute; right: 9px; font-size: 12px; color: #6b746f; }
.reg-cc select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.reg-cc select:focus + .reg-cc-view, .reg-cc:focus-within .reg-cc-view { border-color: var(--ok-green, #0b6e4f); box-shadow: 0 0 0 3px rgba(11,110,79,0.12); }
.reg-phone input { flex: 1 1 auto; min-width: 0; letter-spacing: .02em; }
.auth-page .auth-field.has-err .reg-cc-view { border-color: var(--ok-red, #c0392b); }

/* Doğum tarihi seçimleri (telefonda 16 px, 46 px yükseklik) */
.auth-page .dob-row select { font-size: 16px; min-height: 46px; border-radius: 11px; padding-left: 10px; padding-right: 6px; }
.auth-page .dob-row #re_dob_day { flex: 0.8 1 0; }
.auth-page .dob-row #re_dob_month { flex: 1.5 1 0; }
.auth-page .dob-row #re_dob_year { flex: 1 1 0; }

/* 8) Adım düğmeleri */
.reg-nav { display: flex; gap: 10px; }
.reg-nav .reg-back { flex: 0 0 auto; margin-top: 6px; padding: 13px 16px; border-radius: 12px; }
.reg-nav .auth-submit { flex: 1; }

/* 10) Koşullar / Gizlilik penceresi */
.reg-doc-modal { width: min(760px, 94vw); max-width: 760px; height: min(82vh, 820px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.reg-doc-modal iframe { flex: 1; width: 100%; border: 0; background: #fbfaf6; }
.reg-doc-foot { padding: 12px 16px; border-top: 1px solid #e7e3d8; background: #fff; display: flex; justify-content: flex-end; }
.reg-doc-modal .wd-modal-close { z-index: 2; }
.auth-terms-text a { white-space: nowrap; }

@media (max-width: 520px) {
  .reg-steps { font-size: 12px; }
  .reg-cc { flex-basis: 96px; }
  .reg-doc-modal { width: 100vw; height: 92vh; border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .reg-page { animation: none; } }
