/* ==========================================================
   Modern Auth (Giriş / Kayıt) — split layout
   Sol: görsel paneli · Sağ: form
   ========================================================== */

.auth-shell {
  --a-ink: #141310;
  --a-accent: #f97316;
  --a-accent-text: #ea580c;
  --a-grad: linear-gradient(100deg, #f97316 0%, #ec4899 48%, #8b5cf6 100%);
  --a-text: #1a1a2e;
  --a-muted: #6b7280;
  --a-border: #ece9e1;
  --a-field: #faf9f6;
  --a-card: #ffffff;
  --a-bg: #fbfaf7;
  --a-panel: #f4f1ea;
  --a-ring: rgba(20, 19, 16, .08);
  --a-danger-bg: #fef2f2;
  --a-danger: #b91c1c;
  --a-success-bg: #f0fdf4;
  --a-success: #166534;

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 48px;
  background: var(--a-bg);
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--a-text);
}

body.dark-mode .auth-shell {
  --a-text: #f5f5f5;
  --a-muted: #a1a1aa;
  --a-border: #2a2a2a;
  --a-field: #1c1c1c;
  --a-card: #141414;
  --a-bg: #0b0b0b;
  --a-ring: rgba(255, 255, 255, .12);
  --a-ink: #ffffff;
  --a-accent-text: #fb923c;
  --a-panel: #101010;
  --a-danger-bg: rgba(220, 38, 38, .12);
  --a-danger: #fca5a5;
  --a-success-bg: rgba(22, 163, 74, .12);
  --a-success: #86efac;
}

.auth-split {
  width: 100%;
  max-width: 1120px;
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--a-card);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--a-border);
  box-shadow: 0 30px 70px -30px rgba(20, 19, 16, .18);
}

/* ---------- Sol: görsel paneli (ana sayfa hero stili) ---------- */
.auth-visual {
  position: relative;
  margin: 12px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  color: var(--a-text);
  background:
    radial-gradient(circle at 12% 8%, rgba(249, 115, 22, .10), transparent 42%),
    radial-gradient(circle at 92% 96%, rgba(139, 92, 246, .10), transparent 45%),
    var(--a-panel);
}

.auth-visual__ghost {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: -1;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(160px, 20vw, 300px);
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
  /* Kontur yerine dolgu: variable font'ta text-stroke harf içi kesişim çizgileri çiziyordu */
  color: transparent;
  background: linear-gradient(100deg, rgba(249, 115, 22, .16) 0%, rgba(236, 72, 153, .12) 55%, rgba(139, 92, 246, .12) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
  user-select: none;
  animation: authDrift 24s ease-in-out infinite alternate;
}

@keyframes authDrift {
  from { transform: translate(-56%, -50%); }
  to { transform: translate(-44%, -50%); }
}

.auth-visual__img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-visual.has-image { color: #fff; }

.auth-visual.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 19, 16, 0) 35%, rgba(20, 19, 16, .82) 100%);
}

.auth-visual__content { position: relative; }

.auth-visual__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--a-muted);
}

.auth-visual__kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.auth-visual__title {
  margin: 16px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
  color: var(--a-text);
}

.auth-visual__title span { display: block; font-size: clamp(34px, 3.6vw, 48px); }

.auth-visual__title em {
  display: block;
  padding-bottom: 4px;
  font-style: normal;
  font-size: clamp(40px, 4.4vw, 60px);
  background: var(--a-grad);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: authGradient 8s ease-in-out infinite;
}

@keyframes authGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.auth-visual p {
  margin: 0;
  max-width: 400px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--a-muted);
}

.auth-visual.has-image .auth-visual__kicker,
.auth-visual.has-image p,
.auth-visual.has-image .auth-visual__stats small { color: rgba(255, 255, 255, .72); }
.auth-visual.has-image .auth-visual__title span,
.auth-visual.has-image .auth-visual__stats strong { color: #fff; }

/* Görsel yokken gösterilen bildirim kartları */
.auth-visual__deco {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 300px;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--a-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(20, 19, 16, .18);
  font-size: 13px;
  line-height: 1.35;
  animation: authFloat 6s ease-in-out infinite;
}

.auth-bubble:nth-child(2) { margin-left: auto; animation-delay: -2s; }
.auth-bubble:nth-child(3) { margin-left: 40px; animation-delay: -4s; }

.auth-bubble__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--a-grad);
}

