* {
    box-sizing: border-box;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.08), transparent 28%),
        radial-gradient(circle at top right, rgba(16,185,129,.06), transparent 25%),
        #020617;
}

.panel {
    background: rgba(15, 23, 42, .88);
    border: 1px solid rgba(51, 65, 85, .75);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .20);
}

.metric-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        145deg,
        rgba(15, 23, 42, .98),
        rgba(2, 6, 23, .94)
    );
    border: 1px solid rgba(51, 65, 85, .75);
    border-radius: 16px;
    padding: 20px;
    transition: .25s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(71, 85, 105, .95);
    box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

/* =========================
   CORE CARDS
   ========================= */

.core-card {
    border-color: rgba(59, 130, 246, .25);
    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, .98),
            rgba(8, 15, 30, .96)
        );
}

.core-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(59,130,246,.9),
        rgba(96,165,250,.15)
    );
}

.core-card:hover {
    border-color: rgba(59, 130, 246, .45);
}

/* =========================
   SUPPORT CARDS
   ========================= */

.support-card {
    border-color: rgba(16, 185, 129, .20);
    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, .96),
            rgba(5, 20, 22, .94)
        );
}

.support-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(16,185,129,.85),
        rgba(52,211,153,.08)
    );
}

.support-card:hover {
    border-color: rgba(16, 185, 129, .38);
}

/* =========================
   LABEL / VALUE
   ========================= */

.metric-label,
.detail-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    color: rgb(100 116 139);
}

.metric-value {
    margin-top: 12px;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -.025em;
    color: rgb(241 245 249);
}

.metric-value small {
    font-size: 12px;
    font-weight: 500;
    color: rgb(100 116 139);
}

.detail-box {
    border: 1px solid rgba(51, 65, 85, .65);
    border-radius: 13px;
    padding: 16px;
    background: rgba(2, 6, 23, .42);
    transition: .2s ease;
}

.detail-box:hover {
    border-color: rgba(71, 85, 105, .85);
    background: rgba(15, 23, 42, .55);
}

.detail-value {
    margin-top: 9px;
    font-size: 15px;
    font-weight: 650;
    color: rgb(203 213 225);
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    border: 1px solid transparent;
}

.status-online {
    background: rgba(6, 78, 59, .55);
    border-color: rgba(52, 211, 153, .28);
    color: rgb(110 231 183);
}

.status-reachable {
    background: rgba(30, 64, 175, .35);
    border-color: rgba(96, 165, 250, .28);
    color: rgb(147 197 253);
}

.status-degraded {
    background: rgba(113, 63, 18, .38);
    border-color: rgba(251, 146, 60, .25);
    color: rgb(253 186 116);
}

.status-offline {
    background: rgba(127, 29, 29, .40);
    border-color: rgba(248, 113, 113, .25);
    color: rgb(252 165 165);
}

.status-neutral {
    background: rgba(30, 41, 59, .55);
    border-color: rgba(71, 85, 105, .35);
    color: rgb(148 163 184);
}

/* =========================
   LIVE INDICATOR
   ========================= */

.status-pulse {
    animation: statusPulse 1.6s infinite;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, .38);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(96, 165, 250, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
    }
}

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

.chart-panel {
    position: relative;
    overflow: hidden;
}

.chart-panel::before {
    content: "LIVE";
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    color: rgb(100 116 139);
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15,23,42,.8);
    border: 1px solid rgba(51,65,85,.7);
}

#latency-chart {
    width: 100% !important;
}

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

@media (max-width: 640px) {

    .metric-value {
        font-size: 22px;
    }

    .panel {
        border-radius: 15px;
    }

    .metric-card {
        border-radius: 14px;
        padding: 17px;
    }
}
