.mfb-dashboard.modern-dark {
    background-color: #0f172a;
}

.mfb-dashboard.modern-dark .mfb-widget-container-empty {
    background-color: #1e293b;
    border: dashed 2px #334155;
    border-radius: 8px;
}

.mfb-dashboard.modern-dark .mfb-widget-container-empty.mfc-active {
    background-color: #0f172a;
    border: 2px solid #0ea5e9;
}

.mfb-dashboard.modern-dark .mfb-widget-container-full {
    background-color: #1e293b;
    border: solid 1px #334155;
    border-radius: 8px;
}

.mfb-dashboard.modern-dark .mfb-widget-container-full.mfc-active {
    border: 1px solid #0ea5e9;
}

.mfb-dashboard.modern-dark .mfb-widget-container-full:has(.mfb-widget-not-set) {
    background-color: #1e293b;
}

.mfb-dashboard.modern-dark .mfb-kpi-widget {
    font-family: system-ui, -apple-system, sans-serif;
    text-align: center;
    display: grid;
    height: 100%;
    padding: 10px;
}

.mfb-dashboard.modern-dark .mfb-kpi-widget .mfb-kpi-header {
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
}

.mfb-dashboard.modern-dark .mfb-kpi-widget .mfb-kpi-value {
    color: #38bdf8;
    font-size: 1.8rem;
    font-weight: 700;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.mfb-dashboard.modern-dark .mfb-label-widget {
    font-size: 1.1rem;
    font-weight: 600;
    background-color: #0ea5e9;
    color: #ffffff;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gauge styling - Corrected to use .mfg-linear-gauge and .mfg-oval-gauge with --mfg- variables */
.mfb-dashboard.modern-dark .mfg-linear-gauge,
.mfb-dashboard.modern-dark .mfg-oval-gauge {
    --mfg-gauge-background: transparent;
    --mfg-gauge-stroke: #334155;
    --mfg-gauge-stroke-thickness: 1;

    --mfg-gauge-scale-background: transparent;       /* Seamlessly transparent clock/gauge face */
    --mfc-gauge-scale-background: transparent;
    --mfg-gauge-scale-stroke: #334155;
    --mfc-gauge-scale-stroke: #334155;
    --mfg-gauge-scale-stroke-thickness: 1;
    --mfc-gauge-scale-stroke-thickness: 1;

    --mfg-gauge-pointer-background: #0284c7;         /* Radiant ocean blue needle */
    --mfg-gauge-pointer-stroke: #0284c7;
    --mfg-gauge-pointer-stroke-thickness: 1;

    --mfg-gauge-tick-background: #f8fafc;            /* Crisp white ticks & dial numbers for high visibility */
    --mfc-gauge-tick-background: #f8fafc;
    --mfg-gauge-tick-stroke: #cbd5e1;                /* Subdued border stroke */
    --mfc-gauge-tick-stroke: #cbd5e1;
    --mfg-gauge-tick-stroke-thickness: 1;
    --mfc-gauge-tick-stroke-thickness: 1;

    --mfg-gauge-font-name: 'system-ui', -apple-system, sans-serif;
    --mfg-gauge-font-size: 11;                       /* Unitless font size! */
    --mfg-gauge-font-style: bold;
}

/* KPI Trend Indicators */
.mfb-dashboard.modern-dark .mfb-kpi-widget .mfb-kpi-change {
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
    margin-top: 5px;
}

.mfb-dashboard.modern-dark .mfb-kpi-widget-trend-up .mfb-kpi-change {
    color: #10b981;                                  /* Beautiful Emerald Green for gains */
}

.mfb-dashboard.modern-dark .mfb-kpi-widget-trend-up .mfb-kpi-change:before {
    content: "⬆ ";
}

.mfb-dashboard.modern-dark .mfb-kpi-widget-trend-down .mfb-kpi-change {
    color: #ef4444;                                  /* Radiant Coral Red for losses */
}

.mfb-dashboard.modern-dark .mfb-kpi-widget-trend-down .mfb-kpi-change:before {
    content: "⬇ ";
}
