/**
 * PROPERTIES.CSS
 * Bağımsız Bölümler (Properties) Modülü - Tüm CSS Kuralları
 */

/* Kişiler (2_users_list) ile aynı font: Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Sayfa=properties (Bağımsız Bölümler): Tahsilatlar/Firmalar ile aynı arka plan ve boşluk */
body.yonetim-ui.property-page .app-content,
body.yonetim-ui.bagimsiz-page.property-page .app-content {
    background-color: #f8fafc !important;
}

body.property-page main.content,
body.bagimsiz-page.property-page main.content {
    padding: 12px var(--by4-page-padding) var(--by4-page-padding-bottom) var(--by4-page-padding) !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.property-page main.content .by4-personel-wrap,
body.bagimsiz-page.property-page main.content .by4-personel-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Üst özet: tıklanabilir kartlar + finansal satır sağa */
body.property-page a.by-stat-card,
body.bagimsiz-page.property-page a.by-stat-card {
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}
body.property-page a.by-stat-card:hover,
body.bagimsiz-page.property-page a.by-stat-card:hover {
    text-decoration: none !important;
    color: inherit;
}

.bagimsiz-by .bagimsiz-finance-stat-cards {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0 0 4px 0;
    margin: 0 0 4px 0;
    gap: 10px;
    width: 100%;
}
.bagimsiz-by .bagimsiz-finance-stat-cards > .by-stat-card-stack {
    margin-right: auto;
}
.bagimsiz-by .bagimsiz-finance-stat-cards:not(:has(.by-stat-card-stack)) > .by-stat-card:first-child {
    margin-right: auto;
}
/* Vadeli badge: topbar / sekmelerle boşluk azalt */
.bagimsiz-by .bagimsiz-finance-stat-cards:has(.by-stat-card-stack) {
    margin-bottom: 2px;
    padding-bottom: 2px;
}
.bagimsiz-by .by-stat-card-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}
.bagimsiz-by .by-stat-card-stack.by-stat-card-stack-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}
.bagimsiz-by .by-stat-card-op {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 18px;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
    user-select: none;
}
.bagimsiz-by .by-stat-card-stack .by-stat-label-sub {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1.25;
    margin-top: 1px;
}
.bagimsiz-by .bagimsiz-finance-stat-cards > .by-stat-card {
    align-self: flex-start;
    height: auto;
}

.bagimsiz-by .by4-search-row.bagimsiz-search-with-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}
.bagimsiz-by .bagimsiz-search-with-stats > form {
    flex: 0 0 auto;
}
.bagimsiz-by .bagimsiz-search-stat-cards {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
}
.bagimsiz-by .bagimsiz-search-stat-cards > .by-stat-card {
    padding: 6px 10px;
    gap: 8px;
    border-radius: 10px;
    box-shadow: none;
}
.bagimsiz-by .bagimsiz-search-stat-cards .by-stat-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 8px;
}
.bagimsiz-by .bagimsiz-search-stat-cards .by-stat-label {
    font-size: 10px;
    line-height: 1.2;
}
.bagimsiz-by .bagimsiz-search-stat-cards .by-stat-value {
    font-size: 14px;
    line-height: 1.2;
}
/* Satılık: gruptan ayırıp aynı satırda sağa yasla (Takip hemen yanında kalır) */
.bagimsiz-by .bagimsiz-search-stat-cards > .by-stat-card.bagimsiz-stat-satilik {
    margin-left: auto;
}

body.property-page .by4-main-card.by-panel-shell,
body.bagimsiz-page.property-page .by4-main-card.by-panel-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #ffffff !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}

/* ==========================================
   STAT CHIPS (Demo uyumlu yerleşim ve ikon renkleri)
   ========================================== */


/* Bağımsız Bölümler başlık + ikon – Kat Maliki (thead) ile aynı font ve renk */
body.property-page .by4-tabs-title {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
}
body.property-page .by4-tabs-title i {
    color: #94a3b8 !important;
}

