.statement-filter-form .form-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.statement-filter-actions .btn {
    min-width: 7rem;
}

.statement-average-box,
.statement-progress-stack {
    display: grid;
    gap: 0.55rem;
}

.statement-progress-stack {
    gap: 1.2rem;
}

.statement-average-box strong {
    color: var(--text-strong);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: clamp(1.4rem, 1rem + 1vw, 2rem);
}

.statement-average-box span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.statement-history-table-wrap,
.rate-history-table-wrap,
.payment-plan-table-wrap {
    overflow-x: auto;
}

.payment-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.payment-breakdown-card {
    display: grid;
    gap: 0.35rem;
    min-height: 5.75rem;
    padding: 1rem;
    border: 1px solid #e7edf5;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.payment-breakdown-card span {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.payment-breakdown-card strong {
    color: var(--text-strong);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: clamp(1rem, 0.88rem + 0.45vw, 1.35rem);
}

.payment-breakdown-card.is-warning {
    border-color: #ffe8a3;
    background: #fff9e8;
}

.payment-breakdown-card.is-warning strong {
    color: #b58100;
}

.payment-breakdown-card.is-total {
    border-color: #cfe2ff;
    background: #eef5ff;
}

.payment-breakdown-card.is-total strong {
    color: #0d6efd;
}

.payment-item-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.payment-item-breakdown span {
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.statement-detail-row > td {
    padding: 0 !important;
    border: 0;
}

.statement-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0.35rem 0 0.9rem;
    padding: 1rem;
    border: 1px solid #eef0f2;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.statement-detail-grid section {
    min-width: 0;
}

.statement-detail-grid h3 {
    margin: 0 0 0.75rem;
    color: var(--text-strong);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
}

.statement-detail-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #e9edf2;
}

.statement-detail-item:last-child {
    border-bottom: 0;
}

.statement-detail-item span,
.statement-detail-item small {
    min-width: 0;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.statement-detail-item strong {
    color: var(--text-strong);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.statement-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 991.98px) {
    .statement-detail-grid,
    .payment-breakdown-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .statement-filter-actions,
    .statement-filter-actions .btn {
        width: 100%;
    }

    .payment-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .statement-history-table-wrap,
    .rate-history-table-wrap,
    .payment-plan-table-wrap {
        overflow: visible;
    }

    .statement-history-table,
    .rate-history-table,
    .payment-plan-table {
        min-width: 0;
    }

    .statement-history-table thead,
    .rate-history-table thead,
    .payment-plan-table thead {
        display: none;
    }

    .statement-history-table tbody,
    .rate-history-table tbody,
    .payment-plan-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .statement-history-table tr:not(.statement-detail-row),
    .rate-history-table tr,
    .payment-plan-table tr {
        display: grid;
        gap: 0.45rem;
        padding: 0.85rem;
        border: 1px solid #eef0f2;
        border-radius: 0.75rem;
        background: #fff;
        box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.04);
    }

    .statement-history-table tr:not(.statement-detail-row) td,
    .rate-history-table td,
    .payment-plan-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        min-width: 0;
        padding: 0.18rem 0;
        border: 0;
        text-align: right !important;
        white-space: normal;
    }

    .statement-history-table tr:not(.statement-detail-row) td::before,
    .rate-history-table td::before,
    .payment-plan-table td::before {
        flex: 0 0 auto;
        color: var(--text-muted);
        font-size: 0.76rem;
        font-weight: 800;
        line-height: 1.45;
        text-align: left;
        text-transform: uppercase;
    }

    .statement-history-table tr:not(.statement-detail-row) td:nth-child(1)::before { content: "Kart"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(2)::before { content: "Dönem"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(3)::before { content: "Son Ödeme"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(4)::before { content: "Ekstre"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(5)::before { content: "Asgari"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(6)::before { content: "Ödenen"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(7)::before { content: "Kalan"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(8)::before { content: "Durum"; }
    .statement-history-table tr:not(.statement-detail-row) td:nth-child(9)::before { content: "İşlem"; }

    .rate-history-table td:nth-child(1)::before { content: "Kart"; }
    .rate-history-table td:nth-child(2)::before { content: "Geçerlilik"; }
    .rate-history-table td:nth-child(3)::before { content: "Akdi Faiz"; }
    .rate-history-table td:nth-child(4)::before { content: "Gecikme Faizi"; }
    .rate-history-table td:nth-child(5)::before { content: "KKDF"; }
    .rate-history-table td:nth-child(6)::before { content: "BSMV"; }
    .rate-history-table td:nth-child(7)::before { content: "Asgari Oran"; }
    .rate-history-table td:nth-child(8)::before { content: "Mutlak Asgari"; }
    .rate-history-table td:nth-child(9)::before { content: "İşlem"; }

    .payment-plan-table td:nth-child(1)::before { content: "Tarih"; }
    .payment-plan-table td:nth-child(2)::before { content: "Tür"; }
    .payment-plan-table td:nth-child(3)::before { content: "Açıklama"; }
    .payment-plan-table td:nth-child(4)::before { content: "Durum"; }
    .payment-plan-table td:nth-child(5)::before { content: "Tutar"; }
    .payment-plan-table td:nth-child(6)::before { content: "İşlem"; }

    .rate-history-table td[colspan],
    .payment-plan-table td[colspan] {
        display: block;
        text-align: left !important;
    }

    .rate-history-table td[colspan]::before,
    .payment-plan-table td[colspan]::before {
        display: none;
    }

    .statement-history-table .statement-detail-row {
        display: block;
        margin-top: -0.75rem;
    }

    .statement-history-table .statement-detail-row td {
        display: block;
        width: 100%;
    }

    .statement-detail-grid {
        grid-template-columns: 1fr;
        margin: 0;
        padding: 0.85rem;
        border-radius: 0 0 0.75rem 0.75rem;
    }

    .statement-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .statement-pagination .btn-group,
    .statement-pagination .btn {
        width: 100%;
    }
}
