﻿/* =============================================================
   FinancialInsights.razor.css
   Extends ClinicalInsights.razor.css patterns
   Navy #1e2d4a  |  Gold #e6a817  |  Page bg #ffffff
   ============================================================= */

/* ── Financial KPI row: cards left + chart right ────────── */
.fin-kpi-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* ── Grid of 12 KPI cards (4 cols × 3 rows) ─────────────── */
.fin-kpi-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    flex: 1.4;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

/* ── Individual KPI card ─────────────────────────────────── */
.fin-kpi-card {
    background: #ffffff;
    padding: 12px 14px 6px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

    .fin-kpi-card:nth-child(4n) {
        border-right: none;
    }

    .fin-kpi-card:nth-child(n+9) {
        border-bottom: none;
    }

.fin-kpi-card--dark {
    background: #f9fafb;
}

.fin-kpi-card--gold {
    background: #fffbf0;
}

/* ── KPI value — large, bold, never shrinks ──────────────── */
.fin-kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    flex-shrink: 0;
}

/* ── KPI label — pushed down with margin-top ─────────────── */
.fin-kpi-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px; /* pushes label down away from value */
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* ── Right chart panel ───────────────────────────────────── */
.fin-chart-right {
    flex: 1;
    min-width: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1300px) {
    .fin-kpi-row {
        flex-direction: column;
    }

    .fin-chart-right {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .fin-kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
