/* ===== TEMEL RESETLEME VE GENEL STİLLER ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121214;
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden; /* Mobil kaydırmayı engelle */
}
.container { 
    display: flex; 
    min-height: 100vh; 
}

/* ===== YAN MENÜ (SIDEBAR) ===== */
.sidebar {
    width: 240px;
    background-color: #0e1117;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* Küçülmesini engelle */
    position: relative; /* Masaüstünde normal akışta */
    z-index: 1000;
    transition: transform 0.3s ease; /* Mobil için geçiş efekti */
    border-right: 1px solid #1f2937;
}
.logo-container { padding: 1.5rem; text-align: center; border-bottom: 1px solid #1f2937; }
.logo-container .logo { max-width: 80px; margin-bottom: 10px; border-radius: 50%; }
.logo-container h3 { color: #fff; font-size: 1.1em; }
.sidebar ul { list-style: none; flex-grow: 1; padding-top: 1rem; }
.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 0.85rem 1.5rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}
.sidebar ul li a:hover { background-color: #1f2937; border-left-color: #3498db; color: #ffffff; }
.sidebar ul li.active a { background-color: #1f2937; border-left-color: #3498db; font-weight: 600; color: #ffffff; }
.sidebar ul li:last-child { margin-top: auto; border-top: 1px solid #1f2937; }

/* ===== ANA İÇERİK ALANI ===== */
.content { 
    flex-grow: 1; 
    padding: 2rem; 
    overflow-y: auto; 
    max-height: 100vh;
    width: 100%;
    background-color: #121214;
}
.content h1 { 
    margin-bottom: 1.5rem; 
    color: #ffffff; 
    border-bottom: 2px solid #1f2937; 
    padding-bottom: 0.5rem; 
}

/* ===== MOBİL MENÜ (DÜZELTİLMİŞ) ===== */
.menu-toggle {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: #1f2937;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Mobilde göster */
    }
    .sidebar {
        position: fixed; /* Mobilde menüyü sabitle */
        height: 100%;
        transform: translateX(-240px); /* Gizle (Daha stabil) */
    }
    .sidebar.active {
        transform: translateX(0); /* JS ile 'active' class'ı gelince göster */
    }
    .content {
        padding-top: 4rem; /* Butonun arkasında kalmasın */
    }
}

/* ===== KARTLAR (Dashboard ve Formlar için) ===== */
.kart-container { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.kart {
    background: #161b26;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-grow: 1;
    flex-basis: 300px; 
    color: #e2e8f0;
}
.kart.kasa { border-left: 5px solid #3498db; }
.kart.gelir { border-left: 5px solid #2ecc71; }
.kart.gider { border-left: 5px solid #e74c3c; }
.kart.daire { border-left: 5px solid #f39c12; }
.kart h2 { color: #ffffff; }
.kart h3 { margin-bottom: 1.5rem; color: #f8fafc; border-bottom: 1px solid #2d3748; padding-bottom: 0.5rem;}
.kart h4 { color: #94a3b8; font-weight: 500; margin-bottom: 0.5rem; }

/* ===== FORMLAR ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: #cbd5e1; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #334155;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #1e293b;
    color: #f8fafc;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.form-group textarea { min-height: 80px; }

/* ===== BUTONLAR ===== */
.btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.btn:hover { background-color: #2980b9; }
.btn-secondary { background-color: #475569; }
.btn-secondary:hover { background-color: #334155; }

/* ===== TABLOLAR (Genel) ===== */
table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
table th, table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #2d3748; color: #cbd5e1; }
table th { background-color: #1e293b; font-weight: 600; color: #f8fafc; }
table tr:hover { background-color: #1a202c; }
.islem-ikonlari { white-space: nowrap; } 

/* ===== İKON BUTONLARI (WhatsApp, Düzenle, Sil) ===== */
.icon-btn { 
    text-decoration: none; 
    font-size: 1.4rem; 
    margin-right: 0.75rem; 
    transition: color 0.3s ease;
    vertical-align: middle;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
}
.icon-btn.info { color: #3498db; }
.icon-btn.info:hover { color: #2980b9; }
.icon-btn.whatsapp { color: #25D366; }
.icon-btn.whatsapp:hover { color: #128C7E; }
.icon-btn.edit { color: #f39c12; }
.icon-btn.edit:hover { color: #d35400; }
.icon-btn.delete { color: #e74c3c; }
.icon-btn.delete:hover { color: #c0392b; }

/* ===== MESAJLAR (Başarılı, Hata) ===== */
.msg { padding: 1rem; border-radius: 6px; margin-bottom: 1.5rem; border: 1px solid transparent; }
.msg.success { background-color: #064e3b; color: #6ee7b7; border-color: #047857; }
.msg.error { background-color: #7f1d1d; color: #fca5a5; border-color: #b91c1c; }

/* ===== AİDAT TAKİP MATRİSİ ===== */
.aidat-matrix { border-collapse: separate; border-spacing: 2px; width: 100%; }
.aidat-matrix th { font-size: 0.9em; padding: 10px; text-align: center; background-color: #1e293b; color: #f8fafc; min-width: 120px; }
.aidat-matrix td { padding: 0; text-align: center; vertical-align: middle; }
.aidat-matrix tbody tr td:first-child { text-align: left; padding: 10px; font-weight: 600; background-color: #161b26; color: #e2e8f0; min-width: 150px; }
.aidat-matrix tbody tr:hover td:not(:first-child) { opacity: 0.8; }
.odeme-durum { padding: 15px 10px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-size: 0.9em; }
.odeme-durum .fas { margin-right: 5px; }
.odeme-durum.odendi { background-color: #064e3b; color: #6ee7b7; }
.odeme-durum.odendi:hover { background-color: #047857; }
.odeme-durum.odenmedi { background-color: #7f1d1d; color: #fca5a5; }
.odeme-durum.odenmedi:hover { background-color: #b91c1c; }
.odeme-durum.yok { background-color: #1e293b; color: #64748b; cursor: not-allowed; }

/* ===== NOTLAR SAYFASI ===== */
.not-listesi { max-height: 500px; overflow-y: auto; }
.not-item { border: 1px solid #2d3748; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; position: relative; transition: border-color 0.3s ease, box-shadow 0.3s ease; background-color: #1e293b; }
.not-item:hover { border-color: #475569; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.not-baslik { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2d3748; padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
.not-baslik strong { font-size: 1.1em; color: #ffffff; }
.not-baslik small { font-size: 0.8em; color: #94a3b8; }
.not-icerik { color: #cbd5e1; line-height: 1.5; word-wrap: break-word; margin-bottom: 0.5rem; }
.not-islemler { display: flex; gap: 12px; justify-content: flex-end; padding-top: 0.5rem; border-top: 1px solid #2d3748; opacity: 0.5; transition: opacity 0.3s ease; }
.not-item:hover .not-islemler { opacity: 1; }
.not-duzenle { color: #3498db; text-decoration: none; font-size: 0.85em; cursor: pointer; transition: color 0.3s ease; }
.not-duzenle:hover { color: #2980b9; }
.not-sil { color: #e74c3c; text-decoration: none; font-size: 0.85em; transition: color 0.3s ease; }
.not-sil:hover { color: #c0392b; }

/* ===== KIRMIZI NOKTA (Not Göstergesi) ===== */
.kirmizi-nokta {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: kirmizi-pulse 2s infinite;
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.5);
}
@keyframes kirmizi-pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* ===== ANASAYFA NOTLAR PANELİ ===== */
.anasayfa-notlar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.anasayfa-notlar h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 0.75rem;
}
.anasayfa-notlar h3 .fas { margin-right: 8px; }
.anasayfa-not-item {
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}
.anasayfa-not-item:hover { background: rgba(255,255,255,0.25); }
.anasayfa-not-item:last-child { margin-bottom: 0; }
.anasayfa-not-baslik {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.anasayfa-not-baslik strong { font-size: 1.05em; color: #fff; }
.anasayfa-not-baslik small { font-size: 0.8em; color: rgba(255,255,255,0.7); }
.anasayfa-not-icerik { font-size: 0.95em; color: rgba(255,255,255,0.9); line-height: 1.5; }
.anasayfa-notlar .notlar-link {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.anasayfa-notlar .notlar-link:hover { opacity: 1; }

/* ===== GİDERLER SAYFASI ===== */
.gider-tutar, .tutar-gider { /* .tutar-gider eklendi */
    font-weight: bold;
    color: #c0392b;
    text-align: right; /* Sağa hizala */
    white-space: nowrap; /* Satır atlamasını engelle */
}

/* ===== RAPORLAMA SAYFASI ===== */
.rapor-baslik { text-align: center; margin-bottom: 2rem; border-bottom: 2px solid #2d3748; padding-bottom: 1rem; }
.rapor-logo { max-height: 120px; margin-bottom: 1rem; }
/* .chart-container index.php'de kullanıldığı için SİLİNMİYOR, sadece raporlar.php'den kaldırıldı */
.chart-container { position: relative; height: 350px; width: 100%; }
.rapor-tablo { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.rapor-tablo th, .rapor-tablo td {
    padding: 10px;
    border-bottom: 1px solid #2d3748;
    text-align: left;
    font-size: 0.9em;
    color: #cbd5e1;
    vertical-align: top; /* İçeriği üste hizala */
}
.rapor-tablo th {
    background-color: #1e293b;
    color: #f8fafc;
    vertical-align: middle; /* Başlıkları ortala */
}
.rapor-tablo tbody tr:nth-child(even) {
    background-color: #161b26; /* Zebra striping */
}
.rapor-tablo tbody tr:hover { background-color: #1f2937; }
.badge-success, .badge-danger { padding: 5px 10px; border-radius: 12px; font-size: 0.85em; font-weight: 600; color: #fff; white-space: nowrap; }
.badge-success .fas, .badge-danger .fas { margin-right: 4px; }
.badge-success { background-color: #2ecc71; }
.badge-danger { background-color: #e74c3c; }

/* ===== BİLGİ MODALI (Daire Bilgisi) ===== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.7); 
}
.modal-content {
    background-color: #161b26;
    margin: 10% auto; 
    padding: 20px 30px;
    border: 1px solid #2d3748;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    color: #e2e8f0;
}
.modal-content h2 { margin-bottom: 1rem; color: #ffffff; }
.modal-content h3 { margin-top: 1rem; margin-bottom: 0.5rem; color: #ffffff; }
.modal-content ul { padding-left: 20px; }
.modal-close-btn {
    color: #cbd5e1;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-close-btn:hover,
.modal-close-btn:focus {
    color: #ffffff;
}

/* ===== GİRİŞ SAYFASI (LOGIN) ===== */
.login-container { background: #161b26; border: 1px solid #2d3748; color: #e2e8f0; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); width: 300px; }
.login-container h2 { text-align: center; margin-bottom: 1.5rem; color: #ffffff; }
.login-container input { width: 100%; margin-bottom: 1rem; }
.login-container button { width: 100%; background-color: #3498db; }
.login-container button:hover { background-color: #2980b9; }
.login-container .error { color: #e74c3c; text-align: center; margin-bottom: 1rem; }


/* ===== YAZDIRMA STİLLERİ (PRINT) - GÜNCELLENDİ ===== */
@media print {
    @page { margin: 1cm; }
    body {
        background-color: #fff !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 10pt; /* Çıktı için temel font boyutu */
    }
    /* Siyah yazı rengini zorla */
    body, h1, h2, h3, h4, h5, h6, p, span, strong, td, th, div, label {
        color: #000000 !important;
    }
    title { display: none; }
    .sidebar, #rapor-filtre-formu, .btn, .menu-toggle, .no-print {
        display: none !important;
    }
    .container { display: block; width: 100%; }
    .content { padding: 0; overflow: visible; max-height: none; }
    
    /* Rapor Başlığı */
    .rapor-baslik {
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        page-break-after: avoid;
    }
    .rapor-logo {
        max-height: 100px;
    }
    .rapor-baslik h2 {
        font-size: 1.5rem;
        color: #000;
        margin-top: 0.5rem;
    }
    .rapor-baslik p {
        font-size: 1.1rem;
        color: #333;
    }

    /* Özet Kartları (YENİ KÜÇÜLTME EKLENDİ) */
    #rapor-sonuc-alani {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    .kart {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
        padding: 0.75rem; /* Padding küçültüldü */
        background: #fff !important;
        margin-bottom: 1rem; /* Kartlar arasına boşluk eklendi */
    }
    /* ID ile hedefleme */
    #rapor-ozet-kartlari {
        display: grid !important; /* 2x2 grid */
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem; /* Gap azaltıldı */
        page-break-inside: avoid;
    }
    
    /* *** YENİ DEĞİŞİKLİKLER BURADA *** */
    #rapor-ozet-kartlari .kart {
        display: flex; /* Etiket ve tutarı yan yana getir */
        justify-content: space-between; /* Aralarını aç */
        align-items: center; /* Dikeyde ortala */
        flex-basis: auto !important;
        width: 100%;
        margin-bottom: 0; /* Grid içindeki boşluğu sıfırla */
        padding: 0.5rem 0.75rem; /* Dikey padding azaltıldı */
    }
    /* Yazı tipleri küçültüldü */
    #rapor-ozet-kartlari .kart h4 {
        font-size: 0.7rem; /* Etiket yazısı küçültüldü */
        color: #333;
        margin-bottom: 0; /* Alt boşluk kaldırıldı */
        font-weight: 600;
        flex-shrink: 0; /* Küçülmesini engelle */
    }
    #rapor-ozet-kartlari .kart h2 {
        font-size: 1.0rem; /* Tutar yazısı küçültüldü */
        color: #000;
        margin-left: 10px; /* Araya boşluk koy */
    }
    /* Tahakkuk kartı (alttaki sarı kart) bu kuraldan muaf tutuluyor */
    #rapor-ozet-kartlari .kart[style*="flex-basis: 100%"] {
        grid-column: 1 / -1;
        background-color: #f9f9f9 !important;
        border-style: dashed;
        padding: 0.5rem 0.75rem;
        display: block; /* Flex özelliğini iptal et, normal kalsın */
    }
    #rapor-ozet-kartlari .kart[style*="flex-basis: 100%"] h4,
    #rapor-ozet-kartlari .kart[style*="flex-basis: 100%"] small {
        font-size: 0.7rem;
    }
    /* *** YENİ DEĞİŞİKLİKLER SONU *** */

    
    /* Tablolar */
    a { text-decoration: none; color: #000; }
    table, .rapor-tablo {
        font-size: 9pt; /* Tablolar için daha küçük font */
        page-break-inside: auto;
        width: 100%;
        border: 1px solid #ccc;
        margin-top: 0.5rem; /* Tablo ile başlık arasını aç */
    }
    .rapor-tablo tr { page-break-inside: avoid; }
    .rapor-tablo th, .rapor-tablo td {
        border-bottom: 1px solid #ddd !important;
        padding: 6px 8px; /* Daha sıkı padding */
        vertical-align: top;
        color: #000000 !important;
    }
    .rapor-tablo th {
        background-color: #eee !important;
        color: #000000 !important;
        vertical-align: middle;
    }
    .rapor-tablo tbody tr:nth-child(even) {
        background-color: #f8f9fa !important; /* Zebra deseni */
    }
    .tutar-gider {
        text-align: right;
        white-space: nowrap;
    }
    .badge-success, .badge-danger, .badge-warning {
        border: 1px solid #000;
        color: #000 !important;
        padding: 3px 6px;
        font-size: 0.8em;
    }
    .badge-success { background-color: #c3e6cb !important; }
    .badge-danger { background-color: #f5c6cb !important; }
    .badge-warning {
       background-color: #fdebd0 !important;
       border: 1px solid #000;
       color: #000 !important;
    }
    
    .print-only { display: block !important; }
}
/* ----- YAZDIRMA STİLLERİ SONU ----- */


/* ===== AİDAT MATRİSİ DÖNEM SİL BUTONU ===== */
.aidat-matrix th.donem-baslik {
    position: relative; /* İkonu konumlandırmak için */
    padding-right: 25px; /* İkon için yer aç */
}
.donem-sil-btn {
    position: absolute;
    top: 5px; /* Yukarıdan boşluk */
    right: 5px; /* Sağdan boşluk */
    font-size: 0.9em !important; /* İkon boyutunu küçült */
    padding: 2px !important; /* İç boşluğu azalt */
    color: #e74c3c !important; /* Kırmızı renk */
    opacity: 0.6;
}
.donem-sil-btn:hover {
    opacity: 1;
    color: #c0392b !important; /* Hover rengi */
}


/* ===== PROJE DETAY SAYFASI ===== */
.daire-secim-liste {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 6px;
    display: grid; /* Sütunlu görünüm için */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Otomatik sütun */
    gap: 5px;
}
.daire-checkbox {
    display: block;
    margin-bottom: 5px;
}
.daire-checkbox input {
    margin-right: 8px;
}

#manuel-tutarlar-bolumu {
    border: 1px dashed #334155;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    background-color: #1e293b;
}
.manuel-tutar-input {
    display: none; /* Başlangıçta gizli, JS ile gösterilecek */
}

.odeme-takip-tablo th, .odeme-takip-tablo td {
    vertical-align: middle; /* Hücre içeriğini ortala */
}

.hizli-odeme-form {
    display: flex;
    align-items: center;
    gap: 5px;
}
.hizli-odeme-form input {
    margin-bottom: 0 !important; /* Form-group'tan gelen boşluğu kaldır */
}
.hizli-odeme-form .btn-sm {
    padding: 5px 10px !important;
    font-size: 0.9em !important;
}

/* ===== PROJE DETAY - DAİRE SEÇİM LİSTESİ (Madde 1) ===== */
.daire-secim-liste.single-column {
    grid-template-columns: 1fr; /* Tek sütunlu yap */
    max-height: 300px; /* Yüksekliği biraz artır */
}

/* ===== ÖDEME TAKİBİ - BUTON RENKLERİ (Madde 2) ===== */
.btn-success { background-color: #2ecc71; }
.btn-success:hover { background-color: #27ae60; }
.btn-warning { background-color: #f39c12; }
.btn-warning:hover { background-color: #e67e22; }
.btn-sm { padding: 5px 10px !important; font-size: 0.9em !important; }

/* ===== AİDAT MATRİSİ - TUTAR VE BİREYSEL SİL BUTONU ===== */
.aidat-tutar {
    display: block; /* Alt satıra geç */
    font-size: 0.8em; /* Daha küçük */
    color: #6c757d; /* Gri renk */
    margin-top: 3px;
}
.odeme-durum {
    position: relative; /* Silme ikonunu konumlandırmak için */
    padding-right: 30px !important; /* İkon için yer aç */
}
.aidat-sil-btn {
    position: absolute;
    bottom: 5px; /* Alttan boşluk */
    right: 5px; /* Sağdan boşluk */
    font-size: 0.9em !important; 
    padding: 2px !important; 
    color: #e74c3c !important; 
    opacity: 0.5; /* Normalde soluk */
}
.odeme-durum:hover .aidat-sil-btn {
    opacity: 1; /* Üzerine gelince belirginleş */
}
.aidat-sil-btn:hover {
    color: #c0392b !important; 
}
.aidat-sil-btn .fa-user-slash {
    font-size: 0.9em; /* İkonu biraz küçült */
}


/* ===== AİDAT MATRİSİ - ÖDEME TARİHİ VE BUTONLAR ===== */
.odeme-durum-hucre {
    position: relative;
    padding: 8px !important; /* İç boşluğu ayarla */
    vertical-align: top; /* İçeriği yukarı hizala */
    min-width: 150px; /* Hücre genişliği */
}
.aidat-tutar {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: bold;
}
.durum-bilgi {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}
.odeme-durum-hucre.odendi .durum-bilgi { color: #155724; }
.odeme-durum-hucre.odenmedi .durum-bilgi { color: #721c24; }

.aidat-odeme-tarihi {
    display: block;
    font-size: 0.8em;
    color: #34495e;
    margin-bottom: 8px;
}
.tarih-duzenle-btn {
    font-size: 0.8em !important; /* İkonu küçült */
    padding: 0 !important;
    margin-left: 5px;
    color: #3498db !important;
}
.tarih-duzenle-btn:hover { color: #2980b9 !important; }

.odeme-yap-btn, .odeme-geri-al-btn {
    display: block; /* Butonları alt alta getir */
    width: calc(100% - 10px); /* Sil butonu için yer bırak */
    margin: 0 auto 5px auto; /* Ortala ve boşluk bırak */
    padding: 4px 8px !important;
    font-size: 0.85em !important;
}
.odeme-geri-al-btn { background-color: #f39c12 !important; }
.odeme-geri-al-btn:hover { background-color: #e67e22 !important; }
.odeme-yap-btn { background-color: #2ecc71 !important; }
.odeme-yap-btn:hover { background-color: #27ae60 !important; }

.aidat-sil-btn { /* Muaf tut butonu */
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 1em !important; /* Boyutu biraz ayarla */
    padding: 2px !important;
    color: #95a5a6 !important; /* Daha soluk gri */
    opacity: 0.7;
}
.odeme-durum-hucre:hover .aidat-sil-btn { opacity: 1; }
.aidat-sil-btn:hover { color: #e74c3c !important; }

/* Buton ikonları için genel */
.btn .fas, .icon-btn .fas { margin-right: 5px; }


/* ===== Daireler ve Aidatlar Sayfası için Profil Link Stili ===== */
.profil-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    display: inline-block;
    padding: 2px 0;
    transition: color 0.3s ease;
}
.profil-link:hover {
    color: #3498db;
    text-decoration: none;
}
/* Aidat matrisindeki link için özel */
.aidat-matrix .profil-link {
    display: block;
    padding: 10px;
    margin: -10px; /* Hücrenin padding'ini doldur */
}
.aidat-matrix .profil-link small {
    font-weight: 400;
}

/* ===== YENİ: Daire Profil Sayfası Stilleri ===== */
.profil-bilgi-listesi {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.profil-bilgi-listesi li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #2d3748;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1;
}
.profil-bilgi-listesi li:last-child {
    border-bottom: none;
}
.profil-bilgi-listesi strong {
    color: #3498db;
    min-width: 100px;
    display: inline-block;
    margin-right: 15px;
}

.profil-ozet-kart {
    padding: 1.5rem !important;
    text-align: center;
    border: none;
    color: #fff;
}
.profil-ozet-kart.gider {
    background-color: #e74c3c;
}
.profil-ozet-kart.gelir {
    background-color: #2ecc71;
}
.profil-ozet-kart h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
}
.profil-ozet-kart h2 {
    font-size: 2rem;
    color: #fff;
}

.profil-aidat-tablo th, .profil-aidat-tablo td {
    vertical-align: middle;
}
.profil-aidat-tablo tr.odendi {
    background-color: rgba(46, 204, 113, 0.05);
}
.profil-aidat-tablo tr.odenmedi {
    background-color: rgba(231, 76, 60, 0.05);
    font-weight: 600;
}
.profil-aidat-tablo tr.odenmedi td {
    border-bottom-color: rgba(231, 76, 60, 0.2);
}
.profil-aidat-tablo .icon-btn.btn-success { color: #2ecc71; }
.profil-aidat-tablo .icon-btn.btn-success:hover { color: #27ae60; }
.profil-aidat-tablo .icon-btn.btn-warning { color: #f39c12; }
.profil-aidat-tablo .icon-btn.btn-warning:hover { color: #e67e22; }


/* ===== YENİ: Anasayfa Hatırlatma Kartı Stilleri ===== */
#hatirlatma-karti {
    background-color: #fffaf0; /* Açık krem/sarı */
    border-left: 5px solid #f39c12; /* Turuncu */
    margin-bottom: 2rem;
}
#hatirlatma-karti h3 {
    color: #d35400; /* Koyu turuncu */
    margin-bottom: 1rem;
}
.hatirlatma-listesi {
    list-style: none;
    padding: 0;
}
.hatirlatma-listesi li {
    padding: 0.75rem 0;
    border-bottom: 1px dashed #fbeeca;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    font-weight: 500;
}
.hatirlatma-listesi li:last-child {
    border-bottom: none;
}
.hatirlatma-listesi .btn-sm {
    font-size: 0.85em !important;
    padding: 4px 10px !important;
    white-space: nowrap;
}

/* ===== YENİ: Ayarlar Sayfası Dinamik Form Stilleri ===== */
.dinamik-satir {
    display: grid;
    grid-template-columns: 1fr auto auto; /* Açıklama, Gün/Tarih, Sil Butonu */
    gap: 10px;
    margin-bottom: 10px;
}
/* Gider hatırlatması için */
#gider-listesi .dinamik-satir {
    grid-template-columns: 1fr 100px 50px;
}
/* Özel hatırlatma için */
#ozel-liste .dinamik-satir {
    grid-template-columns: 1fr 150px 50px;
}
.dinamik-satir input {
    margin-bottom: 0 !important; /* Form-group'tan gelen boşluğu kaldır */
}
.dinamik-satir .btn-sm {
    padding: 5px 10px !important;
    font-size: 0.9em !important;
    line-height: 1.5; /* Buton yüksekliğini input ile hizala */
}


/* ===== YENİ: Anasayfa Hatırlatma Kartı Stilleri (GÜÇLENDİRİLDİ) ===== */
@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(243, 156, 18, 0); }
    100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}
#hatirlatma-karti {
    background-color: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-left: 5px solid #f1c40f;
    margin-bottom: 2rem;
    animation: pulse-warning 2.5s infinite;
    border-radius: 8px;
    color: #e2e8f0;
}
#hatirlatma-karti h3 {
    color: #f1c40f;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.hatirlatma-listesi {
    list-style: none;
    padding: 0;
}
.hatirlatma-listesi li {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px dashed #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 500;
    flex-wrap: wrap;
    gap: 10px;
    color: #e2e8f0;
}
.hatirlatma-listesi li:last-child {
    border-bottom: none;
}
.hatirlatma-listesi li a.btn-sm {
    background-color: #f39c12 !important;
}
.hatirlatma-listesi li a.btn-sm:hover {
    background-color: #d35400 !important;
}

/* ===== YENİ: Ayarlar Sayfası Dinamik Form Stilleri ===== */
.dinamik-satir {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    margin-bottom: 10px;
}
#gider-listesi .dinamik-satir {
    grid-template-columns: 1fr 100px 50px;
}
#ozel-liste .dinamik-satir {
    grid-template-columns: 1fr 150px 50px;
}
.dinamik-satir input {
    margin-bottom: 0 !important;
}
.dinamik-satir .btn-sm {
    padding: 5px 10px !important;
    font-size: 0.9em !important;
    line-height: 1.5;
}

/* ===== GİDER KATEGORİ GRID (2 SÜTUN / MOBİL DUYARLI) ===== */
.gider-kategori-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.finansal-ozet-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.finansal-ozet-wrapper .kart {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
    .profil-aidat-tablo th, .profil-aidat-tablo td {
        padding: 0.5rem 0.3rem !important;
        font-size: 0.82rem !important;
    }
    .gider-kategori-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .form-grid-2col {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .profil-bilgi-listesi {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin: 1rem 0 !important;
    }
    .profil-bilgi-listesi li {
        padding: 0.4rem 0 !important;
        border-bottom: none !important;
        font-size: 0.95rem !important;
    }
    .profil-bilgi-listesi li strong {
        display: block !important;
        min-width: auto !important;
        margin-right: 0 !important;
        font-size: 0.85em;
        color: #94a3b8;
    }
    .profil-bilgi-listesi li:last-child {
        grid-column: span 2;
        border-top: 1px solid #2d3748;
        margin-top: 0.5rem;
    }
    .finansal-ozet-wrapper {
        gap: 0.5rem !important;
    }
    .finansal-ozet-wrapper .kart {
        padding: 0.75rem !important;
    }
    .finansal-ozet-wrapper h2 {
        font-size: 1.15rem !important;
    }
    .finansal-ozet-wrapper h4 {
        font-size: 0.8rem !important;
    }
}

/* ===== DASHBOARD CARD GRID 2x2 ===== */
.dashboard-ozet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .dashboard-ozet-grid {
        gap: 0.75rem;
    }
    .dashboard-ozet-grid .kart {
        padding: 1rem !important;
    }
    .dashboard-ozet-grid h2 {
        font-size: 1.35rem !important;
    }
    .dashboard-ozet-grid h4 {
        font-size: 0.85rem !important;
    }
}

.chart-kart-left {
    flex-basis: 30%;
    flex-grow: 1;
}
.chart-kart-right {
    flex-basis: 65%;
    flex-grow: 2;
}
.profil-kart-left {
    flex-basis: 55%;
    flex-grow: 2;
}
.profil-kart-right {
    flex-basis: 40%;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .chart-kart-left, .chart-kart-right, .profil-kart-left, .profil-kart-right {
        flex-basis: 100% !important;
    }
}

/* ===== AIDAT TAKIP - RADIKAL MASTER/DETAIL VIEW ===== */
.aidat-takip-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.5rem;
}
.daire-listesi-sol {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 5px;
}
.daire-liste-elemani {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
}
.daire-liste-elemani:hover {
    background: #334155;
    border-color: #475569;
}
.daire-liste-elemani.selected {
    background: #3498db;
    border-color: #2980b9;
    color: #ffffff;
}
.daire-no-badge {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    min-width: 55px;
    text-align: center;
}
.daire-isim-text {
    font-weight: 500;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}
.aidat-detay-sag {
    background: #161b26;
    border: 1px solid #2d3748;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.daire-detay-panel h3 {
    margin-bottom: 0.5rem;
    color: #ffffff;
    border-bottom: 1px solid #2d3748;
    padding-bottom: 0.5rem;
}
.daire-not-uyari {
    background: rgba(243, 156, 18, 0.1);
    border-left: 4px solid #f39c12;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #f39c12;
    margin-bottom: 1.5rem;
}
.detay-aidat-listesi {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.detay-aidat-satiri {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
    gap: 15px;
    transition: background-color 0.2s;
}
.detay-aidat-satiri:hover {
    background: #243049;
}
.detay-aidat-satiri.odendi {
    border-left: 4px solid #2ecc71;
}
.detay-aidat-satiri.odenmedi {
    border-left: 4px solid #e74c3c;
}
.detay-aidat-sol {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.detay-aidat-donem {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}
.detay-aidat-tutar {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3498db;
}
.detay-aidat-tarih {
    font-size: 0.8em;
    color: #94a3b8;
}
.detay-aidat-sag-islem {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.detay-aidat-butonlar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.detay-aidat-butonlar .btn {
    padding: 5px 10px !important;
    font-size: 0.8em !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .aidat-takip-layout {
        grid-template-columns: 1fr;
    }
    /* detail active -> hide selection */
    .aidat-takip-layout.detay-aktif #daireListesiSol {
        display: none !important;
    }
    .detay-aidat-satiri {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .detay-aidat-sag-islem {
        width: 100%;
        align-items: flex-start;
        border-top: 1px solid #334155;
        padding-top: 8px;
    }
    .detay-aidat-butonlar {
        width: 100%;
        justify-content: flex-start;
    }
}