/* ==========================================================
   CURL Enterprise Analytics Dashboard
   analytics.css
   Part 1
   ========================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

.analytics-page{

    width:100%;
    padding:30px;

}

.page-header{

    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:35px;

}

.page-title{

    color:#ffffff;
    font-size:34px;
    font-weight:700;
    margin-bottom:8px;

}

.page-subtitle{

    color:#94a3b8;
    font-size:16px;

}

.page-actions{

    display:flex;
    align-items:center;
    gap:15px;

}

/* =========================
   LIVE BADGE
   ========================= */

.live-indicator{

    display:flex;
    align-items:center;
    gap:10px;

    background:#0f172a;

    padding:12px 18px;

    border-radius:30px;

    border:1px solid rgba(255,255,255,.08);

    color:#22c55e;

    font-weight:600;

}

.live-dot{

    width:12px;
    height:12px;

    background:#22c55e;

    border-radius:50%;

    animation:pulse 1.5s infinite;

}

@keyframes pulse{

    0%{

        transform:scale(1);
        opacity:1;

    }

    50%{

        transform:scale(1.4);
        opacity:.4;

    }

    100%{

        transform:scale(1);
        opacity:1;

    }

}

/* =========================
   METRIC GRID
   ========================= */

.grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:24px;

    margin-bottom:35px;

}

.metric{

    position:relative;

    background:#1e293b;

    border-radius:20px;

    padding:28px;

    overflow:hidden;

    border:1px solid rgba(255,255,255,.05);

    transition:.35s;

    box-shadow:0 15px 35px rgba(0,0,0,.30);

}

.metric:hover{

    transform:translateY(-8px);

    box-shadow:0 20px 45px rgba(59,130,246,.18);

}

.metric::before{

    content:"";

    position:absolute;

    left:0;
    top:0;

    width:100%;
    height:5px;

    background:linear-gradient(
        90deg,
        #06b6d4,
        #3b82f6,
        #8b5cf6
    );

}

.metric-icon{

    width:62px;
    height:62px;

    border-radius:18px;

    display:flex;

    align-items:center;
    justify-content:center;

    font-size:30px;

    margin-bottom:20px;

    background:linear-gradient(
        135deg,
        #2563eb,
        #0ea5e9
    );

}

.metric h4{

    color:#94a3b8;

    font-size:15px;

    font-weight:500;

    margin-bottom:14px;

}

.metric h2{

    color:#ffffff;

    font-size:38px;

    font-weight:700;

}

/* =========================
   CHART LAYOUT
   ========================= */

.chart-row{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:25px;

    margin-bottom:30px;

}

.chart-card{

    background:#1e293b;

    border-radius:20px;

    padding:25px;

    border:1px solid rgba(255,255,255,.05);

    transition:.35s;

    box-shadow:0 15px 35px rgba(0,0,0,.30);

}

.chart-card:hover{

    transform:translateY(-6px);

}

.card-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:25px;

}

.card-header h3{

    color:#ffffff;

    font-size:20px;

    font-weight:600;

}

.chart-container{

    position:relative;

    width:100%;

    height:340px;

}

canvas{

    width:100%!important;

    height:100%!important;

}
/* ==========================================
   CHART CONTAINERS
========================================== */

.chart-row{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:25px;

    margin-bottom:25px;

}

.chart-card{

    background:#1e293b;

    border-radius:18px;

    padding:22px;

    border:1px solid rgba(255,255,255,.06);

    box-shadow:0 10px 30px rgba(0,0,0,.35);

    transition:.3s;

}

.chart-card:hover{

    transform:translateY(-5px);

    box-shadow:0 18px 45px rgba(59,130,246,.18);

}

.chart-card h3{

    color:#fff;

    margin-bottom:20px;

    font-size:18px;

    font-weight:600;

}

.chart-container{

    position:relative;

    width:100%;

    height:340px;

}

canvas{

    width:100%!important;

    height:100%!important;

}

/* ==========================================
   LIVE SUMMARY TABLE
========================================== */

.table-card{

    background:#1e293b;

    border-radius:18px;

    padding:25px;

    border:1px solid rgba(255,255,255,.06);

    box-shadow:0 10px 30px rgba(0,0,0,.35);

}

.table-card h3{

    color:white;

    margin-bottom:20px;

}

table{

    width:100%;

    border-collapse:collapse;

}

thead{

    background:#0f172a;

}

th{

    padding:15px;

    color:#38bdf8;

    text-align:left;

    font-size:15px;

}

td{

    padding:15px;

    border-bottom:1px solid rgba(255,255,255,.08);

    color:#e2e8f0;

}

tbody tr:hover{

    background:#273449;

}

/* ==========================================
   STATUS COLORS
========================================== */

.status-online{

    color:#22c55e;

    font-weight:600;

}

.status-offline{

    color:#ef4444;

    font-weight:600;

}

.status-warning{

    color:#f59e0b;

    font-weight:600;

}

/* ==========================================
   LOADING EFFECT
========================================== */

.loading{

    opacity:.5;

    pointer-events:none;

}

.fade-in{

    animation:fadeIn .6s ease;

}

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(15px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================
   RESPONSIVE
========================================== */

@media(max-width:1200px){

    .chart-row{

        grid-template-columns:1fr;

    }

}

@media(max-width:992px){

    .grid{

        grid-template-columns:repeat(2,1fr);

    }

}

@media(max-width:768px){

    .grid{

        grid-template-columns:1fr;

    }

    .chart-container{

        height:280px;

    }

    .metric h2{

        font-size:28px;

    }

}

@media(max-width:500px){

    .page-title{

        font-size:28px;

    }

}

/* ==========================================
   SCROLLBAR
========================================== */

::-webkit-scrollbar{

    width:8px;

}

::-webkit-scrollbar-track{

    background:#0f172a;

}

::-webkit-scrollbar-thumb{

    background:#475569;

    border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

    background:#64748b;

}
