/* ==========================================
   FRMS Dashboard — Design System 2.0 (Phase 3h)
   Extracted from frms-system/index.html inline <style> block
   (FRMS v3 plan §E2.7 — CSS extraction).

   ONE card recipe across this subsystem:
     var(--bg-card) surface + 1px var(--warm-border)
     + var(--radius-lg) + var(--shadow-card), on var(--bg-primary) ground.
   Operational data (scores, counts, durations, deltas) renders in
   var(--font-mono) with tnum at var(--text-heading) ink — state lives in
   the labels and the kit pills, never in rainbow digits.

   Shared by the dashboard family (index, fsap, training) —
   selectors here are load-bearing, do not rename.
   ========================================== */

/* ============================================================
   FRMS token layer (FRMS-049 / Structural D) — see frms-session.css for
   the full rationale. Mirrored here so the dashboard-family pages (index,
   fsap, training) resolve the same AA-safe cool-slate values.
   css/v905-theme.css is linked BEFORE this sheet. ============================ */
:root {
    --glass-bg: var(--bg-card, #ffffff);
    --glass-bg-light: var(--bg-card, #ffffff);
    --glass-border: var(--warm-border, #e2e8f0);
    --glass-highlight: var(--warm-subtle, #f8fafc);
    --text-secondary: #586576;
    --text-muted: #586576;
    --accent-blue: #2c5282;
    --accent-green: #047857;
    --accent-yellow: #8a6d1f;
    --accent-orange: #b45309;
    --accent-red: #c0392b;
    /* Phase 3h: gold is retired product-wide. The dashboard family's own
       token layer was still minting it (#8a6d1f), which is why the ALFA
       surface kept rendering gold after the Phase-1c literal sweep. Resolve
       to the sanctioned deep slate-blue (matches css/tokens.css). The RISK
       band tokens below are NOT touched — they are the Phase-0 AA-verified
       safety scale and are semantically load-bearing. */
    --gold-accent: #3468a0;
    --warning: #b45309;
    --risk-low: #047857;
    --risk-moderate: #8a6d1f;
    --risk-high: #b45309;
    --risk-very-high: #c0392b;
}

body {
    background: var(--bg-primary, #eef1f6);
    min-height: 100vh;
}

/* Sleep-debt legend color swatch (FRMS-060): a real color box, not a
   low-contrast ▬ text glyph. aria-hidden in markup — the adjacent label
   carries the meaning, so it is exempt from the text-contrast audit.
   Phase 3h: the four fills moved out of style="" attributes into these
   modifiers. The VALUES are deliberately unchanged — they mirror the
   sleep-debt band scale the chart line, point colors and threshold rules
   draw with (dashboard.js renderSleepDebtChart), and a legend that no
   longer matches its chart is worse than an off-palette one. */
.debt-legend-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 0.15rem;
}
.debt-legend-swatch.is-low       { background: #81c784; }
.debt-legend-swatch.is-moderate  { background: #ffd54f; }
.debt-legend-swatch.is-high      { background: #ffb74d; }
.debt-legend-swatch.is-critical  { background: #e57373; }

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* ── Quiet page header (Phase 3h) ───────────────────────────────────
   22px/700 ink title + one-line subtitle, primary actions right. The
   sr-only <h1> this replaced left the page with no visible name. */
.frms-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.frms-page-head h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-heading, #16202e);
    margin: 0 0 0.3rem 0;
}

.frms-page-sub {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-secondary, #55627a);
    margin: 0;
    max-width: 70ch;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
    flex-wrap: wrap;
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
}

.tab-nav {
    display: flex;
    gap: var(--spacing-xs);
}

.tab-btn {
    min-height: 40px;           /* the style guide's touch floor; was 38px */
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary, #55627a);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--warm-subtle, #f8fafc);
    color: var(--warm-accent, #2c5282);
}

.tab-btn.active {
    background: var(--warm-accent, #2c5282);
    color: white;
    font-weight: 600;
}

.tab-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.action-btn {
    padding: 0.625rem 1rem;
    border: 1px solid var(--warm-border, #dfe5ee);
    background: var(--bg-card, #ffffff);
    color: var(--text-primary, #2c2c2c);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: var(--warm-subtle, #f8fafc);
    transform: translateY(-1px);
}

.action-btn.primary {
    background: var(--warm-accent, #2c5282);
    border-color: var(--warm-accent, #2c5282);
    color: white;
}

/* FRMS-3h: was var(--warm-dark, #6b5a47) — the fallback fired on every
   dashboard-family page and hovered the primary CTA to legacy brown. */
.action-btn.primary:hover {
    background: var(--accent-deep, #1e3a5f);
    border-color: var(--accent-deep, #1e3a5f);
}

/* Tab Content Areas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Glass Panel — THE card recipe */
.glass-panel {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
}

.glass-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.glass-panel-title {
    color: var(--text-heading, #16202e);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

/* A title that is the panel's own first child (no header row) still needs
   air under it — this replaces a per-instance inline margin-bottom. */
.glass-panel > .glass-panel-title { margin-bottom: var(--spacing-md); }

/* Section intro paragraph under a panel title (was 5 inline styles) */
.frms-panel-intro {
    color: var(--text-secondary, #55627a);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 0 var(--spacing-md) 0;
    max-width: 92ch;
}

.frms-panel-intro--tight {
    font-size: 12.5px;
    margin-bottom: 0.75rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
}

.stat-card:hover {
    box-shadow: var(--shadow-lg, 0 4px 14px rgba(22, 32, 46, 0.09));
    transform: translateY(-2px);
}

/* Operational digits: DM Sans + tabular figures, ink. */
.stat-value {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-size: 1.85rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--text-heading, #16202e);
    margin-bottom: var(--spacing-xs);
}

/* Phase 3h: four KPI tiles in four accent colors (one of which, .blue,
   actually rendered gold) is not a taxonomy — it is decoration. Results
   read as ink; the meaning lives in the label. The modifier classes stay
   so sibling markup keeps resolving. */
.stat-value.navy,
.stat-value.red,
.stat-value.blue,
.stat-value.green { color: var(--text-heading, #16202e); }

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-label, #7d89a0);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

/* Session Filter Controls */
.sessions-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--warm-subtle, #f8fafc);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-md, 8px);
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text-primary, #2c2c2c);
    font-size: 0.875rem;
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--line-strong, #c6cfdc);
    border-radius: var(--radius-md, 8px);
    padding: 0.5rem 0.75rem;
    color: var(--text-primary, #2c2c2c);
    font-family: inherit;
    font-size: 0.875rem;
    min-width: 140px;
}

/* The search box takes the leftover width instead of being clipped to the
   140px floor — its placeholder was truncating mid-word. */
.sessions-controls .filter-group:last-child { flex: 1 1 220px; }
.sessions-controls .filter-group:last-child input { width: 100%; }

/* Phase 3h: `outline: none` on :focus left a 1px border-color change as
   the ONLY focus affordance. Keep the border emphasis, restore a real
   focus ring. */
.filter-group select:focus-visible,
.filter-group input:focus-visible,
.filter-select:focus-visible {
    outline: 2px solid var(--accent, #2c5282);
    outline-offset: 2px;
    border-color: var(--warm-accent, #2c5282);
}

.filter-group select option {
    background: var(--bg-card, #ffffff);
    color: var(--text-primary, #2c2c2c);
}

.filter-group input::placeholder {
    color: var(--text-muted, #64748b);
}

@media (max-width: 768px) {
    .sessions-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group label {
        margin-bottom: 0.25rem;
    }
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
}

/* Session Cards */
.sessions-grid {
    display: grid;
    gap: var(--spacing-md);
}

.session-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: var(--spacing-lg);
    transition: all 0.2s ease;
}

.session-card:hover {
    box-shadow: var(--shadow-lg, 0 4px 14px rgba(22, 32, 46, 0.09));
}

/* State edge only — the card surface stays white so every card in the
   list reads as the same object. The state itself is in the pill. */
.session-card.active-flight {
    border-left: 4px solid var(--accent, #2c5282);
}

.session-card.pre-flight {
    border-left: 4px solid var(--accent-light, #4a7ab5);
}

.session-card.planned {
    border-left: 4px solid var(--line-strong, #c6cfdc);
}

.session-card.post-flight {
    border-left: 4px solid var(--ok-ink, #1a6b3c);
}

/* Aircraft chip beside the route (was an inline style in dashboard.js) */
.session-aircraft {
    margin-left: 0.75rem;
    color: var(--text-secondary, #55627a);
    font-size: 0.875rem;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.session-route {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    color: var(--text-heading, #16202e);
    font-size: 1rem;
    font-weight: 500;
}

/* Flight-state chip — kit pill geometry, kit status inks (Phase 3h).
   The four states stay visually distinct; ACTIVE is the only filled one
   because an aircraft in the air is the thing you scan the list for. */
.session-badge {
    display: inline-flex;
    align-items: center;
    padding: 3.5px 10px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.session-badge.active {
    background: var(--accent, #2c5282);
    color: var(--text-inverse);
}

.session-badge.pre-flight {
    background: var(--info-bg, #e4eefb);
    color: var(--info-ink, #23568f);
}

.session-badge.planned {
    background: var(--neutral-bg, #e9edf3);
    color: var(--neutral-ink, #55627a);
}

.session-badge.post-flight {
    background: var(--ok-bg, #e3f3e8);
    color: var(--ok-ink, #1a6b3c);
}

.session-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    margin-bottom: var(--spacing-sm);
    word-break: break-all;
}

.session-stats {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    color: var(--text-primary, #2c2c2c);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

/* Numeric half of a "Label: 42/100" stat pair */
.session-stats .frms-num,
.frms-num {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    color: var(--text-heading, #16202e);
    font-weight: 500;
}

.session-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.session-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.session-btn.primary {
    background: var(--warm-accent, #2c5282);
    color: white;
}

.session-btn.secondary {
    background: var(--bg-card, #ffffff);
    color: var(--text-primary, #2c2c2c);
    border-color: var(--line-strong, #c6cfdc);
}

.session-btn.danger {
    background: var(--danger-red, #b91c1c);
    color: white;
}

.session-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* Recent Table */
.recent-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-table th {
    text-align: left;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--ink-label, #7d89a0);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    white-space: nowrap;
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
}

.recent-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary, #2c2c2c);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
}

/* Route / score columns are operational data */
.recent-table td:nth-child(2),
.recent-table td:nth-child(4) {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    color: var(--text-heading, #16202e);
    white-space: nowrap;
}

.recent-table tr:hover td {
    background: var(--warm-subtle, #f8fafc);
    cursor: pointer;
}

/* Risk chip — kit pill geometry over the Phase-0 AA status inks. The
   BAND TAXONOMY (which score maps to which class) is owned by
   FlightSessionManager.riskBand and is untouched here. */
.risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 3.5px 10px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.risk-badge.low      { background: var(--ok-bg, #e3f3e8);   color: var(--ok-ink, #1a6b3c); }
.risk-badge.moderate { background: var(--warn-bg, #fbeedd); color: var(--warn-ink, #92500e); }
.risk-badge.high     { background: var(--bad-bg, #fbe5e5);  color: var(--bad-ink, #a12626); }
.risk-badge.unknown  { background: var(--neutral-bg, #e9edf3); color: var(--neutral-ink, #55627a); }

/* Analytics Tab Styles */
.analytics-sub-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
    padding-bottom: var(--spacing-sm);
    overflow-x: auto;
}

.analytics-sub-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary, #55627a);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

/* The Model & Validation tab used to carry its identity in an inline
   tinted background + a ★ glyph. It is a tab like the other two. */
.analytics-sub-tab.alfa-tab { font-weight: 600; }

.analytics-sub-tab:hover {
    color: var(--accent-blue, #2c5282);
}

.analytics-sub-tab.active {
    color: var(--accent-blue, #2c5282);
    border-bottom-color: var(--warm-accent, #2c5282);
    font-weight: 600;
}

.analytics-content {
    display: none;
}

.analytics-content.active {
    display: block;
}

.filter-bar {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--line-strong, #c6cfdc);
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary, #2c2c2c);
    font-family: inherit;
    font-size: 0.85rem;
}

.filter-select option {
    background: var(--bg-card, #ffffff);
    color: var(--text-primary, #2c2c2c);
}

.filter-select--auto { width: auto; min-width: 0; }

/* Custom-range group: hidden until the "Custom Range" option is chosen
   (was style="display:none" + a JS style write). */
.filter-range {
    display: none;
    gap: 0.5rem;
    align-items: center;
}
.filter-range.is-open { display: flex; }
.filter-range-sep { color: var(--text-secondary, #55627a); font-size: 0.85rem; }

/* Right-aligned trailing action in the filter bar */
.filter-bar-spacer { margin-left: auto; }

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 900px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: var(--spacing-md);
    text-align: center;
}

.metric-value {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.15;
    color: var(--text-heading, #16202e);
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-label, #7d89a0);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-top: var(--spacing-xs);
}

.chart-placeholder {
    background: var(--warm-subtle, #f8fafc);
    border: 2px dashed var(--warm-border, #dfe5ee);
    border-radius: 12px;
    padding: var(--spacing-2xl);
    text-align: center;
    color: var(--text-muted, #64748b);
    margin-bottom: var(--spacing-lg);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ANALYTICS + MODEL/VALIDATION SURFACE (Phase 3h)

   The Model & Validation tab used to be six competing one-off card
   treatments assembled from ~290 style="" attributes — gold-bordered,
   gold-tinted, white, glass tile, metric card, trend tile. It is now
   TWO shapes:

     .frms-card  — white card: bg-card + 1px warm-border + radius-lg
                   + shadow-card. Everything that is a "section".
     .frms-tile  — flat inner tile: bg-card-alt, radius-md, no border.
                   Everything that is a reading inside a section.

   Every class below exists to retire a style="" attribute, which is
   also what unblocks dropping 'unsafe-inline' from the CSP header.
   ═══════════════════════════════════════════════════════════════════ */

.frms-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.frms-card--tight { padding: 1.25rem; }

.frms-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.frms-card-head-end { text-align: right; }

.frms-card-title {
    color: var(--text-heading, #16202e);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.frms-card-sub {
    color: var(--text-secondary, #55627a);
    font-size: 12.5px;
    line-height: 1.45;
    margin: 0.25rem 0 0 0;
    max-width: 92ch;
}

.frms-card-note {
    color: var(--text-muted, #64748b);
    font-size: 12px;
    font-style: italic;
    margin: 0.35rem 0 0 0;
}

/* 11px uppercase overline — the ONLY thing allowed at 11px. */
.frms-overline {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-label, #7d89a0);
}

/* ── Tiles ────────────────────────────────────────────────────────── */
.frms-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.frms-tile {
    background: var(--bg-card-alt, #f8fafc);
    border-radius: var(--radius-md, 8px);
    padding: 0.85rem;
}

.frms-tile--center { text-align: center; padding: 1rem; }

.frms-tile-value {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-heading, #16202e);
    margin-top: 0.2rem;
}

/* A phase NAME is prose, not operational data — it stays in DM Sans. */
.frms-status-reading {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading, #16202e);
    margin-top: 0.2rem;
}

.frms-tile-hint {
    color: var(--text-muted, #64748b);
    font-size: 11.5px;
    margin-top: 0.15rem;
}

/* ── KPI strip (was three inline "trend tiles" per panel) ─────────── */
.frms-kpi-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.frms-kpi {
    flex: 1;
    min-width: 190px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: 1rem;
}

.frms-kpi-value {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-heading, #16202e);
    margin-top: 0.25rem;
}

.frms-kpi-row-inline {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Trend direction: ink stays ink, the arrow carries the direction and
   the status ink is used only as an accent on the delta itself. */
.frms-trend { font-weight: 600; }
.frms-trend.is-better { color: var(--ok-ink, #1a6b3c); }
.frms-trend.is-worse  { color: var(--bad-ink, #a12626); }
.frms-trend.is-flat   { color: var(--text-secondary, #55627a); }

/* ── Hero: tool accuracy rating ───────────────────────────────────── */
.tool-accuracy-hero {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: 1.5rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.tool-accuracy-hero-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tool-accuracy-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
}

.tool-accuracy-score .tool-accuracy-value {
    font-size: 2.75rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-heading, #16202e);
}

.tool-accuracy-score .tool-accuracy-denom {
    font-size: 1.25rem;
    color: var(--text-muted, #64748b);
}

.tool-accuracy-divider {
    width: 1px;
    align-self: stretch;
    min-height: 72px;
    background: var(--warm-border, #dfe5ee);
}

.tool-accuracy-meta { text-align: left; }

.tool-accuracy-meta-line {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #55627a);
}

.tool-accuracy-meta-line .frms-num { font-size: 0.95rem; }

.tool-accuracy-trend {
    font-size: 0.85rem;
    color: var(--text-secondary, #55627a);
}

@media (max-width: 600px) {
    .tool-accuracy-divider { display: none; }
    .tool-accuracy-meta { text-align: center; }
    .tool-accuracy-meta-line { justify-content: center; }
}

/* ── Chart cards ──────────────────────────────────────────────────── */
.chart-container {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: 1rem;
}

.chart-container + .chart-container,
.charts-grid + .chart-container { margin-top: var(--spacing-md); }

.frms-chart-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text-heading, #16202e);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Fixed canvas frames — Chart.js needs a sized, positioned parent. */
.frms-chart-body { position: relative; }
.frms-chart-body--sm  { height: 180px; }
.frms-chart-body--md  { height: 200px; }
.frms-chart-body--lg  { height: 250px; }
.frms-chart-body--xl  { height: 280px; }
.frms-chart-body--tall { height: 360px; }

.frms-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    font-size: 12px;
    color: var(--text-secondary, #55627a);
}

/* Status chip rendered into a chart card header (sleep-debt risk) */
.frms-chart-status {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3.5px 10px;
    border-radius: var(--radius-full, 9999px);
    background: var(--neutral-bg, #e9edf3);
    color: var(--neutral-ink, #55627a);
    white-space: nowrap;
}

/* ── Inline callout / honest "why is this empty" note ─────────────── */
.frms-note {
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--accent-soft, #e7eef7);
    border-left: 3px solid var(--accent, #2c5282);
    border-radius: var(--radius-sm, 6px);
    color: var(--ink-body, #2a3648);
    font-size: 12.5px;
    line-height: 1.5;
}

.frms-note--ok {
    background: var(--ok-bg, #e3f3e8);
    border-left-color: var(--ok-ink, #1a6b3c);
    color: var(--ok-ink, #1a6b3c);
    margin-top: 0;
}

.frms-note.is-hidden { display: none; }

/* ── Data tables inside cards ─────────────────────────────────────── */
.frms-scroll-x { overflow-x: auto; }

.frms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.frms-table th {
    padding: 0.5rem 0.6rem;
    color: var(--ink-label, #7d89a0);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
}

.frms-table td {
    padding: 0.55rem 0.6rem;
    color: var(--text-primary, #2c2c2c);
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
    vertical-align: top;
}

.frms-table .num,
.frms-table th.num { text-align: right; }

.frms-table td.num {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    color: var(--text-heading, #16202e);
    white-space: nowrap;
}

.frms-table td.center,
.frms-table th.center { text-align: center; }

.frms-table td.empty {
    text-align: center;
    padding: 1.5rem 0.6rem;
    color: var(--text-muted, #64748b);
    border-bottom: none;
}

.frms-table-note {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
    font-style: normal;
}

/* ── Progress: ALFA validation milestones ─────────────────────────── */
.frms-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.frms-progress-track {
    position: relative;
    height: 12px;
    border-radius: var(--radius-full, 9999px);
    background: var(--bg-card-alt, #f8fafc);
    border: 1px solid var(--warm-border, #dfe5ee);
    overflow: hidden;
}

.frms-progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent, #2c5282);
    border-radius: var(--radius-full, 9999px);
    transition: width 0.5s ease;
}

.frms-progress-mark {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--line-strong, #c6cfdc);
}
.frms-progress-mark.at-25  { left: 25%; }
.frms-progress-mark.at-50  { left: 50%; }
.frms-progress-mark.at-100 { left: calc(100% - 2px); }

.frms-progress-scale {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 11px;
    color: var(--text-muted, #64748b);
}

/* ── Schedule-preview flag rows (rendered by dashboard.js) ────────── */
.frms-flag-list { display: flex; flex-direction: column; gap: 0.4rem; }

.frms-flag {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--line-strong, #c6cfdc);
    background: var(--bg-card-alt, #f8fafc);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
}

.frms-flag.is-critical { border-left-color: var(--bad-ink, #a12626); }
.frms-flag.is-warning  { border-left-color: var(--warn-ink, #92500e); }
.frms-flag.is-clear    { border-left-color: var(--line-strong, #c6cfdc); }

.frms-flag-date {
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    font-weight: 500;
    color: var(--text-heading, #16202e);
    white-space: nowrap;
}

.frms-flag-label { color: var(--text-secondary, #55627a); }

.frms-flag-score {
    margin-left: auto;
    font-family: var(--font-mono);
    font-feature-settings: 'tnum';
    color: var(--text-muted, #64748b);
    white-space: nowrap;
}

.frms-flag-more {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
    padding: 0.25rem 0.75rem;
}

/* Reference Tab Styles */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.reference-card {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
    padding: var(--spacing-lg);
    transition: all 0.2s;
}

.reference-card:hover {
    box-shadow: var(--shadow-lg, 0 4px 14px rgba(22, 32, 46, 0.09));
    transform: translateY(-2px);
}

.reference-card-icon {
    color: var(--accent, #2c5282);
    margin-bottom: var(--spacing-sm);
    line-height: 0;
}

.reference-card-title {
    color: var(--text-heading, #16202e);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.reference-card-description {
    color: var(--text-secondary, #55627a);
    font-size: 0.85rem;
    margin-bottom: var(--spacing-md);
}

.reference-link {
    color: var(--warm-accent, #2c5282);
    font-size: 0.85rem;
    text-decoration: none;
}

.reference-link:hover {
    text-decoration: underline;
}

/* Empty State — kept for the sibling dashboard-family pages that still
   use it. index.html itself is on the shared kit `.jf-empty` (Phase 3h);
   this rule keeps the two visually identical during the migration. */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--text-muted, #64748b);
}

.empty-state-icon {
    color: var(--line-strong, #c6cfdc);
    margin-bottom: var(--spacing-sm);
    line-height: 0;
    opacity: 1;
}

/* A `.jf-empty` used as a table cell must not become a flex container —
   that collapses the cell. Restore block flow for that one case. */
td.jf-empty { display: table-cell; text-align: center; }

/* An in-card empty state doesn't need the kit's full 48px pad. */
.jf-empty.jf-empty--inline { padding: 1rem 0.75rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .tab-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-nav {
        overflow-x: auto;
        padding-bottom: var(--spacing-xs);
    }

    .tab-actions {
        justify-content: center;
    }

    .session-header {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .frms-page-head { flex-direction: column; }
    .frms-page-head .tab-actions { width: 100%; }
    .frms-page-head .tab-actions .action-btn { flex: 1; justify-content: center; }
}

/* 375px: nothing may push the page into a horizontal scroll. */
@media (max-width: 480px) {
    .dashboard-container { padding: var(--spacing-md) 0.75rem; }
    .metrics-row { grid-template-columns: 1fr; }
    .glass-panel,
    .frms-card { padding: var(--spacing-md); }
    .frms-card-head { flex-direction: column; gap: 0.5rem; }
    .frms-card-head-end { text-align: left; }
    .frms-tile-grid { grid-template-columns: 1fr; }
    .frms-flag { align-items: flex-start; }
    .frms-flag-score { margin-left: 0; }
    .filter-bar { align-items: stretch; }
    .filter-bar .filter-select { width: 100%; }
    .filter-bar-spacer { margin-left: 0; }
    .filter-range { flex-wrap: wrap; }
    .frms-progress-scale { flex-wrap: wrap; row-gap: 0.25rem; }
    .frms-chart-legend { gap: 0.75rem; }
}

/* Wide content scrolls inside its own box, never the page. */
.recent-table-wrap { overflow-x: auto; }
.recent-table { min-width: 520px; }

/* ==========================================
   Check-In Modal
   ========================================== */
/* Standard overlay convention: `.modal-overlay` toggling `.active` —
   this is what navbar.js's a11y retrofit registers (role=dialog,
   aria-modal, focus trap, focus restore, Esc-to-close). */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 32, 46, 0.55);
    z-index: var(--z-modal-backdrop, 1000);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl, 0 8px 22px rgba(22, 32, 46, 0.11));
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
}

.modal-header h2 {
    color: var(--text-heading, #16202e);
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted, #64748b);
    font-family: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary, #2c2c2c);
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-form-group {
    margin-bottom: var(--spacing-md);
}

.modal-form-group label {
    display: block;
    color: var(--text-primary, #2c2c2c);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* font-family: inherit is load-bearing — a <textarea> with no family falls
   back to the browser's monospace default, so the check-in notes box was
   rendering in a different typeface from the rest of the product. */
.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--line-strong, #c6cfdc);
    border-radius: var(--radius-md, 8px);
    color: var(--text-primary, #2c2c2c);
    font-family: inherit;
    font-size: 0.95rem;
}

.modal-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md, 8px);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--line-strong, #c6cfdc);
    color: var(--text-primary, #2c2c2c);
}

.modal-btn-submit {
    background: var(--warm-accent, #2c5282);
    border: none;
    color: #fff;
}

.modal-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md, 0 4px 12px rgba(44, 82, 130, 0.2));
}

/* Compliance cross-reference table (FRMS v3 plan §F) — rendered by js/compliance/compliance-matrix.js.
   Four text columns stay readable on a phone by scrolling inside
   #complianceMatrixContainer (.frms-scroll-x) rather than squeezing. */
.compliance-matrix-table {
    width: 100%;
    min-width: 44rem;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.compliance-matrix-table caption {
    caption-side: bottom;
    text-align: left;
    padding-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
}

/* One header row per source: 14 CFR Part 135, Part 5, the ACs, ICAO/industry. */
.compliance-matrix-table tbody th.cm-group {
    text-align: left;
    padding: 1rem 0.75rem 0.4rem;
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
    color: var(--text-primary, #2c2c2c);
    font-weight: 600;
    background: none;
}

.compliance-matrix-table .cm-kind,
.compliance-matrix-table .cm-none {
    font-weight: 400;
    color: var(--text-muted, #64748b);
}

.compliance-matrix-table thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--warm-subtle, #f8fafc);
    border-bottom: 2px solid var(--warm-border, #dfe5ee);
    color: var(--text-primary, #2c2c2c);
    font-weight: 600;
}

.compliance-matrix-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--warm-border, #dfe5ee);
    color: var(--text-primary, #2c2c2c);
    vertical-align: top;
}

.compliance-matrix-table tbody tr:hover {
    background: var(--warm-subtle, #f8fafc);
}

.compliance-matrix-table td:first-child {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
}

/* ==========================================
   Loading Skeletons — Phase 08
   Subtle pulse for async data panels. Applied via
   FatigueDashboard.showSkeleton(containerId, { rows }).
   Honors prefers-reduced-motion: no-preference.
   ========================================== */

.frms-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.25rem 0;
}

/* The row itself is the shared kit `.jf-skeleton` (dashboard.js emits
   both classes); this rule only supplies the FRMS row height and the
   staggered widths that make a skeleton read as a list, not a block. */
.frms-skeleton-row {
    height: 0.85rem;
    border-radius: var(--radius-sm, 6px);
    background: linear-gradient(
        90deg,
        var(--line, #dfe5ee) 25%,
        #e9edf4 50%,
        var(--line, #dfe5ee) 75%
    );
    background-size: 200% 100%;
}

.frms-skeleton-row:nth-child(1) { width: 100%; }
.frms-skeleton-row:nth-child(2) { width: 85%; }
.frms-skeleton-row:nth-child(3) { width: 92%; }
.frms-skeleton-row:nth-child(4) { width: 70%; }
.frms-skeleton-row:nth-child(5) { width: 88%; }
.frms-skeleton-row:nth-child(n+6) { width: 78%; }

@media (prefers-reduced-motion: no-preference) {
    .frms-skeleton-row {
        animation: frms-skeleton-pulse 1.4s ease-in-out infinite;
    }
}

@keyframes frms-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* FRMS-051: honour prefers-reduced-motion for ALL FRMS animation/transition
   (pulse-critical, fadeIn, spinner, transform hovers) — not just the
   skeleton. Blanket override, scoped to this FRMS sheet. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* FRMS-051: print styles for the dashboard-family pages. Hide chrome,
   ink-friendly. (The policy preview they were written for went with the
   Policy Generator, 2026-09-25.) */
@media print {
    nav-bar, glass-footer, .skip-link, .skip-to-content,
    .tab-bar, .action-btn, .btn { display: none !important; }
    body, .dashboard-container { background: #fff !important; color: #000 !important; }
    .glass-panel { box-shadow: none !important; border-color: #ccc !important; }
}

/* ── C on Model & Validation (js/validation-panel.js) ─────────────────
   What pilots reported against the model. Words and numbers in ink:
   no colour on a gap (owner rule 2026-09-16: a trend, never a threshold). */
.c-section { margin-top: var(--spacing-md, 1rem); }
.c-section-title {
    color: var(--text-heading, #16202e);
    font-size: 13.5px;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}
.c-section-lede {
    color: var(--text-secondary, #55627a);
    font-size: 12.5px;
    line-height: 1.45;
    margin: 0 0 0.5rem 0;
    max-width: 92ch;
}
/* Row headers read as the row's name, not as a column overline, and keep
   enough width on a phone not to break a word per line (the table scrolls
   in its own box instead). */
.c-table tbody th {
    color: var(--text-primary, #2c2c2c);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    vertical-align: top;
    min-width: 8.5rem;
}
.c-message { margin-top: var(--spacing-md, 1rem); }

/* ── The company view (owner ruling 2026-09-15, ruling 8) ─────────────────
   Every crew member's assessed flights, twelve months, no names and no
   single flight. Counted by the frmsCompanyTotals callable. */
.company-view {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md, 1rem);
    margin-bottom: var(--spacing-lg, 1.5rem);
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--warm-border, #dfe5ee);
    border-radius: var(--radius-lg, 10px);
    box-shadow: var(--shadow-card, 0 1px 2px rgba(22, 32, 46, 0.05));
}
.company-view:empty { display: none; }
.company-view-title { margin: 0; font-size: var(--text-section, 17px); font-weight: 700; color: var(--text-heading, #16202e); }
.company-view-sub { margin: 2px 0 0; font-size: var(--text-support, 13px); color: var(--ink-muted, #5b6779); max-width: 70ch; }
.company-view-note { margin: 0; font-size: var(--text-support, 13px); color: var(--ink-muted, #5b6779); }
.company-view-total { display: flex; align-items: baseline; gap: var(--spacing-sm, 0.5rem); margin: 0; }
.company-view-number { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-heading, #16202e); }
.company-view-number-label { font-size: var(--text-body, 14px); color: var(--ink-body, #2a3648); }
.company-view-bands { display: flex; flex-wrap: wrap; gap: var(--spacing-sm, 0.5rem); margin: 0; padding: 0; list-style: none; }
.company-view-band {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--radius-full, 9999px);
    font-size: var(--text-support, 13px);
    background: var(--wash, #f6f8fb);
    color: var(--ink-body, #2a3648);
}
.company-view-band-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.company-view-band--low { background: var(--ok-bg); color: var(--ok-ink); }
.company-view-band--moderate { background: var(--warn-bg); color: var(--warn-ink); }
.company-view-band--high,
.company-view-band--very-high { background: var(--bad-bg); color: var(--bad-ink); }
.company-view-h4 { margin: 0 0 6px; font-size: var(--text-card, 15px); font-weight: 600; color: var(--text-heading, #16202e); }
.company-view-factor-list { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-body, 14px); }
.company-view-factor-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.company-view-factor-count { color: var(--ink-muted, #5b6779); font-variant-numeric: tabular-nums; }
.company-view-table-wrap { overflow-x: auto; }
.company-view-months { width: 100%; border-collapse: collapse; font-size: var(--text-support, 13px); font-variant-numeric: tabular-nums; }
.company-view-months caption { text-align: left; font-weight: 600; color: var(--text-heading, #16202e); padding-bottom: 6px; }
.company-view-months th, .company-view-months td { padding: 6px 10px; border-bottom: 1px solid var(--line, #dfe5ee); text-align: right; white-space: nowrap; }
.company-view-months thead th { font-weight: 600; color: var(--ink-muted, #5b6779); }
.company-view-months th[scope="row"], .company-view-months thead th:first-child { text-align: left; }
