/* HSE hub — per-page styles. Owned by the HSE hub F1 agent.
   Tokens only (--atlas-* / --atlas-hse-*); class prefix .hse-hub-*.
   Shared component/layout styles live in hse-base.css (owned by F0, do not edit). */

/* ── Gauge bar with target marker (KPIs §1.3 staffing ratios) ───────────── */
.hse-hub-gauge { margin-bottom: var(--atlas-space-4); }
.hse-hub-gauge:last-child { margin-bottom: 0; }
.hse-hub-gauge-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--atlas-space-1); font-size: .82rem; }
.hse-hub-gauge-name { font-weight: 600; color: var(--atlas-text); }
.hse-hub-gauge-track { position: relative; height: 10px; border-radius: var(--atlas-radius-full); background: var(--atlas-surface-sunken); }
.hse-hub-gauge-fill { height: 100%; border-radius: var(--atlas-radius-full); background: var(--hse-hub-gauge-accent, var(--atlas-hse-brand)); }
.hse-hub-gauge-marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--atlas-hse-navy); }
.hse-hub-gauge.acc-ok    { --hse-hub-gauge-accent: var(--atlas-hse-ok); }
.hse-hub-gauge.acc-brand { --hse-hub-gauge-accent: var(--atlas-hse-brand); }
.hse-hub-gauge.acc-warn  { --hse-hub-gauge-accent: var(--atlas-hse-warn); }
.hse-hub-gauge.acc-no    { --hse-hub-gauge-accent: var(--atlas-hse-no); }

/* ── Compliance matrix (Regional Performance §1.7) ──────────────────────── */
.hse-hub-matrix-wrap { overflow-x: auto; }
.hse-hub-matrix { width: 100%; border-collapse: collapse; font-size: .84rem; }
.hse-hub-matrix th, .hse-hub-matrix td {
    padding: var(--atlas-space-2) var(--atlas-space-3); text-align: center;
    border-bottom: 1px solid var(--atlas-hse-line); white-space: nowrap;
}
.hse-hub-matrix thead th {
    text-transform: uppercase; font-size: .68rem; letter-spacing: .04em;
    color: var(--atlas-hse-muted); font-weight: 700;
}
.hse-hub-matrix td:first-child, .hse-hub-matrix th:first-child { text-align: left; font-weight: 600; color: var(--atlas-text); }
.hse-hub-cell-target { color: var(--atlas-hse-muted); }
.hse-hub-cell-pass { background: var(--atlas-hse-ok-soft); color: var(--atlas-hse-ok); font-weight: 700; border-radius: var(--atlas-radius-sm); }
.hse-hub-cell-fail { background: var(--atlas-hse-no-soft); color: var(--atlas-hse-no); font-weight: 700; border-radius: var(--atlas-radius-sm); }
.hse-hub-cell-hold { background: var(--atlas-surface-sunken); color: var(--atlas-hse-muted); border-radius: var(--atlas-radius-sm); }
.hse-hub-matrix-legend { display: flex; gap: var(--atlas-space-4); margin-top: var(--atlas-space-3); font-size: .78rem; color: var(--atlas-hse-muted); align-items: center; flex-wrap: wrap; }
.hse-hub-legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: var(--atlas-radius-xs); margin-right: var(--atlas-space-1); vertical-align: middle; }
.hse-hub-legend-swatch.pass { background: var(--atlas-hse-ok-soft); border: 1px solid var(--atlas-hse-ok); }
.hse-hub-legend-swatch.fail { background: var(--atlas-hse-no-soft); border: 1px solid var(--atlas-hse-no); }
.hse-hub-legend-swatch.hold { background: var(--atlas-surface-sunken); border: 1px solid var(--atlas-hse-line); }

/* ── Region cards (Regional Performance §1.7) ───────────────────────────── */
.hse-hub-region-card {
    background: var(--atlas-surface); border: 1px solid var(--atlas-hse-line);
    border-radius: var(--atlas-radius-xl); padding: var(--atlas-space-4); box-shadow: var(--atlas-shadow-1);
}
.hse-hub-region-name { font-weight: 700; color: var(--atlas-text); font-size: 1rem; }
.hse-hub-region-count { font-size: .78rem; color: var(--atlas-hse-muted); margin-top: 2px; }
.hse-hub-region-status { font-size: .82rem; color: var(--atlas-text); margin-top: var(--atlas-space-3); }
.hse-hub-region-link { display: inline-block; margin-top: var(--atlas-space-3); font-size: .82rem; font-weight: 600; color: var(--atlas-hse-brand); }

/* ── Department pill (Key Personnel §1.6) ───────────────────────────────── */
.hse-hub-dept-pill {
    display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700;
    padding: .32em .6em; border-radius: var(--atlas-radius-full);
    color: var(--hse-hub-dept, var(--atlas-hse-navy));
    background: color-mix(in srgb, var(--hse-hub-dept, var(--atlas-hse-muted)) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--hse-hub-dept, var(--atlas-hse-muted)) 45%, transparent);
}
.hse-hub-dept-pill.dept-hse          { --hse-hub-dept: var(--atlas-hse-ok); }
.hse-hub-dept-pill.dept-pm           { --hse-hub-dept: var(--atlas-hse-brand); }
.hse-hub-dept-pill.dept-construction { --hse-hub-dept: var(--atlas-hse-warn); }
.hse-hub-dept-pill.dept-quality      { --hse-hub-dept: var(--atlas-hse-purple); }
.hse-hub-dept-pill.dept-procurement  { --hse-hub-dept: var(--atlas-hse-accent); }
