/*
 * Business Overview dashboard styling (2026-07-31) — kept in its own
 * file, separate from warm-ember.css's panel-wide chrome tokens, and
 * registered alongside it via the same FilamentAsset::register() call
 * (AdminPanelProvider::boot()).
 *
 * Deliberately real, hand-written CSS classes — not Tailwind utility
 * classes. Filament's admin panel loads its own precompiled CSS bundle,
 * which never scans this app's custom widget Blade views, so any
 * Tailwind class referenced in those views (w-4, flex, rounded-lg, etc.)
 * silently does nothing — found 2026-07-31 as the cause of oversized
 * icons and broken layout. The design reference itself is 100%
 * inline-style HTML with no utility-class framework at all; these
 * classes plus inline styles in the Blade views follow that same
 * approach, guaranteed to render regardless of what Filament's own CSS
 * bundle happens to include.
 *
 * Colors are the two approved palettes only — nothing else:
 */
:root {
    --slate-amber-1: #697A87;
    --slate-amber-2: #C9A469;
    --slate-amber-3: #8FA0AB;
    --slate-amber-4: #DCC08F;
    --slate-amber-5: #4F5E69;
    --slate-amber-6: #EAD8B8;

    --desert-dusk-1: #D4917E;
    --desert-dusk-2: #E3B39B;
    --desert-dusk-3: #B8705C;
    --desert-dusk-4: #F0D4C2;
    --desert-dusk-5: #93594A;
    --desert-dusk-6: #DDA890;
}

.rf-dash * { box-sizing: border-box; }

.rf-dash { font-family: ui-sans-serif, -apple-system, system-ui, sans-serif; }

/* ── Layout ─────────────────────────────────────────────── */

.rf-dash-stack { display: flex; flex-direction: column; gap: 24px; }

.rf-dash-grid-cards {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.rf-dash-grid-2col {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 2.4fr) minmax(280px, 1fr);
}

@media (max-width: 900px) {
    .rf-dash-grid-2col { grid-template-columns: 1fr; }
}

/* ── Section heading ────────────────────────────────────── */

.rf-dash-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rf-dash-dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-top: 9px;
    flex-shrink: 0;
    display: block;
}

.rf-dash-section-heading h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.rf-dash-section-heading p {
    margin: 3px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-amber-1);
}

/* ── Cards ──────────────────────────────────────────────── */

.rf-dash-card {
    background: var(--rf-dash-card-bg, #fff);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 10px 28px -16px rgba(20, 24, 31, 0.16);
}

/* Root-level, not scoped to .rf-dash-card (2026-08-12 fix, same bug class
 * found on the Monitoring pages) — .rf-dash-mini-stat and .rf-dash-btn-group
 * below also read --rf-dash-card-bg but aren't necessarily nested inside a
 * .rf-dash-card ancestor, so a class-scoped definition left them stuck on
 * the #fff fallback in dark mode while their text correctly went light —
 * unreadable. Defining it at :root.dark makes every consumer inherit it
 * regardless of ancestry. */
:root[data-theme="dark"],
.dark {
    --rf-dash-card-bg: #292524;
}

.rf-dash-card-flush { padding: 0; overflow: hidden; }

.rf-dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.rf-dash-card-label-row { display: flex; align-items: center; gap: 11px; }

.rf-dash-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.rf-dash-icon-badge svg { width: 17px; height: 17px; display: block; }

.rf-dash-icon-badge-sm { width: 32px; height: 32px; border-radius: 10px; }

.rf-dash-icon-badge-sm svg { width: 16px; height: 16px; }

.rf-dash-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-amber-1);
}

.rf-dash-value {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    display: block;
}

.rf-dash-value-md { font-size: 22px; }

.rf-dash-value-sm { font-size: 20px; }

.rf-dash-caption {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--slate-amber-3);
    display: block;
}

.rf-dash-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
}

.rf-dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 40px 20px;
}

.rf-dash-empty svg { width: 32px; height: 32px; opacity: .35; }

.rf-dash-empty-title { font-size: 14px; font-weight: 600; color: var(--slate-amber-3); }

.rf-dash-empty-sub { font-size: 12.5px; color: var(--slate-amber-3); max-width: 340px; }

/* ── Mini stat rows (right-column list) ─────────────────── */