.auth-bubble strong { display: block; font-size: 13px; color: var(--a-text); }
.auth-bubble span { color: var(--a-muted); font-size: 12px; }

@keyframes authFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.auth-visual__stats {
  display: flex;
  align-items: center;
  margin-top: 28px;
}

.auth-visual__stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 22px;
}

.auth-visual__stats > div:first-child { padding-left: 0; }

.auth-visual__stats i {
  width: 1px;
  height: 28px;
  background: #e2e0d9;
}

.auth-visual__stats strong {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--a-text);
}

.auth-visual__stats small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--a-muted);
}

body.dark-mode .auth-bubble { background: rgba(28, 28, 28, .85); }
body.dark-mode .auth-visual__stats i { background: #2a2a2a; }
body.dark-mode .auth-visual__ghost {
  color: transparent !important;
  background-image: linear-gradient(100deg, rgba(251, 146, 60, .16) 0%, rgba(236, 72, 153, .13) 55%, rgba(139, 92, 246, .14) 100%);
}

/* ---------- Sağ: form paneli ---------- */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}

.auth-panel__inner {
  width: 100%;
  max-width: 400px;
}

.auth-panel__logo img {
  height: 36px;
  display: block;
}

.auth-panel__logo .auth-logo--dark { display: none; }
body.dark-mode .auth-panel__logo .auth-logo--light { display: none; }
body.dark-mode .auth-panel__logo .auth-logo--dark { display: block; }

.auth-panel__head {
  margin: 28px 0 24px;
}

.auth-panel__head h1 {
  margin: 0 0 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--a-text);
}

.auth-panel__head p {
  margin: 0;
  font-size: 15px;
  color: var(--a-muted);
}

/* Segment sekmeleri */
.auth-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--a-field);
  border: 1px solid var(--a-border);
}

.auth-seg a {
  text-align: center;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--a-muted);
  text-decoration: none;
  transition: color .2s, background .2s, box-shadow .2s;
}

.auth-seg a:hover { color: var(--a-text); }

.auth-seg a.is-active {
  background: var(--a-card);
  color: var(--a-text);
  box-shadow: 0 1px 3px rgba(20, 19, 16, .1);
}

/* Alanlar */
.auth-field { margin-bottom: 16px; }

.auth-field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--a-text);
}

.auth-field__label small {
  font-size: 12px;
  font-weight: 400;
  color: var(--a-muted);
}

.auth-input {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  gap: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--a-border);
  background: var(--a-field);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-input:focus-within {
  border-color: var(--a-ink);
  background: var(--a-card);
  box-shadow: 0 0 0 4px var(--a-ring);
}

.auth-input > svg {
  flex-shrink: 0;
  color: var(--a-muted);
}

.auth-input:focus-within > svg { color: var(--a-ink); }

.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--a-text);
}

.auth-input input::placeholder { color: #94a3b8; }

/* dark-mode.css'teki global `body.dark-mode input {... !important}` kurallarını nötrle */
body.dark-mode .auth-shell .auth-input input,
body.dark-mode .auth-shell .auth-input input:focus,
body.dark-mode #forgotPasswordModal .auth-input input {
  background: transparent !important;
  border: 0 !important;
  color: var(--a-text) !important;
}

body.dark-mode .auth-shell .auth-modal__box {
  background: var(--a-card) !important;
  border: 1px solid var(--a-border) !important;
}

body.dark-mode .auth-shell .auth-split {
  box-shadow: 0 0 0 1px var(--a-border), 0 24px 64px -16px rgba(0, 0, 0, .6);
}

.auth-input input:-webkit-autofill {
  -webkit-text-fill-color: var(--a-text);
  -webkit-box-shadow: 0 0 0 1000px var(--a-field) inset;
  transition: background-color 9999s;
}

