/* Uygulama ile aynı giriş/kayıt görünümü — site auth sayfaları */
:root {
  --bg: #f5f7fb;
  --bg-elev: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --ok: #059669;
  --ok-50: #ecfdf5;
  --radius-sm: 10px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-elev: #111733;
    --text: #e6e8f1;
    --text-muted: #9aa3c0;
    --text-soft: #6c7796;
    --border: #1f2747;
    --border-strong: #2d3868;
    --primary-50: #1c1f48;
    --primary-100: #232a5a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body.auth-page-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Inter", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}

body.auth-page-body.auth-locked { overflow: hidden; }

button { font: inherit; color: inherit; cursor: pointer; }
input, button { font: inherit; }
a { color: var(--primary); text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.hidden { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 15px;
  background: var(--bg-elev);
  color: var(--text);
  transition: transform .05s, background .15s, border-color .15s, box-shadow .15s, color .15s;
  min-height: 48px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, .25);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-600); border-color: var(--primary-600); }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  overflow-y: auto;
}

@media (prefers-color-scheme: dark) {
  .auth-gate {
    background: linear-gradient(135deg, #0b1024 0%, #1c1f48 100%);
  }
}

.auth-site-strip {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1600;
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
}
.auth-site-strip a { color: var(--text-muted); text-decoration: underline; }
.auth-site-strip a:hover { color: var(--primary); }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .12), 0 6px 20px rgba(0, 0, 0, .06);
  animation: authCardIn .35s cubic-bezier(.2, .7, .2, 1);
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
  flex-shrink: 0;
}

.auth-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.auth-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.auth-subtitle { margin: 2px 0 0; font-size: 11px; color: var(--text-muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.auth-tab {
  background: transparent;
  border: 0;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-active {
  background: var(--bg-elev);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form.hidden { display: none; }
.auth-form-title { margin: 0; font-size: 18px; font-weight: 800; }
.auth-form-desc { margin: -4px 0 8px; font-size: 13px; color: var(--text-muted); line-height: 1.45; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.auth-field input[type="email"],
.auth-field input[type="text"],
.auth-field input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.auth-pw-wrap { position: relative; }
.auth-pw-wrap input { padding-right: 42px; }
.auth-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.auth-pw-toggle:hover { background: var(--primary-50); color: var(--primary); }

.auth-hint { font-size: 12px; color: var(--text-muted); }
.auth-error {
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
  min-height: 1em;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.auth-submit {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}

.auth-foot {
  margin: 8px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--text-muted);
}
.auth-link {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-card { padding: 22px 20px 18px; border-radius: 14px; }
  .auth-logo { width: 52px; height: 52px; }
  .auth-title { font-size: 20px; }
}
