/* Mesaj Merkezi - arayüz. Ana renk her kurulumda Ayarlar'dan gelir (--ana). Dış kaynak yüklenmez. */
:root {
  --ana: #0b2f5b; --ana-koyu: #082345;
  --yesil: #0f8f55; --yesil-koyu: #0b7244; --yesil-acik: #dcfce7;
  --kirmizi: #dc2626; --kirmizi-koyu: #b91c1c; --kirmizi-acik: #fee2e2;
  --sari: #b45309; --sari-acik: #fef3c7; --mavi: #1d4ed8; --mavi-acik: #e7f2fb;
  --zemin: #f1f5f9; --kart: #fff; --cizgi: #e2e8f0; --cizgi-koyu: #cbd5e1;
  --yazi: #1e293b; --soluk: #64748b; --cok-soluk: #94a3b8;
  --yaricap: .6rem; --golge: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html:has(.giris-zemin) { background: var(--ana); }
body { margin: 0; background: var(--zemin); color: var(--yazi); font-size: 15px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
a { color: var(--ana); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; background: #f1f5f9; padding: .05rem .3rem; border-radius: .25rem; }

/* Yardımcılar */
.orta { text-align: center; } .sag-yasla { text-align: right; } .kalin { font-weight: 600; }
.soluk { color: var(--soluk); } .kucuk-yazi { font-size: .8rem; } .hata-yazi { color: var(--kirmizi); } .yesil-yazi { color: var(--yesil-koyu); }
.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-5 { margin-bottom: 1.25rem; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-5 { margin-top: 1.25rem; }
.gizli-yazi { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tam { width: 100%; } .nowrap { white-space: nowrap; } .kir { word-break: break-word; }
.dikey { display: flex; flex-direction: column; gap: 1rem; }
.dikey-dar { display: flex; flex-direction: column; gap: .5rem; }
.satir { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.satir > .esnek { flex: 1 1 14rem; min-width: 0; }
.ara-bosluk { margin-left: auto; }
.izgara-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; align-items: start; }
.izgara-alan { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.yan-duzen { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) { .yan-duzen { grid-template-columns: 22rem minmax(0, 1fr); } }

/* Üst çubuk ve menü */
.ust { background: var(--ana); color: #fff; }
.ust-ic { max-width: 96rem; margin: 0 auto; padding: .6rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.marka { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; min-width: 0; }
.marka img, .logo-harf { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #fff; object-fit: contain; flex: none; }
.logo-harf { display: inline-flex; align-items: center; justify-content: center; color: var(--ana); font-weight: 700; font-size: 1.2rem; }
.logo-harf.buyuk { width: 5.5rem; height: 5.5rem; font-size: 2.4rem; background: var(--ana); color: #fff; }
.marka-yazi { display: flex; flex-direction: column; min-width: 0; }
.marka-yazi strong { line-height: 1.2; } .marka-yazi small { font-size: .75rem; opacity: .75; }
.menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .15rem; margin-left: auto; font-size: .875rem; flex: 1 1 0; min-width: 0; }
.menu a { color: #fff; text-decoration: none; padding: .4rem .7rem; border-radius: .5rem; font-weight: 400;
  display: inline-flex; flex-direction: column; align-items: center; }
/* Seçili öğe kalın yazılır; görünmez kalın kopya her öğenin genişliğini sabit tutar, menü sayfadan sayfaya kaymaz. */
.menu a::after { content: attr(data-yazi); font-weight: 600; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.menu a:hover { background: rgba(255,255,255,.12); }
.menu a[aria-current] { background: #fff; color: var(--ana); font-weight: 600; }

/* Profil */
.kredi-rozet { flex: none; color: #fff; text-decoration: none; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; background: rgba(255,255,255,.14); white-space: nowrap; }
.kredi-rozet span { font-weight: 700; font-size: .9rem; }
.kredi-rozet:hover { background: rgba(255,255,255,.24); }
.profil { position: relative; flex: none; }
.profil-dugme { display: flex; align-items: center; padding: .15rem; border: 0; border-radius: 50%; background: none; }
.avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #fff; color: var(--ana); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.profil-dugme:hover .avatar, .profil-dugme:focus-visible .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
/* Üst boşluk fareyle düğmeden menüye geçerken menünün kapanmasını önler. */
.profil-menu { display: none; position: absolute; right: 0; top: 100%; padding-top: .4rem; z-index: 50; min-width: 14rem; }
.profil-kutu { background: #fff; border-radius: .6rem; overflow: hidden; box-shadow: 0 10px 25px rgba(15,23,42,.18); }
.profil.acik .profil-menu { display: block; }
@media (hover: hover) { .profil:hover .profil-menu { display: block; } }
.profil-bilgi { padding: .75rem 1rem; border-bottom: 1px solid var(--cizgi); display: flex; flex-direction: column; color: var(--yazi); }
.profil-bilgi small { color: var(--soluk); font-size: .75rem; }
.profil-menu a, .profil-menu button { display: block; width: 100%; text-align: left; padding: .6rem 1rem; color: var(--yazi); text-decoration: none; border: 0; background: none; font-size: .875rem; }
.profil-menu a:hover, .profil-menu button:hover, .profil-menu a[aria-current] { background: var(--zemin); }
.profil-menu #cikis { color: var(--kirmizi-koyu); }
.menu-dugme { display: none; margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: .5rem; padding: .4rem .8rem; }
@media (max-width: 900px) {
  .menu-dugme { display: inline-block; }
  .menu { display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; margin: 0; order: 3; }
  .menu a { align-items: flex-start; }
  .menu.acik { display: flex; }
}
.icerik { max-width: 96rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* Giriş */
.giris-zemin { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem 1rem 1rem; background: var(--ana); }
.giris-zemin .alt-bilgi { color: rgba(255,255,255,.75); border: 0; background: none; padding: 0; }
.giris-zemin .alt-bilgi a { color: #fff; }
.giris-marka { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-decoration: none; }
.baglanti-dugme { background: none; border: 0; padding: .25rem; color: var(--ana); font-size: .85rem; text-decoration: underline; align-self: center; }

/* Alt bilgi */
.alt-bilgi { flex: none; text-align: center; font-size: .78rem; color: var(--soluk); padding: 1rem; border-top: 1px solid var(--cizgi); background: var(--kart); }
.alt-bilgi a { color: inherit; font-weight: 600; text-decoration: none; }
.alt-bilgi a:hover { text-decoration: underline; }

/* Parolayı göster */
.parola-kap { position: relative; display: block; }
.parola-kap > .alan { padding-right: 2.8rem; }
.parola-goster { position: absolute; right: .25rem; top: .2rem; height: 2rem; width: 2.3rem; border: 0; border-radius: .4rem; background: none; color: var(--soluk); display: inline-flex; align-items: center; justify-content: center; }
.parola-goster:hover { background: var(--zemin); color: var(--yazi); }
.parola-goster svg { width: 1.15rem; height: 1.15rem; }
.giris-kutu.genis-kutu { max-width: 40rem; }
.giris-kutu { width: 100%; max-width: 24rem; background: #fff; border-radius: 1rem; box-shadow: 0 20px 40px rgba(0,0,0,.25); padding: 2rem; }
.giris-logo { width: 6rem; height: 6rem; object-fit: contain; border-radius: 50%; }
.giris-baslik { font-size: 1.15rem; color: var(--ana); margin-top: .75rem; }

/* Kart */
.kart { background: var(--kart); border-radius: .8rem; box-shadow: var(--golge); min-width: 0; }
.kart-ust { padding: 1rem; border-bottom: 1px solid var(--cizgi); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kart-govde { padding: 1rem; }
.kart-alt { padding: .5rem 1rem; border-top: 1px solid var(--cizgi); font-size: .8rem; color: var(--soluk); }
.baslik { font-size: 1.1rem; font-weight: 600; color: var(--ana); margin-right: auto; }
.baslik small { font-size: .85rem; font-weight: 400; color: var(--soluk); }
.alt-baslik { font-size: .95rem; font-weight: 600; color: var(--ana); }
.bolum + .bolum { margin-top: 1.25rem; }

/* Form */
label, .etiket { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .25rem; }
.alan { width: 100%; border: 1px solid var(--cizgi-koyu); border-radius: .5rem; padding: .5rem .7rem; font: inherit; font-size: .9rem; background: #fff; color: inherit; min-height: 2.4rem; }
textarea.alan { resize: vertical; min-height: 5rem; }
select.alan { padding-right: 2rem; }
.alan:focus { outline: 2px solid var(--ana); outline-offset: 1px; }
.alan.hatali { border-color: var(--kirmizi); background: #fff7f7; }
.alan[readonly] { background: #f8fafc; }
.alan-hata { color: var(--kirmizi); font-size: .78rem; margin-top: .25rem; }
.aciklama { font-size: .78rem; color: var(--soluk); margin-top: .25rem; }
.secim { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; font-size: .9rem; margin: 0; }
.secim input { width: 1rem; height: 1rem; accent-color: var(--ana); }
.genislik-kisa { max-width: 14rem; } .genislik-orta { max-width: 22rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .85rem; font-weight: 500; margin-bottom: .35rem; padding: 0; }
.kutu-liste { border: 1px solid var(--cizgi); border-radius: .5rem; max-height: 14rem; overflow-y: auto; }
.kutu-liste > label { display: flex; align-items: flex-start; gap: .5rem; padding: .4rem .7rem; margin: 0; font-weight: 400; font-size: .875rem; border-bottom: 1px solid #f1f5f9; }
.kutu-liste > label:last-child { border-bottom: 0; }
.kutu-liste > label > span:first-of-type { flex: 1; }

/* Düğmeler */
.dugme { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border-radius: .5rem; padding: .5rem .9rem; font-size: .875rem; font-weight: 600; border: 1px solid transparent; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.dugme:disabled { opacity: .45; }
.dugme-ana { background: var(--ana); color: #fff; } .dugme-ana:hover:not(:disabled) { background: var(--ana-koyu); }
.dugme-yesil { background: var(--yesil); color: #fff; } .dugme-yesil:hover:not(:disabled) { background: var(--yesil-koyu); }
.dugme-ikinci { background: #fff; color: var(--ana); border-color: var(--cizgi-koyu); } .dugme-ikinci:hover:not(:disabled) { background: #f1f5f9; }
.dugme-tehlike { background: var(--kirmizi); color: #fff; } .dugme-tehlike:hover:not(:disabled) { background: var(--kirmizi-koyu); }
.dugme-sil { color: var(--kirmizi) !important; }
.dugme.kucuk { padding: .3rem .6rem; font-size: .75rem; }
.dugmeler { display: flex; flex-wrap: wrap; gap: .5rem; } .dugmeler.sag { justify-content: flex-end; }
.islemler { white-space: nowrap; text-align: right; }
.islemler .dugme + .dugme { margin-left: .25rem; }
.cip { display: inline-flex; border: 1px solid var(--cizgi-koyu); background: #fff; color: var(--ana); border-radius: 999px; padding: .15rem .55rem; font-size: .75rem; font-family: ui-monospace, Consolas, monospace; }
.cip:hover { background: var(--mavi-acik); }

/* Aktif/pasif anahtarı: tek tıkla değişir */
.anahtar { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; background: none; border: 0; padding: .15rem 0; }
.anahtar i { position: relative; width: 2.1rem; height: 1.2rem; border-radius: 999px; background: var(--cizgi-koyu); transition: background .15s; flex: none; }
.anahtar i::after { content: ''; position: absolute; top: 2px; left: 2px; width: .95rem; height: .95rem; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.anahtar[aria-checked=true] i { background: var(--yesil); }
.anahtar[aria-checked=true] i::after { left: calc(100% - .95rem - 2px); }
.anahtar[aria-checked=true] { color: var(--yesil-koyu); } .anahtar[aria-checked=false] { color: var(--soluk); }
.anahtar:disabled { opacity: .5; }
.anahtar:focus-visible { outline: 2px solid var(--ana); outline-offset: 2px; border-radius: 999px; }

/* Tablo */
.tablo-kap { overflow: auto; }
.tablo-kap.yuksek { max-height: calc(100vh - 20rem); min-height: 22rem; }
.tablo { width: 100%; font-size: .875rem; }
.tablo th { position: sticky; top: 0; z-index: 1; background: #f8fafc; text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--soluk); padding: .55rem .75rem; box-shadow: 0 1px 0 var(--cizgi); white-space: nowrap; }
.tablo td { padding: .5rem .75rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.tablo tr.soluk-satir td { opacity: .6; }
.tablo td.bos { text-align: center; color: var(--cok-soluk); padding: 2rem; }
.tablo .alt-satir { display: block; font-size: .75rem; color: var(--soluk); }
.tablo input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--ana); }

/* Rozet */
.rozet { display: inline-block; border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; font-weight: 600; white-space: nowrap; border: 0; }
.rozet-yesil { background: var(--yesil-acik); color: #166534; } .rozet-sari { background: var(--sari-acik); color: #92400e; }
.rozet-kirmizi { background: var(--kirmizi-acik); color: #991b1b; } .rozet-mavi { background: var(--mavi-acik); color: var(--mavi); }
.rozet-gri { background: #f1f5f9; color: var(--soluk); } .rozet-mor { background: #ede9fe; color: #5b21b6; }
button.rozet:hover { filter: brightness(.96); }

/* Özet kutuları */
.ozetler { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.ozet { background: #fff; border-radius: .8rem; padding: .85rem 1rem; box-shadow: var(--golge); border-left: 4px solid var(--ana); }
.ozet p:first-child { font-size: .75rem; color: var(--soluk); }
.ozet p:last-child { font-size: 1.5rem; font-weight: 700; color: var(--ana); }
.ozet.yesil { border-color: var(--yesil); } .ozet.yesil p:last-child { color: var(--yesil); }
.ozet.sari { border-color: #f59e0b; } .ozet.sari p:last-child { color: var(--sari); }
.ozet.kirmizi { border-color: var(--kirmizi); } .ozet.kirmizi p:last-child { color: var(--kirmizi); }
.ozet.mavi { border-color: #3b82f6; } .ozet.mavi p:last-child { color: var(--mavi); }

.ilerleme { height: .6rem; border-radius: 999px; background: #e2e8f0; overflow: hidden; display: flex; }
.ilerleme span { display: block; height: 100%; }

/* Uyarı kutusu */
.uyari { border-radius: .6rem; padding: .75rem 1rem; font-size: .875rem; }
.uyari-hata { background: var(--kirmizi-acik); color: #991b1b; } .uyari-sari { background: var(--sari-acik); color: #78350f; }
.uyari-mavi { background: var(--mavi-acik); color: #1e3a8a; } .uyari-yesil { background: var(--yesil-acik); color: #14532d; }

/* WhatsApp balonu önizlemesi */
.balon { background: #e7f7ec; border-radius: .6rem; padding: .75rem; font-size: .875rem; white-space: pre-wrap; word-break: break-word; max-height: 16rem; overflow-y: auto; }

/* Pencere */
dialog.pencere { border: 0; border-radius: .9rem; padding: 0; width: calc(100% - 2rem); max-width: 34rem; box-shadow: 0 25px 50px rgba(0,0,0,.25); color: inherit; }
dialog.pencere.dar { max-width: 28rem; } dialog.pencere.genis { max-width: 52rem; }
dialog.pencere::backdrop { background: rgba(15,23,42,.55); }
.pencere-ic { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
.pencere-baslik { font-size: 1.1rem; font-weight: 600; color: var(--ana); }
.onay-metin { font-size: .9rem; color: #475569; white-space: pre-wrap; max-height: 20rem; overflow-y: auto; }

/* Bildirimler */
.bildirimler { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: min(24rem, calc(100% - 2rem)); }
.bildirim { color: #fff; font-size: .875rem; border-radius: .5rem; padding: .6rem 1rem; box-shadow: 0 8px 20px rgba(0,0,0,.2); background: var(--ana); }
.bildirim.basari { background: var(--yesil); } .bildirim.hata { background: var(--kirmizi); }

/* Sayfalama */
.sayfalama { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .6rem 1rem; border-top: 1px solid var(--cizgi); font-size: .8rem; color: var(--soluk); }

/* Medya ızgarası */
.medya-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; padding: 1rem; }
.medya-kart { border: 1px solid var(--cizgi); border-radius: .7rem; overflow: hidden; display: flex; flex-direction: column; }
.medya-kart.pasif { opacity: .6; }
.medya-onizleme { aspect-ratio: 16 / 10; background: #0f172a; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.medya-onizleme img, .medya-onizleme video { width: 100%; height: 100%; object-fit: contain; }
.medya-bilgi { padding: .7rem; display: flex; flex-direction: column; gap: .4rem; font-size: .8rem; flex: 1; }
.kopya-satir { flex-wrap: nowrap; } .kopya-satir > .alan { flex: 1 1 0; min-width: 0; font-size: .75rem; min-height: 2rem; padding: .3rem .5rem; }

/* Eşleme tablosu (yükleme önizlemesi) */
.esleme td { vertical-align: middle; }
.esleme select { min-width: 11rem; }

@media print { .ust, .bildirimler, .alt-bilgi { display: none; } }
