/**
 * ==========================================
 * KARTLAR
 * Card bileşenleri ve varyasyonları
 * ==========================================
 */

/* ========== TEMEL KART ========== */
.card {
    border-radius: var(--by-radius-xl);
    border: 1px solid var(--by-border-soft);
    background-color: var(--by-bg-content);
    box-shadow: var(--by-shadow-md);
    padding: 18px 22px;
    margin-bottom: 16px;
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

/* ========== KASA KARTLARI ========== */
.cash-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cash-card {
    background: #fff;
    border-radius: var(--by-radius-xl);
    padding: 16px 22px;
    box-shadow: var(--by-shadow-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform var(--by-transition-normal), box-shadow var(--by-transition-normal);
}

.cash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.cash-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 4px !important;
}

.cash-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Banka logosu: %30 küçültülmüş (56px→39px, max 220px→154px) */
.cash-logo:has(.bank-icon) {
    width: auto;
    min-width: 56px;
    height: 39px;
    min-height: 39px;
}

.cash-logo-cash {
    background: #dcfce7;
    color: #059669;
    font-size: 20px;
}

.cash-logo-bank {
    background: #eff6ff;
    color: var(--by-primary-dark);
    font-weight: 700;
    font-size: 14px;
}

.bank-icon {
    height: 39px;
    width: auto;
    max-width: 154px;
    object-fit: contain;
    display: block;
}

.cash-card-title,
.cash-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--by-text-main);
}

.cash-card-subtitle,
.cash-sub {
    font-size: 13px;
    color: var(--by-text-muted);
}

.cash-card-amount,
.cash-balance {
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.cash-balance.positive,
.bank-value.positive {
    color: var(--by-success);
}

.cash-balance.negative,
.bank-value.negative,
.cash-card-amount {
    color: var(--by-danger);
}

.cash-card-amount .currency {
    font-size: 13px;
    font-weight: 500;
    margin-left: 2px;
    color: var(--by-text-soft);
}

.cash-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px !important;
    font-size: 12px;
    color: var(--by-text-muted);
}

.cash-card-footer-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cash-bank-balance {
    font-weight: 500;
    color: var(--by-success);
}

.cash-card-footer-right {
    display: flex;
    gap: 6px;
}

.cash-tags {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cash-extra {
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    margin-top: 6px;
}

.cash-card .cash-extra {
    margin-top: 2px !important;
}

.cash-actions {
    margin-top: 12px;
    margin-bottom: 0;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    width: 100%;
    visibility: visible;
    opacity: 1;
}

.cash-actions .btn {
    min-width: 70px;
    font-size: 0.8rem;
}

/* Cash sayfası butonları - Beyaz dolgu, sidebar rengi yazı ve çerçeve */
.cash-actions button.btn.btn-outline-secondary.btn-topbar {
    background-color: #ffffff;
    background: #ffffff;
    border: 1px solid #2c3e50;
    border-color: #2c3e50;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 10px;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: auto;
    line-height: 1;
    box-shadow: none;
    transition: all 0.2s ease;
    visibility: visible;
    opacity: 1;
    min-width: auto;
}

.cash-actions button.btn.btn-outline-secondary.btn-topbar:hover,
.cash-actions button.btn.btn-outline-secondary.btn-topbar:focus,
.cash-actions button.btn.btn-outline-secondary.btn-topbar:active {
    background-color: #f8f9fa;
    background: #f8f9fa;
    border: 1px solid #2c3e50;
    border-color: #2c3e50;
    color: #2c3e50;
    box-shadow: none;
}

.cash-actions button.btn.btn-outline-secondary.btn-topbar i {
    color: #2c3e50;
}

.bank-value {
    font-weight: 700;
    font-size: 20px;
    font-family: "Inter", system-ui, sans-serif;
}

.bank-updated {
    font-size: 12px;
    margin-left: 8px;
}

/* ========== DASHBOARD KART ========== */
.dashboard-card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dashboard-card-purple .card-icon,
.dashboard-card-purple .card-title {
    color: white !important;
}

.dashboard-card-purple .card-title {
    font-weight: 600;
}

/* ========== BANKA KART HEADER ========== */
.bank-card-header {
    background: #f8f9fa !important;
    padding: 15px 20px !important;
}

.bank-card-title {
    margin: 0;
    font-weight: 500;
    color: var(--by-bg-header);
    font-size: 16px;
    display: flex;
    align-items: center;
}

.bank-card-title i {
    margin-right: 8px;
    color: #0d6efd;
}

/* ========== RAPOR KART ========== */
.report-card-isletme-defteri {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.report-card-isletme-defteri .card-icon,
.report-card-isletme-defteri .card-title {
    color: white;
}

.report-card-isletme-defteri .card-title {
    font-weight: 600;
}

/* ========== FİRMALAR KART ========== */
.firmalar-card {
    margin: 0;
    width: 100%;
    border-radius: var(--by-radius-xl) !important;
    overflow: hidden;
}

/* ========== MOBİL UYUMLULUK ========== */
@media (max-width: 768px) {
    .cash-card {
        padding: 15px;
    }
    
    .cash-actions {
        flex-direction: column;
    }
    
    .cash-actions .btn {
        width: 100%;
    }
}

/* ========== FLUSH KART (Tablo için padding sıfır) ========== */
.card-flush {
    padding: 0 !important;
    overflow: hidden; /* Köşelerin yuvarlak kalmasını sağlar */
}

.card-flush .card-body {
    padding: 0 !important;
}

/* Flush kart header (varsa) */
.card-flush .card-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc !important;
}

/* Flush kart içindeki tablo köşelerini yuvarla */
.card-flush .table {
    margin-bottom: 0;
}

/* Tablonun son satırındaki çizgiyi kaldır */
.card-flush .table tbody tr:last-child td {
    border-bottom: 0;
}

/* Flush kart içindeki tablo başlığı (header yoksa) */
.card-flush:not(:has(.card-header)) .table thead th:first-child {
    border-top-left-radius: var(--by-radius-xl);
}

.card-flush:not(:has(.card-header)) .table thead th:last-child {
    border-top-right-radius: var(--by-radius-xl);
}

/* Flush kart içindeki toolbar */
.card-flush .table-toolbar,
.card-flush .filtreleme-alani {
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

