/* =============================================================================
   ENERVON BRAND SYSTEM v1.0 — oturum ekranları
   -----------------------------------------------------------------------------
   Giriş, iki adımlı doğrulama, parola değiştirme, ek parola ve çıkış sayfaları
   _header.ejs'i kullanmaz. Ham marka token'larını (--mint-*, --teal-*, --ink-*,
   --r-*, --font-sans) enervon-brand.css'in :root bloğundan alır; bu dosya ondan
   SONRA yüklenmelidir. <html> üzerinde brand-v1 sınıfı YOKTUR — uygulama bileşen
   kuralları (.card, .btn, .field …) bu sayfalara dokunmaz.

   Her zaman koyu: marka kitinin koyu yüzeyi (ink-1000), mint birincil eylem,
   teal bağlantı ve odak.
   ============================================================================= */

body.auth,
body.auth *,
body.auth *::before,
body.auth *::after { box-sizing: border-box; }

body.auth {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--ink-1000);
  color: var(--ink-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.auth ::selection { background: rgba(74,195,149,0.30); color: var(--ink-0); }

/* ── Sahne: mint + teal ışık, mimari ızgara, sinyal işareti filigranı ───────── */
.auth-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(56rem 38rem at 8% 0%, rgba(74,195,149,0.15), transparent 62%),
    radial-gradient(52rem 40rem at 100% 100%, rgba(17,112,153,0.30), transparent 64%),
    var(--ink-1000);
}
.auth-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 80%);
}
.auth-scene::after {
  content: '';
  position: absolute;
  width: min(62rem, 130vw);
  aspect-ratio: 1;
  right: -16rem;
  bottom: -20rem;
  background: url('/assets/brand/enervon-signal.svg') center / contain no-repeat;
  opacity: 0.07;
}
.auth-scene--center::after { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: min(52rem, 140vw); opacity: 0.06; }

/* ── Tek kartlı düzen (2FA, parola, ek parola, çıkış) ───────────────────────── */
.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem;
}
.auth-logo { display: block; height: 20px; width: auto; }

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 2.2rem 2rem 1.9rem;
  background: rgba(18,26,36,0.84);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
  box-shadow: 0 28px 64px -24px rgba(0,0,0,0.75), 0 0 0 1px rgba(0,0,0,0.25);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.auth-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74,195,149,0.55), transparent);
}
.auth-card--center { text-align: center; }

.auth-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: rgba(74,195,149,0.10);
  border: 1px solid rgba(74,195,149,0.28);
  color: var(--mint-300);
}

.auth-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink-50);
  text-align: center;
}
.auth-sub {
  margin: 0.45rem 0 1.5rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-400);
  text-align: center;
}

/* ── Uyarılar — yeşil onaylar, amber uyarır, kırmızı durdurur ──────────────── */
.auth-alert {
  margin: 0 0 1.1rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}
.auth-alert--err  { background: rgba(229,72,77,0.13);  border-color: rgba(229,72,77,0.36);  color: #F0676B; }
.auth-alert--ok   { background: rgba(74,195,149,0.12); border-color: rgba(74,195,149,0.32); color: var(--mint-300); }
.auth-alert--warn { background: rgba(242,166,58,0.12); border-color: rgba(242,166,58,0.34); color: #F2A63A; }

/* ── Form ───────────────────────────────────────────────────────────────────── */
.auth-label {
  display: block;
  margin: 0.9rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-300);
}
.auth-input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  background: var(--ink-800);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-md);
  color: var(--ink-50);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.auth-input:hover { border-color: rgba(255,255,255,0.18); }
.auth-input:focus {
  border-color: var(--teal-300);
  box-shadow: 0 0 0 3px rgba(84,156,186,0.35);
  background: #1E2935;
}
.auth-input--code {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  letter-spacing: 0.35em;
}
.auth-hint { margin-top: 0.35rem; font-size: 0.73rem; line-height: 1.45; color: var(--ink-500); }

/* ── Butonlar — pill; birincil = mint dolgu + koyu metin ───────────────────── */
.auth-btn {
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.85rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--mint-400);
  color: var(--ink-1000);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(74,195,149,0.65);
  transition: background 0.15s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.auth-btn:hover { background: var(--mint-500); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(84,156,186,0.45); }
.auth-btn:disabled { opacity: 0.7; cursor: progress; }
.auth-btn--ghost {
  background: transparent;
  color: var(--ink-100);
  border-color: rgba(255,255,255,0.16);
  box-shadow: none;
}
.auth-btn--ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.24); }

/* ── Kart altı ──────────────────────────────────────────────────────────────── */
.auth-foot {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-500);
}
.auth-foot a,
.auth-linkbtn {
  color: var(--teal-300);
  text-decoration: none;
}
.auth-foot a:hover,
.auth-linkbtn:hover { color: var(--teal-200); text-decoration: underline; text-underline-offset: 2px; }
/* Çıkış POST ile yapılır (GET çıkış zorla-oturum-kapatmaya açıktı); buton bağlantı gibi görünür. */
.auth-foot form { display: inline; }
.auth-linkbtn { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }

@media (max-width: 480px) {
  .auth-card { padding: 1.8rem 1.35rem 1.6rem; border-radius: var(--r-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-btn { transition: none; }
}
