/* [REMOVAL-1980] D5 sweep: rules extracted from template <style> blocks.
   Each section header names its source template. */

/* ---- extracted from apps/templates/includes/risk_events_tabs.html ---- */
/* [REMOVAL-1188] DS migration: hex literals replaced with design-system tokens. */
/* [REMOVAL-1188] DS migration: file-private tokens for feature-specific hues with no matching global design-system token (rule design-system.mdc S1). */
:root{ --c-0d6efd:#0d6efd; }

/* [REMOVAL-1686] Risk & Consolidation visual reskin (design handoff 2026-06-24). Dropped
   the generic Bootstrap .risk-matrix-table/.label-risk-table/.rules-table/.info-card/
   .badge-wildcard/.badge-specific rules below along with the OLD saturated .risk-cell-N
   classes (they read from the legacy --risk-* tokens, which stay reserved for other
   surfaces) in favor of the muted heat-scale system driven by the file-private --rc-*
   tokens declared here (design-system.mdc S1: no global tokens match these
   feature-specific hues). Markup/JS below now target .rc-* classes instead. */
:root{
  --rc-navy:#0E2841;
  --rc-orange:#E97132;
  --rc-radius-card:10px;
  --rc-panel-strip:#F7F9FB;
  --rc-card-border:#E2E9F0;
  --rc-header-border:#E4EAF0;
  --rc-row-sep:#F1F4F8;
  --rc-header-label:#8A97A6;
  --rc-body-text:#3A4A5A;
  --rc-info-bg:#F1F6F9;
  --rc-control-border:#D6DEE6;
  --rc-danger:#C0392B;
  --rc-danger-border:#E6B3B3;
  --rc-edit-border:#B9D3DD;
  --rc-heat-1-bg:#E9EFE9; --rc-heat-1-fg:#3A6B4C; --rc-heat-1-dot:#4F8A66;
  --rc-heat-2-bg:#EEF0E2; --rc-heat-2-fg:#5F6B3C; --rc-heat-2-dot:#7F8A45;
  --rc-heat-3-bg:#F5EDDB; --rc-heat-3-fg:#8A6A30; --rc-heat-3-dot:#B28A45;
  --rc-heat-4-bg:#F0E0D2; --rc-heat-4-fg:#9C5A34; --rc-heat-4-dot:#B0653E;
  --rc-heat-5-bg:#EDDADB; --rc-heat-5-fg:#933F42; --rc-heat-5-dot:#9E474A;
}

/* ---- Section header ---- */
.rc-section-header{ display:flex; align-items:center; gap:14px; padding:20px 24px; border-bottom:1px solid var(--rc-header-border); }
.rc-section-header .rc-accent-bar{ width:4px; height:34px; background:var(--rc-orange); border-radius:3px; flex:none; }
.rc-section-header .rc-title{ font-size:17px; font-weight:600; color:var(--rc-navy); }
.rc-section-header .rc-subtitle{ font-size:13px; color:var(--rc-header-label); margin-top:2px; }

/* ---- Sub-tabs ---- */
.rc-subtabs{ display:flex; gap:2px; padding:0 24px; border-bottom:1px solid var(--rc-header-border); margin:0; list-style:none; }
.rc-subtabs .nav-item{ margin:0; }
.rc-subtabs .nav-link{ display:flex; align-items:center; gap:8px; padding:14px 14px; font-size:13.5px; font-weight:500; color:#7A8896; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; margin-bottom:-1px; }
.rc-subtabs .nav-link i{ font-size:15px; }
.rc-subtabs .nav-link.active{ color:var(--accent); font-weight:600; border-bottom-color:var(--accent); background:transparent; }

.rc-panel{ padding:26px 24px; }

/* ---- Risk matrix ---- */
.rc-matrix-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:16px; }
.rc-matrix-title{ font-size:15px; font-weight:600; color:var(--rc-navy); }
.rc-matrix-desc{ font-size:13px; color:var(--rc-header-label); margin-top:3px; }
.rc-legend{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; font-size:11.5px; color:#6B7683; }
.rc-legend-item{ display:flex; align-items:center; gap:6px; }
.rc-legend-sw{ width:14px; height:14px; border-radius:4px; border:1px solid rgba(20,40,60,.12); display:inline-block; }

.rc-axis-caption{ font-size:10.5px; font-weight:700; letter-spacing:.06em; color:var(--rc-header-label); white-space:nowrap; }
.rc-axis-caption-top{ display:flex; justify-content:flex-end; margin-bottom:8px; padding-right:4px; }
.rc-axis-caption-side{ writing-mode:vertical-rl; transform:rotate(180deg); }
.rc-matrix-wrap{ display:flex; gap:10px; align-items:stretch; }
.rc-matrix-axis{ display:flex; align-items:center; }
.rc-matrix-scroll{ flex:1; overflow-x:auto; }

.rc-matrix-grid{ display:grid; grid-template-columns:200px repeat(5,minmax(88px,1fr)); gap:8px; min-width:720px; }
.rc-corner{ display:flex; align-items:center; justify-content:center; background:var(--rc-navy); color:#fff; border-radius:var(--radius-md); font-size:12px; font-weight:600; padding:10px; text-align:center; }
.rc-col-header{ display:flex; align-items:center; justify-content:center; background:var(--surface-2); border:1px solid #DDE4EC; border-radius:var(--radius-md); font-size:16px; font-weight:700; color:var(--rc-navy); padding:10px; }
.rc-row-header{ display:flex; align-items:center; gap:10px; background:var(--rc-panel-strip); border:1px solid var(--rc-header-border); border-radius:var(--radius-md); padding:0 14px; font-weight:600; color:var(--rc-navy); }
.rc-row-dot{ width:9px; height:9px; border-radius:50%; flex:none; }

.rc-cell{ width:100%; height:46px; text-align:center; text-align-last:center; font-size:15px; font-weight:600; border:1px solid rgba(20,40,60,.1); border-radius:5px; cursor:pointer; font-family:inherit; appearance:none; -webkit-appearance:none; background-color:var(--surface-2); color:var(--rc-body-text); }
.rc-cell.rc-heat-1{ background-color:var(--rc-heat-1-bg); color:var(--rc-heat-1-fg); }
.rc-cell.rc-heat-2{ background-color:var(--rc-heat-2-bg); color:var(--rc-heat-2-fg); }
.rc-cell.rc-heat-3{ background-color:var(--rc-heat-3-bg); color:var(--rc-heat-3-fg); }
.rc-cell.rc-heat-4{ background-color:var(--rc-heat-4-bg); color:var(--rc-heat-4-fg); }
.rc-cell.rc-heat-5{ background-color:var(--rc-heat-5-bg); color:var(--rc-heat-5-fg); }

/* ---- Risk-level pill selects (label/area panels) ---- */
.rc-pill{ height:38px; width:100%; max-width:170px; padding:0 30px 0 12px; border:1px solid rgba(20,40,60,.12); border-radius:var(--radius-md); font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; appearance:none; -webkit-appearance:none;
  background-color:var(--surface-2); color:var(--rc-body-text);
  background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" stroke="%23555555" stroke-width="2"><path d="M3 5l3 3 3-3"/></svg>');
  background-repeat:no-repeat; background-position:right 10px center; }
.rc-pill.rc-heat-1{ background-color:var(--rc-heat-1-bg); color:var(--rc-heat-1-fg); }
.rc-pill.rc-heat-2{ background-color:var(--rc-heat-2-bg); color:var(--rc-heat-2-fg); }
.rc-pill.rc-heat-3{ background-color:var(--rc-heat-3-bg); color:var(--rc-heat-3-fg); }
.rc-pill.rc-heat-4{ background-color:var(--rc-heat-4-bg); color:var(--rc-heat-4-fg); }
.rc-pill.rc-heat-5{ background-color:var(--rc-heat-5-bg); color:var(--rc-heat-5-fg); }

.rc-btn{ border-radius:var(--radius-sm) !important; height:40px; }
.rc-btn-orange{ background:var(--rc-orange); border-color:var(--rc-orange); color:#fff; }
.rc-btn-orange:hover:not(:disabled){ filter:brightness(.93); color:#fff; }
.rc-btn-orange:active:not(:disabled){ filter:brightness(.86); }

/* ---- Label / Area risk-level panels ---- */
.rc-panels{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:30px; }
@media (max-width:991px){ .rc-panels{ grid-template-columns:1fr; } }
.rc-panel-card{ border:1px solid var(--rc-card-border); border-radius:var(--rc-radius-card); overflow:hidden; display:flex; flex-direction:column; }
.rc-panel-card-header{ padding:16px 18px; border-bottom:1px solid var(--rc-header-border); }
.rc-panel-card-header .rc-panel-card-title{ font-size:14.5px; font-weight:600; color:var(--rc-navy); }
.rc-panel-card-header .rc-panel-card-desc{ font-size:12.5px; color:var(--rc-header-label); margin-top:2px; }
.rc-panel-search{ padding:12px 18px; border-bottom:1px solid var(--rc-header-border); }
.rc-panel-search .rc-search-wrap{ position:relative; }
.rc-panel-search .rc-search-wrap i{ position:absolute; left:11px; top:50%; transform:translateY(-50%); color:#9AA8B6; font-size:14px; }
.rc-panel-search input{ height:36px; width:100%; padding:0 12px 0 34px; border:1px solid var(--rc-control-border); border-radius:var(--radius-sm); font-size:13px; color:var(--rc-body-text); outline:none; font-family:inherit; }
.rc-panel-strip{ display:grid; grid-template-columns:1fr 170px; gap:10px; padding:10px 18px; background:var(--rc-panel-strip); border-bottom:1px solid var(--rc-header-border); font-size:10.5px; font-weight:700; letter-spacing:.06em; color:var(--rc-header-label); text-transform:uppercase; }
.rc-panel-body{ flex:1; }
.rc-panel-body.rc-scroll{ max-height:330px; overflow-y:auto; }
.rc-row{ display:grid; grid-template-columns:1fr 170px; gap:10px; align-items:center; padding:11px 18px; border-bottom:1px solid var(--rc-row-sep); font-size:13.5px; color:var(--rc-body-text); }
.rc-row:last-child{ border-bottom:0; }
.rc-row:hover{ background:#F5F9FC; }
.rc-row.rc-row-navy{ font-weight:500; color:var(--rc-navy); }
.rc-panel-card-footer{ padding:14px 18px; border-top:1px solid var(--rc-header-border); }

/* ---- Recalculate strip ---- */
.rc-recalc-strip{ display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:28px; padding-top:22px; border-top:1px solid var(--rc-header-border); }
.rc-recalc-strip .rc-recalc-copy{ font-size:12.5px; color:var(--rc-header-label); max-width:520px; }

/* ---- Event consolidation ---- */
.rc-info-callout{ display:flex; gap:13px; background:var(--rc-info-bg); border-left:3px solid var(--accent); border-radius:var(--radius-md); padding:16px 18px; }
.rc-info-callout i{ flex:none; margin-top:1px; color:var(--accent); font-size:17px; }
.rc-info-callout .rc-info-copy{ font-size:13px; color:#47576A; line-height:1.6; }
.rc-info-callout .rc-info-copy b{ color:var(--rc-navy); }

.rc-rules-head{ display:flex; align-items:center; justify-content:space-between; margin:26px 0 14px; flex-wrap:wrap; gap:10px; }
.rc-rules-head .rc-rules-title{ font-size:15px; font-weight:600; color:var(--rc-navy); }

.rc-table-card{ border:1px solid var(--rc-card-border); border-radius:var(--rc-radius-card); overflow:hidden; }
.rc-table-scroll{ overflow-x:auto; }
.rc-table{ width:100%; border-collapse:collapse; font-size:13.5px; min-width:920px; margin:0; }
.rc-table thead th{ text-align:left; padding:12px 18px; font-size:10.5px; font-weight:700; letter-spacing:.06em; color:var(--rc-header-label); border-bottom:1px solid var(--rc-header-border); white-space:nowrap; text-transform:uppercase; background:none; }
.rc-table tbody td{ padding:14px 18px; color:var(--rc-body-text); vertical-align:middle; border-bottom:1px solid var(--rc-row-sep); }
.rc-table tbody tr:last-child td{ border-bottom:0; }

.rc-navy-pill{ display:inline-block; background:var(--rc-navy); color:#fff; font-size:11px; font-weight:600; padding:4px 10px; border-radius:5px; }

.rc-icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:var(--radius-sm); border:1px solid transparent; background:transparent; cursor:pointer; }
.rc-icon-btn i{ font-size:15px; }
.rc-icon-btn + .rc-icon-btn{ margin-left:8px; }
.rc-icon-btn-edit{ border-color:var(--rc-edit-border); color:var(--accent); }
.rc-icon-btn-edit:hover{ background:var(--accent-soft); }
.rc-icon-btn-delete{ border-color:var(--rc-danger-border); color:var(--rc-danger); }
.rc-icon-btn-delete:hover{ background:rgba(192,57,43,.08); }

.empty-state{ padding:3rem 1rem; text-align:center; color:var(--rc-header-label); }
.empty-state i{ font-size:2.5rem; display:block; margin-bottom:.75rem; }
