/* PARTI_TAKIP - Tek stil dosyası. Harici kütüphane kullanılmaz.
   Renkler taban.html içinde ayarlar.py'dan gelen CSS değişkenleri ile tanımlanır,
   ancak bu dosya sonradan yüklendiği için aşağıdaki :root bloğu onları geçersiz
   kılar - tüm renkler TEK YERDE (burada) tanımlıdır, geri dönmek istenirse
   sadece bu iki bloğü (aktif tema / hemen altındaki yorum satırındaki eski açık
   tema) yer değiştirmek yeterlidir. */

:root {
    /* --- AKTİF TEMA: Açık (orijinal) ----------------------------------------- */
    --lacivert: #10243A;
    --kirmizi: #B3121D;
    --altin: #C8A24A;
    --zemin: #E9EDF1;
    --kart: #FFFFFF;
    --yazi-ana: #1c2833;
    --yazi-ikincil: #8a93a2;
    --kenarlik: #d9dfe6;
    --kenarlik-ince: #eef1f5;
    --kirmizi-parlak: #B3121D;
    --golge: rgba(16, 36, 58, 0.08);
}

/* --- ESKİ KOYU LACİVERT TEMA (yedek - geri dönmek için yukarıdaki :root
   bloğunun içeriğini bu değerlerle değiştirin) --------------------------------
:root {
    --lacivert: #10243A;
    --kirmizi: #B3121D;
    --altin: #C8A24A;
    --zemin: #1B2E45;
    --kart: #243B57;
    --yazi-ana: #F2F4F7;
    --yazi-ikincil: #A9B6C6;
    --kenarlik: #C8A24A;
    --kenarlik-ince: rgba(200, 162, 74, 0.25);
    --kirmizi-parlak: #FF8A8A;
    --golge: rgba(0, 0, 0, 0.35);
}
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--zemin);
    color: var(--yazi-ana);
    padding-top: 64px;
    padding-bottom: 72px;
    min-height: 100vh;
}

/* Masaüstünde büyüyen logo yüzünden üst şerit yükseliyor (146px); içerik
   şeridin altına girmesin diye üstten boşluk da aynı oranda artırılır. */
@media (min-width: 900px) {
    body {
        padding-top: 146px;
    }
}

body.modal-acikken {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* --- Üst Bar --------------------------------------------------------- */

.ust-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--lacivert);
    color: #fff;
}

.ust-bar-ic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}

@media (min-width: 900px) {
    .ust-bar-ic {
        padding: 14px 24px;
    }
}

