.dashboard-main {
    max-width: 1080px;
    align-items: stretch;
    padding: 1rem;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass);
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    display: block;
    flex-shrink: 0;
}

.status-dot.offline {
    background-color: #f43f5e;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.uptime-sep {
    opacity: 0.3;
}

.header-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    opacity: 0.6;
}

.upsub {
    opacity: 0.3;
}

.health-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.health-link:hover {
    opacity: 0.7;
}

@media (min-width: 640px) {
    .header-top {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .health-status {
        position: absolute;
        right: 0;
    }
}



.glow-right {
    left: auto;
    right: -200px;
    top: auto;
    bottom: -200px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
}

.kpi-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}



.kpi-card {
    text-align: center;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



.kpi-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}



.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--heading-from) 0%, var(--heading-to) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.kpi-value-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.kpi-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.kpi-inline-icon {
    width: 24px;
    height: 24px;
    opacity: 0.85;
    object-fit: contain;
}

.kpi-inline-flag {
    font-size: 24px;
    line-height: 1;
}

.kpi-sub {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.trend-up {
    color: #10b981;
    font-weight: 600;
}

.trend-down {
    color: #f43f5e;
    font-weight: 600;
}

.trend-neutral {
    color: #6366f1;
    font-weight: 600;
}

.trend-sep {
    margin: 0 0.4rem;
    opacity: 0.3;
}

.activity-card {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-main);
    opacity: 0.8;
}

.range-filter {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    background: var(--glass);
    border-radius: 8px;
    padding: 0.2rem;
    border: 1px solid var(--border);
}

.range-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.range-btn:hover {
    opacity: 0.8;
}

.range-btn.active {
    background: var(--border);
    color: var(--text-main);
    opacity: 1;
}

.section-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.chart-container {
    height: 220px;
    padding: 0.5rem 0;
    position: relative;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.chart-box {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.chart-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
}

.chart-wrapper {
    height: 180px;
    width: 180px;
    max-width: 100%;
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
}

.chart-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.center-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.center-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
}

.center-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    object-fit: contain;
}

.center-flag {
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
}

.chart-legend {
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
    object-fit: contain;
}

.legend-flag {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
    border-radius: 2px;
}

.legend-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-percent {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.4;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.text-center {
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .dashboard-main {
        padding: 2rem;
    }

    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .kpi-value {
        font-size: 2rem;
    }

    .activity-card {
        padding: 2rem;
    }

    .chart-container {
        height: 300px;
    }

    .charts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .chart-box {
        padding: 2rem 1.5rem;
    }

    .chart-wrapper {
        height: 200px;
        width: 200px;
    }

    .center-value {
        font-size: 1.5rem;
    }
}

@media (min-width: 960px) {
    .kpi-row {
        grid-template-columns: repeat(4, 1fr);
    }


    .charts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}