/* ==========================================
   TABLO ÜSTÜ ÖZET SATIRI (Bize Borçlu / Bizden Alacaklı / Net Bakiye)
   Kişiler sayfasındaki sekme yanındaki özetlerle 1:1 görünüm
   ========================================== */
body.property-page .by4-property-summary {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-left: -4px;
}

body.property-page .by4-property-summary .by4-tab-summary {
    padding-left: 8px;
    padding-right: 8px;
    border-bottom-color: transparent !important;
    cursor: default;
}

body.property-page .by4-property-summary .by4-tab-summary:hover {
    color: inherit;
}

body.property-page .by4-property-summary .by4-tab-summary-label {
    color: #6b7280;
}

body.property-page .by4-property-summary .by4-tab-summary-value .text-success {
    color: #10b981 !important;
}

body.property-page .by4-property-summary .by4-tab-summary-value .text-danger {
    color: #dc2626 !important;
}

body.property-page .by4-property-summary .icon-bize-borclu {
    color: #10b981 !important;
}

body.property-page .by4-property-summary .icon-bizden-alacakli {
    color: #f59e0b !important;
}

body.property-page .by4-property-summary .icon-net-bakiye {
    color: #3B7FB9 !important;
}

/* ==========================================
   FAIZ SEGMENTED (Bağımsızlar sayfasında seçili mavi)
   body.property-page ile özgüllük artırıldı – buttons.css .btn !important’ına karşı
   ========================================== */
body.property-page .btn-group.faiz-segmented a.faiz-segmented-btn.faiz-segmented-active,
body.property-page .btn-group.faiz-segmented .faiz-segmented-btn.active {
    background: #2563EB;
    color: #fff;
    border-color: #2563EB;
}
body.property-page .btn-group.faiz-segmented a.faiz-segmented-btn.faiz-segmented-active:hover,
body.property-page .btn-group.faiz-segmented .faiz-segmented-btn.active:hover {
    background: #1D4ED8;
    color: #fff;
    border-color: #1D4ED8;
}
body.property-page .btn-group.faiz-segmented a.faiz-segmented-btn.faiz-segmented-outline,
body.property-page .btn-group.faiz-segmented .faiz-segmented-btn:not(.active) {
    background: #fff;
    color: #334155;
}
body.property-page .btn-group.faiz-segmented a.faiz-segmented-btn.faiz-segmented-outline:hover,
body.property-page .btn-group.faiz-segmented .faiz-segmented-btn:not(.active):hover {
    background: #F1F5F9;
    color: #334155;
}

/* ==========================================
   1. TABLO STİLLERİ
   ========================================== */

/* Menü başlığı bannerı – referans panel (Blok, No, Kat Maliki, Kiracı, Durum, Takip).
   bagimsiz.css ve tables.css’i geçersiz kılmak için özgüllük + !important. */
.property-table thead.property-table-header tr {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Tablo başlığı – Kişiler (kisiler-by) ile aynı font ve stil (özgüllük: body ile ezilsin diye) */
body.property-page .property-table thead.property-table-header th,
body.bagimsiz-page .property-table thead.property-table-header th,
body.property-page .property-table thead th,
body.bagimsiz-page .property-table thead th {
    padding: 10px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
}
body.property-page .property-table thead.property-table-header th *,
body.bagimsiz-page .property-table thead.property-table-header th * {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
}



.property-table thead.property-table-header .th-left {
    text-align: left !important;
}

.property-table thead.property-table-header .th-center {
    text-align: center !important;
}

.property-table thead.property-table-header .th-right {
    text-align: right !important;
}

.property-table thead.property-table-header .th-blok {
    width: 60px !important;
    min-width: 60px !important;
    padding-left: 20px !important;
}

.property-table thead.property-table-header .th-no {
    width: 70px !important;
    min-width: 70px !important;
    padding-left: 16px !important;
}

.property-table thead.property-table-header .th-kat-maliki {
    width: 126px !important;
    min-width: 98px !important;
    padding-left: 16px !important;
}

.property-table thead.property-table-header .th-kiraci {
    width: 180px !important;
    min-width: 140px !important;
    padding-left: 16px !important;
}

.property-table thead.property-table-header .th-durum {
    width: 110px !important;
    min-width: 90px !important;
}

.property-table thead.property-table-header .th-takip {
    width: 100px !important;
    min-width: 80px !important;
}

.property-table thead.property-table-header .th-faizli-bakiye {
    min-width: 120px !important;
    white-space: nowrap !important;
}

/* Tabloyu sabitle */
.property-table {
    table-layout: fixed;
    width: 100%;
}

/* Sütun genişlikleri: assets/css/components/bagimsizlar-table.css (sadece bu sayfada yüklenir) */

/* TABLO İÇİ METİN AYARLARI */
.property-table td {
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--by-list-font-size) !important;
}