.ust-bar-baslik {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.ust-bar-logo {
    height: 30px;
    width: auto;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Masaüstünde logo ve yanındaki yazı yaklaşık 3 katına büyütülür (30/38px -> 114px). */
@media (min-width: 900px) {
    .ust-bar-logo {
        height: 114px;
        margin-right: 22px;
    }
}

.ust-bar-baslik-metin {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ust-bar-parti {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.ust-bar-ilce {
    font-size: 0.72rem;
    color: #cfd8e3;
}

@media (min-width: 900px) {
    .ust-bar-parti {
        font-size: 3.1rem;
    }

    .ust-bar-ilce {
        font-size: 2.1rem;
    }
}

.ust-bar-eylemler {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ust-menu {
    display: none;
}

@media (min-width: 900px) {
    /* İleride geri açılabilir: masaüstü üst menüsü şimdilik gizleniyor.
       Yapı (HTML) ve aşağıdaki stiller olduğu gibi duruyor, yalnızca
       display:none ile kapatıldı; geri almak için bunu flex yapmak yeterli. */
    .ust-menu {
        display: none;
        align-items: center;
        gap: 26px;
    }

    .ust-menu a {
        position: relative;
        color: #fff;
        font-size: 0.86rem;
        font-weight: 600;
        padding: 4px 0;
        border-bottom: 2px solid transparent;
    }

    .ust-menu a.aktif {
        color: var(--altin);
        border-bottom-color: var(--altin);
    }

    .ust-menu .rozet {
        position: static;
        display: inline-flex;
        margin-left: 4px;
    }
}

.ust-bar-eylemler a {
    color: #fff;
    font-size: 1.2rem;
}

.uc-cizgi {
    height: 4px;
    display: flex;
}

.uc-cizgi span {
    flex: 1;
}

.uc-cizgi .kirmizi { background: var(--kirmizi); }
.uc-cizgi .altin { background: var(--altin); }

/* --- Alt Menü ---------------------------------------------------------- */

.alt-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--kart);
    border-top: 1px solid var(--kenarlik);
    display: flex;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

@media (min-width: 900px) {
    .alt-menu {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

.alt-menu a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    color: #7a8494;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    position: relative;
}

.alt-menu a.aktif {
    color: var(--lacivert);
}

.alt-menu .simge {
    font-size: 1.3rem;
    line-height: 1;
}

.rozet {
    position: absolute;
    top: 2px;
    right: 22%;
    background: var(--kirmizi);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* --- İçerik Kapsayıcı ---------------------------------------------------- */

.icerik {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 14px 16px 20px;
}

@media (min-width: 900px) {
    .icerik {
        padding-left: 32px;
        padding-right: 32px;
    }
}

.sayfa-baslik {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lacivert);
    margin-bottom: 12px;
}

.bolum-baslik {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--yazi-ikincil);
    margin: 18px 0 8px;
}

/* --- Kart ----------------------------------------------------------------- */

.kart {
    width: 100%;
    box-sizing: border-box;
    background: var(--kart);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--golge);
    padding: 14px;
    margin-bottom: 12px;
}

/* --- Sekmeler --------------------------------------------------------------- */

.sekmeler {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.sekmeler a, .sekmeler button {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #d9dfe6;
    color: #4a5568;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.sekmeler a.aktif, .sekmeler button.aktif {
    background: var(--lacivert);
    border-color: var(--lacivert);
    color: #fff;
}

/* --- Kişi Kartı ------------------------------------------------------------- */

.kisi-kart {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--kart);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--golge);
    margin-bottom: 10px;
    overflow: hidden;
    border-left: 6px solid #ccc;
}

.kisi-kart.serit-baskanlik { border-left-color: var(--altin); }
.kisi-kart.serit-yonetim { border-left-color: var(--lacivert); }
.kisi-kart.serit-temsilci { border-left-color: var(--kirmizi); }

.kisi-kart-ic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    flex: 1;
    min-width: 0;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lacivert);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kisi-kart-bilgi {
    min-width: 0;
}

.kisi-kart-ad {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--yazi-ana);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kisi-kart-detay {
    font-size: 0.8rem;
    color: #6b7684;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Avatar Büyük (detay sayfası) ------------------------------------------- */

.avatar-buyuk {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--lacivert);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0 auto 10px;
    overflow: hidden;
}

.avatar-buyuk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Etiketler (rozet metinleri) -------------------------------------------- */

.etiket {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.etiket-normal { background: #e2e8f0; color: #475569; }
.etiket-onemli { background: #fdecc8; color: #8a5a00; }
.etiket-acil { background: #fbdada; color: var(--kirmizi); }

.etiket-yeni { background: var(--kirmizi); color: #fff; }

.etiket-durum-yeni { background: #dbeafe; color: #1d4ed8; }
.etiket-durum-islemde { background: #fdecc8; color: #8a5a00; }
.etiket-durum-cozuldu { background: #d7f3df; color: #157347; }
.etiket-durum-olumsuz { background: #fbdada; color: var(--kirmizi); }

.etiket-tamamlandi { background: #d7f3df; color: #157347; }
.etiket-bekliyor { background: #fdecc8; color: #8a5a00; }

/* --- Butonlar --------------------------------------------------------------- */

.dugme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    text-align: center;
}

.dugme-birincil { background: var(--lacivert); color: #fff; }
.dugme-vurgu { background: var(--kirmizi); color: #fff; }
.dugme-altin { background: var(--altin); color: #3a2c00; }
.dugme-ikincil { background: #fff; color: var(--lacivert); border: 1px solid #c7d0da; }
.dugme-tehlike { background: #fff; color: var(--kirmizi); border: 1px solid #f0b8bd; }
.dugme-blok { display: flex; width: 100%; }
.dugme-kucuk { padding: 7px 12px; font-size: 0.8rem; border-radius: 8px; }
.dugme-buyuk { padding: 16px 20px; font-size: 1.05rem; }

.dugme-ara {
    background: #1a9850;
    color: #fff;
}

/* --- Formlar ------------------------------------------------------------------ */

.form-grup {
    margin-bottom: 14px;
}

.form-grup label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 5px;
}

.form-grup input[type=text],
.form-grup input[type=tel],
.form-grup input[type=email],
.form-grup input[type=password],
.form-grup input[type=date],
.form-grup input[type=time],
.form-grup input[type=file],
.form-grup select,
.form-grup textarea {
    width: 100%;
    border: 1px solid var(--kenarlik);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: #1c2833;
}

.form-grup textarea {
    min-height: 90px;
    resize: vertical;
}

.form-satir {
    display: flex;
    gap: 10px;
}

.form-satir .form-grup {
    flex: 1;
    min-width: 0;
}

.form-yardim {
    font-size: 0.72rem;
    color: var(--yazi-ikincil);
    margin-top: 4px;
}

/* --- Tik Listesi (gizlilik ayarları vb.) ------------------------------------ */

.tik-liste {
    display: flex;
    flex-direction: column;
}

.tik-satir {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--kenarlik-ince);
    font-size: 0.9rem;
    color: var(--yazi-ana);
    cursor: pointer;
}

.tik-satir:last-child {
    border-bottom: none;
}

.tik-satir input[type=checkbox] {
    width: 19px;
    height: 19px;
    min-width: 19px;
    accent-color: var(--altin);
    cursor: pointer;
}

/* --- Arama Kutusu ---------------------------------------------------------- */

.arama-kutu {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.arama-kutu input {
    flex: 1;
    border: 1px solid var(--kenarlik);
    border-radius: 10px;
    padding: 11px 14px;
    background: #fff;
}

/* --- Bilgi Satırları (detay sayfaları) --------------------------------------- */

.bilgi-satir {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--kenarlik-ince);
    font-size: 0.88rem;
}

.bilgi-satir:last-child {
    border-bottom: none;
}

.bilgi-etiket {
    color: var(--yazi-ikincil);
    flex: 0 0 42%;
}

.bilgi-deger {
    color: var(--yazi-ana);
    font-weight: 600;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

/* --- Yönetime Özel Kutu (kesikli çerçeve) ------------------------------------ */

.gizli-kutu {
    border: 2px dashed var(--kirmizi);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff8f8;
}

.gizli-kutu-baslik {
    color: var(--kirmizi-parlak);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

/* --- İstatistik Kartları (ana sayfa) ------------------------------------------ */

.istatistik-izgara {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 6px;
}

.istatistik-kart {
    background: var(--kart);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--golge);
    padding: 14px;
    text-align: center;
}

.istatistik-sayi {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--lacivert);
}

.istatistik-etiket {
    font-size: 0.72rem;
    color: var(--yazi-ikincil);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* --- Teşkilat Şeması ve Mahalleler (ana sayfa) --------------------------------- */

.sema-izgara {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 6px;
    align-items: start;
}

@media (min-width: 900px) {
    .sema-izgara {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* Kartın en üstünde, köşe yuvarlaklığına uyan 4px'lik kırmızı vurgu şeridi. */
.sema-kart {
    border-top: 4px solid var(--kirmizi);
}

.sema-kart > .bolum-baslik {
    color: var(--lacivert);
}

/* "Yönetim Kurulu" başlığı: ortalı, lacivert, aralıklı-yarı kalın, üstünde/
   altında ferah boşluk. */
.sema-etiket {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lacivert);
    text-align: center;
    margin: 22px 0 16px;
}

.sema-govde {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sema-yonetim {
    width: 100%;
}

/* İlçe başkanı satırı: açık gri, içeriği kadar geniş, kartın içinde ortalı. */
.sema-baskan-satir {
    display: flex;
    justify-content: center;
}

.sema-baskan-kutu {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--zemin);
    border-radius: 16px;
    padding: 10px 22px 10px 10px;
}

.sema-baskan-metin {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sema-baskan-etiket {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--yazi-ikincil);
    margin-bottom: 2px;
}

.sema-foto {
    border-radius: 50%;
    background: var(--lacivert);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.sema-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sema-foto-baskan {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border: 3px solid var(--altin);
    font-size: 2rem;
}

@media (min-width: 900px) {
    .sema-foto-baskan {
        width: 120px;
        height: 120px;
        font-size: 2.4rem;
    }
}

.sema-ad {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--lacivert);
}

.sema-izgara-uyeler {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 6px;
}

/* Telefonda 3, orta ekranda (900px+) 5, geniş ekranda (1400px+) 8 üye bir
   satırda - üye sayısı (1 ile 40 arası) ne olursa olsun aynı ızgarayı
   kullanır; eksik satır flex ile ortalanır, sabit sütun sayısı yazılmaz. */
.sema-uye {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    /* Her formülün sonundaki "- 1px" pay, alt piksel yuvarlamasının satır
       başına düşen kutu sayısını (kenarlık/dolgu eklendikten sonra bile)
       bozmaması için küçük bir güvenlik boşluğu bırakır. min-width:0 ise
       flex öğesinin varsayılan "auto" min-genişliğini kapatır - yoksa uzun
       görev yazısı (nowrap) kutuyu hesaplanan genişlikten daha geniş
       tutmaya zorlar ve satır başına düşen kutu sayısı bozulur. */
    flex: 0 0 calc((100% - 12px) / 3 - 1px);
    min-width: 0;
    padding: 12px 8px;
    background: var(--kart);
    border: 1px solid var(--kenarlik-ince);
    border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 900px) {
    .sema-uye {
        flex: 0 0 calc((100% - 24px) / 5 - 1px);
    }
}

@media (min-width: 1400px) {
    .sema-uye {
        flex: 0 0 calc((100% - 42px) / 8 - 1px);
    }
}

/* Dolu üye kutusu: üzerine gelince kenarlık lacivert olur, kutu hafifçe belirginleşir. */
a.sema-uye:hover {
    border-color: var(--lacivert);
    box-shadow: 0 3px 10px rgba(16, 36, 58, 0.12);
}

.sema-foto-uye {
    width: 70px;
    height: 70px;
    border: 2px solid var(--lacivert);
    font-size: 1.3rem;
}

@media (min-width: 900px) {
    .sema-foto-uye {
        width: 90px;
        height: 90px;
        font-size: 1.6rem;
    }
}

/* Ad soyad en fazla 2 satıra sığar (taşarsa "..." ile kesilir), böylece
   uzun isimler kutuyu büyütüp sıradaki üyeleri kaydırmaz - tüm kutular
   aynı yükseklikte, görev yazısı her zaman aynı hizada başlar. */
.sema-uye-ad {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
    width: 100%;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--lacivert);
    line-height: 1.25;
    overflow-wrap: break-word;
}

.sema-uye-gorev {
    width: 100%;
    min-height: 1.4em;
    font-size: 0.64rem;
    color: var(--yazi-ikincil);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Yönetim Kurulu Izgarasında Boş Kutular ------------------------------------
   Veritabanında kaydı olmayan, yalnızca 40 kutuluk ızgarayı tamamlamak için
   kullanılan görsel yer tutucular. Boyut/hiza .sema-foto-uye ve .sema-uye-ad
   ile aynı sınıfları paylaştığı için otomatik eşleşir, burada yalnızca renk/
   kenar/işaret farkı tanımlanır. */

/* Boş kutunun dış çerçevesi de (fotoğrafın kendisi gibi) kesik çizgili ve soluk olur. */
.sema-uye-bos {
    border-style: dashed;
    border-color: #d9dfe6;
}

.sema-foto-bos {
    background: transparent;
    border: 2px dashed #c2c9d2;
    color: #c2c9d2;
}

.sema-bos-arti {
    font-size: 1.3rem;
    font-weight: 300;
    line-height: 1;
}

@media (min-width: 900px) {
    .sema-bos-arti {
        font-size: 1.6rem;
    }
}

.sema-uye-ad-bos {
    color: #c2c9d2;
}

a.sema-uye-bos {
    cursor: pointer;
}

/* Boş kutunun üzerine gelince sadece kesik çizgiler koyulaşır (dolu kutudaki
   gibi gölge eklenmez, bu yüzden genel .sema-uye:hover kuralından sonra gelip
   kenarlık ve gölgeyi kendi haline döndürür). */
a.sema-uye-bos:hover {
    border-color: #8a93a2;
    box-shadow: none;
}

a.sema-uye-bos:hover .sema-foto-bos {
    border-color: #8a93a2;
    color: #8a93a2;
}

.sema-uye-bos-kilitli {
    cursor: default;
}

.mahalle-listesi {
    display: flex;
    flex-direction: column;
}

/* Her mahalle grubu bir veya birden çok satırı bir arada tutar; kendisi kutu
   üretmez ki içindeki satırlar .mahalle-listesi'nin doğrudan çocuğu gibi dizilsin. */
.mahalle-grup {
    display: contents;
}

.mahalle-satir {
    display: grid;
    grid-template-columns: 1fr 1fr 46px;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 6px 4px 6px 8px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--kenarlik-ince);
}

.mahalle-listesi > .mahalle-grup:last-child .mahalle-satir:last-child {
    border-bottom: none;
}

.mahalle-satir-bos {
    border-left-color: var(--kirmizi-parlak);
}

.mahalle-ad {
    font-weight: 700;
    font-size: 14px;
    color: var(--yazi-ana);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mahalle-temsilci-ad {
    font-size: 14px;
    color: #4a5568;
}

.mahalle-bos-metin {
    color: #a0a8b4;
    font-style: italic;
}

.mahalle-foto {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--lacivert);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    border: 2px solid var(--kirmizi);
    flex: 0 0 auto;
    margin-left: auto;
}

.mahalle-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mahalle-foto-bos {
    background: transparent;
    border: 2px dashed #c2c9d2;
}

/* --- Mahalleler Açılır Penceresi (modal) --------------------------------------- */

.modal-arkaplan {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 36, 58, 0.6);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-arkaplan.acik {
    display: flex;
}

.modal-kutu-dar {
    max-width: 360px;
}

.modal-kutu {
    background: var(--kart);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--kenarlik-ince);
    flex: 0 0 auto;
}

.modal-baslik {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--lacivert);
}

.modal-kapat {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--yazi-ikincil);
    cursor: pointer;
    line-height: 1;
    padding: 6px 8px;
}

.modal-arama-satir {
    padding: 14px 18px 0;
    flex: 0 0 auto;
}

.modal-arama-kutu {
    width: 100%;
    border: 1px solid var(--kenarlik);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    background: #fff;
}

.modal-filtreler {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    flex: 0 0 auto;
}

.modal-filtre {
    border: 1px solid var(--kenarlik);
    background: #fff;
    color: #4a5568;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.modal-filtre.aktif {
    background: var(--lacivert);
    border-color: var(--lacivert);
    color: #fff;
}

.modal-govde {
    overflow-y: auto;
    padding: 0 18px 18px;
    flex: 1 1 auto;
}

.modal-geri-satir {
    margin-bottom: 12px;
}

.mahalle-foto-onizleme {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin-top: 8px;
    border: 2px solid var(--altin);
}

.mahalle-foto-onizleme img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mahalle-foto-degistir {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--lacivert);
    text-decoration: underline;
    cursor: pointer;
}

/* Ana Sayfa Genel Düzeni: solda (geniş) Teşkilat Şemamız kartı, sağda (dar)
   eylem düğmeleri + Duyurular/Yaklaşan Etkinlik. Geniş ekranda 2 sütun yan
   yana, telefonda tek sütun (teşkilat şeması, düğmeler, kutular alt alta). */

.anasayfa-govde {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (min-width: 900px) {
    .anasayfa-govde {
        /* Sağ sütun, Yunusemre haritasının büyük ve rahat seçilebilir görünmesi
           için 1fr'den 1.5fr'ye genişletildi (teşkilat şeması yine baskın kalır). */
        grid-template-columns: 2fr 1.5fr;
    }
}

.anasayfa-sag-dar {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Beş eylem düğmesi, ikişerli ızgara - tek sayıda düğme olduğu için son
   düğme otomatik olarak sola hizalı, sağ hücre boş kalır. */
.anasayfa-eylem-izgara {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.anasayfa-eylem-buton {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid var(--lacivert);
    border-radius: 10px;
    color: var(--lacivert);
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
}

.anasayfa-eylem-buton:hover {
    background: var(--lacivert);
    color: #fff;
}

.anasayfa-bilgi-yigin {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Kutular arası boşluğu tek başına üstteki gap belirlesin diye .kart'ın
   varsayılan alt boşluğu burada sıfırlanır. */
.anasayfa-kutu {
    min-width: 0;
    margin-bottom: 0;
}

.anasayfa-kutu-baslik {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--lacivert);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    margin-bottom: 10px;
}

.anasayfa-kutu-icerik {
    display: block;
}

.anasayfa-kutu-bos {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #a0a8b4;
    font-size: 0.88rem;
    text-align: center;
}

/* --- Yunusemre Haritası (ana sayfa) ------------------------------------------ */

.harita-kutu-govde {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    touch-action: manipulation;
}

/* Uydu görüntüsü ve SVG sınır katmanı AYNI kapsayıcının içinde, ikisi de
   mutlak konumlanıp tam kaplar. Küçük haritada bu kapsayıcı hiç değişmez/
   dönüşmez (dönüşüm sadece büyük pencerede, bu kapsayıcının bir KOPYASINA
   uygulanır — bkz. .harita-buyuk-modal-yakinlastirma). */
.harita-yakinlastirma {
    position: relative;
    width: 100%;
    aspect-ratio: 3328 / 3840;
}

.harita-uydu-resim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
    pointer-events: none;
}

.harita-yakinlastirma svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Mahalle dolgusu yarı saydam ki altındaki uydu görüntüsü görünsün; sınır
   çizgisi beyaz + ince koyu gölge ile her zeminde (açık/koyu fark etmeksizin)
   net seçilir. */
.harita-sekil {
    fill: rgba(216, 221, 227, 0.4);
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 1.6px rgba(16, 36, 58, 0.95));
    cursor: pointer;
    transition: fill 0.15s ease, filter 0.15s ease;
}

.harita-nokta {
    fill: rgba(216, 221, 227, 0.75);
    stroke: #ffffff;
    stroke-width: 3;
    filter: drop-shadow(0 0 1.6px rgba(16, 36, 58, 0.95));
    cursor: pointer;
    transition: fill 0.15s ease, filter 0.15s ease;
}

.harita-sekil.harita-dolu,
.harita-nokta.harita-dolu {
    fill: rgba(179, 18, 29, 0.55);
}

.harita-sekil.harita-bos,
.harita-nokta.harita-bos {
    fill: rgba(216, 221, 227, 0.4);
}

.harita-sekil:hover,
.harita-nokta:hover {
    fill-opacity: 1;
    filter: drop-shadow(0 0 2.5px rgba(16, 36, 58, 1)) brightness(0.88);
}

/* Küçük haritada tıklanan mahalle: sınırı altın ve kalın olur ki hangisinin
   seçili olduğu belli olsun. Küçük harita bunun dışında hiç değişmez. */
.harita-sekil.harita-secili,
.harita-nokta.harita-secili {
    stroke: var(--altin);
    stroke-width: 6;
    filter: drop-shadow(0 0 3px rgba(16, 36, 58, 1));
}

/* İlçe dış sınırı: en kalın, altın renkli, mahallelerin üstünde çizilir. */
.harita-ilce-sinir {
    fill: none;
    stroke: var(--altin);
    stroke-width: 7;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 2px rgba(16, 36, 58, 0.9));
    pointer-events: none;
}

/* Fare üstüne gelince görünen mahalle adı: beyaz yazı + koyu kenarlık, uydu
   görüntüsü üzerinde her zaman okunabilir olsun diye paint-order kullanılır. */
.harita-etiket {
    fill: #ffffff;
    stroke: var(--lacivert);
    stroke-width: 3.5px;
    paint-order: stroke fill;
    font-size: 30px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.harita-etiket.harita-etiket-aktif {
    opacity: 1;
}

.harita-konumsuz-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.harita-konumsuz-kutu {
    padding: 8px 10px;
    border-radius: 8px;
    background: #d8dde3;
    color: var(--lacivert);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.harita-konumsuz-kutu:hover {
    filter: brightness(0.92);
}

.harita-konumsuz-kutu.harita-dolu {
    background: var(--kirmizi);
    color: #fff;
}

.harita-bilgi-baslik {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--lacivert);
    margin-bottom: 8px;
}

.harita-bilgi-satir {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.harita-bilgi-foto {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--lacivert);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    border: 2px solid var(--altin);
    flex: 0 0 auto;
}

.harita-bilgi-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.harita-bilgi-metin {
    flex: 1;
    min-width: 0;
}

.harita-bilgi-ad {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--yazi-ana);
}

.harita-bilgi-gorev {
    font-size: 0.72rem;
    color: var(--yazi-ikincil);
}

.harita-bilgi-telefon {
    font-size: 0.72rem;
    color: var(--yazi-ikincil);
}

.harita-bilgi-nufus {
    font-size: 0.8rem;
    color: var(--lacivert);
    margin-bottom: 8px;
}

.harita-bilgi-nufus b {
    color: var(--kirmizi-parlak);
}

.harita-bilgi-bos {
    color: #a0a8b4;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* --- Büyük Mahalle Penceresi (haritadan tıklayınca ekranı kaplayan görünüm) --- */

.harita-buyuk-modal-arkaplan {
    position: fixed;
    inset: 0;
    background: rgba(6, 13, 22, 0.82);
    z-index: 320;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.harita-buyuk-modal-kutu {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1100px;
    background: var(--lacivert);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.harita-buyuk-modal-kapat {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.harita-buyuk-modal-kapat:hover {
    background: var(--kirmizi);
}

.harita-buyuk-modal-baslik {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    text-align: center;
    padding: 16px 54px 6px;
    flex: 0 0 auto;
}

.harita-buyuk-modal-harita {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #04080d;
    cursor: pointer;
}

/* Büyük pencerede haritaya (ikinci kez) tıklayınca uydu haritasının yeni
   sekmede açılacağını belirten köşe ipucu. */
.harita-buyuk-modal-ipucu {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(16, 36, 58, 0.78);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    pointer-events: none;
}

@media (max-width: 640px) {
    .harita-buyuk-modal-ipucu {
        font-size: 0.64rem;
        left: 8px;
        bottom: 8px;
        padding: 5px 9px;
    }
}

.harita-buyuk-modal-yakinlastirma {
    position: relative;
    transform-origin: 0 0;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.harita-buyuk-modal-yakinlastirma img,
.harita-buyuk-modal-yakinlastirma svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Seçilen mahalle: kalın altın sınır + hafif saydam dolgu ki uydu net görünsün. */
.harita-buyuk-modal-yakinlastirma .harita-sekil.harita-secili,
.harita-buyuk-modal-yakinlastirma .harita-nokta.harita-secili {
    stroke: var(--altin);
    stroke-width: 10;
    fill-opacity: 0.5;
    filter: none;
}

.harita-buyuk-modal-bilgi {
    flex: 0 0 auto;
    max-height: 34%;
    overflow-y: auto;
    background: var(--kart);
    padding: 14px 18px;
}

@media (max-width: 640px) {
    .harita-buyuk-modal-arkaplan {
        padding: 6px;
    }
    .harita-buyuk-modal-baslik {
        font-size: 1.05rem;
        padding: 12px 48px 6px;
    }
    .harita-buyuk-modal-bilgi {
        max-height: 40%;
    }
}

/* --- Hemşehri Dağılımı (ana sayfa sağ sütun kutusu + büyük mahalle penceresi) --- */

.hemsehri-toplam {
    font-size: 0.92rem;
    color: var(--lacivert);
    margin-bottom: 4px;
}

.hemsehri-toplam b {
    color: var(--kirmizi-parlak);
    font-size: 1.05rem;
}

.hemsehri-not {
    font-size: 0.72rem;
    color: var(--yazi-ikincil);
    margin-bottom: 10px;
}

.hemsehri-liste {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.hemsehri-satir {
    min-width: 0;
}

.hemsehri-satir-ust {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.hemsehri-il {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--yazi-ana);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hemsehri-sayi {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: #5a6472;
}

.hemsehri-yuzde {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--kirmizi-parlak);
    min-width: 32px;
    text-align: right;
}

.hemsehri-cubuk-govde {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e9edf1;
    overflow: hidden;
}

.hemsehri-cubuk {
    height: 100%;
    border-radius: 999px;
    background: var(--kirmizi);
    max-width: 100%;
}

.hemsehri-tumunu-goster {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    color: var(--lacivert);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

.hemsehri-tumunu-goster:hover {
    text-decoration: underline;
}

.hemsehri-kaynak {
    margin-top: 12px;
    font-size: 0.68rem;
    color: #a0a8b4;
}

/* --- Geniş Ekran Liste Izgarası (teşkilat, rehber, duyurular, belgeler, talepler) --- */

.liste-izgara {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 900px) {
    .liste-izgara {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (min-width: 1400px) {
    .liste-izgara {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.liste-izgara > .kisi-kart,
.liste-izgara > .liste-oge {
    margin-bottom: 0;
}

/* --- Çubuk Grafik (CSS ile, kütüphanesiz) ------------------------------------- */

.cubuk-satir {
    margin-bottom: 12px;
}

.cubuk-ust {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.cubuk-ad {
    font-weight: 600;
    color: var(--yazi-ana);
}

.cubuk-deger {
    font-weight: 700;
    color: var(--lacivert);
}

.cubuk-zemin {
    background: #edf1f5;
    border-radius: 8px;
    height: 12px;
    overflow: hidden;
}

.cubuk-dolu {
    background: linear-gradient(90deg, var(--lacivert), var(--altin));
    height: 100%;
    border-radius: 8px;
}

/* --- Uyarı Kutusu (rapor: temsilcisiz mahalleler) ------------------------------ */

.uyari-kutu {
    background: #fff8f0;
    border: 1px solid #f3d9a8;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #7a4b00;
    margin-bottom: 10px;
}

.uyari-kutu strong {
    display: block;
    margin-bottom: 4px;
}

/* --- Flash Mesajları -------------------------------------------------------- */

.mesajlar {
    margin-bottom: 12px;
}

.mesaj {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mesaj-basari { background: #d7f3df; color: #157347; }
.mesaj-hata { background: #fbdada; color: var(--kirmizi); }
.mesaj-uyari { background: #fdecc8; color: #8a5a00; }
.mesaj-bilgi { background: #dbeafe; color: #1d4ed8; }

/* --- Giriş Sayfası ------------------------------------------------------------ */

.giris-sayfa {
    position: relative;
    z-index: 0;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--lacivert);
}

.giris-kutu {
    position: relative;
    background: var(--kart);
    border-radius: 16px;
    padding: 26px 22px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.giris-amblem {
    display: block;
    height: 90px;
    width: auto;
    margin: 0 auto 12px;
}

.giris-baslik {
    text-align: center;
    font-weight: 800;
    color: var(--lacivert);
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.giris-alt-baslik {
    text-align: center;
    color: var(--yazi-ikincil);
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.giris-yardim {
    text-align: center;
    font-size: 0.72rem;
    color: #a0a8b4;
    margin-top: 14px;
}

/* --- Liste Öğeleri (duyuru, belge, etkinlik, talep) --------------------------- */

.liste-oge {
    display: block;
    background: var(--kart);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--golge);
    padding: 14px;
    margin-bottom: 10px;
}

.liste-oge-ust {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.liste-oge-baslik {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--yazi-ana);
}

.liste-oge-meta {
    font-size: 0.76rem;
    color: var(--yazi-ikincil);
    margin-top: 4px;
}

.liste-oge-metin {
    font-size: 0.86rem;
    color: #4a5568;
    line-height: 1.4;
}

.bos-durum {
    text-align: center;
    color: #a0a8b4;
    font-size: 0.88rem;
    padding: 30px 10px;
}

/* --- Daha Fazla Menü ----------------------------------------------------------- */

.menu-liste {
    background: var(--kart);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--golge);
    overflow: hidden;
    margin-bottom: 14px;
}

.menu-liste a, .menu-liste .menu-satir {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid var(--kenarlik-ince);
    font-weight: 600;
    font-size: 0.9rem;
}

.menu-liste a:last-child, .menu-liste .menu-satir:last-child {
    border-bottom: none;
}

.menu-satir-sol {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-simge {
    font-size: 1.1rem;
    width: 22px;
    flex: 0 0 22px;
    text-align: center;
    line-height: 1;
}

.menu-metin {
    flex: 1;
    min-width: 0;
}

.menu-ok {
    color: #c2c9d2;
}

/* --- Tablo (hesaplar) ------------------------------------------------------------ */

.tablo-kaydirici {
    overflow-x: auto;
}

table.veri-tablo {
    width: 100%;
    border-collapse: collapse;
    background: var(--kart);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.84rem;
}

table.veri-tablo th, table.veri-tablo td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--kenarlik-ince);
    white-space: nowrap;
}

table.veri-tablo th {
    background: #f4f6f9;
    color: #4a5568;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Yardımcı Sınıflar ------------------------------------------------------------ */

.satir { display: flex; }
.aralik { gap: 8px; }
.esit-genislik { flex: 1; }
.ust-bosluk { margin-top: 10px; }
.metin-orta { text-align: center; }
.metin-gri { color: var(--yazi-ikincil); }
.metin-kucuk { font-size: 0.78rem; }
.gizli { display: none; }
