
/* MAIN PAGE */

.payment-page {
    padding: 22px;
    background: #f4f7fc;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #172554;
}

/* HEADER */

.payment-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 15px;
}

.page-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    background: linear-gradient(135deg, #1684f8, #0750c9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    box-shadow: 0 5px 15px rgba(20, 100, 220, .2);
}

.page-title-section h2 {
    font-size: 25px;
    font-weight: 750;
    margin: 0 0 5px;
    color: #101d40;
}

.page-title-section p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.back-button {
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    font-weight: 600;
    padding: 9px 18px !important;
}

/* FILTER CARD */

.payment-filter-card {
    width: 100%;
    background: #ffffff;
    padding: 24px;
    border: 1px solid #dce5f3;
    border-radius: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.filter-group {
    width: 100%;
}

    .filter-group ::deep .rz-label {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: #172554;
        margin-bottom: 10px;
    }

    .filter-group ::deep .rz-textbox,
    .filter-group ::deep .rz-dropdown {
        width: 100%;
        height: 44px;
        border-radius: 10px;
    }

.payment-filter-card ::deep .rz-button {
    border-radius: 9px;
    font-weight: 650;
}

@media (max-width: 767px) {
    .payment-filter-card {
        padding: 16px;
    }
}

/* STATISTICS */

/* DASHBOARD CONTAINER */

.payment-statistics {
    width: 100%;
    margin: 20px 0;
}

/* FOUR COLUMN GRID */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* DASHBOARD CARD */

.stat-card {
    min-width: 0;
    min-height: 130px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    background: #ffffff;
    transition: all .2s ease;
}

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
    }

/* ICON */

.stat-icon {
    width: 66px;
    height: 66px;
    min-width: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
}

/* TEXT */

.stat-content {
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.stat-card h3 {
    margin: 0;
    font-size: 25px;
    font-weight: 750;
    color: #172554;
    overflow-wrap: anywhere;
}

/* BLUE */

.stat-blue {
    background: linear-gradient(120deg, #ffffff, #eaf3ff);
    border-color: #bfdbfe;
}

    .stat-blue .stat-icon {
        background: #dbeafe;
        color: #1263d8;
    }

/* YELLOW */

.stat-yellow {
    background: linear-gradient(120deg, #ffffff, #fff8e6);
    border-color: #fde7b0;
}

    .stat-yellow .stat-icon {
        background: #fef0c7;
        color: #e99a00;
    }

/* RED */

.stat-red {
    background: linear-gradient(120deg, #ffffff, #fff0f1);
    border-color: #fecdd3;
}

    .stat-red .stat-icon {
        background: #ffe0e3;
        color: #dc2626;
    }

    .stat-red h3 {
        color: #dc2626;
    }

/* GREEN */

.stat-green {
    background: linear-gradient(120deg, #ffffff, #eaffef);
    border-color: #bbf7d0;
}

    .stat-green .stat-icon {
        background: #d9fbe3;
        color: #15803d;
    }

/* TABLET */

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        min-height: 100px;
        padding: 15px;
    }

    .stat-icon {
        width: 55px;
        height: 55px;
        min-width: 55px;
    }

    .stat-card h3 {
        font-size: 21px;
    }
}


/* TABLE CARD */

.payment-table-card {
    background: white;
    padding: 18px;
    border: 1px solid #dce5f3;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(30, 64, 175, .035);
}

.table-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.table-heading-icon {
    color: #075be5;
    font-size: 24px;
    display: flex;
}

.table-heading h3 {
    font-size: 18px;
    font-weight: 750;
    margin: 0 0 4px;
    color: #14244b;
}

.table-heading span {
    font-size: 12px;
    color: #64748b;
}

/* DATA GRID */

.payment-grid-wrapper {
    width: 100%;
    overflow-x: auto;
}

.payment-grid {
    width: 100%;
    border: 1px solid #d5dfed;
    border-radius: 10px;
    overflow: hidden;
}

    .payment-grid .rz-datatable-thead > tr > th {
        background: #104da8 !important;
        color: white !important;
        font-size: 13px;
        font-weight: 650;
        padding: 13px 12px !important;
        border-color: #104da8 !important;
    }

        .payment-grid .rz-datatable-thead > tr > th .rz-column-title,
        .payment-grid .rz-datatable-thead > tr > th .rz-sortable-column-icon {
            color: white !important;
        }

    .payment-grid .rz-datatable-tbody > tr > td {
        padding: 9px 12px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 13px;
        color: #172554;
        vertical-align: middle;
    }

    .payment-grid .rz-datatable-tbody > tr:hover > td {
        background: #f0f6ff !important;
    }

    .payment-grid .rz-paginator {
        background: #fff;
        border-top: 1px solid #e2e8f0;
    }

/* STUDENT */

.student-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0edff;
    color: #1263d8;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    flex-shrink: 0;
}

.student-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .student-details strong {
        font-size: 13px;
        font-weight: 700;
        color: #172554;
    }

    .student-details span {
        font-size: 11px;
        color: #64748b;
    }

/* INSTALLMENT / DATE / AMOUNT */

.installment-number {
    font-weight: 600;
    color: #334155;
}

.due-date {
    font-weight: 550;
    color: #334155;
    white-space: nowrap;
}

.payment-amount {
    font-size: 13px;
    color: #111827;
    white-space: nowrap;
}

/* STATUS */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-paid {
    color: #15803d;
    background: #dcfce7;
}

.status-overdue {
    color: #b91c1c;
    background: #fee2e2;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
}

/* ACTION BUTTONS */

.receive-button {
    background: #159447 !important;
    border-radius: 7px !important;
    min-width: 105px;
    font-weight: 650 !important;
}

    .receive-button:hover {
        background: #117a39 !important;
    }

.view-button {
    border: 1px solid #94a3b8 !important;
    background: white !important;
    color: #1e3a5f !important;
    border-radius: 7px !important;
    min-width: 90px;
}

/* EMPTY / LOADING */

.loading-area {
    padding: 60px 20px;
    text-align: center;
    color: #64748b;
}

    .loading-area p {
        margin-top: 15px;
    }

.empty-state {
    padding: 65px 20px;
    text-align: center;
    color: #64748b;
}

    .empty-state > .rz-icon {
        font-size: 50px;
        color: #94a3b8;
    }

    .empty-state h3 {
        margin: 15px 0 8px;
        color: #172554;
        font-size: 20px;
    }

    .empty-state p {
        font-size: 14px;
        margin-bottom: 20px;
    }

/* RESPONSIVE */

@media (max-width: 768px) {

    .payment-page {
        padding: 12px;
    }

    .payment-page-header {
        align-items: flex-start;
    }

    .page-title-section {
        gap: 10px;
    }

    .page-title-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .page-title-section h2 {
        font-size: 19px;
    }

    .page-title-section p {
        font-size: 12px;
    }

    .back-button {
        padding: 7px 10px !important;
    }

    .payment-filter-card {
        padding: 15px;
    }

    .search-button {
        margin-top: 0;
    }

    .stat-card {
        min-height: 90px;
        padding: 13px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .stat-card h3 {
        font-size: 19px;
    }

    .payment-table-card {
        padding: 12px;
    }

    .payment-grid {
        min-width: 850px;
    }
}

/* FORCE FOUR-COLUMN DASHBOARD */

.payment-page .payment-statistics {
    display: block !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

.payment-page .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
}

    .payment-page .stats-grid > .stat-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 130px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

@media (max-width: 1100px) {
    .payment-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .payment-page .stats-grid {
        grid-template-columns: 1fr !important;
    }
}
