/* ============================================================
   Cards, Stat Cards, Progress Bars, Dashboard Layout, Charts
   ============================================================ */

/* --- Base Card --- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.card-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

/* --- Stat Card Values --- */
.card-value {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-primary);
}

.card-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* --- Progress Bars --- */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-default);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--space-md);
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 1s ease-out;
}

/* --- Dashboard Grid Layouts --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* --- Chart Area --- */
.chart-container {
    width: 100%;
    height: 200px;
    position: relative;
}

.chart-canvas {
    width: 100%;
    height: 100%;
}

.chart-legend {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    font-size: 11px;
    font-family: var(--font-mono);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* --- WireGuard Info Grid --- */
.wg-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.wg-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wg-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wg-stat-value {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.wg-stat-value.green { color: var(--status-green); }
.wg-stat-value.cyan  { color: var(--status-pending); }
