/* ============================================================
   Modern Auth (Just Eat tarzı) — ortalanmış temiz kart düzeni.
   Site style.css :root değişkenlerini kullanır. JS sözleşme sınıfları
   (auth-ajax, auth-input-wrap, auth-toggle-pass, auth-alert) korunur.
   ============================================================ */

.auth2-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--text, #333);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(243, 156, 18, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(192, 57, 43, 0.10), transparent 55%),
    var(--cream, #faf7f2);
}

/* Üst header çubuğu (site logosu + geri butonu) */
.auth2-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--cream-dark, #eadfce);
  box-shadow: 0 1px 10px rgba(26, 26, 46, 0.04);
}
.auth2-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.auth2-header-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid var(--cream-dark, #eadfce);
  background: #fff;
  color: var(--dark, #1a1a2e);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.auth2-header-back:hover { background: var(--cream, #faf7f2); border-color: #ddc9aa; color: var(--primary, #c0392b); }
.auth2-header-back .auth2-back-text { display: inline; }
.auth2-header-logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--dark, #1a1a2e);
  text-decoration: none;
}
.auth2-header-logo span { color: var(--primary, #c0392b); }
.auth2-header-logo img { height: 38px; width: auto; display: block; }

.auth2-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

@media (max-width: 520px) {
  .auth2-header-inner { height: 56px; padding: 0 0.85rem; }
  .auth2-header-back .auth2-back-text { display: none; }
  .auth2-header-back { padding: 0.5rem 0.65rem; }
  .auth2-header-logo { font-size: 1.2rem; }
}

/* Kart */
.auth2-card {
  width: 100%;
  max-width: 460px;
  background: var(--white, #fff);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(26, 26, 46, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 2.5rem 2.25rem;
}
@media (max-width: 520px) {
  .auth2-card { padding: 1.75rem 1.35rem; border-radius: 20px; }
}

/* Marka */
.auth2-brand {
  display: block;
  text-align: center;
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--dark, #1a1a2e);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.auth2-brand span { color: var(--primary, #c0392b); }

/* Başlık */
.auth2-head { text-align: center; margin-bottom: 1.5rem; }
.auth2-head h1 {
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
  color: var(--dark, #1a1a2e);
}
.auth2-head p { color: var(--text-muted, #6c757d); margin: 0; font-size: 0.96rem; }

/* Sosyal buton */
.auth2-social { display: flex; flex-direction: column; gap: 0.65rem; }
.auth2-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--cream-dark, #eadfce);
  border-radius: 14px;
  background: #fff;
  color: var(--dark, #1a1a2e);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.auth2-social-btn:hover:not(:disabled) { background: var(--cream, #faf7f2); border-color: #ddc9aa; }
.auth2-social-btn:active:not(:disabled) { transform: translateY(1px); }
.auth2-social-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth2-social-btn .g-icon { color: #ea4335; font-size: 1.15rem; }
.auth2-social-btn small { color: var(--text-muted, #6c757d); font-weight: 500; }

/* Ayraç */
.auth2-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.4rem 0;
  color: var(--text-muted, #9aa0a6);
  font-size: 0.85rem;
}
.auth2-divider::before, .auth2-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark, #eadfce);
}

/* Form */
.auth2-form { display: flex; flex-direction: column; gap: 1rem; }
.auth2-row { display: flex; gap: 0.75rem; }
.auth2-row > * { flex: 1; }

.auth2-field { display: flex; flex-direction: column; gap: 0.4rem; }
.auth2-field > label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark, #1a1a2e);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap > i:first-child {
  position: absolute;
  left: 1rem;
  color: var(--text-muted, #9aa0a6);
  font-size: 0.95rem;
  pointer-events: none;
}
.auth2-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.7rem;
  border: 1.5px solid var(--cream-dark, #eadfce);
  border-radius: 14px;
  background: var(--cream, #faf7f2);
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--text, #333);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth2-input::placeholder { color: #b9b2a6; }
.auth2-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--primary, #c0392b);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.10);
}
.auth-toggle-pass {
  position: absolute;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted, #9aa0a6);
  cursor: pointer;
  padding: 0.35rem;
  font-size: 0.95rem;
}
.auth-toggle-pass:hover { color: var(--primary, #c0392b); }

/* Meta satırı */
.auth2-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-top: -0.15rem;
}
.auth2-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted, #6c757d);
  cursor: pointer;
  user-select: none;
}
.auth2-check input { accent-color: var(--primary, #c0392b); width: 16px; height: 16px; }
.auth2-link { color: var(--primary, #c0392b); text-decoration: none; font-weight: 600; }
.auth2-link:hover { text-decoration: underline; }

/* Onay kutusu (kayıt) */
.auth2-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted, #6c757d);
  line-height: 1.45;
}
.auth2-terms input { margin-top: 0.15rem; accent-color: var(--primary, #c0392b); width: 16px; height: 16px; flex: none; }

/* Gönder butonu */
.auth2-submit {
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary, #c0392b), var(--primary-dark, #96281b));
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.28);
  transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
  margin-top: 0.25rem;
}
.auth2-submit:hover { box-shadow: 0 10px 26px rgba(192, 57, 43, 0.36); }
.auth2-submit:active { transform: translateY(1px); }
.auth2-submit:disabled { opacity: 0.7; cursor: default; }

/* Alt geçiş */
.auth2-switch {
  text-align: center;
  margin: 1.5rem 0 0;
  color: var(--text-muted, #6c757d);
  font-size: 0.94rem;
}
.auth2-switch a { color: var(--primary, #c0392b); font-weight: 700; text-decoration: none; }
.auth2-switch a:hover { text-decoration: underline; }

/* Uyarı kutusu (auth.js ile uyumlu) */
.auth-alert {
  display: none;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.auth-alert.is-error { background: #fdecec; color: #c0392b; }
.auth-alert.is-success { background: #e9f7ef; color: #1e7e45; }
.auth-alert.is-info { background: #eef4fd; color: #2d6cdf; }

/* Alt güven rozetleri */
.auth2-trust {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  color: var(--text-muted, #9aa0a6);
  font-size: 0.8rem;
}
.auth2-trust span { display: inline-flex; align-items: center; gap: 0.35rem; }
