/* =========================================================
   Giriş / Kayıt ortak stiller
   Header (kredi, posta) bu ekranlarda yok.
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-page {
  font-family: var(--font-ui);
  color: var(--color-text);
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: #1a3a28;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.08) 35%, rgba(0, 0, 0, 0.42) 100%),
    url("../assets/auth-bg.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  gap: var(--space-md);
}

/* Marka: logo + başlık */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: var(--space-md);
}

.auth-logo {
  width: min(148px, 36vw);
  height: auto;
  display: block;
  background: transparent;
  /* Beyaz kutu yok; gölgeyle arka plandan ayrılır */
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}

.auth-brand h1 {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 6.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--color-title);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.75),
    0 4px 10px rgba(0, 0, 0, 0.45);
}

/* Parchment form kutusu + 5px iç çerçeve */
.auth-box {
  position: relative;
  width: 100%;
  max-width: var(--auth-box-max);
  background: linear-gradient(180deg, #f6ebcf 0%, var(--color-parchment) 55%, #ead4ad 100%);
  border: 2px solid var(--color-parchment-border);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow-box);
  /* Dış padding; iç çizgi outline ile 5px içeride */
  padding: calc(var(--space-xl) + 4px) calc(var(--space-lg) + 6px) calc(var(--space-xl) - 4px) calc(var(--space-lg) + 6px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-box::before {
  content: "";
  position: absolute;
  inset: var(--auth-inset);
  border: 1.5px solid var(--color-parchment-inset);
  border-radius: calc(var(--radius-box) - 4px);
  pointer-events: none;
}

/* Box içi Giriş / Kayıt sekmeleri */
.auth-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(140, 110, 70, 0.14);
  border: 1px solid var(--color-parchment-inset);
}

.auth-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  color: var(--color-text-muted);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-tab:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.28);
}

.auth-tab.is-active {
  color: var(--color-on-primary);
  background: linear-gradient(180deg, #4a97f5 0%, #2a78e0 45%, var(--color-primary) 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 3px 0 var(--color-primary-press),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.auth-tab:focus-visible {
  outline: 3px solid rgba(30, 111, 217, 0.45);
  outline-offset: 2px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-field input {
  width: 100%;
  padding: 15px 16px;
  font-family: var(--font-ui);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-control);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-field input::placeholder {
  color: var(--color-text-muted);
  font-weight: 500;
}

.auth-field input:focus {
  border-color: var(--color-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(30, 111, 217, 0.25);
}

/* Birincil CTA — daha belirgin 3D */
.auth-btn {
  margin-top: 0px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: none;
  border-radius: var(--radius-control);
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-on-primary);
  background: linear-gradient(180deg, #4a97f5 0%, #2a78e0 42%, var(--color-primary) 78%, var(--color-primary-dark) 100%);
  box-shadow:
    0 5px 0 var(--color-primary-press),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.auth-btn:hover {
  filter: brightness(1.04);
}

.auth-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 var(--color-primary-press),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-btn:focus-visible {
  outline: 3px solid rgba(30, 111, 217, 0.45);
  outline-offset: 2px;
}

@media (min-width: 480px) {
  .auth-box {
    padding: calc(var(--space-xl) + 8px) calc(var(--space-xl) + 4px) calc(var(--space-xl) - 8px) calc(var(--space-xl) + 4px);
  }
}

/* Alt bilgi linkleri — sayfalar sonra */
.auth-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: auto;
  padding: var(--space-sm) 4px var(--space-xs);
}

.auth-footer a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.auth-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-footer a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}