/* =====================================================================
   Giris sayfasi v3 (login/index.php) - Bootstrap 5.3 uzerine ozel stiller
   Renk/olcu degiskenleri :root altinda; modallar kendi css dosyalarini kullanir.
   ===================================================================== */
:root {
  /* Logo laciverti (#292559) temel alinir */
  --lg-bg1: #0e0d2b;
  --lg-bg2: #292559;
  --lg-ink: #1f2340;
  --lg-muted: #6b7280;
  --lg-accent: #a9b8ff;
  --lg-accent-2: #c9d3ff;
  --lg-primary: #292559;
  --lg-primary-2: #3b357f;
  --lg-line: #e3e6ee;
  --lg-field: #f8f9fc;
  --lg-radius: 18px;
  --lg-card-w: 480px;
}

html, body { height: 100%; }

body.lg-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: var(--lg-bg1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Arka plan ---------- */
.lg-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #0e0d2b 0%, #1c1a4a 50%, #292559 100%);
}

/* Slayt gosterisi: login/img/arkaplan/ icindeki resimler sirayla gecer.
   Yalnizca opacity + transform animasyonu kullanilir (GPU katmani, yeniden boyama yok).
   .active  : ustte, solarak belirir ve kb-* hareketini oynatir
   .leaving : altta gorunur kalir, gecis bitince JS kaldirir (karartma dipi olmaz)
   digerleri: visibility:hidden -> compositing katmani olusturmaz */
.lg-slide {
  position: absolute;
  inset: -2%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 0, 0) scale(1.04);
  transition: opacity 2.4s ease-in-out, visibility 0s linear 2.4s;
  backface-visibility: hidden;
}
.lg-slide.leaving {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: none;
}
.lg-slide.active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transition: opacity 2.4s ease-in-out, visibility 0s;
  will-change: opacity, transform;
}
/* Hareket turleri: animasyon adi active -> leaving gecisinde degismez, hareket kesilmez */
.lg-slide.kb-1.active, .lg-slide.kb-1.leaving { animation: lgKb1 22s linear forwards; }
.lg-slide.kb-2.active, .lg-slide.kb-2.leaving { animation: lgKb2 22s linear forwards; }
.lg-slide.kb-3.active, .lg-slide.kb-3.leaving { animation: lgKb3 22s linear forwards; }
.lg-slide.kb-4.active, .lg-slide.kb-4.leaving { animation: lgKb4 22s linear forwards; }

@keyframes lgKb1 { /* yakinlasma */
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to   { transform: translate3d(0, 0, 0) scale(1.16); }
}
@keyframes lgKb2 { /* uzaklasma */
  from { transform: translate3d(1.5%, 1%, 0) scale(1.16); }
  to   { transform: translate3d(0, 0, 0) scale(1.04); }
}
@keyframes lgKb3 { /* yatay kayma */
  from { transform: translate3d(-3%, 0, 0) scale(1.12); }
  to   { transform: translate3d(3%, 0, 0) scale(1.12); }
}
@keyframes lgKb4 { /* capraz */
  from { transform: translate3d(2.5%, -2%, 0) scale(1.14); }
  to   { transform: translate3d(-2.5%, 2%, 0) scale(1.10); }
}

@media (prefers-reduced-motion: reduce) {
  .lg-slide { transition-duration: .6s; }
  .lg-slide.active, .lg-slide.leaving { animation: none; }
}

/* Fotograf uzerine lacivert kaplama */
.lg-bg.has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3; /* slaytlar 0-2, kaplama her zaman ustte */
  background: linear-gradient(180deg, rgba(14, 13, 43, .72) 0%, rgba(41, 37, 89, .80) 100%);
}

.lg-bg:not(.has-img)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(90, 84, 180, .35) 0%, transparent 70%),
    radial-gradient(50% 45% at 85% 80%, rgba(169, 184, 255, .14) 0%, transparent 70%),
    radial-gradient(40% 40% at 70% 15%, rgba(120, 140, 255, .16) 0%, transparent 70%);
}