.auth-eye {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--a-muted);
  cursor: pointer;
}

.auth-eye:hover { background: var(--a-border); color: var(--a-text); }

/* Butonlar */
.auth-btn-primary {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--a-ink);
  color: var(--a-card);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.auth-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(20, 18, 14, .4);
}

.auth-btn-primary:active { transform: translateY(0); }
.auth-btn-primary:disabled { opacity: .7; cursor: not-allowed; }

.auth-btn-primary svg { transition: transform .2s; }
.auth-btn-primary:hover svg { transform: translateX(3px); }

.auth-btn-google {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: 1.5px solid var(--a-border);
  background: var(--a-card);
  color: var(--a-text);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.auth-btn-google:hover { background: var(--a-field); border-color: #d6d2c7; }

.auth-btn-ghost {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--a-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.auth-btn-ghost:hover { color: var(--a-text); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--a-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

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

/* Yardımcılar */
.auth-link {
  color: var(--a-accent-text);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.auth-link:hover { text-decoration: underline; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 16px;
  font-size: 14px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--a-muted);
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--a-accent);
  cursor: pointer;
}

.auth-center { text-align: center; margin-top: 14px; font-size: 14px; }

.auth-foot {
  margin: 28px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--a-muted);
}

.auth-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  background: var(--a-danger-bg);
  color: var(--a-danger);
}

.auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert--success { background: var(--a-success-bg); color: var(--a-success); }

/* 2. adımdaki kullanıcı chip'i */
.auth-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--a-field);
  border: 1px solid var(--a-border);
  font-size: 14px;
}

.auth-chip__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--a-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.auth-chip #displayLogin {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--a-text);
}

.auth-chip button {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.auth-chip button:hover { background: var(--a-card); text-decoration: none; }

.auth-step { animation: authIn .3s ease; }

@keyframes authIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.auth-turnstile { margin-bottom: 12px; }

/* Şifre güç göstergesi */
.auth-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.auth-strength i {
  height: 4px;
  border-radius: 4px;
  background: var(--a-border);
  transition: background .25s;
}

.auth-strength[data-level="1"] i:nth-child(-n+1) { background: #ef4444; }
.auth-strength[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.auth-strength[data-level="3"] i:nth-child(-n+3) { background: #eab308; }
.auth-strength[data-level="4"] i:nth-child(-n+4) { background: #22c55e; }

.auth-terms {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: var(--a-muted);
}

/* ---------- Şifremi unuttum modalı ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 19, 16, .55);
  backdrop-filter: blur(4px);
}

.auth-modal__box {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  border-radius: 20px;
  background: var(--a-card);
  color: var(--a-text);
  box-shadow: 0 24px 64px -12px rgba(20, 19, 16, .35);
  animation: authIn .25s ease;
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--a-muted);
  font-size: 22px;
  cursor: pointer;
}

.auth-modal__close:hover { background: var(--a-field); color: var(--a-text); }

.auth-modal__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(249, 115, 22, .14);
  color: var(--a-accent-text);
}

.auth-modal h2 { margin: 0 0 6px; font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--a-text); }
.auth-modal p.auth-modal__sub { margin: 0 0 22px; font-size: 14px; color: var(--a-muted); }
.auth-modal .auth-alert { display: none; }

.auth-input--code input {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .auth-panel { padding: 40px 36px; }
  .auth-visual { padding: 32px; }
  .auth-visual__deco { left: 32px; right: 32px; }
}

@media (max-width: 860px) {
  .auth-shell { padding: 96px 16px 32px; align-items: flex-start; }
  .auth-split { grid-template-columns: 1fr; min-height: 0; max-width: 480px; border-radius: 24px; }
  .auth-visual { display: none; }
  .auth-panel { padding: 32px 24px; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 28px 18px; }
  .auth-panel__head h1 { font-size: 24px; }
  .auth-modal__box { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-bubble, .auth-step, .auth-modal__box, .auth-visual__ghost, .auth-visual__title em { animation: none; }
}
