/**
 * RCBR IS-BAO Visualization Layer — Styles
 * Cores ICAO: vermelho=intolerável, amarelo=ALARP, verde=aceitável
 * Compatível com light/dark themes via CSS vars existentes do app
 */

/* ============================================================
   CONTAINER
   ============================================================ */
.isbao-visualizations {
  background: var(--bg-card, #FFFFFF);
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--border, #E5E7EB);
}

.isbao-visualizations h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1F2937);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   TABS (legacy — mantido como fallback; renderAll novo usa .isbao-vstack)
   ============================================================ */
.isbao-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border, #E5E7EB);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.isbao-tab {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #6B7280);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  border-radius: 0;
  min-height: 44px;
}
.isbao-tab:hover {
  color: var(--teal, #0B6E6E);
  background: rgba(11,110,110,0.04);
}
.isbao-tab.active {
  color: var(--teal, #0B6E6E);
  border-bottom-color: var(--teal, #0B6E6E);
}
.isbao-tab-panel {
  display: none;
}
.isbao-tab-panel.active {
  display: block;
}

/* ============================================================
   GRID 1×4 VERTICAL (Scarpari 2026-06-07, mock v7) — substitui tabs.
   Quatro cards em pilha (Matriz · ALARP · Bowtie · PAVE), todos sempre
   visíveis. Bowtie ocupa largura total do container.
   ============================================================ */
.isbao-vstack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.isbao-card {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.isbao-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border, #E5E7EB);
}
.isbao-card-icon {
  font-size: 18px;
  line-height: 1;
}
.isbao-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1F2937);
  letter-spacing: -.01em;
}
.isbao-card-body {
  padding: 16px;
}
.isbao-card-foot {
  font-size: 11px;
  color: var(--text-muted, #6B7280);
  padding: 8px 16px 11px;
  border-top: 1px solid var(--border-light, #F1F5F9);
  background: #fafbfc;
  line-height: 1.5;
}
.isbao-card-foot b {
  color: var(--teal, #0B6E6E);
  font-weight: 700;
}
@media (max-width: 640px) {
  .isbao-card-head { padding: 10px 12px; }
  .isbao-card-title { font-size: 13px; }
  .isbao-card-body { padding: 12px; }
}

/* ============================================================
   MATRIX 5×5
   ============================================================ */
.isbao-matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.isbao-matrix-score {
  font-size: 12px;
  color: var(--text-muted, #6B7280);
}
.isbao-matrix-score strong {
  color: var(--text, #1F2937);
  font-size: 14px;
}

.isbao-matrix-grid {
  display: grid;
  grid-template-columns: 50px repeat(5, 1fr);
  gap: 4px;
  margin: 8px 0;
  max-width: 520px;
}
.isbao-matrix-corner { background: transparent; }
.isbao-matrix-col-hdr,
.isbao-matrix-row-hdr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: #F3F4F6;
  border-radius: 6px;
  color: #374151;
  font-size: 10px;
  font-weight: 700;
  min-height: 50px;
  cursor: help;
}
.isbao-matrix-row-hdr {
  min-height: 60px;
}
.isbao-axis-num {
  font-size: 16px;
  font-weight: 800;
}
.isbao-axis-label {
  font-size: 9px;
  color: #6B7280;
  font-weight: 600;
}
.isbao-matrix-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  min-height: 60px;
  position: relative;
  cursor: help;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}
.isbao-matrix-cell:hover {
  transform: scale(1.05);
  z-index: 1;
}
.isbao-matrix-cell.current {
  outline: 4px solid #1F2937;
  outline-offset: -4px;
  box-shadow: 0 0 0 2px white, 0 4px 12px rgba(0,0,0,0.3);
  transform: scale(1.05);
  z-index: 2;
}
.isbao-current-marker {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #1F2937;
  color: #FBBF24;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid white;
}

.isbao-matrix-legend {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #6B7280);
  max-width: 520px;
}

.isbao-matrix-zones {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.isbao-zone-pill {
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

/* ============================================================
   ALARP CARROT
   ============================================================ */
.isbao-alarp {
  max-width: 600px;
}
.isbao-alarp-carrot {
  position: relative;
  width: 360px;
  height: 420px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
}
.isbao-alarp-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 24px;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* Top: trapézio invertido (largo embaixo, estreito em cima) — espaço para texto */
.isbao-alarp-zone.top {
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%);
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
  height: 130px;
  padding-top: 16px;
  padding-bottom: 18px;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}
.isbao-alarp-zone.top .isbao-alarp-label {
  font-size: 17px;
  margin-bottom: 6px;
}
.isbao-alarp-zone.top .isbao-alarp-sublabel {
  max-width: 280px;
  text-align: center;
}
.isbao-alarp-zone.mid {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  height: 140px;
}
.isbao-alarp-zone.bot {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  border-radius: 0 0 12px 12px;
  height: 130px;
}
.isbao-alarp-label {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.1;
}
.isbao-alarp-sublabel {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.95;
  max-width: 300px;
  line-height: 1.3;
}

.isbao-alarp-marker {
  position: absolute;
  left: 100%;
  margin-left: 24px;
  transform: translateY(50%);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.isbao-alarp-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.isbao-alarp-marker-label {
  background: white;
  padding: 6px 12px;
  border-radius: 6px;
  border: 2px solid;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: var(--text, #1F2937);
}

/* ============================================================
   BOWTIE
   ============================================================ */
.isbao-bowtie {
  overflow-x: auto;
}
.isbao-bowtie-desc {
  font-size: 11px;
  color: var(--text-muted, #6B7280);
  margin: 0 0 12px;
}
.isbao-bowtie-svg {
  width: 100%;
  height: auto;
  min-width: 700px;
  background: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  padding: 12px;
}

/* ============================================================
   PAVE
   ============================================================ */
.isbao-pave-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.isbao-pave-bucket {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 2px solid;
  border-radius: 8px;
  align-items: flex-start;
}
.isbao-pave-letter {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}
.isbao-pave-info {
  flex: 1;
  min-width: 0;
}
.isbao-pave-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1F2937);
  margin-bottom: 2px;
}
.isbao-pave-desc {
  font-size: 11px;
  color: var(--text-muted, #6B7280);
  margin-bottom: 8px;
}
.isbao-pave-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.isbao-pave-counts span {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(255,255,255,0.6);
}
.isbao-count-red { color: #991B1B; }
.isbao-count-warn { color: #92400E; }
.isbao-count-green { color: #065F46; }
.isbao-count-none { color: #6B7280; }
.isbao-pave-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.isbao-pave-spec-chip {
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  color: var(--text-muted, #6B7280);
  border: 1px solid rgba(0,0,0,0.06);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .isbao-matrix-grid {
    grid-template-columns: 40px repeat(5, 1fr);
  }
  .isbao-matrix-cell { min-height: 50px; font-size: 12px; }
  .isbao-alarp-carrot { width: 100%; max-width: 280px; }
  .isbao-alarp-marker {
    position: static;
    margin: 8px 0;
    transform: none;
    justify-content: center;
  }
  .isbao-tab { padding: 8px 12px; font-size: 12px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .isbao-tab { display: inline-block !important; }
  .isbao-tab-panel { display: block !important; page-break-inside: avoid; }
  .isbao-tabs { display: none; }
  .isbao-visualizations { break-inside: avoid; }
}

/* ============================================================
   SPRINT 3 — MODAIS (Just Culture, Checklist 91.103)
   ============================================================ */

/* Generic modal overlay */
.isbao-jc-modal-overlay,
.isbao-pc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.isbao-jc-modal,
.isbao-pc-modal {
  background: white;
  border-radius: 12px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* ---- Just Culture modal ---- */
.isbao-jc-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #E5E7EB;
}
.isbao-jc-header h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #1F2937;
}
.isbao-jc-header p { margin: 4px 0; font-size: 13px; color: #6B7280; }
.isbao-jc-context { background: #FEF3C7; padding: 6px 10px; border-radius: 4px; margin-top: 8px; }

.isbao-jc-body { padding: 16px 24px; }
.isbao-jc-option {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 2px solid;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.isbao-jc-option:hover { background: #F9FAFB; }
.isbao-jc-option input[type="radio"] {
  margin-top: 4px;
  flex-shrink: 0;
  cursor: pointer;
}
.isbao-jc-option input[type="radio"]:checked + .isbao-jc-option-content { font-weight: 600; }
.isbao-jc-option-content { flex: 1; }
.isbao-jc-option-label { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.isbao-jc-option-desc { font-size: 12px; color: #6B7280; margin-bottom: 4px; line-height: 1.4; }
.isbao-jc-option-treatment {
  font-size: 11px;
  color: #4B5563;
  background: #F3F4F6;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
}

.isbao-jc-justification { padding: 12px 24px 0; }
.isbao-jc-justification label { display: block; margin-bottom: 6px; font-size: 13px; }
.isbao-jc-justification textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.isbao-jc-char-count {
  font-size: 11px;
  color: #6B7280;
  text-align: right;
  margin-top: 4px;
  font-weight: 600;
}

.isbao-jc-footer {
  padding: 16px 24px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
}
.isbao-jc-privacy { margin-bottom: 12px; color: #6B7280; font-size: 11px; }
.isbao-jc-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---- Pre-flight Checklist 91.103 modal ---- */
.isbao-pc-modal { max-width: 720px; }
.isbao-pc-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #E5E7EB;
}
.isbao-pc-header h3 { margin: 0 0 8px; font-size: 18px; }
.isbao-pc-header p { margin: 4px 0; font-size: 13px; color: #6B7280; }
.isbao-pc-reg-cite {
  background: #DBEAFE;
  border-left: 3px solid #2563EB;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  margin-top: 8px;
}

.isbao-pc-body { padding: 12px 16px; max-height: 50vh; overflow-y: auto; }
.isbao-pc-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.isbao-pc-item:has(input:checked) {
  background: #D1FAE5;
  border-color: #10B981;
}
.isbao-pc-check {
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.isbao-pc-item-content { flex: 1; min-width: 0; }
.isbao-pc-item-line {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.isbao-pc-icon { font-size: 16px; }
.isbao-pc-label { font-size: 13px; font-weight: 600; color: #1F2937; }
.isbao-pc-cite {
  font-size: 10px;
  color: #4B5563;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.isbao-pc-detail {
  font-size: 11px;
  color: #6B7280;
  margin-top: 3px;
  line-height: 1.3;
}
.isbao-pc-ts {
  font-size: 10px;
  color: #065F46;
  font-weight: 600;
  margin-top: 4px;
  font-family: 'SF Mono', Monaco, monospace;
}

.isbao-pc-footer {
  padding: 14px 24px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
}
.isbao-pc-progress { margin-bottom: 12px; }
.isbao-pc-progress span {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: 4px;
}
.isbao-pc-progress-bar {
  background: #E5E7EB;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}
.isbao-pc-progress-bar > div {
  background: linear-gradient(90deg, #10B981, #059669);
  height: 100%;
  transition: width 0.3s;
}
.isbao-pc-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   SPRINT 3 — Risk Register UI (mini-dashboard)
   ============================================================ */
.isbao-rr-panel {
  background: var(--bg-card, white);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}
.isbao-rr-panel h4 { margin: 0 0 8px; font-size: 14px; }
.isbao-rr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.isbao-rr-stat-card {
  padding: 8px 10px;
  border-radius: 6px;
  background: #F3F4F6;
  text-align: center;
}
.isbao-rr-stat-num { font-size: 20px; font-weight: 700; color: #1F2937; }
.isbao-rr-stat-lbl { font-size: 10px; color: #6B7280; }

.isbao-rr-entry {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-left: 4px solid;
  background: #F9FAFB;
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}
.isbao-rr-entry.sev-2 { border-color: #F59E0B; }
.isbao-rr-entry.sev-3 { border-color: #DC2626; }
.isbao-rr-entry.sev-4 { border-color: #991B1B; background: #FEE2E2; }
.isbao-rr-entry-id { font-family: monospace; font-size: 10px; color: #4B5563; min-width: 90px; }
.isbao-rr-entry-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: auto;
}
.isbao-rr-entry-status.open { background: #FEE2E2; color: #991B1B; }
.isbao-rr-entry-status.mitigating { background: #FEF3C7; color: #92400E; }
.isbao-rr-entry-status.closed { background: #D1FAE5; color: #065F46; }

/* ============================================================
   SPRINT 3 — Evidence Bundle button
   ============================================================ */
.isbao-evidence-btn {
  background: linear-gradient(135deg, #0B6E6E 0%, #0D8585 100%);
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 44px;
}
.isbao-evidence-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11,110,110,0.3);
}
.isbao-evidence-btn:active { transform: translateY(0); }

/* ============================================================
   SPRINT 4 — Risk Register CRUD modal
   ============================================================ */
.isbao-rr-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.isbao-rr-editor,
.isbao-rr-dashboard,
.isbao-ll-browser {
  background: white;
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.isbao-rr-dashboard { max-width: 920px; }
.isbao-ll-browser { max-width: 840px; }
.isbao-rr-editor-header {
  display: flex; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 12px 12px 0 0;
}
.isbao-rr-editor-header h3 {
  margin: 0; flex: 1;
  font-size: 17px; color: #1F2937;
}
.isbao-rr-close {
  background: transparent; border: none;
  font-size: 20px; cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #6B7280;
}
.isbao-rr-close:hover { background: #E5E7EB; color: #1F2937; }
.isbao-rr-editor-body,
.isbao-rr-dashboard-body,
.isbao-ll-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}
.isbao-rr-editor-footer {
  padding: 14px 20px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
  display: flex; justify-content: space-between; gap: 8px;
}
.isbao-rr-field { margin-bottom: 14px; }
.isbao-rr-field label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: #4B5563;
  margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.isbao-rr-field-inline label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: #6B7280; margin-bottom: 3px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.isbao-rr-readonly {
  padding: 8px 10px; background: #F3F4F6;
  border-radius: 6px; font-size: 13px;
  color: #1F2937;
}
.isbao-rr-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 11px; color: #6B7280; margin-top: 6px;
}
.isbao-rr-cites { padding-left: 20px; margin: 4px 0; font-size: 12px; }
.isbao-rr-cites li { margin: 3px 0; }
.isbao-rr-edition {
  font-size: 10px; padding: 1px 6px;
  background: #DBEAFE; color: #1E40AF;
  border-radius: 8px; margin-left: 6px;
}
.isbao-rr-tax-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.isbao-rr-input,
.isbao-rr-select,
.isbao-rr-textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.isbao-rr-textarea { resize: vertical; }
.isbao-rr-status-row { display: flex; gap: 8px; }
.isbao-rr-mitigations-list {
  background: #F9FAFB;
  border-radius: 6px;
  padding: 8px;
  min-height: 50px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #E5E7EB;
}
.isbao-rr-mitigation-item {
  background: white;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.isbao-rr-mit-meta {
  display: flex; gap: 8px;
  font-size: 10px; color: #6B7280;
  margin-bottom: 3px;
}
.isbao-rr-mit-ts { font-family: monospace; }
.isbao-rr-mit-type {
  background: #DBEAFE; color: #1E40AF;
  padding: 1px 6px; border-radius: 8px;
}
.isbao-rr-empty {
  text-align: center; padding: 12px;
  color: #9CA3AF; font-size: 12px; font-style: italic;
}
.isbao-rr-add-mit,
.isbao-rr-add-note {
  display: flex; gap: 6px;
  margin-top: 6px; align-items: stretch;
}
.isbao-rr-add-mit input,
.isbao-rr-add-note textarea { flex: 1; }
.isbao-rr-notes-list {
  background: #F9FAFB;
  border-radius: 6px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #E5E7EB;
  font-size: 12px;
}
.isbao-rr-note {
  padding: 6px 8px;
  border-left: 3px solid #9CA3AF;
  background: white;
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}
.isbao-rr-note-system { border-color: #3B82F6; background: #DBEAFE; }
.isbao-rr-note-ts {
  font-family: monospace; font-size: 10px;
  color: #6B7280; margin-right: 6px;
}
.isbao-rr-note-status {
  font-size: 10px; color: #4B5563;
  background: #F3F4F6; padding: 1px 5px;
  border-radius: 8px; margin-right: 4px;
}
.isbao-rr-occurrences {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px;
}
.isbao-rr-occ-chip {
  font-size: 10px; padding: 2px 6px;
  background: #F3F4F6; color: #4B5563;
  border-radius: 8px; font-family: monospace;
}

/* Dashboard */
.isbao-rr-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.isbao-rr-dash-filters {
  display: flex; gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.isbao-rr-dash-filters label {
  font-size: 12px; font-weight: 600; color: #6B7280;
}
.isbao-rr-dash-filters select,
.isbao-rr-dash-filters input {
  padding: 6px 8px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  font-size: 12px;
}
.isbao-rr-recurring {
  background: #FEF3C7;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  border-left: 4px solid #F59E0B;
}
.isbao-rr-recurring summary {
  cursor: pointer; font-weight: 600; font-size: 12px;
}
.isbao-rr-recurring ul { margin: 6px 0 0; font-size: 12px; }
.isbao-rr-dash-list {
  max-height: 50vh;
  overflow-y: auto;
  border-top: 1px solid #E5E7EB;
  padding-top: 8px;
}
.isbao-rr-dash-entry {
  padding: 10px;
  border-left: 4px solid;
  background: #F9FAFB;
  margin-bottom: 6px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.15s;
}
.isbao-rr-dash-entry:hover { background: #F3F4F6; }
.isbao-rr-dash-entry.sev-2 { border-color: #F59E0B; }
.isbao-rr-dash-entry.sev-3 { border-color: #DC2626; }
.isbao-rr-dash-entry.sev-4 { border-color: #991B1B; background: #FEE2E2; }
.isbao-rr-dash-entry-header {
  display: flex; gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}
.isbao-rr-dash-entry-hazard {
  font-size: 13px; color: #1F2937;
  margin-bottom: 4px;
}
.isbao-rr-dash-entry-meta {
  display: flex; gap: 10px;
  font-size: 11px; color: #6B7280;
}
.isbao-rr-dash-owner { color: #1E40AF; font-weight: 600; }
.isbao-rr-dash-due { color: #92400E; }
.isbao-rr-dash-occ { color: #DC2626; font-weight: 600; }
.isbao-rr-dash-mit { color: #065F46; font-weight: 600; }

/* ============================================================
   SPRINT 4 — Safety Culture Survey
   ============================================================ */
.isbao-sc-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.isbao-sc-modal,
.isbao-sc-result {
  background: white;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.isbao-sc-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E5E7EB;
}
.isbao-sc-header h3 { margin: 0 0 4px; font-size: 17px; }
.isbao-sc-header p { margin: 4px 0; font-size: 13px; color: #6B7280; }
.isbao-sc-body {
  padding: 12px 20px;
  overflow-y: auto;
  flex: 1;
}
.isbao-sc-q {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #F9FAFB;
  border-radius: 6px;
  border-left: 3px solid #0B6E6E;
}
.isbao-sc-q-num {
  font-size: 13px; font-weight: 600;
  color: #1F2937; margin-bottom: 4px;
}
.isbao-sc-reverse {
  color: #DC2626; font-weight: 700;
  font-size: 11px;
  display: inline-block;
  padding: 1px 5px;
  background: #FEE2E2;
  border-radius: 4px;
}
.isbao-sc-q-meta {
  font-size: 10px; color: #6B7280;
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.isbao-sc-likert {
  display: flex;
  gap: 4px;
}
.isbao-sc-opt {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 60px;
}
.isbao-sc-opt:has(input:checked) {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, white);
}
.isbao-sc-opt input { margin-bottom: 4px; cursor: pointer; }
.isbao-sc-opt-num {
  font-size: 18px; font-weight: 800;
  color: var(--c);
}
.isbao-sc-opt-lbl {
  font-size: 9px;
  text-align: center;
  color: #6B7280;
  line-height: 1.2;
}
.isbao-sc-footer {
  padding: 14px 20px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Result */
.isbao-sc-result-body {
  padding: 20px;
  text-align: center;
}
.isbao-sc-result-score {
  font-weight: 800;
  margin-bottom: 16px;
}
.isbao-sc-result-num {
  font-size: 64px;
  line-height: 1;
}
.isbao-sc-result-lbl { font-size: 16px; color: #6B7280; }
.isbao-sc-result-maturity {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #F9FAFB;
  padding: 14px;
  border-radius: 8px;
  text-align: left;
  margin: 14px 0;
}
.isbao-sc-result-emoji { font-size: 40px; }
.isbao-sc-result-maturity strong { font-size: 16px; }
.isbao-sc-result-maturity p { font-size: 12px; color: #6B7280; margin: 4px 0 0; }
.isbao-sc-pillars {
  display: flex; flex-direction: column;
  gap: 6px;
  text-align: left;
}
.isbao-sc-pillar {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.isbao-sc-pillar-lbl { color: #4B5563; text-transform: capitalize; }
.isbao-sc-pillar-bar {
  background: #E5E7EB;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}
.isbao-sc-pillar-fill {
  height: 100%;
  transition: width 0.5s;
}
.isbao-sc-pillar-num {
  font-weight: 700;
  text-align: right;
}

/* ============================================================
   SPRINT 4 — Lessons Learned cards
   ============================================================ */
.isbao-ll-header-stats {
  font-size: 13px;
  color: #4B5563;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #DBEAFE;
  border-radius: 6px;
}
.isbao-ll-card {
  background: white;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #E5E7EB;
}
.isbao-ll-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.isbao-ll-header h4 {
  margin: 0; flex: 1;
  font-size: 14px;
  color: #1F2937;
}
.isbao-ll-id {
  font-family: monospace;
  font-size: 10px;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  color: #4B5563;
}
.isbao-ll-confidence {
  color: #0B6E6E;
  font-size: 12px;
  letter-spacing: 1px;
}
.isbao-ll-summary {
  font-size: 13px;
  color: #1F2937;
  margin-bottom: 8px;
  line-height: 1.4;
}
.isbao-ll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #6B7280;
  margin-bottom: 8px;
}
.isbao-ll-closed { color: #065F46; font-weight: 600; }
.isbao-ll-period { margin-left: auto; }
.isbao-ll-cites {
  font-size: 11px;
  background: #F9FAFB;
  padding: 6px 8px;
  border-radius: 4px;
  margin: 6px 0;
}
.isbao-ll-cite {
  display: inline-block;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px;
  font-size: 10px;
  font-weight: 600;
}
.isbao-ll-hfacs,
.isbao-ll-tem {
  font-size: 11px;
  color: #4B5563;
  margin: 3px 0;
}
.isbao-ll-recommendation {
  background: #FEF3C7;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 8px;
  border-left: 3px solid #F59E0B;
}
.isbao-ll-mitigations {
  margin-top: 8px;
  font-size: 12px;
}
.isbao-ll-mitigations summary {
  cursor: pointer;
  color: #0B6E6E;
  font-weight: 600;
}
.isbao-ll-mitigations ul {
  margin: 6px 0;
  padding-left: 20px;
}
.isbao-ll-mit-type {
  display: inline-block;
  font-size: 10px;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 1px 5px;
  border-radius: 4px;
}

/* ============================================================
   FASE 2 — External Feeds Cards
   ============================================================ */
.isbao-feeds-panel {
  background: var(--bg-card, white);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 12px 0;
}
.isbao-feeds-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.isbao-feeds-panel-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1F2937);
}
.isbao-feeds-panel-actions {
  display: flex;
  gap: 8px;
}
.rcbr-feeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.rcbr-feed-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.15s;
}
.rcbr-feed-card[data-status="alert"] {
  border-left: 4px solid #DC2626;
  background: #FEF2F2;
}
.rcbr-feed-card[data-status="warn"] {
  border-left: 4px solid #F59E0B;
  background: #FFFBEB;
}
.rcbr-feed-card[data-status="ok"] {
  border-left: 4px solid #10B981;
}
.rcbr-feed-card[data-status="skip"],
.rcbr-feed-card[data-status="pending"] {
  border-left: 4px solid #9CA3AF;
  opacity: 0.75;
}
.rcbr-feed-card[data-status="error"] {
  border-left: 4px solid #6B7280;
  background: #F3F4F6;
}
.rcbr-feed-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.rcbr-feed-icon {
  font-size: 18px;
}
.rcbr-feed-name {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #1F2937);
}
.rcbr-feed-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rcbr-feed-summary {
  font-size: 11px;
  color: var(--text-muted, #6B7280);
  margin-bottom: 6px;
  line-height: 1.4;
}
.rcbr-feed-alerts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}
.rcbr-feed-alert {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: white;
  border-left: 3px solid;
  color: #1F2937;
}
.rcbr-feed-alert.sev-alert { border-color: #DC2626; background: #FEE2E2; }
.rcbr-feed-alert.sev-warn { border-color: #F59E0B; background: #FEF3C7; }
.rcbr-feed-alert.sev-info { border-color: #3B82F6; background: #DBEAFE; }
.rcbr-feed-age {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 4px;
  text-align: right;
  font-family: monospace;
}
.rcbr-feeds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEE2E2;
  color: #991B1B;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   FASE 3 — AI Cards (outcome classifier, anomaly, pilot profile)
   ============================================================ */
.ai-prediction-card {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 12px 0;
  border-left: 4px solid;
}
.ai-prediction-card.severity-low {
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFCCB 100%);
  border-color: #10B981;
}
.ai-prediction-card.severity-low h4,
.ai-prediction-card.severity-low .ai-pred-pct { color: #065F46; }
.ai-prediction-card.severity-medium {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #F59E0B;
}
.ai-prediction-card.severity-medium h4,
.ai-prediction-card.severity-medium .ai-pred-pct { color: #92400E; }
.ai-prediction-card.severity-high {
  background: linear-gradient(135deg, #FFF7ED 0%, #FED7AA 100%);
  border-color: #EA580C;
}
.ai-prediction-card.severity-high h4,
.ai-prediction-card.severity-high .ai-pred-pct { color: #9A3412; }
.ai-prediction-card.severity-critical {
  background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
  border-color: #DC2626;
}
.ai-prediction-card.severity-critical h4,
.ai-prediction-card.severity-critical .ai-pred-pct { color: #991B1B; }
.ai-prediction-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
}
.ai-pred-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}
.ai-pred-big {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ai-pred-pct {
  font-size: 36px;
  font-weight: 800;
  color: #065F46;
  line-height: 1;
}
.ai-pred-label {
  font-size: 10px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.ai-pred-ci, .ai-pred-or {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ai-pred-ci-label {
  font-size: 10px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai-pred-ci-val {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
}
.ai-pred-interp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin: 6px 0;
}
.ai-pred-interp.muito_baixo, .ai-pred-interp.baixo { background: #D1FAE5; color: #065F46; }
.ai-pred-interp.médio, .ai-pred-interp.medio { background: #FEF3C7; color: #92400E; }
.ai-pred-interp.elevado { background: #FED7AA; color: #9A3412; }
.ai-pred-interp.crítico, .ai-pred-interp.critico { background: #FEE2E2; color: #991B1B; }
.ai-pred-emoji { font-size: 16px; }
.ai-pred-details {
  margin-top: 8px;
  font-size: 11px;
}
.ai-pred-details summary {
  cursor: pointer;
  color: #065F46;
  font-weight: 600;
}
.ai-pred-details ul {
  margin: 6px 0;
  padding-left: 20px;
}
.ai-pred-details code {
  font-family: monospace;
  background: rgba(0,0,0,0.05);
  padding: 1px 4px;
  border-radius: 3px;
}

.ai-anomaly-banner {
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 13px;
}
.ai-anomaly-banner strong { font-size: 13px; }

/* Safety Culture Onboarding banner (não-bloqueante) */
.isbao-sc-onboarding-banner {
  background: linear-gradient(135deg, #DBEAFE 0%, #E0F2FE 100%);
  border-left: 4px solid #2563EB;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 12px 0;
}
.isbao-sc-onboarding-content {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.isbao-sc-onboarding-icon { font-size: 32px; }
.isbao-sc-onboarding-text { flex: 1; min-width: 220px; }
.isbao-sc-onboarding-text strong { font-size: 14px; color: #1E40AF; }
.isbao-sc-onboarding-text p { margin: 4px 0 0; font-size: 12px; color: #475569; }
.isbao-sc-onboarding-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   VERDICT HEADER — Pills Legal/Operacional + tipografia alinhada
   ============================================================ */
.verdict-decomp {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.vd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(2px);
}
.vd-pill .vd-label {
  font-weight: 500;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 10px;
}
.vd-pill .vd-val {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
/* Color por valor */
.vd-pill[data-val="GO"] { background: rgba(16,185,129,0.32); border-color: rgba(16,185,129,0.55); }
.vd-pill[data-val="CAUTION"] { background: rgba(245,158,11,0.32); border-color: rgba(245,158,11,0.55); }
.vd-pill[data-val="NO-GO"] { background: rgba(220,38,38,0.4); border-color: rgba(220,38,38,0.7); }

/* Bowtie mitigated barriers panel */
.bt2-mitigated-panel {
  background: linear-gradient(135deg, #F0FDF4 0%, #D1FAE5 100%);
  border-left: 4px solid #10B981;
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 12px;
}
.bt2-mitigated-panel strong { color: #065F46; }
.bt2-mitigated-panel ul { margin: 6px 0 0 18px; padding: 0; }
.bt2-mitigated-panel li { margin: 3px 0; color: #064E3B; }
.bt2-mitigated-panel code {
  background: rgba(16,185,129,0.15);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: #065F46;
}

/* ============================================================
   MITIGATION PLANNER — Timeline + Suggestions + What-if
   ============================================================ */
.rcbr-mitigation-panel {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 12px 0;
}

/* Timeline */
.rcbr-timeline {
  margin-bottom: 14px;
}
.rcbr-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.rcbr-timeline-header strong { font-size: 13px; color: var(--text); }
.rcbr-timeline-delta {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.rcbr-timeline-delta.down { background: #D1FAE5; color: #065F46; }
.rcbr-timeline-delta.up { background: #FEE2E2; color: #991B1B; }
.rcbr-timeline-delta.flat { background: #F3F4F6; color: #4B5563; }
.rcbr-timeline-svg {
  width: 100%;
  height: 110px;
  background: #FAFAFA;
  border-radius: 6px;
}
.rcbr-timeline-zones {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}
.rcbr-zone-pill {
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.rcbr-timeline-empty {
  padding: 16px;
  text-align: center;
  color: #6B7280;
  background: #F9FAFB;
  border-radius: 6px;
}

/* Suggestions */
.rcbr-suggestions {
  border-top: 1px solid #E5E7EB;
  padding-top: 12px;
}
.rcbr-suggestions-header {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
}
.rcbr-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rcbr-suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #F9FAFB;
  border-radius: 6px;
  border-left: 3px solid #E5E7EB;
}
.rcbr-suggestion-item:hover { background: #F3F4F6; }
.rcbr-suggestion-impact {
  font-size: 10px;
  font-weight: 700;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
}
.rcbr-suggestion-content {
  flex: 1;
  min-width: 0;
}
.rcbr-suggestion-msg {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 2px;
}
.rcbr-suggestion-impact-detail {
  font-size: 11px;
  color: var(--text-muted);
}
.rcbr-suggestion-actions {
  flex-shrink: 0;
}
.rcbr-btn-whatif {
  font-size: 11px !important;
  padding: 4px 10px !important;
}
.rcbr-suggestions-more {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}
.rcbr-suggestions-empty {
  padding: 14px;
  text-align: center;
  background: #D1FAE5;
  border-radius: 6px;
  color: #065F46;
  font-size: 12px;
}

/* What-if modal */
.rcbr-whatif-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.rcbr-whatif-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rcbr-whatif-header h3 { margin: 0; font-size: 16px; }
.rcbr-whatif-header code { font-family: monospace; background: #F3F4F6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.rcbr-whatif-body { padding: 18px 20px; }
.rcbr-whatif-msg { background: #F9FAFB; padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.rcbr-whatif-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.rcbr-whatif-state {
  background: #F9FAFB;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #E5E7EB;
}
.rcbr-whatif-state.projected { border-color: #10B981; background: #F0FDF4; }
.rcbr-whatif-label {
  font-size: 10px;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.rcbr-whatif-verdict {
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 6px;
  font-size: 14px;
}
.rcbr-whatif-score { font-size: 13px; color: var(--text); }
.rcbr-whatif-arrow { font-size: 28px; color: #9CA3AF; }
.rcbr-whatif-impact {
  background: #F9FAFB;
  border: 2px solid;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  margin-bottom: 12px;
}
.rcbr-whatif-callout {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 10px;
}
.rcbr-whatif-callout.success { background: #D1FAE5; color: #065F46; border-left: 3px solid #10B981; }
.rcbr-whatif-callout.info { background: #DBEAFE; color: #1E40AF; border-left: 3px solid #3B82F6; }
.rcbr-whatif-disclaimer {
  color: #6B7280;
  font-size: 11px;
  margin: 0;
}
.rcbr-whatif-footer {
  padding: 14px 20px;
  border-top: 1px solid #E5E7EB;
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