/* Satır arka planı: zebra (çift satır açık gri), badge altında renk farkı olmasın */
body.property-page .property-table tbody tr:nth-child(odd) td,
body.bagimsiz-page.property-page .property-table tbody tr:nth-child(odd) td {
    background-color: #ffffff !important;
}
body.property-page .property-table tbody tr:nth-child(even) td,
body.bagimsiz-page.property-page .property-table tbody tr:nth-child(even) td {
    background-color: #f9fafb !important;
}
body.property-page .property-table tbody tr:hover td,
body.bagimsiz-page.property-page .property-table tbody tr:hover td {
    background-color: #F8FAFC !important;
}

/* Uzun İsimler (Malik/Kiracı) Alt Satıra Geçsin */
.property-table .property-col-malik,
.property-table .property-col-kiraci {
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Net / Brüt / Tip / Arsa — kat maliki ile aynı soft koyu gri */
.property-table .property-col-net-alan,
.property-table .property-col-brut,
.property-table .property-col-tip,
.property-table .property-col-arsa,
.property-table .editable-metrekare,
.property-table .editable-metrekare .metrekare-badge {
    color: #374151 !important;
}

/* Kat maliki / kiracı boş hücre — NO sütunu gibi mavi metin link */
.property-table .kisi-ata-link,
.kisi-ata-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    color: #0d6efd;
    font-weight: 700;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    text-decoration: none;
    vertical-align: baseline;
}
.property-table .kisi-ata-link:hover,
.kisi-ata-link:hover,
.property-table .kisi-ata-link:focus-visible,
.kisi-ata-link:focus-visible {
    color: #0a58ca;
    text-decoration: underline;
    outline: none;
    background: none;
}
.kisi-ata-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.kisi-ata-sep {
    color: #94a3b8;
    font-weight: 600;
    user-select: none;
    margin: 0 2px;
    padding: 0 2px;
}

/* Kapı Numarası ortalansın + No badge (demo uyumlu) */
.property-table .property-col-no {
    text-align: center;
    font-weight: bold;
}

.property-table .no-badge {
    background: none;
    min-width: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
}

/* Durum / Takip badge (demo uyumlu pill) */
.property-table .badge-pill-btn.durum-btn,
.property-table .badge-pill-btn.takip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
}

.property-table .badge-pill-btn.durum-btn i,
.property-table .badge-pill-btn.takip-btn i {
    font-size: 10px;
}

.property-table .durum-btn.durum-danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.property-table .durum-btn.durum-danger i {
    color: inherit;
}

.property-table .durum-btn.durum-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}
.property-table .durum-btn.durum-success i {
    color: inherit;
}

