/* Ortak renk paleti (prototipten) */
:root {
    --navy: #16314f;
    --accent: #2f80ed;
    --accent2: #56ccf2;
    --green: #1e9e6a;
    --red: #d64545;
    --amber: #e0a800;
    --blue: #1c6dd0;
    --ink: #22303f;
    --muted: #7b8794;
    --bg: #e7ecf1;
    --line: #e6ebf0;
}

body {
    background: #f4f6f9;
    color: var(--ink);
}

.app-navbar {
    background: linear-gradient(120deg, var(--navy), #22507f);
}

.card {
    border: 1px solid var(--line);
    border-radius: 13px;
}

.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* Komite — meslek grubu forma secildiginde kisa vurgu */
.mg-flash { box-shadow: 0 0 0 3px rgba(47,128,237,.35); border-color: var(--accent) !important; }

/* ===================== Calisma Gruplari — kompakt akordeon ===================== */

.cg-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; overflow: hidden; }
.cg-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; }
.cg-head:hover { background: #f6f9fc; }
.cg-head .kod { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--navy);
                border-radius: 6px; padding: 3px 9px; white-space: nowrap; }
.cg-head .nm { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink);
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-head .meta { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.cg-caret { flex: 0 0 auto; color: var(--muted); font-size: 12px; transition: transform .15s; }
.cg-head[aria-expanded="true"] .cg-caret { transform: rotate(180deg); }
.cg-head[aria-expanded="true"] { background: #f1f6fb; }
.cg-body-inner { padding: 13px 14px; border-top: 1px solid var(--line); }

/* Uye rozetleri */
.cg-uye { display: inline-flex; align-items: center; background: #eef3f8; border: 1px solid var(--line);
          border-radius: 8px; padding: 3px 4px 3px 9px; font-size: 12px; margin: 0 5px 5px 0; }
.cg-uye .sil { border: none; background: transparent; color: var(--red); font-weight: 700; cursor: pointer;
               line-height: 1; padding: 0 4px; }

/* Eksik (sorumlu/uye bosluk) olan birim — sol turuncu vurgu */
.cg-item.eksik { border-left: 3px solid var(--amber); }

/* ===================== Genel AJAX (PJAX) toast ===================== */

.pjax-toast { position: fixed; top: 16px; right: 16px; z-index: 2000;
              display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.pjax-t { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
          box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; transform: translateX(20px); transition: .25s;
          max-width: 340px; }
.pjax-t.show { opacity: 1; transform: none; }
.pjax-t.ok  { background: #1e7e4f; }
.pjax-t.err { background: #b23b3b; }

/* ===================== Zimmet Havuzu — baglam + secim ===================== */

/* Secili grup baglam basligi */
.havuz-bant .kod { font-size: 12px; font-weight: 700; color: #fff; background: var(--navy);
                   border-radius: 6px; padding: 3px 9px; white-space: nowrap; }

/* Atama kutusu uzun listede ust'e sabitlenir */
.havuz-ata { position: sticky; top: 8px; z-index: 1020; box-shadow: 0 4px 14px rgba(16,49,79,.10); }

/* Zimmet ekranlari "ben buradayim, ne yaparim" sade dil bandi (Havuz/Liste/Bosta) */
.zimmet-aciklama { border-left: 4px solid var(--navy); }
.zimmet-aciklama strong { display: inline-block; margin-bottom: 2px; }
.zimmet-aciklama .small { color: #41576b; }
.zimmet-aciklama a { font-weight: 600; }

/* --- Veri grid (kullanici dostu tablo: Havuz / Aktif Zimmetler / Bosta) --- */
.veri-grid-kart { padding: 0; overflow: hidden; position: relative; box-shadow: 0 1px 3px rgba(16,49,79,.06); }
.veri-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; margin: 0; }

/* Yapiskan, sakin baslik */
.veri-grid thead th {
    position: sticky; top: 0; z-index: 3;
    background: #eef3f9; color: #5b6b7b;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    text-align: left; white-space: nowrap;
    padding: 12px 16px; border-bottom: 1px solid #dde6ef;
}

/* Ferah hucreler + ince ayirici */
.veri-grid tbody td { padding: 13px 16px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.veri-grid tbody tr:last-child td { border-bottom: 0; }

/* Secim sutunu + buyuk, tiklamasi kolay kutu */
.veri-grid .sec-col { width: 48px; text-align: center; padding-left: 18px; padding-right: 4px; }
.veri-grid .form-check-input { width: 18px; height: 18px; margin: 0; cursor: pointer; }

/* Metin sutunlari */
.veri-grid .unvan   { font-weight: 600; color: var(--ink); line-height: 1.35; }
.veri-grid .num     { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.veri-grid .tarih   { color: var(--muted); white-space: nowrap; }
.veri-grid .ikincil { color: var(--muted); }

/* Kod cipi (meslek/calisma grubu kodu) */
.grid-kod { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--navy);
            border-radius: 6px; padding: 3px 9px; white-space: nowrap; }

/* Satir hover (Havuz secili + Liste/Bosta) */
.firma-row { cursor: pointer; transition: background .12s; }
.firma-row:hover, .zimmet-row:hover, .bosta-row:hover { background: #f4f9ff; }
.firma-row.secili { background: #e9f3ff; box-shadow: inset 4px 0 0 var(--accent); }
.firma-row.secili .unvan { color: var(--navy); }

/* ---- Kart gorunumlu satirlar (Havuz ana tablosu): her satir ayri kart + belirgin hover ----
   border-spacing ile satirlar arasi dikey bosluk; hucreler beyaz kart, cevre faint gri zemin.
   Yalniz .kart-satir tablosuna uygulanir (modal/diger gridler etkilenmez). */
.veri-grid-kart-kart { background: #f1f4f9; padding: 0 12px; }  /* kartlarin oturdugu hafif zemin + yan bosluk */
.veri-grid.kart-satir { border-spacing: 0 8px; background: transparent; }
/* Baslik: bosluk zaten ayirdigi icin alt cizgi yok; sticky korunur */
.veri-grid.kart-satir thead th { border-bottom: 0; }
/* Hucreler = kart yuzeyi */
.veri-grid.kart-satir tbody td {
    background: #fff; border-top: 1px solid #e2e9f2; border-bottom: 1px solid #e2e9f2;
    transition: background .12s ease, border-color .12s ease;
}
.veri-grid.kart-satir tbody tr:last-child td { border-bottom: 1px solid #e2e9f2; }  /* son satirda da kenar kalsin */
.veri-grid.kart-satir tbody td:first-child {
    border-left: 1px solid #e2e9f2; border-top-left-radius: 10px; border-bottom-left-radius: 10px;
}
.veri-grid.kart-satir tbody td:last-child {
    border-right: 1px solid #e2e9f2; border-top-right-radius: 10px; border-bottom-right-radius: 10px;
}
/* Hover: belirgin vurgu — mavi zemin, mavi kenar, sol aksan cubugu + hafif golge */
.veri-grid.kart-satir .firma-row { box-shadow: 0 1px 2px rgba(16,49,79,.05); transition: box-shadow .12s ease; }
.veri-grid.kart-satir .firma-row:hover td { background: #f0f7ff; border-color: #bcd8fb; }
.veri-grid.kart-satir .firma-row:hover td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.veri-grid.kart-satir .firma-row:hover { box-shadow: 0 5px 16px rgba(16,49,79,.12); }
/* Secili satir (checkbox isaretli) — tr yerine hucrelere uygulanir (kart zemini ezmesin) */
.veri-grid.kart-satir .firma-row.secili { box-shadow: 0 5px 16px rgba(28,95,191,.14); }
.veri-grid.kart-satir .firma-row.secili td { background: #e9f3ff; border-color: #bcd8fb; }
.veri-grid.kart-satir .firma-row.secili td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
/* Satir ici atama paneli (acildiginda) de kart gibi gozuksun */
.veri-grid.kart-satir .havuz-ata-satir td { background: #f7faff; border-color: #d7e6fb; }

/* Durum rozetleri (pill + renkli nokta) */
.durum-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
              padding: 4px 11px; border-radius: 999px; white-space: nowrap; line-height: 1; }
.durum-pill .nokta { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.durum-pill.bosta   { background: #e7f7ef; color: #1e7e4f; border: 1px solid #c6e8d6; }
.durum-pill.devir   { background: #fff4d6; color: #946a00; border: 1px solid #f0d795; }
.durum-pill.bizde   { background: #e7f7ef; color: #1e7e4f; border: 1px solid #c6e8d6; }
.durum-pill.karsida { background: #fdeaea; color: #c0392b; border: 1px solid #f3c2c2; }
.durum-pill.soz     { background: #e8f1fe; color: #1c5fbf; border: 1px solid #c5dbf7; }
.durum-pill.bekle   { background: #eef2f6; color: #5b6b7b; border: 1px solid #dde6ef; }
.devir-not { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* Uye durumu kolonu — sadece bu kolonda renklendirme (FAAL / ASKIDA) */
.uye-durum { display: inline-block; font-size: 12px; font-weight: 600;
             padding: 3px 10px; border-radius: 999px; white-space: nowrap; line-height: 1; }
.uye-durum.faal   { background: #e7f7ef; color: #1e7e4f; border: 1px solid #c6e8d6; }
.uye-durum.askida { background: #fdeaea; color: #c0392b; border: 1px solid #f3c2c2; }

/* Kompakt grid (Havuz atama tablosu) — kolonlar birlesik, ikincil bilgi alt satirda */
.veri-grid.kompakt thead th  { padding: 8px 12px; }
.veri-grid.kompakt tbody td  { padding: 7px 12px; }
/* Firma hucresi: unvan (tam, kirpilmaz) + alt satir meta */
.veri-grid .firma-hucre .unvan { display: block; font-weight: 600; color: var(--ink); line-height: 1.3; }
.veri-grid .hucre-meta         { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.veri-grid .hucre-meta .ayrac  { color: #c3ccd6; margin: 0 5px; }
/* Firma (kurum) telefonlari — unvan altinda; yetkili telefonu ad-soyad yaninda (rozet ici soluk metin) */
.veri-grid .firma-tel          { display: block; margin-top: 2px; font-size: 11.5px; color: #2a6; font-weight: 600; }
.veri-grid .yetkili-badge .yetkili-tel { font-weight: 500; color: #7a8a99; }
/* Borc hucresi: iki satir (gecmis / gelmemis), etiketli */
.veri-grid .borc-hucre        { font-variant-numeric: tabular-nums; min-width: 150px; }
.veri-grid .borc-satir        { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; line-height: 1.4; }
.veri-grid .borc-satir .etiket { color: var(--muted); font-size: 11px; font-weight: 500; }
.veri-grid .borc-gecmis.dolu .tutar { color: #c0392b; font-weight: 600; }
/* Yetkililer rozeti (firma hucresi meta satiri) — modal acar */
.yetkili-link { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px;
                color: var(--accent); cursor: pointer; }
.yetkili-link:hover { text-decoration: underline; }

/* Yetkili + tescil adresi kolonlari (T1/T2): sabit genislik (firma kolonu kalan yeri alir), sarmali */
.veri-grid th.yetkili-col, .veri-grid .yetkili-hucre { width: 190px; }
.veri-grid th.adres-col,   .veri-grid .adres-hucre   { width: 220px; }
.veri-grid .yetkili-hucre { font-size: 12.5px; }
.veri-grid .adres-hucre   { font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: break-word; }

/* Atanmis (zimmet sahibi var) pill — mavi ton */
.durum-pill.atanmis { background: #e8f1fe; color: #1c5fbf; border: 1px solid #c5dbf7; }

/* Satir ici dogrudan atama (Zimmet Sahibi kolonu): pill yanindaki kucuk "ata" butonu + acilir satir */
/* TUTARLILIK: hucre NORMAL tablo hucresi kalir (vertical-align:middle ile icerik dikey ortali).
   Icerik blok olarak alt alta dizilir: once sahip rozet(ler)i (sahipler-kutu), ALTINDA her zaman
   "ekle/ata" butonu. Boylece ad uzunlugundan bagimsiz buton hep ayni yerde durur. */
.sahip-hucre .sahipler-kutu { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.btn-sahip-ata { display: inline-block; margin-top: 6px; border: 1px solid #c6e8d6;
                 background: #e7f7ef; color: #1e7e4f;
                 font-size: 11px; font-weight: 600; border-radius: 7px; padding: 2px 8px;
                 cursor: pointer; white-space: nowrap; vertical-align: middle; }
.btn-sahip-ata:hover { background: #d7f0e2; }
.havuz-ata-satir > .havuz-ata-hucre,
.yp-ata-satir > .havuz-ata-hucre { background: #f4faf6; }

/* Firma Yetkilileri: tiklanan ozet satiri + acilan detay (yetkili oldugu firmalar) */
.yetkili-ozet-row { cursor: pointer; }
.yetkili-ozet-row:hover { background: #f1f4f9; }
.yetkili-ozet-row .ac-ok { color: var(--navy); font-size: 12px; }
.yetkili-detay-row > .yetkili-detay-hucre { background: #f7f9fc; padding: 8px 12px; }

/* Kolon filtre satiri (baslik altinda input'lar). size="1" + width:100% ile input hucreyi
   genistirmez (yatay scroll engellenir); hucre genisligini govde icerigi belirler. */
.veri-grid thead tr.kolon-filtre th { padding-top: 4px; padding-bottom: 6px; background: #fbfcfe; }
.veri-grid thead tr.kolon-filtre .kf-input { font-size: 12px; width: 100%; min-width: 0; }

/* Coklu zimmet sahibi: her sahip ayri badge + kaldirma (×) */
.sahip-badge .sahip-kaldir { border: none; background: transparent; color: inherit; cursor: pointer;
                             font-size: 14px; line-height: 1; padding: 0; margin-left: 4px; opacity: .55; }
.sahip-badge .sahip-kaldir:hover { opacity: 1; color: #c0392b; }
.sahip-badge .sahip-kaldir:disabled { opacity: .3; cursor: default; }

/* T4 — Borc: uye durumu hucresinin altinda kucuk buton, tiklayinca satir ici acilir */
.borc-col { min-width: 130px; }
.uye-borc { margin-top: 6px; }
/* Evrak durumu kolonu: coklu sahip varsa pill'ler alt alta */
.evrak-col { white-space: nowrap; }
.evrak-col .durum-pill { margin: 2px 0; }
.btn-borc { border: 1px solid #dde6ef; background: #f6f9fc; color: #5b6b7b;
            font-size: 11.5px; font-weight: 600; border-radius: 7px; padding: 4px 10px;
            cursor: pointer; white-space: nowrap; }
.btn-borc:hover { background: #eef3f9; color: var(--navy); }
.btn-borc.acik  { background: #e8f1fe; color: #1c5fbf; border-color: #c5dbf7; }

/* WhatsApp kopyalama butonlari: firma satiri (kucuk 📋), modal ve "secilenleri kopyala".
   .kopyalandi -> 1.5sn'lik "Kopyalandi ✓" geri bildirimi (geriBildirim()). */
.firma-kopya { border: 1px solid #dde6ef; background: #f6f9fc; color: #5b6b7b;
               font-size: 12px; line-height: 1; border-radius: 7px; padding: 3px 7px;
               margin-top: 4px; cursor: pointer; vertical-align: middle; }
.firma-kopya:hover { background: #eef3f9; }
.yp-kopya { border: 1px solid #c6e8d6; background: #e7f7ef; color: #1e7e4f;
            font-size: 12.5px; font-weight: 600; border-radius: 7px; padding: 5px 12px;
            cursor: pointer; white-space: nowrap; }
.yp-kopya:hover { background: #d7f0e2; }
.kopyalandi { background: #e7f7ef !important; color: #1e7e4f !important; border-color: #c6e8d6 !important; }
.borc-detay { margin-top: 7px; padding: 8px 10px; background: #f8fafc; border: 1px solid #eef2f6;
              border-radius: 8px; font-variant-numeric: tabular-nums; min-width: 180px; }
.borc-detay .borc-toplam { border-top: 1px dashed #dde6ef; margin-top: 4px; padding-top: 4px; font-weight: 600; }
.borc-detay .borc-toplam .etiket { color: var(--ink); }

/* T5 — Coklu zimmet sahibi secici (otomatik tamamlama + chip) */
.uye-secici { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
              min-height: 38px; padding: 4px 8px; border: 1px solid #ced4da; border-radius: 8px;
              background: #fff; }
.uye-secici.devre-disi { background: #f1f3f5; }
.uye-secici:focus-within { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(28,95,191,.12); }
.uye-chips { display: contents; }
.uye-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
            background: #e8f1fe; color: #1c5fbf; border: 1px solid #c5dbf7;
            border-radius: 999px; padding: 2px 4px 2px 10px; }
.uye-chip button { border: 0; background: none; color: #1c5fbf; font-size: 15px; line-height: 1;
                   cursor: pointer; padding: 0 4px; }
.uye-chip button:hover { color: #c0392b; }
.uye-arama { flex: 1; min-width: 120px; border: 0; outline: none; font-size: 14px; background: transparent; }
.uye-liste { position: absolute; top: 100%; left: 0; right: 0; z-index: 1040; margin-top: 4px;
             max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid #dde6ef;
             border-radius: 8px; box-shadow: 0 6px 18px rgba(16,49,79,.14); }
.uye-secenek { padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.uye-secenek:hover { background: #f4f9ff; }
.uye-bos { padding: 8px 12px; color: var(--muted); font-size: 13px; }

/* Havuz "Kişi Ekle" — mukerrer kontrol otomatik tamamlama (iki tarafli kontrol) */
.hk-oneri { position: absolute; top: 100%; left: 12px; right: 12px; z-index: 1050; margin-top: 2px;
            max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid #dde6ef;
            border-radius: 8px; box-shadow: 0 6px 18px rgba(16,49,79,.14); }
.hk-secenek { display: flex; align-items: center; gap: 8px; padding: 7px 11px; cursor: pointer;
              font-size: 13px; border-bottom: 1px solid #f1f4f8;
              text-decoration: none; color: inherit; }
.hk-secenek:last-child { border-bottom: 0; }
.hk-secenek:hover { background: #f4f9ff; }
.hk-ad { font-weight: 600; color: var(--ink); }
.hk-komite { font-size: 11.5px; color: var(--muted); }
.hk-rozet { margin-left: auto; font-size: 11px; font-weight: 600; white-space: nowrap;
            background: #fff4e5; color: #9a6212; border: 1px solid #f0d9b5; border-radius: 999px; padding: 1px 8px; }
.hk-rozet.bu { background: #e8f7ee; color: #1b7a43; border-color: #bfe6cd; }

/* Kullanıcı meslek grubu seçimi — 10'arlı sütunlar (hepsi ekranda, scroll yok; yalnız kod) */
.meslek-grup-secim { display: flex; flex-wrap: wrap; gap: 4px 26px; margin-top: 4px; }
.mg-sutun { display: flex; flex-direction: column; gap: 3px; }
.mg-kutu { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer;
           white-space: nowrap; font-size: 13px; }
.mg-kutu input { margin: 0; flex: 0 0 auto; }
.mg-kutu span { font-weight: 600; color: var(--ink); }
.mg-kutu:hover span { color: var(--accent); }

/* ===================== Komuta Zinciri — agac (akordeon govdesi) ===================== */

.hz-tree { font-size: 13px; }
.hz-komite { font-weight: 600; color: var(--navy); padding-bottom: 8px; margin-bottom: 8px;
             border-bottom: 1px dashed var(--line); }
.hz-grup { margin-left: 8px; padding: 7px 0 7px 14px; border-left: 2px solid #dde6ef; }
.hz-grup + .hz-grup { margin-top: 4px; }
.hz-grup-bas { font-weight: 600; color: var(--ink); }
/* Calisma grubu sorumlulari (1./2./3.) — agac govdesinde etiketli liste. */
.hz-sorumlular { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.hz-sorumlu { font-size: 12.5px; color: var(--ink); }
.hz-sorumlu-no { font-weight: 600; color: var(--navy); }
.hz-uyeler { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.hz-uye-chip { background: #eef3f8; border: 1px solid var(--line); border-radius: 8px; padding: 2px 9px;
               font-size: 12px; color: var(--ink); }
.hz-yok { color: #9a7b2e; font-weight: 600; }   /* "atanmadı / yok" yumusak uyari */
/* Saha uyeleri bloku — komite (meslek grubu) duzeyinde; grup sorumlularindan ayri vurgu. */
.hz-uyeler-grup { border-left-color: #c5dbf7; margin-top: 8px; }
.hz-uyeler-grup .hz-grup-bas { color: var(--navy); }

/* ===================== 09. faz — Baskan yonetici panosu ===================== */

.exec-banner { background: linear-gradient(120deg, #3a2160, #7a4ad0); color: #fff;
               border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.exec-banner .top { display: flex; justify-content: space-between; font-size: 13px; opacity: .85; }
.exec-banner .big { font-size: 34px; font-weight: 800; margin: 8px 0 2px; }
.exec-banner .sub { font-size: 13px; opacity: .9; }

.exec-h { font-size: 15px; font-weight: 700; color: var(--navy); margin: 4px 2px 10px;
          display: flex; align-items: baseline; gap: 8px; }
.exec-h small { font-weight: 500; color: var(--muted); font-size: 12px; }

.pano-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.pano-stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 10px; text-align: center; }
.pano-stat .v { font-size: 26px; font-weight: 800; }
.pano-stat .l { font-size: 12px; color: var(--muted); margin-top: 3px; }
.pano-stat.green .v { color: var(--green); }
.pano-stat.red .v   { color: var(--red); }
.pano-stat.gray .v  { color: var(--muted); }

/* biz/karsi split bar */
.split { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin: 0 0 16px;
         font-size: 12px; font-weight: 700; color: #fff; }
.split .b { background: var(--green); display: flex; align-items: center; justify-content: center; min-width: 0; }
.split .k { background: var(--red);   display: flex; align-items: center; justify-content: center; min-width: 0; }

/* Komite durumlari kartlari (rev01 Faz 07 R10/R11/R12) */
.kmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kmt-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.kmt-card .kmt-ad { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.kmt-card .kmt-sayilar { display: flex; gap: 12px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.kmt-card .kmt-sayilar .g { color: var(--green); }
.kmt-card .kmt-sayilar .r { color: var(--red); }
.kmt-card .kmt-sayilar .m { color: var(--muted); font-weight: 500; }
.kmt-card .kmt-bar { height: 12px; background: #eef2f6; border-radius: 7px; overflow: hidden; margin-bottom: 5px; }
.kmt-card .kmt-bar > i { display: block; height: 100%; border-radius: 7px;
                         background: linear-gradient(90deg, #7a4ad0, #a87fe0); }
.kmt-card .kmt-oran { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.kmt-card .kmt-sayac { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.kmt-card .kmt-sayac.vurgu { color: #6b4a17; }
/* Faal sayisi belirgin yesil, askida borc belirgin amber */
.kmt-card .kmt-sayac .faal { color: var(--green); font-weight: 800; }
.kmt-card .kmt-sayac .askida { color: var(--amber); font-weight: 800; }
/* R12: kademe atlamaya aday komite — yakinlik derecesine gore renk */
.kmt-card.turuncu { border-color: var(--amber); border-left: 5px solid var(--amber); background: #fff9f0; }
.kmt-card.kirmizi { border-color: var(--red); border-left: 5px solid var(--red); background: #fff3f2; }
.kmt-card.kirmizi .kmt-sayac.vurgu { color: var(--red); }

/* 7 gunluk trend */
.trend { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 16px; margin-bottom: 16px; }
.trend .t { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.trend .bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; justify-content: flex-end; }
.trend .cb { width: 100%; max-width: 46px; background: linear-gradient(180deg, #7a4ad0, #a87fe0);
             border-radius: 5px 5px 0 0; min-height: 2px; }
.trend .cd { font-size: 11px; color: var(--muted); }
.trend .cn { font-size: 11px; font-weight: 700; color: var(--navy); }

/* ===================== Yukleme gostergesi (loader) ===================== */
/* Kapsayici (grid karti) icinde: islemin oldugu alanin uzerinde. */
.loader-katman { position: absolute; inset: 0; z-index: 60;
                 display: flex; align-items: flex-start; justify-content: center;
                 background: rgba(244,246,249,.62); }
/* Tam ekran varyant: POST islemleri (atama, devir, kaydet...) */
.loader-katman.tam { position: fixed; align-items: center; background: rgba(22,49,79,.14); z-index: 2600; }
.loader-kutu { margin-top: 56px; background: #fff; border-radius: 12px; padding: 14px;
               box-shadow: 0 8px 26px rgba(16,49,79,.18); }
.loader-katman.tam .loader-kutu { margin-top: 0; }
.loader-spin { width: 30px; height: 30px; border: 3px solid #cdd8e3; border-top-color: var(--accent);
               border-radius: 50%; animation: loader-don .7s linear infinite; }
@keyframes loader-don { to { transform: rotate(360deg); } }

/* ===================== Toplanti takvimi (matris) ===================== */
.takvim-tablo th { vertical-align: middle; font-size: 13px; }
.takvim-hucre { padding: 4px; }
/* Hucredeki toplanti rozeti (tarih + meta). */
.tpl-rozet { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap;
             border: 1px solid transparent; border-radius: 6px; padding: 2px 7px; margin: 2px;
             font-size: 12px; line-height: 1.3; cursor: pointer; background: #fff; }
.tpl-rozet .tpl-meta { font-size: 11px; color: #5b6b7c; }
.tpl-rozet:hover { box-shadow: 0 1px 5px rgba(16,49,79,.18); }
/* Planlandi = yesil (Excel'deki yesil hucre). */
.tpl-planli { background: #e6f4ea; border-color: #198754; color: #145c36; }
.tpl-planli .tpl-meta { color: #2c7a52; }
/* Tamamlandi = sade/gri, ✓ ile. */
.tpl-tamam { background: #f3f5f7; border-color: #ced6de; color: #41505f; }
/* Iptal = kirmizi, ustu cizili. */
.tpl-iptal { background: #fdeaea; border-color: #dc3545; color: #a32430; text-decoration: line-through; }
/* "+" ekle dugmesi. */
.tpl-ekle { border: 1px dashed #adb5bd; background: #fff; color: #6c757d; border-radius: 6px;
            width: 26px; height: 26px; line-height: 1; margin: 2px; cursor: pointer; }
.tpl-ekle:hover { border-color: #198754; color: #198754; }
/* Tip yonetimi renk ornegi. */
.tip-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px;
              vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }

/* ===================== Toplanti takvimi (ay/hafta izgara) ===================== */
.ajanda-tablo { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.ajanda-tablo thead th { background: #16314f; color: #fff; font-size: 12px; font-weight: 600;
                         padding: 6px 8px; text-align: left; border: 1px solid #dfe5ec; }
.ajanda-hucre { vertical-align: top; height: 104px; width: 14.28%; padding: 4px;
                border: 1px solid #e5e9ef; background: #fff; }
.ajanda-hafta .ajanda-hucre { height: 320px; }       /* hafta: daha yüksek hücre */
.ajanda-hucre.ay-disi { background: #f6f8fa; }        /* içinde bulunulan ay dışı günler */
.ajanda-hucre.bugun { background: #fff8e6; box-shadow: inset 0 0 0 2px #ffc107; }
.ajanda-gun { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.ajanda-gunno { font-size: 12px; font-weight: 700; color: #41505f; }
.ay-disi .ajanda-gunno { color: #aab4be; }
.ajanda-gun-ekle { border: none; background: transparent; color: #adb5bd; cursor: pointer;
                   line-height: 1; font-size: 16px; padding: 0 4px; border-radius: 4px; }
.ajanda-gun-ekle:hover { color: #198754; background: #e6f4ea; }
/* Gün hücresindeki toplanti pill'i. */
.ajanda-pill { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left;
               border: 1px solid #e0e0e0; border-left: 4px solid #6c757d; border-radius: 5px;
               background: #fff; padding: 2px 6px; margin-bottom: 3px; font-size: 11.5px;
               line-height: 1.35; cursor: pointer; }
.ajanda-pill:hover { box-shadow: 0 1px 5px rgba(16,49,79,.18); }
.ajanda-pill .ajanda-saat { font-weight: 700; color: #16314f; white-space: nowrap; }
.ajanda-pill .ajanda-kod { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ajanda-pill.tpl-planli { background: #e6f4ea; }
.ajanda-pill.tpl-tamam  { background: #f3f5f7; color: #5b6b7c; }
.ajanda-pill.tpl-iptal  { background: #fdeaea; text-decoration: line-through; }

/* ===== Faz 04 — Aktif Zimmetler / Tarama ekrani ===== */
/* T23 — evrak hatali: belirgin kirmizi chip (karsida'dan ayri, dolu zemin) */
.durum-pill.hatali { background: #fbe2e0; color: #a4271c; border: 1px solid #efb1ab; }

/* Firma adi butonu (panel acar) */
.firma-ac { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.firma-ac .unvan { color: var(--navy); font-weight: 600; }
.firma-ac:hover .unvan { text-decoration: underline; }

/* T14 — Not hucresi: tek satir kirpilmis metin + kucuk tarih */
.not-hucre .not-metin { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
                        white-space: nowrap; font-size: 12.5px; color: var(--ink); }
.not-hucre .not-tarih { font-size: 11px; color: var(--muted); }

/* Islem kolonu: butonlar arasi bosluk */
.islem-col .btn, .islem-col form { margin-left: 4px; }

/* T16 — Firma bilgi paneli (sagdan acilir) */
.firma-panel-arka { position: fixed; inset: 0; background: rgba(16,49,79,.25); z-index: 1040; }
.firma-panel { position: fixed; top: 0; right: 0; width: 360px; max-width: 92vw; height: 100vh;
               background: #fff; box-shadow: -4px 0 24px rgba(16,49,79,.22); z-index: 1050;
               display: flex; flex-direction: column; }
.firma-panel-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px;
                   padding: 14px 18px; border-bottom: 1px solid #e8edf2; }
.firma-panel-bas strong { color: var(--navy); font-size: 15px; line-height: 1.3; }
.firma-panel-kapat { border: 0; background: none; font-size: 24px; line-height: 1; color: #8a97a5; cursor: pointer; }
.firma-panel-kapat:hover { color: var(--navy); }
.firma-panel-govde { padding: 16px 18px; overflow-y: auto; }
.fp-bolum { margin-bottom: 18px; }
.fp-etiket { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
             color: var(--muted); margin-bottom: 5px; }
.fp-deger { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.fp-yetkili { padding: 6px 0; border-bottom: 1px dashed #eef2f6; }
.fp-yetkili:last-child { border-bottom: 0; }
.fp-yad { display: block; font-weight: 600; color: var(--navy); }
.fp-yalt { display: block; font-size: 12px; color: var(--muted); }
.fp-ipucu { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* T19 — yetkili yanindaki firma sayisi rozeti (tiklanir = diger firmalar) */
.fp-firma-sayi { border: 0; background: #eaf2fb; color: var(--navy); font-weight: 700;
                 font-size: 12px; padding: 1px 7px; border-radius: 10px; cursor: pointer; }
.fp-firma-sayi:hover { background: #d6e6f8; }
.fp-firma-sayi.tek { background: #f0f3f6; color: var(--muted); cursor: default; }

/* T21 — yonetici notu (panel) */
.fp-not { padding: 7px 0; border-bottom: 1px dashed #eef2f6; }
.fp-not:last-child { border-bottom: 0; }
.fp-not-metin { font-size: 13px; color: var(--ink); line-height: 1.4; white-space: pre-wrap; }
.fp-not-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.fp-not-form { margin-top: 10px; }

/* T19/T20 — kisinin diger firmalari (capraz komite paneli, ust uste yigili) */
.kisi-panel { z-index: 1060; width: 380px; }
.kp-uyari { background: #fff7e6; border: 1px solid #ffe2a8; color: #7a5a00;
            font-size: 12px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; margin-bottom: 14px; }
.kp-firma { padding: 9px 0; border-bottom: 1px solid #eef2f6; }
.kp-firma:last-child { border-bottom: 0; }
.kp-unvan { font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.kp-ilce { font-weight: 400; color: var(--muted); font-size: 12px; }
.kp-satir { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.5; }
.kp-et { flex: 0 0 64px; color: var(--muted); }
.kp-de { color: var(--ink); }

/* T21 — Aktif Zimmetler not hucresinde yonetici notu (sorumlu notundan ayri) */
.not-yonetici { display: block; font-size: 12px; color: #6b4d00; margin-top: 3px;
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* T19/T20 (Havuz) — Yetkili kolonu: her yetkili bir badge; cok firmali ise tiklanir + sayi rozeti */
/* Kolon genisligi yetkili-col/adres-col ile sabitlenir (otomatik yerlesimde td max-width yok sayilir).
   Badge ad+tel+rozet ile uzun olursa kelime kelime (harf harf DEGIL) alt satira sarar; tasmaz. */
.yetkili-rozetler { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; }
.yetkili-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
                 font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px;
                 line-height: 1.25; white-space: normal; max-width: 100%;
                 background: #eef2f6; color: #5b6b7b; border: 1px solid #dde6ef; }
button.yetkili-badge { cursor: pointer; }
button.yetkili-badge:hover { background: #e8f1fe; color: #1c5fbf; border-color: #c5dbf7; }
.yetkili-badge .yetkili-rozet { display: inline-flex; align-items: center; justify-content: center;
                 min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
                 background: #1c5fbf; color: #fff; font-size: 10px; font-weight: 700; }

/* T-sube (Havuz) — Firma kolonu: ayni vergi no'da >1 kayit varsa tiklanir "N sube/merkez" rozeti */
.sube-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; cursor: pointer;
              font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1;
              white-space: nowrap; border: 1px solid #cfe9dd; background: #e9f7f0; color: #1f7a55; }
.sube-badge:hover { background: #d7f0e5; border-color: #aedcc6; }
.sube-badge .sube-rozet { display: inline-flex; align-items: center; justify-content: center;
              min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
              background: #1f7a55; color: #fff; font-size: 10px; font-weight: 700; }
/* Sube popup: merkez/sube tipi etiketi */
.sube-tip { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
            background: #eef2f6; color: #5b6b7b; vertical-align: middle; }
.sube-tip.merkez { background: #e9f7f0; color: #1f7a55; }

/* T19/T20 (Havuz) — yetkilinin diger firmalari popup'i (ortali modal) */
.yp-arka { position: fixed; inset: 0; background: rgba(16,49,79,.35); z-index: 1070;
           display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.yp-arka[hidden] { display: none; }   /* hidden, .yp-arka display:flex'ini ezsin (origin/spesifiklik) */
.yp-modal { background: #fff; border-radius: 12px; box-shadow: 0 16px 48px rgba(16,49,79,.3);
            width: 920px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; }
.yp-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px;
          padding: 14px 18px; border-bottom: 1px solid #e8edf2; }
.yp-bas strong { color: var(--navy); font-size: 15px; }
.yp-kapat { border: 0; background: none; font-size: 24px; line-height: 1; color: #8a97a5; cursor: pointer; }
.yp-kapat:hover { color: var(--navy); }
.yp-uyari { background: #fff7e6; border-bottom: 1px solid #ffe2a8; color: #7a5a00;
            font-size: 12px; line-height: 1.4; padding: 8px 18px; }
.yp-govde { padding: 0; overflow: auto; }
