/* Sirius Panel arayüzü. Ölçüler ve renkler: TASARIM.md. Çerçeve yok; satır içi style yok (CSP). */
:root {
  --yazi: #191d33;
  --menu: #3b4477;
  --sayfa: #f6f9fb;
  --lavanta: #e6e9ff;
  --mavi: #1e4db7;
  --sessiz: #5a6174;
  --cizgi: #d9dde6;
  --ana: #d92449; /* TASARIM #EE3158; beyaz yazıda AA kontrastı için biraz koyu */
  --koyu: #172b4c;
  --sari: #ffc107;
  --yesil: #2a8174; /* TASARIM #58BAAB; AA için koyu */
  --turuncu: #ff8f00;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; font: 400 13px/1.45 Poppins, system-ui, "Segoe UI", sans-serif; color: var(--yazi); background: var(--sayfa); }
a { color: var(--mavi); }
h1, h2, h3 { margin: 0; font-weight: 400; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.atla { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.atla:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#ileti { padding: 0 16px; color: #a71920; min-height: 1.2em; text-align: center; }

/* ── Giriş / kurulum ── */
#giris-alani { max-width: 420px; margin: 8vh auto 0; padding: 0 16px; }
#giris-alani h1 { font-size: 22px; font-weight: 600; color: var(--mavi); letter-spacing: .08em; margin-bottom: 16px; }
.kutu { background: #fff; border-radius: 5px; box-shadow: 0 0 35px rgba(154, 161, 171, .15); padding: 20px; }
.kutu h2 { font-size: 17.5px; margin-bottom: 8px; }
.form-dikey { display: grid; gap: 12px; margin-top: 12px; }
.alan { display: grid; gap: 4px; }
.alan > label, .etiket { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--sessiz); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=date], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 34px; padding: 5px 10px; border: 1px solid #c3c8d4; border-radius: 3px; background: #fff; font-size: 13px;
}

/* ── Düğmeler ── */
.dugme { display: inline-block; border: 0; border-radius: 5px; padding: 8px 16px; font-size: 14px; cursor: pointer; text-decoration: none; color: #fff; background: var(--koyu); line-height: 1.2; }
.dugme.kucuk { font-size: 12px; padding: 7px 12px; text-transform: uppercase; }
.dugme.ana { background: var(--ana); }
.dugme.koyu { background: var(--koyu); }
.dugme.sari { background: var(--sari); color: #1b1920; }
.dugme.yesil { background: var(--yesil); }
.dugme:disabled { opacity: .6; cursor: default; }
.dugme.hayalet { background: #fff; color: var(--menu); border: 1px solid var(--cizgi); }

/* ── Kabuk ── */
#uygulama { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 60px 1fr; grid-template-areas: "menu ust" "menu icerik"; min-height: 100vh; }
#uygulama.dar { grid-template-columns: 0 1fr; }
#uygulama.dar .yan { display: none; }
.yan { grid-area: menu; background: #fff; padding: 12px 10px; overflow-y: auto; position: sticky; top: 0; height: 100vh; width: 250px; }
.marka { font-size: 20px; font-weight: 600; color: var(--mavi); letter-spacing: .12em; padding: 8px 10px 10px; text-decoration: none; display: block; }
.proje-sec { padding: 0 0 10px; }
.proje-sec select { min-height: 36px; }
.menu { list-style: none; margin: 8px 0 0; padding: 0; }
.menu a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 10px; border-radius: 5px; font-size: 15px; color: var(--menu); text-decoration: none; text-transform: uppercase; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.menu a:hover { background: var(--sayfa); }
.menu a[aria-current=page] { color: var(--mavi); background: #eef2ff; font-weight: 500; }
.menu svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ust { grid-area: ust; background: var(--sayfa); display: flex; align-items: center; gap: 12px; padding: 0 20px; min-width: 0; }
.ust h1 { font-size: 17.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ust .kullanici { color: var(--sessiz); font-size: 13px; text-align: right; }
.ust .kullanici b { color: var(--yazi); font-weight: 500; }
.ikon-dugme { width: 38px; height: 38px; display: inline-grid; place-items: center; background: none; border: 0; border-radius: 5px; color: var(--menu); cursor: pointer; flex: none; }
.ikon-dugme:hover { background: #fff; }
.ikon-dugme svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icerik { grid-area: icerik; background: var(--lavanta); border-radius: 16px 0 0 0; padding: 20px; min-width: 0; overflow-x: hidden; }
.perde { display: none; }

/* ── Kart ── */
.kart { background: #fff; border-radius: 5px; box-shadow: 0 0 35px rgba(154, 161, 171, .15); margin-bottom: 18px; min-width: 0; }
.kart-baslik { padding: 13px; font-size: 13px; font-weight: 600; border-bottom: 1px solid #edeff5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.kart-govde { padding: 13px; }
.serit { background: var(--turuncu); color: #1b1920; font-weight: 600; padding: 9px 13px; border-radius: 5px 5px 0 0; text-transform: uppercase; font-size: 13px; }

/* ── Süzgeç ── */
.dugme-sira { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ── Sonuç başlığı + tablo ── */
.sonuc-ust { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 13px; }
.sayfa-boyut { display: inline-flex; border: 1px solid var(--cizgi); border-radius: 5px; overflow: hidden; }
.sayfa-boyut button { border: 0; background: #fff; padding: 6px 10px; cursor: pointer; font-size: 12px; color: var(--menu); }
.sayfa-boyut button[aria-pressed=true] { background: var(--koyu); color: #fff; }
.uyari { margin: 0 13px 10px; padding: 8px 12px; background: #fff7e0; border: 1px solid #f0d78a; border-radius: 5px; color: #5c4400; }
.tablo-kutu { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13px; color: #212529; }
th { text-align: left; font-weight: 600; padding: 13px; border-bottom: 2px solid #343a40; white-space: nowrap; }
td { padding: 6.5px 13px; border-bottom: 1px solid #e6e8ee; vertical-align: top; }
tbody tr:nth-child(even) { background: #fafbfc; }
td.sag, th.sag { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
tfoot td { font-weight: 600; border-top: 2px solid #343a40; }
.bos { padding: 28px 13px; text-align: center; color: var(--sessiz); }
.hata-kutu { padding: 20px 13px; text-align: center; }
.hata-kutu p { margin: 0 0 12px; color: #a71920; }
.sayfalar { display: flex; flex-wrap: wrap; gap: 4px; padding: 13px; justify-content: center; }
.sayfalar button { min-width: 34px; height: 34px; border: 1px solid var(--cizgi); background: #fff; border-radius: 5px; cursor: pointer; color: var(--menu); }
.sayfalar button[aria-current=page] { background: var(--koyu); color: #fff; border-color: var(--koyu); }
.sayfalar button:disabled { opacity: .4; cursor: default; }

/* ── İskelet ── */
.iskelet td, .iskelet-blok { position: relative; }
.iskelet td::after, .iskelet-blok::after { content: ""; display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, #eceef3 25%, #f6f7fa 50%, #eceef3 75%); background-size: 200% 100%; animation: parilti 1.4s linear infinite; }
.iskelet-blok { padding: 13px; }
.iskelet-blok::after { height: 90px; }
@keyframes parilti { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .iskelet td::after, .iskelet-blok::after { animation: none; } }

/* ── Rozet ── */
.rozet { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.r-satista { background: rgba(46, 158, 107, .12); color: #1f7a52; }
.r-rezerve, .r-bekliyor { background: rgba(224, 161, 0, .14); color: #7a5600; }
.r-sozlesme { background: rgba(30, 77, 183, .12); color: #1e4db7; }
.r-tapu { background: rgba(107, 75, 200, .12); color: #5a3bb0; }
.r-iptal, .r-cakisma { background: rgba(214, 69, 69, .12); color: #b02d2d; }
.r-kapali, .r-odenecek { background: rgba(122, 129, 148, .16); color: #4c5366; }
.r-odendi { background: rgba(46, 158, 107, .12); color: #1f7a52; }
/* Muhasebe durumu (Nova Ödemeler sözlüğü): bekleniyor gri-mavi · gecikti kırmızı · geldi yeşil · çek bekliyor sarı; Nova kaynak rozeti */
.r-bekleniyor { background: rgba(59, 68, 119, .1); color: #3b4477; }
.r-gecikti { background: rgba(214, 69, 69, .12); color: #b02d2d; }
.r-geldi { background: rgba(46, 158, 107, .12); color: #1f7a52; }
.r-cek { background: rgba(224, 161, 0, .14); color: #7a5600; }
.r-nova { background: #fff; color: #1e4db7; border: 1px solid rgba(30, 77, 183, .35); padding: 1px 7px; }

/* ── Kart ekranı ── */
.sekmeler { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--cizgi); padding: 0 13px; }
.sekmeler button { border: 0; background: none; padding: 12px 14px; cursor: pointer; color: var(--menu); font-size: 13px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sekmeler button[aria-selected=true] { color: var(--mavi); border-bottom-color: var(--mavi); font-weight: 500; }
.bilgi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; margin: 0; }
.bilgi div { min-width: 0; }
.bilgi dt { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--sessiz); }
.bilgi dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.bilgi .tam { grid-column: 1 / -1; }
.ozet-serit { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; }
.ozet-serit div { padding: 13px; border-right: 1px solid #edeff5; }
.ozet-serit div:last-child { border-right: 0; }
.ozet-serit .e { font-size: 12px; text-transform: uppercase; color: var(--sessiz); }
.ozet-serit .d { font-size: 17.5px; font-weight: 500; }
.not-satir { padding: 10px 0; border-bottom: 1px solid #edeff5; }
.not-satir:last-child { border-bottom: 0; }
.not-ust { color: var(--sessiz); font-size: 12px; }
.sessiz { color: var(--sessiz); }
.kucuk-not { font-size: 12px; color: var(--sessiz); padding: 0 13px 13px; }
/* Muhasebe: dört özet kutusu, tıklanır satır, eski plan */
.ozet-kutular .d { display: flex; flex-direction: column; }
.ozet-kutular .adet { font-size: 12px; font-weight: 400; color: var(--sessiz); }
.ozet-kutular .k-gelen .d { color: #1f7a52; }
.ozet-kutular .k-gecikti .d { color: #b02d2d; }
tr.tiklanir { cursor: pointer; }
tr.tiklanir:hover td { background: #f3f5ff; }
.eski-plan { margin: 0 13px 13px; }
.eski-plan summary { cursor: pointer; color: var(--sessiz); padding: 6px 0; }

/* ── Başlangıç ── */
.rakamlar { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rakam { min-width: 120px; display: block; color: inherit; text-decoration: none; padding: 4px 8px; border-radius: 5px; }
.rakam:hover { background: var(--sayfa); }
.rakam.yesil-yazi .d { color: #1f7a52; }
.rakam.kirmizi-yazi .d { color: #b02d2d; }
.rakam .d { font-size: 22px; font-weight: 500; }
.rakam .e { font-size: 12px; color: var(--sessiz); }

/* ── Faz 2: formlar, pencere, onay, bildirim, eylemler ── */
textarea { resize: vertical; font: inherit; line-height: 1.4; }
.dugme.tehlike { background: #b3261e; }
.dugme.yesil { color: #fff; }
.eylem-sira { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kart-govde > .eylem-sira, .kart-govde > div > .eylem-sira { margin-bottom: 10px; }
.satir-dugmeler { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.satir-dugmeler .dugme.kucuk { padding: 4px 8px; font-size: 11px; }
tr.soluk td { color: #8a90a0; }
tr.secili-satir td { background: #eef2ff; }
.form-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; align-items: start; }
.form-izgara .tam { grid-column: 1 / -1; }
.alan-hata { margin: 2px 0 0; min-height: 0; font-size: 12px; color: #a71920; }
.alan-hata:empty { display: none; }
.form-hata { margin: 0; color: #a71920; font-weight: 500; }
.form-hata:empty { display: none; }
.kutu-alan label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; text-transform: none; color: var(--yazi); font-weight: 400; }
.salt { min-height: 34px; padding: 6px 10px; background: #f3f5f9; border-radius: 3px; }
.pencere { border: 0; border-radius: 8px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 10px 40px rgba(23, 43, 76, .3); color: var(--yazi); }
.pencere.genis { width: min(900px, calc(100vw - 32px)); }
.pencere::backdrop { background: rgba(23, 43, 76, .45); }
.pencere-ust { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #edeff5; position: sticky; top: 0; background: #fff; z-index: 1; }
.pencere-ust h2 { font-size: 16px; font-weight: 600; }
.pencere-kapat { font-size: 24px; line-height: 1; }
.pencere-govde { padding: 16px; }
.pencere-govde > .uyari { margin: 0 0 12px; }
.onay-metin { margin: 0 0 14px; line-height: 1.5; }
.onizleme { margin: 0 0 12px; padding: 8px 12px; background: #eef2ff; border-radius: 5px; color: var(--menu); }
.mukerrer ul { margin: 6px 0; padding-left: 18px; }
.mukerrer p { margin: 4px 0; }
.bildirim-kutu { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 1000; max-width: calc(100vw - 32px); }
.bildirim { background: #1f5f3f; color: #fff; padding: 10px 14px; border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.bildirim.hata { background: #8c1d18; }
.satir-ici { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.satir-ici input, .satir-ici select { width: auto; flex: 1 1 120px; }
.secim-liste { display: grid; gap: 4px; margin-top: 6px; max-height: 220px; overflow-y: auto; }
.secim { text-align: left; border: 1px solid var(--cizgi); background: #fff; border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.secim:hover, .secim:focus { background: #eef2ff; }
.secili { margin-top: 6px; font-weight: 500; color: var(--mavi); }
.daire-secici { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.daire-secici p { grid-column: 1 / -1; margin: 0; }
.secim-cubugu { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 13px 10px; }
.ayar-sekme { display: flex; gap: 2px; padding: 0 13px; margin-bottom: 18px; }
.ayar-sekme a { padding: 12px 14px; color: var(--menu); text-decoration: none; border-bottom: 3px solid transparent; }
.ayar-sekme a[aria-current=page] { color: var(--mavi); border-bottom-color: var(--mavi); font-weight: 500; }
.etiketler { display: flex; flex-wrap: wrap; gap: 4px; }
.etiket-kutu { display: inline-flex; gap: 4px; align-items: center; background: #f3f5f9; border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.mini-sil { border: 0; background: none; cursor: pointer; color: #a71920; font-size: 14px; padding: 0 2px; }
.renk-nokta { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.not-metin { white-space: pre-wrap; }
.kart-baslik .eylem-sira { font-weight: 400; }

/* ── Sade düzen: tek satır süzgeç, sekme, satır menüsü, kart ekleri ── */
.suzgec-satir { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 13px; }
.suzgec-satir .ara-kutu { flex: 1 1 260px; max-width: 420px; }
.suzgec-satir select { width: auto; flex: 0 1 220px; }
.suzgec-satir .bosluk { flex: 1 1 0; }
.suzgec-ileti { margin: 0; padding: 0 13px; }
.suzgec-ileti:empty { display: none; }
.durum-dugmeleri button { white-space: nowrap; }
.liste-sekme { padding-top: 4px; }
.durum-hucre { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.satir-not { padding: 0; display: block; max-width: 260px; white-space: normal; }
.nova-not { color: var(--sessiz); font-size: 12px; }
.nova-not-blok { padding-top: 10px; }
.eylem-menu { position: relative; display: inline-block; }
.dugme.ucnokta { font-size: 14px; line-height: 1; padding: 3px 9px; }
.menu-liste { position: fixed; z-index: 60; min-width: 190px; max-width: min(300px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--cizgi); border-radius: 6px; box-shadow: 0 6px 24px rgba(23, 43, 76, .18); padding: 4px; display: grid; }
.menu-liste button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 4px; cursor: pointer; color: var(--yazi); font-size: 13px; text-transform: none; }
.menu-liste button:hover, .menu-liste button:focus { background: #eef2ff; }
.menu-liste .tehlike-oge { color: #b3261e; }
.menu-liste .kapali-oge { color: #8a90a0; cursor: not-allowed; }
.oge-neden { display: block; white-space: normal; font-size: 11px; color: var(--sessiz); margin-top: 2px; }
.kart-ek { margin-top: 12px; }
.kart-ek summary { cursor: pointer; color: var(--sessiz); padding: 4px 0; }
.kart-ek > .bilgi { margin-top: 8px; }
.gecmis { margin: 0; padding: 13px; }
.gecmis > summary { font-weight: 600; color: var(--yazi); }
.uyari-kart .kart-baslik { color: #7a5600; }
.uyari-liste { margin: 0; padding: 10px 13px 13px 32px; line-height: 1.7; }
.yeni-musteri { margin-top: 6px; }

/* ── Dar ekran ── */
@media (max-width: 900px) {
  #uygulama, #uygulama.dar { grid-template-columns: 1fr; grid-template-areas: "ust" "icerik"; }
  .yan, #uygulama.dar .yan { display: block; position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0, 0, 0, .2); }
  #uygulama.cekmece .yan { transform: none; }
  #uygulama.cekmece .perde { display: block; position: fixed; inset: 0; background: rgba(23, 43, 76, .4); z-index: 40; border: 0; }
  .ust { padding: 0 10px; gap: 6px; }
  .ust .kullanici { display: none; }
  .icerik { padding: 12px; border-radius: 12px 12px 0 0; }
  .form-izgara { grid-template-columns: 1fr; }
  .bildirim-kutu { left: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .yan { transition: none; } }

/* ── Eski sade sayfalar (şifre belirleme) ── */
main.sade { max-width: 460px; margin: 6vh auto; padding: 16px; }
main.sade h1 { font-size: 22px; font-weight: 600; color: var(--mavi); }
main.sade h2 { font-size: 17.5px; margin: 16px 0 8px; }
main.sade form { display: grid; gap: 12px; }
main.sade label { display: grid; gap: 4px; font-size: 13px; }
main.sade button { background: var(--koyu); color: #fff; border: 0; border-radius: 5px; padding: 8px 16px; cursor: pointer; }

/* SMS: Toplu SMS ekranı ve Ayarlar › SMS (public/js/sms.js, public/js/ayarlar-sms.js) */
.sms-suzgec { margin-top: 12px; }
.sms-suzgec .onay-grup { grid-column: span 2; }
.sms-sayac { margin-top: 14px; font-size: 13px; }
.sms-kisi { font-size: 22px; font-weight: 500; color: var(--mavi); }
#sms-metin { width: 100%; box-sizing: border-box; min-height: 110px; margin-top: 10px; }
.sms-sablon-sira select { max-width: 320px; }
.sms-metin-sayac { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.sms-onizleme { display: grid; gap: 8px; margin-top: 10px; }
.sms-onizleme > .etiket { margin: 0; }
.sms-ornek { background: #f3f5f9; border-radius: 8px; padding: 8px 12px; max-width: 420px; }
.sms-gonder { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sms-gonder p { margin: 0; }
.sms-onay { margin-bottom: 12px; }
.sms-ilerleme { width: 100%; height: 10px; margin-top: 12px; }
.sms-sayfa { align-self: center; padding: 0 8px; }
@media (max-width: 900px) { .sms-suzgec .onay-grup { grid-column: auto; } }
