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

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Mobil cerceve — masaustunde ortalanmis dar kolon */
.phone {
    width: 100%;
    max-width: 430px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.appbar {
    background: linear-gradient(120deg, var(--navy), #22507f);
    color: #fff;
    padding: 30px 16px 14px;
}
.appbar-title { font-size: 20px; font-weight: 700; }
.appbar-sub   { font-size: 11px; opacity: .8; margin-top: 2px; }
.appbar-row   { display: flex; justify-content: space-between; align-items: flex-start; }
.appbar-aksiyon { display: flex; gap: 8px; align-items: center; }
.appbar-cikis {
    display: inline-block; background: rgba(255,255,255,.15); color: #fff;
    border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: 5px 10px;
    font-size: 12px; cursor: pointer; text-decoration: none; white-space: nowrap;
}

/* Mobil giris */
.login { padding: 26px 18px; }
.login h1 { font-size: 20px; color: var(--navy); margin: 6px 0 18px; }
.login label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.login input[type=text], .login input[type=password] {
    width: 100%; padding: 12px; font-size: 15px; border: 1.5px solid var(--line); border-radius: 11px;
}
.login .check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); margin-top: 14px; }
.login .check input { width: auto; }
.login button {
    width: 100%; margin-top: 18px; padding: 13px; font-size: 15px; font-weight: 700;
    background: var(--accent); color: #fff; border: none; border-radius: 11px; cursor: pointer;
}
.login-hata { color: var(--red); font-size: 13px; margin-bottom: 6px; }
.login-hata ul { margin: 0; padding-left: 18px; }
.login-basari {
    color: var(--green); background: rgba(30,158,106,.1); border: 1px solid rgba(30,158,106,.35);
    border-radius: 9px; padding: 9px 11px; font-size: 13px; margin-bottom: 10px;
}
.login-geri { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.login input:disabled { background: #f2f4f7; color: var(--muted); }
.login-ipucu { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Hesap ekranlari (sifre / giris kodu) sekme cubugu */
.hesap-sekmeler { display: flex; gap: 6px; margin-bottom: 14px; }
.hesap-sekmeler a {
    flex: 1; text-align: center; padding: 9px 10px; font-size: 13px; font-weight: 600;
    color: var(--muted); background: #f2f4f7; border: 1.5px solid var(--line);
    border-radius: 10px; text-decoration: none;
}
.hesap-sekmeler a.aktif { color: #fff; background: var(--navy); border-color: var(--navy); }

.content {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
}

/* Alt sekme bari */
.tabbar {
    display: flex;
    border-top: 1px solid var(--line);
    background: #fff;
    position: sticky;
    bottom: 0;
}
.tab {
    flex: 1;
    padding: 9px 0 11px;
    text-align: center;
    color: var(--muted);
    font-size: 18px;
    text-decoration: none;
    line-height: 1.1;
}
.tab span { display: block; font-size: 10.5px; margin-top: 3px; }
.tab.on { color: var(--accent); font-weight: 700; }

/* Bos sayfa yer tutucusu */
.placeholder {
    text-align: center;
    padding: 48px 18px;
    color: var(--muted);
}
.placeholder h1 { font-size: 20px; color: var(--navy); margin: 8px 0 6px; }
.placeholder p  { font-size: 13px; }
.ph-emoji { font-size: 44px; }
.ph-faz {
    display: inline-block;
    margin-top: 10px;
    font-size: 11px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px 12px;
    color: var(--navy);
}
.ph-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

/* ===================== 06. faz — Firmalarim + ziyaret gunlugu ===================== */

/* Baslik satiri */
.h { font-size: 14px; font-weight: 700; color: var(--navy); margin: 2px 2px 10px;
     display: flex; justify-content: space-between; align-items: center; }
.h small { font-weight: 500; color: var(--muted); font-size: 11px; }

/* Kategori segmenti (Faz 03-5): Tümü / Firmalarım / Boşta / Diğer atanmışlar */
.segment { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seg-btn { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted); background: #fff;
           border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; white-space: nowrap; }
.seg-btn small { font-weight: 700; opacity: .7; margin-left: 3px; }
.seg-btn.on { color: #fff; background: var(--navy); border-color: var(--navy); }
.seg-btn.on small { opacity: .85; }
.seg-btn:active { transform: scale(.98); }

/* Filtre kutusu */
.filtre { margin-bottom: 12px; }
.filtre-ara { width: 100%; padding: 11px 12px; font-size: 14px; border: 1.5px solid var(--line);
              border-radius: 11px; background: #fff; }
/* Filtreler tek satira sigmayinca mantikli sekilde alt satira sarar (Madde 2/4, 08.07.2026):
   dar telefonda 2 sutun (yan yana 2 filtre), her filtre en az ~%47 genislik. */
.filtre-satir { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filtre-satir > .filtre-sel, .filtre-satir > .msel { flex: 1 1 calc(50% - 4px); min-width: calc(50% - 4px); }
.filtre-sel { padding: 9px 10px; font-size: 13px; border: 1px solid var(--line);
              border-radius: 10px; background: #fff; color: var(--ink); }

/* Coklu secim filtresi (Madde 2, 08.07.2026): saha durumu + evrak onay durumu. Mobil checkbox
   acilir listesi — native <select multiple> yerine okunur ve tek dokunusla cok secim. */
.msel { position: relative; }   /* flex genisligi .filtre-satir kuralindan gelir */
.msel-btn { width: 100%; text-align: left; padding: 9px 26px 9px 10px; font-size: 13px;
            border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
            cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.msel-btn::after { content: '▾'; position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
                   font-size: 11px; color: var(--muted); }
.msel-btn.dolu { color: var(--navy); font-weight: 600; border-color: var(--navy); }
.msel.acik .msel-btn { border-color: var(--navy); }
.msel-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%;
              width: max-content; max-width: 72vw; max-height: 280px; overflow-y: auto; background: #fff;
              border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
              padding: 4px; }
.msel-panel label { display: flex; align-items: center; gap: 8px; padding: 8px 9px; font-size: 13px;
                    color: var(--ink); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.msel-panel label:active { background: #f0f4f8; }
.msel-panel input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--navy); margin: 0; }

/* Buyuk kapsam (Firmalarim): sunucudan parca yukleme bilgi seridi */
.uzak-bilgi { margin: 0 0 10px; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: #7a5200;
              background: #fff7e3; border: 1px solid #f0dfb2; border-radius: 10px; }

/* Sayfalama (Firmalarim) */
.pager { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.pager .pg-btn { padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--navy);
                 border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.pager .pg-btn:active { transform: scale(.99); background: #f1f7ff; }
.pager .pg-btn:disabled { opacity: .45; cursor: default; }
.pager .pg-bilgi { flex: 1; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pager .pg-boyut { flex: 0 0 auto; width: auto; }

/* Firma karti (paylasilan temel: Takip + Bugun yatay ikon+mid duzeni) */
.firma { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px;
         margin-bottom: 9px; display: flex; align-items: center; gap: 11px; cursor: pointer; transition: .12s; }
.firma:active { transform: scale(.99); background: #f0f4f8; }
.firma .ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: #eef3f8;
             display: flex; align-items: center; justify-content: center; font-size: 17px; }
.firma .mid { flex: 1; min-width: 0; }
.firma .ad { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.firma .sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Firmalarim + Takip kart yeni duzeni: dikey blok + sol durum seridi (chip paletiyle ayni). Yalniz bu iki
   listeye ozel, boylece Bugun yatay karti etkilenmez. Bostaki firma (zimmet yok) notr gri serit alir. */
#firmaList .firma, #takipList .firma { display: block; border-left-width: 4px; }
#firmaList .firma { margin-bottom: 14px; }
#takipList .firma { margin-bottom: 12px; }
#firmaList .firma.fb-green,  #takipList .firma.fb-green  { border-left-color: var(--green); }
#firmaList .firma.fb-amber,  #takipList .firma.fb-amber  { border-left-color: var(--amber); }
#firmaList .firma.fb-red,    #takipList .firma.fb-red    { border-left-color: var(--red); }
#firmaList .firma.fb-orange, #takipList .firma.fb-orange { border-left-color: var(--orange); }
#firmaList .firma.fb-gray,   #takipList .firma.fb-gray   { border-left-color: #c2cbd4; }
/* Ust satir: unvan (artik sarabilir) + durum chip sag ustte */
.firma-ust { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.firma-ust .chip { flex: 0 0 auto; }
#firmaList .firma .ad,  #takipList .firma .ad  { white-space: normal; overflow: visible; line-height: 1.3; }
#firmaList .firma .sub, #takipList .firma .sub { white-space: normal; overflow: visible; margin-top: 3px; }
/* Yetkililer + iletisim: kart altinda ince ayracla ayrilmis blok */
.firma-altyetkili { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
                    display: flex; flex-direction: column; gap: 6px; }
.firma-altyetkili .firma-detay { margin-top: 0; }
/* Kart detay satirlari: adres, yetkili rozetleri, firma telefonu — sarabilir (mobilde okunsun/aranisin).
   Temel stil global (modaldeki klon da kullanir); kart ici ust bosluk ayri. */
.firma-detay { font-size: 11px; color: var(--muted); line-height: 1.35; word-break: break-word; }
.firma .firma-detay { margin-top: 3px; }

/* Yetkili rozetleri (kart + modal): her yetkili AYRI badge, telefonu tiklanabilir (tel:) */
.firma-yetkililer { display: flex; flex-wrap: wrap; gap: 5px; }
.yk-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; max-width: 100%;
            background: #eef3f8; border: 1px solid #dde7f0; border-radius: 999px;
            padding: 3px 10px; font-size: 11px; line-height: 1.3; }
.yk-badge::before { content: "👤"; font-size: 10px; opacity: .8; }
.yk-ad { font-weight: 700; color: var(--ink); }
.yk-tel, .tel-link { color: #1f8a4c; font-weight: 600; text-decoration: none; white-space: nowrap; }
.yk-tel:active, .tel-link:active { opacity: .55; }
.firma-tel .tel-link + .tel-link { margin-left: 8px; }

/* Modal: yetkili + iletisim bolumu (adres yok) */
.m-firmabilgi { display: grid; gap: 10px; margin: 2px 0 13px; padding: 11px 12px;
                background: #f7fafc; border: 1px solid var(--line); border-radius: 11px; }
.mfb-bas { font-size: 11px; font-weight: 700; color: var(--navy); text-transform: uppercase;
           letter-spacing: .3px; margin-bottom: 6px; }

/* ---- REV03 Faz 03: komite rozeti, salt-okunur, borc/durum, indirme ---- */
/* Komite (meslek grubu) + salt-okunur rozet satiri (unvanin altinda; .ad ellipsis'ine takilmaz) */
.firma-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.komite-rozet { display: inline-block; font-size: 10px; font-weight: 700; color: var(--navy);
                background: #eaf1f9; border: 1px solid #d6e3f0; border-radius: 999px; padding: 2px 8px; }
.salt-rozet { display: inline-block; font-size: 10px; font-weight: 600; color: #8a6d1f;
              background: #fbf3da; border: 1px solid #efe2b4; border-radius: 999px; padding: 2px 8px; }
/* Evrak onay durumu rozeti (salt gosterim; renge gore ton). */
.onay-rozet { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 999px;
              padding: 2px 8px; border: 1px solid transparent; }
.onay-mavi    { color: #1c5fbf; background: #e8f1fe; border-color: #c5dbf7; }
.onay-sari    { color: #946a00; background: #fff4d6; border-color: #f0d795; }
.onay-mor     { color: #6b3fa0; background: #efe7fb; border-color: #d9c9f2; }
.onay-yesil   { color: #1e7e4f; background: #e7f7ef; border-color: #c6e8d6; }
.onay-kirmizi { color: #c0392b; background: #fdeaea; border-color: #f3c2c2; }
.onay-gri     { color: #5b6b7b; background: #eef2f6; border-color: #dde6ef; }
/* Faz 04 (19.08 / Talep 1.b): KOBI/OSB basvuru rozeti - tek kapsul icinde iki donem. */
.kobi-rozet { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700;
              border-radius: 999px; padding: 2px 8px; background: #f4f7fa; border: 1px solid #e0e7ee; }
.kobi-rozet .kobi-et { color: #5b6b7b; letter-spacing: .03em; }
.kobi-rozet .kobi-yil { border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.kobi-rozet .kobi-var { color: #1c5fbf; background: #e7f0fd; border: 1px solid #c5dbf7; }
.kobi-rozet .kobi-yok { color: #8a97a5; background: #eef2f6; border: 1px solid #dfe6ee; }
/* Boşta / atanmış ayrimi (BostakiGor + BaskasiniGor acikken gelen salt-okunur firmalar) */
.durum-rozet { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.rozet-bosta { color: #1f8a4c; background: #e2f5ec; border: 1px solid #c4e8d4; }
.rozet-atanmis { color: var(--navy); background: #eef2f7; border: 1px solid #d8e0ea; }
/* Üyelik durumu değişim rozeti: dolgun renk + nabız halkası (dikkat çekici ama yumuşak) */
.durum-degisim { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
                 padding: 2px 9px; border-radius: 999px; white-space: nowrap;
                 color: #fff; animation: dd-parla 2.2s ease-out infinite; }
.durum-degisim .dd-nokta { width: 6px; height: 6px; border-radius: 50%; background: #fff;
                           animation: dd-yanip 2.2s ease-in-out infinite; flex: 0 0 auto; }
.durum-degisim.dd-olumlu { --dd-halka: rgba(30, 158, 90, .5);  background: #1e9e5a; }
.durum-degisim.dd-uyari  { --dd-halka: rgba(231, 76, 60, .5);  background: #e74c3c; }
.durum-degisim.dd-kritik { --dd-halka: rgba(59, 54, 83, .55);  background: #3b3653; }
.durum-degisim.dd-notr   { --dd-halka: rgba(90, 107, 127, .5); background: #5a6b7f; }
@keyframes dd-parla { 0% { box-shadow: 0 0 0 0 var(--dd-halka); }
                      70% { box-shadow: 0 0 0 8px rgba(0,0,0,0); }
                      100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
@keyframes dd-yanip { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
    .durum-degisim, .durum-degisim .dd-nokta { animation: none; }
}
/* Degisim raporunda rozet sabit durur (liste boyunca animasyon rahatsiz eder) */
.durum-degisim.dd-sabit, .durum-degisim.dd-sabit .dd-nokta { animation: none; }

/* ---- Degisim ekrani (durumu degisen firmalar) ---- */
#degisimList .firma { display: block; border-left-width: 4px; margin-bottom: 12px; }
#degisimList .firma .ad { white-space: normal; overflow: visible; line-height: 1.3; }
#degisimList .firma .sub { white-space: normal; overflow: visible; margin-top: 3px; }
#degisimList .firma.fb-green { border-left-color: var(--green); }
#degisimList .firma.fb-red   { border-left-color: var(--red); }
#degisimList .firma.fb-dark  { border-left-color: #3b3653; }
#degisimList .firma.fb-gray  { border-left-color: #c2cbd4; }
/* Eski durum -> yeni durum gecis satiri */
.dr-gecis { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dr-ok { color: var(--muted); font-weight: 700; }
.uye-durum { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px;
             padding: 2px 9px; white-space: nowrap; background: #eef2f7; color: #5a6b7f;
             border: 1px solid #d8e0ea; }
.uye-durum.faal   { background: #e2f5ec; color: #1f8a4c; border-color: #c4e8d4; }
.uye-durum.askida { background: #fdeaea; color: #c0392b; border-color: #f3c2c2; }
.uye-durum.durum-eski { background: #f1f3f5; color: #6c757d; border-color: #dee2e6;
                        text-decoration: line-through; text-decoration-thickness: 1px; }
/* Yon kirilimi ozet cipleri */
.dr-ozet { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.dr-chip { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
           background: #fff; border: 1px solid var(--line); }
.dr-yesil   { color: #1f8a4c; }
.dr-kirmizi { color: #c0392b; }
.dr-koyu    { color: #3b3653; }
.dr-gri     { color: #5a6b7f; }
/* Onceki/sonraki sayfalama */
.dr-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px;
            margin: 12px 0 20px; }
.dr-pg-btn { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
             font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; }
.dr-pg-btn.pasif { opacity: .4; }
.dr-pg-bilgi { font-size: 12px; color: var(--muted); }
/* Salt-okunur firma karti: tiklanamaz gorunum (boştaki/baskasinin firmasi) */
.firma-salt { cursor: default; }
.firma-salt:active { transform: none; background: #fff; }
/* Borc + faal/durum satiri (Faz 03-4; yalniz yetki dahilinde render edilir) */
.firma-borc { display: flex; flex-wrap: wrap; gap: 8px; }
.borc-askida { font-weight: 700; color: var(--red); }
.borc-tutar { font-weight: 600; color: var(--ink); }
/* Ayni firmayi 2+ kisi zimmetlediginde diger sahip(ler) seridi: ad + guncel durum chip.
   Koordinasyon amacli (iki saha uyesi ayni firmada birbirinin ilerlemesini gorsun). */
.firma-diger { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
               margin-top: 5px; padding: 6px 8px; background: #fff7e6;
               border: 1px solid #f0e2bd; border-radius: 9px; }
.diger-bas { font-weight: 700; color: #8a6d1f; width: 100%; }
/* Her diger sahip ayri blok: ust satir (ad + durum chip), altinda varsa durum tarihi + notu. */
.diger-sahip { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.diger-ust { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.diger-ad { font-weight: 700; color: var(--ink); }
.diger-ad::before { content: "👤"; font-weight: 400; margin-right: 2px; opacity: .8; }
.firma-diger .chip { font-size: 10px; }
.diger-tarih { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.diger-not { display: flex; font-size: 11px; line-height: 1.3; padding-left: 18px; }
.diger-not-metin { color: var(--ink); word-break: break-word; }
/* Evrak KURUM bazli: baska bir sahip evraki almissa (evrak_bizde) belirgin yesil uyari —
   durum kisi bazli kalsa da "is bitti, tekrar gitme" mesaji. firma-diger seridinin ustunde durur. */
/* Faz 04 (27.07): kutu iki satir tasiyabilir - saha durumunu isaretleyen kisi + tutanaktaki getiren. */
.firma-evrak-alindi { display: flex; flex-direction: column; gap: 3px;
                      margin-top: 6px; padding: 7px 9px; font-weight: 700; color: #14633f;
                      background: #e2f5ec; border: 1px solid #b6e2cc; border-radius: 9px; line-height: 1.35; }
.ea-getiren { font-weight: 600; }
/* Indirme dugmeleri (Faz 03-5) — baslik satirinda */
.indir-grup { display: inline-flex; gap: 6px; }
.indir-btn { font-size: 11px; font-weight: 600; color: var(--navy); background: #fff;
             border: 1px solid var(--line); border-radius: 9px; padding: 5px 10px; cursor: pointer; }
.indir-btn:active { transform: scale(.98); background: #f1f7ff; }
.indir-btn:disabled { opacity: .55; cursor: default; }

/* Durum chip */
.chip { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.c-gray   { background: #eceff3; color: #5b6b7b; }
.c-blue   { background: #e3effd; color: var(--blue); }
.c-green  { background: #e2f5ec; color: var(--green); }
.c-red    { background: #fdecec; color: var(--red); }
.c-amber  { background: #fdf3d6; color: #9a7400; }
.c-orange { background: #fdeede; color: #c4630a; }

/* Bottom-sheet modal */
.modal { position: fixed; inset: 0; background: rgba(10,25,45,.45); display: none;
         align-items: flex-end; justify-content: center; z-index: 50; }
.modal.on { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 430px; border-radius: 18px 18px 0 0;
         padding: 16px 16px 22px; max-height: 92vh; overflow-y: auto; animation: sheetUp .25s; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
/* Yapisik kapat cubugu: sayfa tum ekrani kaplasa da ust koste sabit kalir. */
.sheet-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end;
             margin: 0 -16px 6px; padding: 0 8px; background: #fff; }
.sheet-kapat { width: 34px; height: 34px; border: none; border-radius: 50%; background: #eef1f5;
               color: var(--navy); font-size: 15px; line-height: 1; cursor: pointer; }
.sheet-kapat:hover { background: #dfe4ea; }
.sheet h3 { margin: 2px 0 3px; font-size: 16px; color: var(--navy); }
.sheet .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 13px; }
.newvisit { font-size: 12px; font-weight: 700; color: var(--navy); margin: 4px 2px 8px; }
.newvisit-ipucu { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.opt { position: relative; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 11px;
       font-size: 13.5px; font-weight: 600; cursor: pointer; transition: border-color .12s, background .12s; }
.opt:active { transform: scale(.99); }
.opt.sel { border-color: var(--green); background: #eefaf3; }
.opt-ic { display: block; font-size: 19px; line-height: 1; margin-bottom: 7px; }
.opt-et { display: block; }
.opt-ac { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.opt-tik { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%;
           background: var(--green); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
           opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }
.opt.sel .opt-tik { opacity: 1; transform: scale(1); }
.iki { display: flex; gap: 10px; margin-top: 6px; }
.iki > div { flex: 1; min-width: 0; }
.fld { display: block; font-size: 11.5px; font-weight: 700; color: var(--navy); margin: 10px 2px 6px; }
.selbox { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
          font-family: inherit; font-size: 13.5px; color: var(--ink); background: #fff; }
.sheet textarea { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px;
                  padding: 9px; font-family: inherit; font-size: 13px; min-height: 52px; resize: none; }
.m-hata { color: var(--red); font-size: 12.5px; margin: 8px 2px 0; min-height: 1px; }
.sheet .save { width: 100%; margin-top: 12px; padding: 13px; border: none; border-radius: 11px;
               background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.sheet .save:disabled { opacity: .6; cursor: default; }

/* Belge fotografi: kamera/galeri secimi + onizleme */
.fotobtns { display: flex; gap: 8px; }
.fotobtn { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px;
           font-family: inherit; font-size: 13px; font-weight: 600; color: var(--navy);
           background: #fff; cursor: pointer; }
.fotobtn:active { transform: scale(.99); background: #f1f7ff; }
.fotoprev { position: relative; margin-top: 10px; }
.fotoprev img { width: 100%; max-height: 220px; object-fit: contain; border: 1px solid var(--line);
                border-radius: 10px; background: #f5f8fb; }
.fotodel { position: absolute; top: 6px; right: 6px; border: none; border-radius: 9px;
           background: rgba(16,49,79,.82); color: #fff; font-size: 11.5px; font-weight: 700;
           padding: 5px 9px; cursor: pointer; }

/* Kamera alt düğme çubuğu (canlı kamera overlay'inde kullanılır) */
.bt-bar { display: flex; gap: 6px; padding: 10px; background: #0a1626; flex-wrap: wrap;
          justify-content: center; }
.bt-btn { border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: #16314f; color: #fff;
          font-family: inherit; font-size: 13px; font-weight: 600; padding: 11px 13px; cursor: pointer; }
.bt-btn:active { transform: scale(.98); }
.bt-btn:disabled { opacity: .5; }
.bt-btn.bt-apply { background: var(--green, #1f9d57); flex: 1; min-width: 110px; }
.bt-btn.bt-cancel { background: transparent; }

/* Canlı kamera (çerçeve/referans) */
.bt-cam-overlay { position: fixed; inset: 0; background: #000; display: none; flex-direction: column; z-index: 85; }
.bt-cam-overlay.on { display: flex; }
.bt-cam-stage { flex: 1; position: relative; overflow: hidden; }
.bt-cam-stage video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
.bt-cam-guide { position: absolute; top: 9%; bottom: 13%; left: 7%; right: 7%;
                border: 2px dashed rgba(255,255,255,.92); border-radius: 12px;
                box-shadow: 0 0 0 100vmax rgba(0,0,0,.32); pointer-events: none; }
.bt-cam-hint { position: absolute; left: 0; right: 0; bottom: 3.5%; text-align: center; color: #fff;
               font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.85); pointer-events: none; }

/* Ziyaret gunlugu (cok kayitli gecmis) */
.vlog { background: #f5f8fb; border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin-bottom: 14px; }
.vt { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.vrow { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed #dde4ec; }
.vrow:first-of-type { border-top: none; }
.vd { flex: 0 0 50px; color: var(--muted); font-size: 11px; padding-top: 1px; }
.vmid { flex: 1; min-width: 0; }
.vnote { font-size: 12px; color: var(--ink); margin-top: 3px; }
.vfoto { font-size: 11px; color: var(--accent); text-decoration: none; display: inline-block; margin-top: 3px; }
.vempty, .vyukle { font-size: 12px; color: var(--muted); text-align: center; padding: 6px 0; }
.minichip { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 12px; white-space: nowrap; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%); background: #16314f; color: #fff;
         font-size: 12.5px; line-height: 1.4; padding: 10px 15px; border-radius: 14px; opacity: 0; transition: .3s;
         pointer-events: none; z-index: 60; max-width: 88%; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.toast.on { opacity: 1; }

/* ===================== Bugun (genel durum + bugunku ziyaretler) ===================== */
/* rev02 Faz 06 (T10): Takvim/planlama soküldü — ilgili stiller (week/day/planrow/...) kaldirildi. */

/* Gun ozeti kutulari (Bugun) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.stat  { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px 8px; text-align: center; }
.stat .v { font-size: 21px; font-weight: 800; }
.stat .l { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.stat.green .v { color: var(--green); }
.stat.red .v   { color: var(--red); }
.stat.gray .v  { color: var(--muted); }

/* Bilgi/aciklama satiri (Bugun genel durum altinda) */
.gec-bilgi { font-size: 11.5px; color: var(--muted); margin: -4px 2px 10px; }

/* ===================== 09. faz — Canli (cetele + siralama cubuklari) ===================== */

/* biz/karsi split bar */
.split { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin: 0 0 14px;
         font-size: 11px; 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; }

/* Siralama cubuklari (kapsam-bazli — prototip buildBars) */
.race { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 12px; }
.race .t { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.bar { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12px; }
.bar:last-child { margin-bottom: 0; }
.bar .nm { flex: 0 0 130px; line-height: 1.25; overflow-wrap: anywhere; }
.bar .track { flex: 1; height: 14px; background: #eef2f6; border-radius: 8px; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bar.me .nm { font-weight: 700; color: var(--accent); }
.bar.low .fill { background: linear-gradient(90deg, #e0823f, #e9a96a); }
.bar .pct { flex: 0 0 auto; font-weight: 700; font-size: 11.5px; }
/* rev01 Faz 06: 1. sorumlu gorunumunde alt-ekip baslik satiri */
.race-grp { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
            letter-spacing: .4px; margin: 10px 0 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.race-grp:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.canli-foot { text-align: center; font-size: 11px; color: var(--muted); margin: 4px 0 0; }

/* Faz 04 (27.07): Özet ekranı evrak durum bandı (5 kutu) + kişi çubuğu altındaki sade rozetler.
   Band .stats'ın 5 sütunlu, küçültülmüş türevidir (telefon genişliğinde yatay taşma yapmaz);
   rozet satırı kişi çubuğuna yapışık durur ve dar ekranda alt alta sarar. */
.ev-stats { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ev-stats .stat { padding: 9px 3px; border-radius: 11px; }
.ev-stats .stat .v { font-size: 17px; }
.ev-stats .stat .l { font-size: 9.5px; }

.ev-satir { display: flex; flex-wrap: wrap; gap: 4px; margin: -5px 0 10px 2px; }
.ev-satir:last-child { margin-bottom: 0; }
.ev-rz { padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1.6;
         background: #f1f4f8; border: 1px solid var(--line); color: var(--muted); }
.ev-getir   { background: #eef4fb; border-color: #d3e2f1; color: var(--navy); }
.ev-onayli  { background: #e9f7ee; border-color: #c3e7d0; color: #1d6b3a; }
.ev-sahis   { background: #f4f1fa; border-color: #ded4ee; color: #4a2f78; }
.ev-sorunlu { background: #fdecec; border-color: #f5c9c9; color: #a32626; }
.ev-bekle   { background: #f4f6f8; border-color: #e2e7ec; color: #5c6976; }

/* ===================== Faz 06 (Madde 12+13) - yönetici notu + yetkili/şube rozetleri + popup ===================== */

/* Madde 13: tıklanabilir yetkili adı (yetkili olduğu firma sayısı >1) + parantez rozeti */
.yk-badge.yk-link { background: #eaf3fb; border-color: #cfe1f2; }
.yk-ad-link { cursor: pointer; color: var(--blue); text-decoration: underline dotted; text-underline-offset: 2px; }
.yk-ad-link:active { opacity: .6; }
.yk-rozet { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px;
            margin-left: 4px; padding: 0 5px; font-size: 10px; font-weight: 800; line-height: 16px;
            color: #fff; background: var(--blue); border-radius: 999px; }

/* Madde 13: aynı vergi nolu şube/merkez sayısı rozeti (firma-meta içinde, tıklanır) */
.sube-rozet-btn { font: inherit; font-size: 10px; font-weight: 700; color: var(--navy);
                  background: #eef4fb; border: 1px solid #d3e2f1; border-radius: 999px;
                  padding: 2px 9px; cursor: pointer; line-height: 1.5; }
.sube-rozet-btn:active { transform: scale(.97); background: #e0ecf9; }

/* Madde 12: firmanın yönetici (zimmet atama) notları - sahada salt gösterim bandı */
.firma-yonetici-not { display: flex; flex-direction: column; gap: 5px; margin-top: 6px;
                      padding: 7px 9px; background: #fef6e7; border: 1px solid #f0dfb0; border-radius: 9px; }
.yn-bas { font-weight: 700; color: #8a6d1f; }
.yn-oge { display: flex; flex-direction: column; gap: 1px; }
.yn-metin { color: var(--ink); word-break: break-word; line-height: 1.35; }
.yn-meta { font-size: 10.5px; color: var(--muted); }

/* Faz 03 (27.07): saha geri dönüş etiketleri - kartta salt gösterim (admin havuzundaki lila tema) */
.firma-etiketler { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px;
                   padding: 6px 9px; background: #f8f4fe; border: 1px solid #e4d8f6; border-radius: 9px; }
.fe-bas { font-weight: 700; color: #5a3d8a; }
.fe-badge { padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6;
            background: #efe6fb; border: 1px solid #d9c9f0; color: #4a2f78; }

/* Madde 13: firma popup'ı (yetkilinin diğer firmaları + şube/merkez) - bottom-sheet, modal üstünde */
.fpop { position: fixed; inset: 0; background: rgba(10,25,45,.45); display: flex;
        align-items: flex-end; justify-content: center; z-index: 60; }
.fpop[hidden] { display: none; }
.fpop-sheet { background: #fff; width: 100%; max-width: 430px; border-radius: 18px 18px 0 0;
              max-height: 88vh; display: flex; flex-direction: column; animation: sheetUp .25s; }
.fpop-bar { position: sticky; top: 0; display: flex; align-items: center; gap: 8px;
            padding: 13px 14px 9px; border-bottom: 1px solid var(--line); background: #fff;
            border-radius: 18px 18px 0 0; }
.fpop-bas { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.fpop-kapat { width: 32px; height: 32px; flex: 0 0 auto; border: none; border-radius: 50%;
              background: #eef1f5; color: var(--navy); font-size: 14px; cursor: pointer; }
.fpop-kapat:active { background: #dfe4ea; }
.fpop-uyari { font-size: 11px; color: var(--muted); padding: 8px 14px 0; line-height: 1.35; }
.fpop-govde { padding: 12px 14px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.fpop-bos { font-size: 12.5px; color: var(--muted); text-align: center; padding: 22px 6px; }
/* Her firma ayri beyaz kart: net ayrim + hafif govde (kalabalik gorunumu azaltir) */
.fpop-firma { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
              background: #fbfcfe; box-shadow: 0 1px 2px rgba(16,49,79,.04); }
/* Baslik: unvan (sol, kalin) + durum/tip rozetleri (sag ust) */
.fpop-head { display: flex; align-items: flex-start; gap: 8px; }
.fpop-unvan { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.fpop-head-sag { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
/* Komite: buyuk pill yerine hafif alt baslik */
.fpop-komite { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.fpop-ms { font-size: 10px; font-weight: 700; color: #5b6b7b; background: #eef2f6;
           border: 1px solid #dde6ef; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.fpop-ms.merkez { color: #1e7e4f; background: #e7f7ef; border-color: #c6e8d6; }
.fpop-durum { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
              color: #5b6b7b; background: #eef2f6; border: 1px solid #dde6ef; }
.fpop-durum.faal { color: #1e7e4f; background: #e7f7ef; border-color: #c6e8d6; }
.fpop-durum.askida { color: #c0392b; background: #fdeaea; border-color: #f3c2c2; }
/* Etiketli bilgi tablosu: 2 kolon (etiket | deger) hizali */
.fpop-bilgi { display: grid; grid-template-columns: max-content 1fr; gap: 5px 10px; margin-top: 9px;
              padding-top: 9px; border-top: 1px solid #eef2f6; }
.fpop-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase;
            letter-spacing: .3px; padding-top: 1px; white-space: nowrap; }
.fpop-val { font-size: 12px; color: var(--ink); line-height: 1.35; word-break: break-word; min-width: 0; }
.fpop-bosta { color: var(--muted); font-style: italic; }

/* ===================== Faz 10 (Madde 7.1): Ajanda - etkinlik + toplanti takvimi ===================== */
.aj-yarin { background: #fff8e6; border: 1px solid #f0dfb0; border-radius: 13px;
            padding: 10px 13px; margin-bottom: 12px; }
.aj-yarin-baslik { font-size: 12px; font-weight: 800; color: #8a6d1f; margin-bottom: 4px; }
.aj-yarin-satir { font-size: 12.5px; color: var(--ink); line-height: 1.4; }

.aj-sekmeler { display: flex; gap: 8px; margin-bottom: 12px; }
.aj-sekme { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted);
            background: #fff; border: 1px solid var(--line); border-radius: 999px;
            padding: 8px 10px; text-decoration: none; }
.aj-sekme.on { color: #fff; background: var(--navy); border-color: var(--navy); }

.aj-bolum { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase;
            letter-spacing: .4px; margin: 12px 2px 7px; }
.aj-kart { display: flex; gap: 11px; background: #fff; border: 1px solid var(--line);
           border-radius: 13px; padding: 11px 13px; margin-bottom: 8px; }
.aj-kart.aj-etkinlik { border-left: 4px solid #7b3fa9; }
.aj-kart.aj-bugun { background: #fff8e6; }
.aj-kart.aj-iptal { opacity: .6; }
.aj-kart.aj-iptal .aj-ad { text-decoration: line-through; }
.aj-tarih { flex: 0 0 auto; width: 52px; text-align: center; border-right: 1px solid #eef2f6;
            padding-right: 10px; }
.aj-gunno { font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.aj-ay { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.aj-gun { font-size: 9.5px; color: var(--muted); }
.aj-icerik { flex: 1; min-width: 0; }
.aj-ust { display: flex; align-items: baseline; gap: 8px; }
.aj-ad { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.aj-saat { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--navy); }
.aj-alt { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; word-break: break-word; }
.aj-alt.aj-not { font-style: italic; }
.aj-alt.aj-cekirdek { color: var(--navy); font-weight: 600; }
.aj-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }

/* Ajanda görüntüleme modu (Liste / Takvim) */
.aj-modlar { display: flex; gap: 8px; margin-bottom: 12px; }
.aj-mod { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted);
          background: #fff; border: 1px solid var(--line); border-radius: 999px;
          padding: 8px 10px; text-decoration: none; }
.aj-mod.on { color: #fff; background: var(--navy); border-color: var(--navy); }

/* Aylık ızgara takvim (telefon) */
.aj-takvim-bar { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 8px; }
.aj-ay-baslik { font-size: 14px; font-weight: 800; color: var(--navy); text-transform: capitalize; }
.aj-nav-ok { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none;
             border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 13px; }
.aj-legend { display: flex; gap: 16px; justify-content: center; margin: 0 0 10px; font-size: 11px; color: var(--muted); }
.aj-legend span { display: inline-flex; align-items: center; gap: 5px; }

.aj-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.aj-gh { text-align: center; font-size: 10px; font-weight: 800; color: var(--muted);
         padding: 3px 0 5px; text-transform: uppercase; letter-spacing: .3px; }
.aj-hucre { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
            padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.aj-hucre.ay-disi { opacity: .38; }
.aj-hucre.bugun { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.aj-hucre.tiklanir { cursor: pointer; }
.aj-hucre.on { background: #fff8e6; border-color: #f0dfb0; }
.aj-hn { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.aj-noktalar { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.aj-nokta { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.aj-nokta.top { background: var(--navy); }
.aj-nokta.etk { background: #7b3fa9; }

.aj-gun-detay { margin-top: 14px; }
.aj-gun-liste-baslik { font-size: 12px; font-weight: 800; color: var(--navy); text-transform: capitalize;
                       margin: 0 2px 8px; }
.aj-gun-bos { font-size: 12.5px; color: var(--muted); text-align: center; padding: 20px 0; }
.gizli { display: none; }

/* ===================== Responsive genis ekran duzeni (10.07.2026) ===================== */
/* Dar ekran (telefon) gorunumu yukaridaki kurallarla AYNEN korunur; asagidaki bloklar yalnizca
   genis ekranda devreye girer. Hicbir eleman gizlenmez, kaldirilmaz veya davranis degistirmez;
   yalnizca yerlesim genisler. Tum secici/JS kancalari (id, data-*, onclick) ayni kalir. */

/* Ortalanan modal/pencereler icin yumusak giris (masaustu; alttan kayma yerine) */
@keyframes sheetOrta { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 768px) {
    /* Cerceve genisler, icerik ferahlar */
    .phone { max-width: 760px; }
    .content { padding: 18px 24px 28px; }

    /* Ust bar: telefon centik boslugu gereksiz */
    .appbar { padding: 16px 24px 14px; order: -2; }

    /* Sekme cubugu altta degil ustte (app bar altinda) yapisik gezinme cubugu olur.
       Ayni elemandir; yalnizca flex sirasi ve konumu degisir. */
    .tabbar { order: -1; position: sticky; top: 0; bottom: auto; z-index: 20;
              border-top: none; border-bottom: 1px solid var(--line);
              box-shadow: 0 1px 4px rgba(16,49,79,.06); }
    .tab { display: flex; align-items: center; justify-content: center; gap: 7px;
           font-size: 16px; padding: 11px 0; }
    .tab span { display: inline; font-size: 13.5px; margin-top: 0; }
    .tab.on { box-shadow: inset 0 -2px 0 var(--accent); }

    /* Sekme cubugu artik altta olmadigi icin toast asagi inebilir */
    .toast { bottom: 28px; }

    /* Giris / sifre formlari genis ekranda dar kart olarak ortalanir */
    .login { max-width: 430px; margin: 0 auto; width: 100%; }

    /* Filtre satiri: 2 yerine 4 kolona kadar yan yana */
    .filtre-satir > .filtre-sel, .filtre-satir > .msel { flex: 1 1 calc(25% - 6px); min-width: 150px; }
    .msel-panel { max-width: 360px; }

    /* Firma listeleri (Firmalarim + Takip) 2 kolon karta gecer; kart ici duzen ayni kalir.
       JS'in tek tek kart gizlemesi (display:none) grid'de de ayni sekilde calisir. */
    #firmaList, #takipList { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
    #firmaList .firma, #takipList .firma { margin-bottom: 0; }

    /* Alt-sayfa (bottom-sheet) modallar ortalanmis pencere olur; icerik ve davranis ayni */
    .modal { align-items: center; padding: 24px; }
    .sheet { max-width: 560px; border-radius: 16px; max-height: 88vh; animation: sheetOrta .2s; }
    .fpop { align-items: center; padding: 24px; }
    .fpop-sheet { max-width: 560px; border-radius: 16px; max-height: 88vh; animation: sheetOrta .2s; }
    .fpop-bar { border-radius: 16px 16px 0 0; }

    /* Ziyaret durumu secenekleri 3 kolon */
    .opts { grid-template-columns: 1fr 1fr 1fr; }

    /* Ozet/Takip siralama cubuklarinda isim kolonu genis */
    .bar .nm { flex: 0 0 200px; }

    /* Ajanda: sekme/mod dugmeleri tam genislige yayilmasin, takvim hucreleri ferah olsun */
    .aj-modlar, .aj-sekmeler { max-width: 460px; }
    .aj-hucre { min-height: 64px; }
}

@media (min-width: 1200px) {
    .phone { max-width: 1080px; }
    #firmaList, #takipList { grid-template-columns: repeat(3, 1fr); }
}

/* Fare olan cihazlarda ince hover geri bildirimi (dokunmatik davranis degismez) */
@media (hover: hover) and (pointer: fine) {
    .firma:not(.firma-salt):hover { background: #f0f4f8; }
    .tab:hover { background: #f1f6fc; }
    .seg-btn:not(.on):hover, .pg-btn:not(:disabled):hover, .indir-btn:not(:disabled):hover,
    .fotobtn:hover, .aj-nav-ok:hover, .aj-mod:not(.on):hover, .aj-sekme:not(.on):hover { background: #f1f7ff; }
    .msel-panel label:hover { background: #f0f4f8; }
    .opt:hover { border-color: var(--accent); }
    .opt.sel:hover { border-color: var(--green); }
    .yk-tel:hover, .tel-link:hover, .ph-link:hover, .vfoto:hover { text-decoration: underline; }
    .sheet .save:not(:disabled):hover { filter: brightness(1.12); }
    .appbar-cikis:hover { background: rgba(255,255,255,.28); }
    .sube-rozet-btn:hover { background: #e0ecf9; }
}