/* Yildiz benekleri */
.lg-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, .9) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 8%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255, 215, 130, .9) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 36%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 64%, rgba(255, 255, 255, .7) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, rgba(255, 215, 130, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 72%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1px 1px at 42% 42%, rgba(255, 255, 255, .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 60%, rgba(255, 215, 130, .7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 24% 86%, rgba(255, 255, 255, .7) 50%, transparent 51%);
}

/* ---------- Sayfa iskeleti ---------- */
.lg-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 28px;
}

/* ---------- Logo (kart icinde, beyaz zemin uzerinde) ---------- */
.lg-card-logo {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}
.lg-card-logo img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* ---------- Kart ---------- */
.lg-card {
  position: relative;
  width: 100%;
  max-width: var(--lg-card-w);
  padding: 28px 30px 30px;
  border-radius: var(--lg-radius);
  background: #fff;
  color: var(--lg-ink);
  box-shadow: 0 30px 70px rgba(5, 3, 30, .45);
  overflow: hidden;
}

.lg-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--lg-primary) 30%, var(--lg-primary-2) 50%, var(--lg-primary) 70%, transparent 100%);
}

.lg-card-hint {
  margin: 0 0 18px;
  text-align: center;
  color: var(--lg-muted);
  font-size: 14px;
}

/* Sekmeler */
.lg-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: #f1f2f6;
  overflow-x: auto;
  scrollbar-width: none;
}
.lg-tabs::-webkit-scrollbar { display: none; }

.lg-tabs .nav-link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5b6170;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .18s ease;
}

.lg-tabs .nav-link:hover { color: var(--lg-ink); }

.lg-tabs .nav-link.active {
  background: #fff;
  color: var(--lg-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .10);
}

.lg-tabs .nav-link svg { width: 14px; height: 14px; flex: none; }

/* Form alanlari */
.lg-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lg-ink);
}

.lg-field { position: relative; margin-bottom: 16px; }