.property-table .durum-btn.durum-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.property-table .durum-btn.durum-info {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.property-table .durum-btn.durum-secondary {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.property-table .takip-btn.takip-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.property-table .takip-btn.takip-warning {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}

.property-table .takip-btn.takip-warning .takip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    display: inline-block;
    animation: property-takip-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes property-takip-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Boş state (kayıt yok / arama sonucu yok) */
body.property-page .property-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 16px;
    text-align: center;
}

body.property-page .property-empty-state .property-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

body.property-page .property-empty-state .property-empty-icon i {
    font-size: 32px;
    color: #cbd5e1;
}

body.property-page .property-empty-state .property-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

body.property-page .property-empty-state .property-empty-text {
    font-size: 12px;
    color: #cbd5e1;
}

/* Kalan Bakiye / Faizli Bakiye renkleri (people listesi gibi: borçlu kırmızı, alacaklı yeşil) */
.property-table .bakiye-borc {
    color: #dc3545;
    font-weight: 600;
}
.property-table .bakiye-alacak {
    color: #198754;
    font-weight: 600;
}
.property-table .bakiye-sifir {
    color: #6c757d;
}

/* ==========================================
   2. SAYFALAMA VE FİLTRELEME
   ========================================== */

/* Kişiler ile aynı: by4-main-card padding sıfır (panel içi bar + tablo) */
body.property-page .by4-main-card.by-main-card-padding {
    margin: 0 !important;
    padding: 0 !important;
}

/* Badge (stat chip) altındaki bar ve panel – tablo ile aynı beyaz arka plan */
body.property-page .by4-main-card.by-main-card-padding,
body.property-page .by4-tabs-row {
    background: #fff !important;
    min-height: 48px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    align-items: center !important;
}

.users-list-header {
    margin-bottom: 1rem;
}

.users-list-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.users-list-pagination-buttons {
    display: flex;
    gap: 0.25rem;
}

.users-list-page-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ==========================================
   3. DROPDOWN STİLLERİ
   ========================================== */

.property-table .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 8px 0;
    z-index: 1050 !important;
}

.property-table .dropdown-item {
    padding: 8px 16px;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 8px;
}

.property-table .dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
}

.property-table .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* İşlemler sütunu çark: firma/personel ile aynı — sadece ikon; Durum/Takip pill’leri ayrı sütunda (.badge-pill-btn) */
body.property-page .property-table td:last-child .dropdown-toggle::after {
    display: none !important;
}
body.property-page .property-table td:last-child {
    overflow: visible !important;
}
body.property-page .property-table td:last-child > .dropdown > .btn-outline-secondary.dropdown-toggle {
    transition: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0.25rem !important;
    min-width: 0 !important;
}
body.property-page .property-table td:last-child > .dropdown > .btn-outline-secondary.dropdown-toggle:hover,
body.property-page .property-table td:last-child > .dropdown > .btn-outline-secondary.dropdown-toggle:focus,
body.property-page .property-table td:last-child > .dropdown > .btn-outline-secondary.dropdown-toggle:focus-visible,
body.property-page .property-table td:last-child > .dropdown > .btn-outline-secondary.dropdown-toggle:active,
body.property-page .property-table td:last-child .dropdown.show > .btn-outline-secondary.dropdown-toggle {
    background: transparent !important;
    color: #6b7280 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
}

/* ==========================================
   4. RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .property-table {
        font-size: 0.75rem;
    }
    
    .property-table th,
    .property-table td {
        padding: 0.25rem;
    }
}

/* ==========================================
   5. TABLO ALTI SAYFALAMA (Kişiler ile aynı: Tümünü göster, Satır sayısı, Toplam X kayıt, 1/2)
   ========================================== */
body.property-page .by4-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

body.property-page .by4-pagination-nav {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

body.property-page .by4-page-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.12s ease;
    font-family: inherit;
    color: #3B7FB9;
}

body.property-page .by4-page-btn:disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
}

body.property-page .by4-page-btn:not(:disabled):hover {
    background: rgba(59,127,185,0.06);
}

body.property-page .by4-page-btn.prev-btn { border-right: 1px solid #e5e7eb; }
body.property-page .by4-page-btn.next-btn { border-left: 1px solid #e5e7eb; }

body.property-page .by4-page-info,
body.property-page .by4-total-info {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

body.property-page .by4-page-info {
    padding: 0 10px;
}

body.property-page .by4-pagination-row select {
    height: 32px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}








