/* CUSTOMER 360 PAGE*/
.customer-page{
    padding:24px;
    background:#f5f7fa;
}
/* HEADER*/
.customer-header{
    background:linear-gradient(
        135deg,
        #204028,
        #2e5b39
    );
    color:white;
    border-radius:14px;
    padding:12px 20px;
    margin-bottom:8px;
    box-shadow:0 8px 24px rgba(0,0,0,.15);
    display:flex;
    align-items:center;
    gap:16px;
}
.customer-hero{
    position:relative;
    overflow:hidden;
}
.customer-hero::after{
    content:"";
    position:absolute;
    right:-80px;
    top:-80px;
    width:220px;
    height:220px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
}
.customer-title{
    font-size:20px;
    font-weight:700;
    line-height:1.2;
}
.customer-subtitle{
    margin-top:2px;
    color:#d9e6dd;
    font-size:13px;
}
/* KPI CARDS*/
.stats-grid{
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(220px,1fr));
    gap:6px;
    margin-bottom:8px;
}
.stat-card{
    background:white;
    border-radius:14px;
    padding:8px 12px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    border:1px solid #e5e7eb;
    position:relative;
    overflow:hidden;
}
.stat-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.stat-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.12);
}
.invoice-card{
    background:linear-gradient(135deg,#e2edfc,#ffffff);
}
.payment-card{
    background:linear-gradient(135deg,#ecfeff,#ffffff);
}
.recent-orders-section{
    border-top:4px solid #0ea5e9;
}
.sales-card{
    background:linear-gradient(135deg, #dcfce7, #ffffff);
}
.sales-chart-card{
    border-top:4px solid #22c55e;
}
.target-card{
    background:linear-gradient(135deg, #fef3c7, #ffffff);
}
.stat-label{
    color:#64748b;
    font-size:11px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.5px;
}
.stat-value{
    margin-top:2px;
    font-size:20px;
    font-weight:700;
    color:#1e293b;
}
/* SECTION*/
.section-card{
    background:white;
    border-radius:14px;
    padding:6px;
    margin-bottom:10px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    transition:.25s;
}
.section-title{
    margin:0 0 2px;
    font-size:14px;
    font-weight:700;
    color:#204028;
}
/* TABLES*/
.custom-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
    border-radius:12px;
    margin-top:2px;
    box-shadow:
        0 4px 12px rgba(0,0,0,.05);
}
.custom-table th{
    background:#1e293b;
    color:white;
    padding:4px 8px;
    font-size:10.5px;
    text-transform:uppercase;
    letter-spacing:.5px;
    line-height:1.2;
    white-space:nowrap;
}
.custom-table td{
    padding:p4x 8px;
    border-bottom:1px solid #edf2f7;
    background:white;
    font-size:10.5px;
    line-height:1.2;
    vertical-align:middle;
}
.custom-table tbody tr{
    height:11px;
    cursor:pointer;
    transition:.18s;
}
.custom-table tbody tr:hover{
    background:#f8fafc;
}
.custom-table tbody tr:hover td{
    background:#f8fafc;
}
.custom-table tbody tr td{
    vertical-align:middle;
}
.custom-table a{
    color:#2563eb;
    text-decoration:none;
    font-weight:600;
}
.custom-table a:hover{
    text-decoration:underline;
}
.progress{
    height:16px;
    background:#e5e7eb;
    border-radius:40px;
    overflow:hidden;
    margin-top:4px;
}
.progress-bar{
    background:linear-gradient(90deg, #16a34a, #22c55e);
    color:white;
    height:100%;
    font-weight:600;
    text-align:center;
    line-height:18px;
    font-size:11px;
}
.timeline{
    position:relative;
    padding-left:18px;
}
.timeline::before{
    content:"";
    position:absolute;
    left:7px;
    top:0;
    bottom:0;
    width:3px;
    background:#dbe4ea;
}
.timeline-item{
    position:relative;
    margin-bottom:4px;
    padding-left:8px;
}
.timeline-item::before{
    content:"";
    position:absolute;
    left:-4px;
    top:5px;
    width:10px;
    height:10px;
    border-radius:50%;
    background:#204028;
}
.timeline-date{
    font-size:11px;
    color:#64748b;
    margin-bottom:2px;
}
.timeline-text{
    margin-top:2px;
    border-radius:10px;
    font-size:12px;
    background:white;
    line-height:1.15;
    padding:4px 6px;
    border-left:4px solid #204028;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}
/* RESPONSIVE*/
@media(max-width:992px){
    .stats-grid{
        grid-template-columns:
            repeat(2,1fr);
    }
}
@media(max-width:576px){
    .stats-grid{
        grid-template-columns:1fr;
    }
    .customer-title{
        font-size:22px;
    }
}
@media(max-width:992px){
    .customer-layout{
        grid-template-columns:1fr;
    }
}
.section-link{
    display:block;
    text-decoration:none;
    color:inherit;
    cursor:pointer;
}
.customer-main,
.customer-sidebar{
    min-width:0;
    flex:1;
}
.customer-main{
    flex:2;
}
.customer-avatar{
    width:55px;
    height:55px;
    border-radius:50%;
    background:white;
    color:#204028;
    font-size:22px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
}
.status-badge{
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
}
.status-badge.paid{
    background:#dcfce7;
    color:#15803d;
}
.status-badge.pending{
    background:#fef3c7;
    color:#b45309;
}
.status-badge.overdue{
    background:#fee2e2;
    color:#dc2626;
}
.stat-icon{
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
}
.insight-card{
    height:auto;
}
#salesChart{
    max-height:220px !important;
}
.stat-subtitle{
    margin-top:8px;
    font-size:12px;
    color:#94a3b8;
}
.mini-card{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:6px;
}
.mini-card .stat-label{
    font-size:11px;
}
.mini-card .stat-value{
    font-size:16px;
}
.insight-card{
    border-top:4px solid #3b82f6;
}
.invoice-section{
    border-top:4px solid #8b5cf6;
}
.payment-section{
    border-top:4px solid #06b6d4;
}
.product-section{
    border-top:4px solid #f59e0b;
}
.order-section{
    border-top:4px solid #ef4444;
}
.target-section{
    border-top:4px solid #16a34a;
}
.timeline-section{
    border-top:4px solid #a534a5;
}
.customer-meta{
    margin-top:4px;
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}
.customer-meta span{
    background:rgba(255,255,255,.12);
    padding:8px 14px;
    border-radius:999px;
    font-size:13px;
}
.section-card:hover{
    transform:translateY(-4px);
    box-shadow:
        0 12px 30px rgba(0,0,0,.12);
}
.insight-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.stat-card{
    cursor:pointer;
}
.kpi-link{
    text-decoration:none;
    color:inherit;
}
.customer-layout{
    display:flex;
    gap:8px;
    align-items:flex-start;
}
/* DETAIL PAGE KPI COLORS */

.currency-card{
    background:linear-gradient(
        135deg,
        #e0f2fe,
        #ffffff
    );
    border-left:5px solid #0284c7;
}

.amount-card{
    background:linear-gradient(
        135deg,
        #dcfce7,
        #ffffff
    );
    border-left:5px solid #16a34a;
}

.exchange-card{
    background:linear-gradient(
        135deg,
        #ede9fe,
        #ffffff
    );
    border-left:5px solid #7c3aed;
}

.status-card{
    background:linear-gradient(
        135deg,
        #fef3c7,
        #ffffff
    );
    border-left:5px solid #f59e0b;
}

/* PRODUCT PAGE */

.price-card{
    background:linear-gradient(
        135deg,
        #dcfce7,
        #ffffff
    );
    border-left:5px solid #22c55e;
}

.gst-card{
    background:linear-gradient(
        135deg,
        #fef3c7,
        #ffffff
    );
    border-left:5px solid #f59e0b;
}

.stock-card{
    background:linear-gradient(
        135deg,
        #dbeafe,
        #ffffff
    );
    border-left:5px solid #2563eb;
}

.sold-card{
    background:linear-gradient(
        135deg,
        #fee2e2,
        #ffffff
    );
    border-left:5px solid #ef4444;
}

/* SALES ORDER PAGE */

.subtotal-card{
    background:linear-gradient(
        135deg,
        #e0f2fe,
        #ffffff
    );
    border-left:5px solid #0ea5e9;
}

.tax-card{
    background:linear-gradient(
        135deg,
        #fef3c7,
        #ffffff
    );
    border-left:5px solid #f59e0b;
}

.discount-card{
    background:linear-gradient(
        135deg,
        #fee2e2,
        #ffffff
    );
    border-left:5px solid #ef4444;
}

.total-card{
    background:linear-gradient(
        135deg,
        #dcfce7,
        #ffffff
    );
    border-left:5px solid #22c55e;
}
.detail-card p{
    margin:0;
    font-size:10px;
    line-height:1.15;
}

.detail-card{
    padding:6px 8px;
}

.detail-page h2{
    margin-bottom:0 0 4px;
    font-size:16px;
}
.gst-breakdown p{
    margin:0;
    padding:0;
    line-height:1.15;
    font-size:10px;
}

.gst-breakdown{
    display:flex;
    flex-direction:column;
    gap:2px;
}
.target-section p{
    margin:0;
    line-height:1.15;
    font-size:10px;
}

.target-section{
    padding:6px 8px;
}
.section-card p,
.detail-card p{
    margin:0;
    line-height:1.15;
    font-size:10px;
}

.section-card p + p,
.detail-card p + p{
    margin-top:2px;
}
.customer-actions{
    margin-left:auto;
    display:flex;
    gap:10px;
}

.customer-actions .btn{
    border-radius:8px;
}

.timeline-item{
    margin-bottom:16px;
}

.timeline-date{
    font-size:11px;
    color:#94a3b8;
}

.section-card textarea{
    min-height:90px;
}

.section-card form{
    margin-top:6px;
}

.stat-icon{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#ffffff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:18px;
}

.stat-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.status-card .stat-icon{
    background:#fff3cd;
}

.payment-card .stat-icon{
    background:#dbeafe;
}

.sales-card .stat-icon{
    background:#dcfce7;
}

.invoice-card .stat-icon{
    background:#ede9fe;
}