.rf-dash-mini-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--rf-dash-card-bg, #fff);
    border-radius: 16px;
    padding: 17px 18px;
    box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 8px 22px -16px rgba(20, 24, 31, 0.16);
}

.rf-dash-mini-stat-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

/* ── Toggle buttons ─────────────────────────────────────── */

.rf-dash-btn-group {
    display: flex;
    padding: 3px;
    gap: 2px;
    border-radius: 11px;
    background: var(--rf-dash-card-bg, #fff);
    box-shadow: inset 0 0 0 1px var(--slate-amber-6);
}

.rf-dash-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    background: transparent;
    color: var(--slate-amber-1);
}

.rf-dash-btn-active {
    background: var(--slate-amber-5);
    color: #fff;
}

/* ── Table ──────────────────────────────────────────────── */

.rf-dash-table-wrap { overflow-x: auto; }

.rf-dash-table { width: 100%; border-collapse: collapse; min-width: 560px; }

.rf-dash-table thead tr { background: var(--slate-amber-6); opacity: .45; }

.rf-dash-table th {
    text-align: left;
    padding: 11px 26px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--slate-amber-1);
}

.rf-dash-table th.rf-dash-text-right { text-align: right; }

.rf-dash-table td {
    padding: 16px 26px;
    font-size: 14px;
    border-top: 1px solid var(--slate-amber-6);
}

.rf-dash-table td.rf-dash-text-right { text-align: right; font-weight: 700; }

/* ── Bars / progress ────────────────────────────────────── */

.rf-dash-bar-row {
    display: grid;
    grid-template-columns: 34px 1fr 44px;
    align-items: center;
    gap: 14px;
}

.rf-dash-bar-row .rf-dash-bar-label {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-amber-1);
}

.rf-dash-bar-track {
    height: 20px;
    border-radius: 6px;
    background: var(--slate-amber-6);
    overflow: hidden;
    display: block;
}

.rf-dash-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--desert-dusk-3);
    display: block;
}

.rf-dash-bar-row .rf-dash-bar-value {
    font-size: 12.5px;
    font-weight: 700;
    text-align: right;
}

.rf-dash-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--slate-amber-6);
    overflow: hidden;
    display: block;
}

.rf-dash-progress-fill {
    height: 100%;
    border-radius: 999px;
    display: block;
}

/* ── Status pills ───────────────────────────────────────── */

.rf-dash-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-block;
}

/* ── Clickable filter pills (2026-08-12, Content Performance language
   filter) — terracotta-filled when active, matching the panel's primary
   action color (Constitution Principle IV: sand marks passive nav state,
   never a button; this IS a button, so it uses primary, not sand). ─── */

.rf-dash-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rf-dash-filter-pill {
    font-size: 12.5px;
    font-weight: 650;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--slate-amber-4);
    background: transparent;
    color: var(--slate-amber-1);
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}

.rf-dash-filter-pill:hover {
    border-color: var(--desert-dusk-3);
}

.rf-dash-filter-pill-active {
    background: var(--desert-dusk-3);
    border-color: var(--desert-dusk-3);
    color: #fff;
}

.dark .rf-dash-filter-pill {
    border-color: #44403c;
    color: #a8a29e;
}

/* ── Insight callouts ───────────────────────────────────── */

.rf-dash-insight-label {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-amber-1);
    display: block;
}

/* ── Timeline ───────────────────────────────────────────── */

.rf-dash-timeline-item {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px;
}

.rf-dash-timeline-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rf-dash-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 4px;
    flex-shrink: 0;
    display: block;
}

.rf-dash-timeline-line {
    flex: 1;
    width: 2px;
    background: var(--slate-amber-6);
}

.rf-dash-timeline-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 20px;
}

.rf-dash-timeline-title { font-size: 13.5px; font-weight: 700; }

.rf-dash-timeline-meta { font-size: 12.5px; font-weight: 500; color: var(--slate-amber-1); }

.rf-dash-timeline-time { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--slate-amber-3); }

/* ── Currency / donut legend rows ───────────────────────── */

.rf-dash-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.rf-dash-legend-key { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; }

.rf-dash-swatch { width: 9px; height: 9px; border-radius: 3px; display: block; flex-shrink: 0; }