.lg-field .form-control {
  height: 48px;
  padding: 0 44px 0 44px;
  border: 1px solid var(--lg-line);
  border-radius: 10px;
  background: var(--lg-field);
  font-size: 14px;
  color: var(--lg-ink);
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.lg-field .form-control::placeholder { color: #a7adbb; }

.lg-field .form-control:focus {
  border-color: var(--lg-primary-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(41, 37, 89, .14);
}

.lg-field .lg-ico {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #9aa0ae;
  pointer-events: none;
}

.lg-field .lg-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa0ae;
  cursor: pointer;
}
.lg-field .lg-eye:hover { color: var(--lg-primary-2); background: #eef0f6; }
.lg-field .lg-eye svg { width: 18px; height: 18px; }

.lg-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #4b5563;
}
.lg-remember .form-check-input {
  width: 17px;
  height: 17px;
  margin: 0;
  border-color: #c9ced9;
  cursor: pointer;
}
.lg-remember .form-check-input:checked {
  background-color: var(--lg-primary-2);
  border-color: var(--lg-primary-2);
}
.lg-remember label { cursor: pointer; }

/* Butonlar */
.lg-btn-primary {
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lg-primary) 0%, var(--lg-primary-2) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(41, 37, 89, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
/* Ikon CSS ile verilir; giris.js buton metnini degistirdiginde kaybolmaz */
.lg-btn-primary::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lg-btn-primary:hover { filter: brightness(1.12); box-shadow: 0 14px 28px rgba(41, 37, 89, .42); color: #fff; }
.lg-btn-primary:active { transform: scale(.99); }
.lg-btn-primary:disabled { opacity: .75; cursor: wait; }

.lg-btn-outline {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--lg-primary-2);
  border-radius: 12px;
  background: #fff;
  color: var(--lg-primary-2);
  font-size: 14px;
  font-weight: 700;
  transition: all .15s ease;
}
.lg-btn-outline:hover { background: var(--lg-primary-2); color: #fff; }
.lg-btn-outline svg { width: 18px; height: 18px; }

/* Sekme icerikleri (e-Devlet / Sifremi unuttum) */
.lg-pane-info { text-align: center; padding: 6px 0 2px; }

.lg-pane-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ecedf7;
  color: var(--lg-primary);
}
.lg-pane-ico svg { width: 26px; height: 26px; }

.lg-pane-info h5 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.lg-pane-info p { margin: 0 0 18px; color: var(--lg-muted); font-size: 13.5px; line-height: 1.55; }

.lg-edevlet-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--lg-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
}
.lg-edevlet-btn:hover { border-color: #c8102e; box-shadow: 0 8px 20px rgba(200, 16, 46, .12); }
.lg-edevlet-btn:disabled { cursor: wait; }
.lg-edevlet-btn img { height: 40px; width: auto; display: block; margin: 0 auto; }

.lg-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: #8b93a5;
  text-align: center;
}

/* ---------- Kart alti cam paneller ---------- */
.lg-glass {
  width: 100%;
  max-width: var(--lg-card-w);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  color: #fff;
}

.lg-register {
  margin-top: 16px;
  padding: 13px 16px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
}
.lg-register button {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lg-accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.lg-register button:hover { color: var(--lg-accent-2); text-decoration: underline; }

.lg-card-link {
  margin-top: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--lg-card-w);
  text-align: left;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.lg-card-link:hover { background: rgba(255, 255, 255, .13); color: #fff; transform: translateY(-1px); }

.lg-card-link .lg-ico-box {
  flex: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  color: #c3ccff;
}
.lg-card-link .lg-ico-box svg { width: 20px; height: 20px; }

.lg-card-link .lg-txt { min-width: 0; }
.lg-card-link strong { display: block; font-size: 14.5px; font-weight: 700; }
.lg-card-link .lg-sub-txt { display: block; font-size: 12px; color: rgba(255, 255, 255, .65); margin-top: 2px; }

.lg-card-link .lg-chev {
  flex: none;
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.lg-card-link .lg-chev svg { width: 14px; height: 14px; }

.lg-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .45);
}
.lg-footer a { color: rgba(255, 255, 255, .6); text-decoration: none; }
.lg-footer a:hover { color: #fff; }

/* ---------- Bildirimler: Bootstrap 5 Toast (login/js/bildirim.js) ---------- */
.lg-toast-container { z-index: 2000; max-width: 380px; width: calc(100vw - 24px); }

.lg-toast {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--lg-ink);
  box-shadow: 0 14px 36px rgba(14, 13, 43, .28);
}
.lg-toast::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--lg-toast-renk, var(--lg-primary));
}
.lg-toast-govde {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 12px 16px;
}
.lg-toast-ikon {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--lg-toast-zemin, #ecedf7);
  color: var(--lg-toast-renk, var(--lg-primary));
}
.lg-toast-ikon svg { width: 18px; height: 18px; }
.lg-toast-metin { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.lg-toast-baslik { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; }
.lg-toast-mesaj { font-size: 13px; line-height: 1.45; color: #4b5563; margin-top: 2px; word-wrap: break-word; }
.lg-toast .btn-close { flex: none; margin: 2px 0 0 2px; padding: 6px; font-size: 11px; }

/* Otomatik kapanma gostergesi: sadece transform animasyonu */
.lg-toast-sure {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--lg-toast-renk, var(--lg-primary));
  opacity: .55;
  transform-origin: left;
  animation: lgToastSure linear forwards;
}
.lg-toast.lg-toast-dur .lg-toast-sure { animation-play-state: paused; }
@keyframes lgToastSure { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.lg-toast-success { --lg-toast-renk: #1f9d55; --lg-toast-zemin: #e6f6ec; }
.lg-toast-warning { --lg-toast-renk: #d97706; --lg-toast-zemin: #fdf1e0; }
.lg-toast-info    { --lg-toast-renk: var(--lg-primary-2); --lg-toast-zemin: #ecedf7; }
.lg-toast-error   { --lg-toast-renk: #dc2626; --lg-toast-zemin: #fdeaea; }

@media (max-width: 575.98px) {
  .lg-toast-container { max-width: none; padding: 12px !important; }
}

/* ---------- Duyarli ---------- */
@media (max-width: 575.98px) {
  .lg-wrap { padding: 20px 16px 20px; }
  .lg-card-logo img { max-width: 240px; }
  .lg-card { padding: 22px 18px 24px; border-radius: 16px; }
  .lg-tabs .nav-link { padding: 8px 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-card-link, .lg-btn-primary, .lg-tabs .nav-link { transition: none; }
}
