.customer-ledger-wrapper{
    width:100%;
}

.customer-ledger-card{
    background:rgba(255,255,255,0.75);
    backdrop-filter:blur(18px);
    border-radius:28px;
    padding:24px;
    border:1px solid rgba(255,255,255,0.5);
    box-shadow:0 10px 40px rgba(15,23,42,0.08);
}

.customer-ledger-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin-bottom:24px;
}

.customer-stat-card{
    border-radius:22px;
    padding:24px;
    background:rgba(255,255,255,0.75);
    backdrop-filter:blur(14px);
    border:1px solid rgba(255,255,255,0.7);
    box-shadow:0 4px 18px rgba(15,23,42,0.05);
}

.customer-stat-title{
    font-size:13px;
    color:#64748b;
    margin-bottom:10px;
    font-weight:600;
}

.customer-stat-value{
    font-size:30px;
    font-weight:800;
    color:#0f172a;
}

.customer-ledger-table-wrapper{
    overflow-x:auto;
    border-radius:24px;
    background:rgba(255,255,255,0.65);
    backdrop-filter:blur(14px);
    border:1px solid rgba(255,255,255,0.7);
}

.customer-ledger-table{
    width:100%;
    border-collapse:collapse;
}

.customer-ledger-table thead{
    background:rgba(248,250,252,0.8);
}

.customer-ledger-table th{
    padding:18px;
    text-align:left;
    font-size:13px;
    text-transform:uppercase;
    color:#64748b;
    font-weight:700;
}

.customer-ledger-table td{
    padding:18px;
    border-top:1px solid #e2e8f0;
    color:#0f172a;
    font-weight:500;
}

.customer-ledger-table tbody tr{
    transition:all .25s ease;
}

.customer-ledger-table tbody tr:hover{
    background:rgba(248,250,252,0.8);
}

.invoice-badge{
    background:#eff6ff;
    color:#2563eb;
    padding:10px 16px;
    border-radius:14px;
    font-weight:700;
    display:inline-block;
}

.text-paid{
    color:#16a34a;
    font-weight:700;
}

.text-remaining{
    color:#dc2626;
    font-weight:700;
}

.text-discount{
    color:#d97706;
    font-weight:700;
}

.text-balance{
    color:#2563eb;
    font-weight:800;
}

.view-btn{
    border:none;
    background:#2563eb;
    color:white;
    padding:10px 18px;
    border-radius:14px;
    cursor:pointer;
    font-weight:700;
    transition:.2s;
}

.view-btn:hover{
    transform:translateY(-2px);
    background:#1d4ed8;
}

.customer-modal{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.55);
    backdrop-filter:blur(8px);
    z-index:999999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px;
}

.customer-modal-content{
    width:100%;
    max-width:1100px;
    border-radius:28px;
    overflow:hidden;
    background:white;
    box-shadow:0 20px 60px rgba(15,23,42,0.2);
}

.customer-modal-header{
    padding:24px;
    border-bottom:1px solid #e2e8f0;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.customer-modal-title{
    font-size:24px;
    font-weight:800;
    color:#0f172a;
}

.customer-modal-body{
    padding:24px;
}

.customer-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin-bottom:24px;
}

.customer-summary-card{
    background:#f8fafc;
    border-radius:20px;
    padding:20px;
}

.customer-summary-label{
    color:#64748b;
    font-size:13px;
    margin-bottom:8px;
    font-weight:600;
}

.customer-summary-value{
    color:#0f172a;
    font-size:24px;
    font-weight:800;
}

.close-btn{
    border:none;
    background:#ef4444;
    color:white;
    padding:10px 18px;
    border-radius:14px;
    cursor:pointer;
    font-weight:700;
}

.customer-items-table{
    width:100%;
    border-collapse:collapse;
}

.customer-items-table th{
    background:#f8fafc;
    padding:16px;
    text-align:left;
    color:#64748b;
}

.customer-items-table td{
    padding:16px;
    border-top:1px solid #e2e8f0;
}

.fi-select-input{
    position:relative !important;
    z-index:999999 !important;
}

.fi-dropdown-panel{
    z-index:999999 !important;
}

@media(max-width:1100px){

    .customer-ledger-grid,
    .customer-summary-grid{
        grid-template-columns:1fr 1fr;
    }

}

@media(max-width:700px){

    .customer-ledger-grid,
    .customer-summary-grid{
        grid-template-columns:1fr;
    }

}