/* Dashboard Inteligente - tema claro executivo */
.di-root {
  --di-bg: #ffffff;
  --di-bg-card: #ffffff;
  --di-bg-soft: #fcfdfc;
  --di-border: #c5d6cb;
  --di-border-strong: #9fb8a8;
  --di-accent: #1d6b3b;
  --di-accent-soft: #fbfcfc;
  --di-text: #122018;
  --di-text-muted: #3f5348;
  --di-warn: #b45309;
  --di-danger: #c53030;
  --di-stable: #1d6b3b;
  --di-shadow: 0 1px 2px rgba(18, 32, 24, 0.06), 0 6px 18px rgba(18, 32, 24, 0.06);
  --di-green-gradient: linear-gradient(135deg, #fbfdfc 0%, #ffffff 52%, #ffffff 100%);
  --di-green-border: rgba(29, 107, 59, 0.28);
  /* Escala tipográfica alinhada ao SST; display herda o tamanho grande dos KPIs */
  --di-fs-base: var(--painel-fs-body, 13px);
  --di-fs-body-sm: var(--painel-fs-meta, 12px);
  --di-fs-heading: var(--painel-fs-body, 13px);
  --di-fs-title: var(--painel-fs-title, 15px);
  --di-fs-display: var(--painel-fs-display, 28px);
  --di-fs-display-sm: var(--painel-fs-display-sm, 22px);
  --di-fs-metric: var(--painel-fs-subtitle, 14px);
  --di-fs-label: var(--painel-fs-micro, 12px);
  --di-fs-caption: var(--painel-fs-micro, 12px);
  --di-lh-body: 1.5;
  --di-lh-tight: 1.35;
  color: var(--di-text);
  font-family: inherit;
  font-size: var(--di-fs-base);
  line-height: var(--di-lh-body);
  background:
    linear-gradient(32deg, rgba(255, 255, 255, 0.92) 0%, rgba(251, 253, 252, 0.55) 28%, rgba(255, 255, 255, 0) 58%),
    #fcfdfc;
  border-radius: 16px;
  padding: 24px 28px 28px;
  min-height: 520px;
  border: 1px solid var(--di-border);
}

.di-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.di-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
  position: sticky;
  top: 76px;
  overflow: visible;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .di-shell { grid-template-columns: 1fr; gap: 20px; }
  .di-sidebar {
    position: static;
    top: auto;
  }
  .di-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px;
    width: 100%;
    position: static;
  }
  .di-nav-item {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 11px 12px;
  }
  .di-nav-item.is-active::before {
    width: 100%;
    height: 3px;
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    border-radius: 0 0 8px 8px;
  }
}

.di-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, #0f3d24 0%, #14502c 55%, #1a5c34 100%);
  border: 1px solid rgba(15, 61, 36, 0.35);
  border-radius: 14px;
  box-sizing: border-box;
  width: 100%;
  position: static;
  top: auto;
  box-shadow:
    0 1px 2px rgba(15, 61, 36, 0.18),
    0 10px 28px rgba(15, 61, 36, 0.16);
}

.di-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.di-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}

.di-root.di-focus-section .di-grid {
  grid-template-columns: 1fr;
}

.di-root.di-focus-section .di-widget {
  max-width: 100%;
}

.di-nav-item.is-active {
  background: #ffffff;
  color: #0f3d24;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 61, 36, 0.12),
    0 8px 20px rgba(15, 61, 36, 0.18);
}

.di-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #2f7d32 0%, #14502c 100%);
}

.di-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  opacity: 1;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.di-nav-item:hover .di-nav-dot {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.di-nav-item.is-active .di-nav-dot {
  background: #14502c;
  border-color: #14502c;
  box-shadow: 0 0 0 3px rgba(20, 80, 44, 0.12);
}

.di-main { min-width: 0; }

.di-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--di-border);
}

.di-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  min-width: 0;
}

.di-header-copy {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}

.di-header-filters {
  width: 100%;
  min-width: 0;
}

.di-ops-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #d5e0d9;
  background: #fcfdfc;
}

.di-ops-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.di-ops-strip-list li {
  font-size: 12px;
  font-weight: 650;
  color: #4a5c53;
  letter-spacing: 0.01em;
}

.di-ops-strip-link {
  font-size: 12px;
  font-weight: 750;
  color: #1f6b45;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.di-ops-strip-link:hover {
  border-bottom-color: #1f6b45;
}

.di-filter-box {
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1.5px solid #8fad9a;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  box-shadow: 0 1px 2px rgba(18, 32, 24, 0.05);
}

.di-filter-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 12px;
}

.di-filter-box-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1d6b3b;
}

.di-filter-box-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #3f5348;
}

.di-tab-cfo .di-filter-box {
  margin-bottom: 12px;
}

.di-header-monitors {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 1 auto;
  max-width: min(380px, 46%);
  align-self: stretch;
}

.di-header-monitors[hidden],
.di-tab-cfo .di-header-monitors {
  display: none !important;
}

@media (max-width: 720px) {
  .di-header-monitors {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }
}

/* Pulso operacional - linha viva + métricas do dia */
.di-pulse-panel {
  position: relative;
  flex: 0 1 248px;
  min-width: 200px;
  max-width: 280px;
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px 11px;
  border-radius: 14px;
  border: 1px solid var(--di-border);
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  box-shadow: 0 1px 2px rgba(28, 36, 32, 0.04);
  overflow: hidden;
}

.di-pulse-panel.is-ok { border-left: 3px solid rgba(47, 125, 50, 0.45); }
.di-pulse-panel.is-attention { border-left: 3px solid rgba(230, 126, 34, 0.55); }
.di-pulse-panel.is-critical { border-left: 3px solid rgba(197, 48, 48, 0.55); }
.di-pulse-panel.is-pending { border-left: 3px solid var(--di-border-strong); }

.di-pulse-wave-wrap {
  width: 100%;
  height: 30px;
  color: rgba(47, 125, 50, 0.72);
}

.di-pulse-panel.is-attention .di-pulse-wave-wrap { color: rgba(180, 83, 9, 0.78); }
.di-pulse-panel.is-critical .di-pulse-wave-wrap { color: rgba(197, 48, 48, 0.78); }
.di-pulse-panel.is-pending .di-pulse-wave-wrap { color: var(--di-text-muted); }

.di-pulse-wave {
  display: block;
  width: 100%;
  height: 100%;
}

.di-pulse-wave-line {
  stroke-dasharray: 220;
  stroke-dashoffset: 0;
  animation: di-pulse-wave 2.8s ease-in-out infinite;
}

@keyframes di-pulse-wave {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.72; }
  50% { stroke-dashoffset: 18; opacity: 1; }
}

.di-pulse-metrics {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.di-pulse-primary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.di-pulse-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: #111827;
}

.di-pulse-pct {
  font-size: var(--di-fs-caption);
  font-weight: 700;
  color: var(--di-text-muted);
}

.di-pulse-panel.is-critical .di-pulse-pct { color: #9b2c2c; }
.di-pulse-panel.is-attention .di-pulse-pct { color: #9a6700; }

.di-pulse-meta {
  font-size: var(--di-fs-caption);
  line-height: 1.35;
  color: var(--di-text-muted);
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.di-pulse-live {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43a047;
  box-shadow: 0 0 0 0 rgba(67, 160, 71, 0.45);
  animation: di-pulse-live 2s ease-out infinite;
}

.di-pulse-panel.is-attention .di-pulse-live { background: #e65100; box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.4); }
.di-pulse-panel.is-critical .di-pulse-live { background: #c53030; box-shadow: 0 0 0 0 rgba(197, 48, 48, 0.4); }
.di-pulse-panel.is-pending .di-pulse-live { background: #94a3b8; animation: none; opacity: 0.65; }

@keyframes di-pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(67, 160, 71, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(67, 160, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 160, 71, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .di-pulse-wave-line,
  .di-pulse-live {
    animation: none;
  }
}

/* Radar executivo - varredura contínua */
.di-radar-panel {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.di-radar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(155deg, rgba(47, 125, 50, 0.28), rgba(12, 40, 22, 0.72));
  box-shadow:
    0 0 0 1px rgba(47, 125, 50, 0.14),
    0 8px 24px rgba(12, 40, 22, 0.12);
}

.di-radar-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(18, 48, 28, 0.15) 0%, rgba(6, 18, 10, 0.98) 72%),
    repeating-linear-gradient(0deg, transparent, transparent 7px, rgba(102, 187, 106, 0.07) 7px, rgba(102, 187, 106, 0.07) 8px),
    repeating-linear-gradient(90deg, transparent, transparent 7px, rgba(102, 187, 106, 0.07) 7px, rgba(102, 187, 106, 0.07) 8px),
    #07140b;
}

.di-radar-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.di-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(134, 210, 145, 0.22);
  border-radius: 50%;
  box-sizing: border-box;
}

.di-radar-ring-1 { width: 28%; height: 28%; }
.di-radar-ring-2 { width: 56%; height: 56%; }
.di-radar-ring-3 { width: 84%; height: 84%; }

.di-radar-axis {
  position: absolute;
  background: rgba(134, 210, 145, 0.12);
}

.di-radar-axis-h {
  top: 50%;
  left: 8%;
  width: 84%;
  height: 1px;
  transform: translateY(-50%);
}

.di-radar-axis-v {
  left: 50%;
  top: 8%;
  width: 1px;
  height: 84%;
  transform: translateX(-50%);
}

.di-radar-sweep {
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 288deg,
    rgba(102, 187, 106, 0.08) 312deg,
    rgba(168, 230, 173, 0.42) 342deg,
    rgba(220, 255, 225, 0.55) 360deg
  );
  animation: di-radar-sweep 3.6s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes di-radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.di-radar-blip {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(220, 255, 225, 0.95);
  box-shadow: 0 0 6px rgba(168, 230, 173, 0.9);
  opacity: 0.55;
  animation: di-radar-blip 3.6s ease-in-out infinite;
}

.di-radar-blip-a { top: 24%; left: 64%; animation-delay: 0.6s; }
.di-radar-blip-b { top: 62%; left: 30%; animation-delay: 2.2s; }

@keyframes di-radar-blip {
  0%, 100% { opacity: 0.15; transform: scale(0.9); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.di-radar-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  background: radial-gradient(circle at 40% 32%, rgba(255, 255, 255, 0.14), rgba(6, 16, 10, 0.94) 70%);
  border: 1px solid rgba(168, 230, 173, 0.38);
  box-shadow: 0 0 16px rgba(102, 187, 106, 0.28), inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.di-radar.is-ok .di-radar-center {
  border-color: rgba(129, 199, 132, 0.65);
  box-shadow: 0 0 14px rgba(76, 175, 80, 0.45), inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.di-radar.is-attention .di-radar-center,
.di-radar.is-pending .di-radar-center {
  border-color: rgba(255, 193, 77, 0.65);
  box-shadow: 0 0 14px rgba(255, 193, 77, 0.35), inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.di-radar.is-critical .di-radar-center {
  border-color: rgba(239, 83, 80, 0.7);
  box-shadow: 0 0 14px rgba(239, 83, 80, 0.4), inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.di-radar-keyword {
  display: block;
  max-width: 100%;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  color: #e8f5e9;
  text-transform: uppercase;
  white-space: nowrap;
}

.di-radar.is-attention .di-radar-keyword,
.di-radar.is-pending .di-radar-keyword {
  color: #ffe8b8;
}

.di-radar.is-critical .di-radar-keyword {
  color: #ffebee;
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .di-header-filters .di-header-filter-row,
  .di-header-filters .di-filters {
    flex-wrap: wrap;
  }

  .di-header-filters .di-filter,
  .di-header-filters .di-filter-unit {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    max-width: none;
  }

  .di-header-filters .di-filter-unit {
    flex-basis: 100%;
  }

  .di-header-monitors {
    width: 100%;
    justify-content: space-between;
  }

  .di-pulse-panel {
    flex: 1 1 auto;
    max-width: none;
  }

  .di-radar-panel {
    order: 0;
    width: auto;
    justify-content: flex-end;
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .di-radar-sweep,
  .di-radar-blip {
    animation: none;
  }

  .di-radar-sweep {
    background: conic-gradient(from 45deg, transparent 0deg, transparent 270deg, rgba(168, 230, 173, 0.25) 360deg);
  }
}

.di-title {
  margin: 0 0 10px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(
    --painel-title-bar,
    var(--green-gradient, linear-gradient(135deg, #0d3320 0%, #14502c 42%, #1a5f34 72%, #1d6b3b 100%))
  );
  color: #fff;
  font-size: var(--di-fs-title);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(13, 51, 32, 0.18);
}

.di-subtitle {
  margin: 5px 0 0;
  font-size: var(--di-fs-body-sm);
  line-height: 1.45;
  color: #3f5348;
  font-weight: 600;
}

.di-header-filters .di-header-filter-row,
.di-header-filters.di-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: flex-end;
  width: 100%;
}

.di-header-filters .di-filter {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.di-header-filters .di-filter-unit {
  flex: 1.35 1 0;
  min-width: 180px;
}

.di-header-filters .di-filter:not(.di-filter-unit) {
  flex: 1 1 0;
  min-width: 140px;
  max-width: 220px;
}

.di-header-filters .di-filter select {
  min-width: 0;
  width: 100%;
  text-overflow: ellipsis;
}

.di-scope-inline {
  color: var(--di-accent);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .di-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .di-header-monitors {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.di-header-filters .di-filter label {
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.di-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.di-filter label {
  display: block;
  font-size: var(--di-fs-label);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2a4034;
  margin-bottom: 6px;
}

.di-filter select {
  min-width: 130px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #8fad9a;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  color: #122018;
  font-size: var(--di-fs-base);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(18, 32, 24, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.di-filter select:hover {
  border-color: #1d6b3b;
  background: #ffffff;
}

.di-filter select:focus {
  outline: none;
  border-color: #1d6b3b;
  box-shadow: 0 0 0 3px rgba(29, 107, 59, 0.18);
  background: #ffffff;
}

.di-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .di-scores { grid-template-columns: 1fr; }
}

.di-score-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  border: 1px solid #b7cfc0;
  border-radius: 16px;
  padding: 18px 18px 16px;
  min-height: 168px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 20px rgba(28, 36, 32, 0.06);
}

.di-score-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.di-score-label {
  font-size: var(--di-fs-base);
  font-weight: 700;
  color: var(--di-text);
  line-height: 1.35;
  margin-bottom: 0;
}

.di-score-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.di-score-badge.is-ok {
  color: #14502c;
  background: rgba(47, 125, 50, 0.12);
  border-color: rgba(31, 94, 52, 0.16);
}

.di-score-badge.is-attention,
.di-score-badge.is-pending {
  color: #9a6700;
  background: rgba(230, 126, 34, 0.12);
  border-color: rgba(180, 83, 9, 0.18);
}

.di-score-badge.is-critical {
  color: #9b2c2c;
  background: rgba(197, 48, 48, 0.1);
  border-color: rgba(197, 48, 48, 0.18);
}

.di-score-hint {
  font-size: var(--di-fs-caption);
  line-height: var(--di-lh-tight);
  color: var(--di-text-muted);
  margin-bottom: 10px;
  min-height: 28px;
}

.di-score-card.is-ok .di-score-value { color: var(--di-accent); }
.di-score-card.is-attention .di-score-value { color: var(--di-warn); }
.di-score-card.is-critical .di-score-value { color: var(--di-danger); }
.di-score-card.is-pending .di-score-value { color: var(--di-warn); }

.di-score-card.is-critical { background: #fffafa; }
.di-score-card.is-attention { background: #fffdf8; }

.di-score-value {
  font-size: var(--di-fs-display);
  font-weight: 800;
  line-height: 1;
  color: var(--di-accent);
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.di-score-value.is-pending {
  color: var(--di-warn);
  font-size: var(--di-fs-display-sm);
  font-weight: 600;
  line-height: 1.3;
}

.di-score-meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 80, 44, 0.08);
  overflow: visible;
  margin-bottom: 8px;
}

.di-score-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: #2f7d32;
  transition: width 0.35s ease;
}

.di-score-meter-fill.is-attention,
.di-score-meter-fill.is-pending {
  background: #d97706;
}

.di-score-meter-fill.is-critical {
  background: #c53030;
}

.di-score-meter-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: #0b2d1e;
  border-radius: 2px;
  opacity: 0.55;
}

.di-score-decision {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: #33423a;
}

.di-score-decision.is-ok { color: #14502c; }
.di-score-decision.is-attention,
.di-score-decision.is-pending { color: #9a6700; }
.di-score-decision.is-critical { color: #9b2c2c; }

.di-score-delta {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: var(--di-fs-caption);
  font-weight: 600;
  color: var(--di-accent);
}

.di-score-delta.is-down { color: var(--di-danger); }

.di-score-trend {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(20, 80, 44, 0.08);
}

.di-score-trend-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7c72;
}

.di-sparkline {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 0;
  opacity: 0.95;
}

.di-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.di-widget-chart {
  align-self: stretch;
  height: 100%;
}

@media (max-width: 1100px) {
  .di-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .di-grid { grid-template-columns: 1fr; }
}

.di-widget {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  border: 1px solid #b7cfc0;
  border-radius: 14px;
  padding: 14px 16px 14px;
  box-shadow: var(--di-shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* display:flex acima sobrescreve o [hidden] nativo - forçar ocultação por aba */
.di-root [data-di-sections][hidden] {
  display: none !important;
}

.di-widget h4 {
  margin: 0 0 12px;
  padding: 8px 12px 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--di-green-border);
  border-left: 4px solid var(--di-accent);
  background: var(--di-accent-soft);
  color: var(--di-accent);
  font-size: var(--di-fs-title);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.di-widget-foot {
  margin: 8px 0 0;
  padding-top: 2px;
  font-size: var(--di-fs-caption);
  line-height: 1.4;
  color: var(--di-text-muted);
}

.di-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--di-fs-base);
}

.di-table th {
  text-align: left;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--di-text-muted);
  padding: 0 8px 10px 0;
  border-bottom: 1px solid var(--di-border);
  vertical-align: bottom;
  line-height: 1.3;
}

.di-table-attention {
  table-layout: auto;
}

.di-table-attention .di-th-leader {
  white-space: nowrap;
}

.di-table-attention .di-th-metric,
.di-table-attention .di-th-attention {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

.di-table-attention td:nth-child(n+2) {
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
}

.di-table-attention td:first-child {
  padding-right: 10px;
}

.di-table td {
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--di-border);
  vertical-align: middle;
  color: var(--di-text);
}

.di-table tr:last-child td { border-bottom: none; }

.di-table tr:hover td {
  background: var(--di-bg-soft);
}

.di-attention {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--di-fs-body-sm);
  font-weight: 600;
}

.di-attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.di-attention-dot.is-high { background: var(--di-danger); }
.di-attention-dot.is-medium { background: var(--di-warn); }
.di-attention-dot.is-low { background: #caad2a; }
.di-attention-dot.is-stable { background: var(--di-stable); }

/* Barras verticais - padrão unificado */
.di-bars-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.di-bars-plans,
.di-bars-pillars {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.di-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.di-bar-col-value {
  font-size: var(--di-fs-metric);
  font-weight: 700;
  color: var(--di-text);
  line-height: 1;
}

.di-bar-col-sub {
  font-size: var(--di-fs-label);
  color: var(--di-text-muted);
  margin-top: -2px;
}

.di-bar-col-track {
  width: 100%;
  max-width: 56px;
  height: 118px;
  max-height: 118px;
  min-height: 118px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--di-bg-soft);
  border: 1px solid var(--di-border);
  border-radius: 10px;
  padding: 5px;
  box-sizing: border-box;
  margin: 0 auto;
}

.di-bar-col-fill {
  width: 100%;
  border-radius: 6px 6px 4px 4px;
  min-height: 0;
  transition: height 0.35s ease;
  background: linear-gradient(180deg, #66bb6a 0%, var(--di-accent) 100%);
}

.di-bar-col-fill.is-ok,
.di-bar-col-fill.is-stable {
  background: linear-gradient(180deg, #66bb6a 0%, var(--di-accent) 100%);
}

.di-bar-col-fill.is-warn {
  background: linear-gradient(180deg, #f59e0b 0%, var(--di-warn) 100%);
}

.di-bar-col-fill.is-danger {
  background: linear-gradient(180deg, #ef4444 0%, var(--di-danger) 100%);
}

.di-bar-col-fill.is-zero {
  background: transparent;
  min-height: 0 !important;
  height: 0 !important;
}

.di-bar-col-label {
  font-size: var(--di-fs-caption);
  font-weight: 600;
  text-align: center;
  color: var(--di-text-muted);
  line-height: 1.25;
  white-space: normal;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
}

.di-bars-pillars {
  align-items: end;
}

.di-bars-pillars .di-bar-col-pillar {
  min-width: 0;
  width: 100%;
}

.di-bars-pillars .di-bar-col-pillar .di-bar-col-value,
.di-bars-pillars .di-bar-col-pillar .di-bar-col-sub,
.di-bars-pillars .di-bar-col-pillar .di-bar-col-label {
  width: 100%;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.di-bar-col-pillar-name {
  font-size: var(--di-fs-metric);
  font-weight: 800;
  color: var(--di-accent);
  letter-spacing: 0;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.di-widget-pillars {
  min-width: 0;
}

.di-widget-pillars .di-bars-pillars {
  margin-top: 2px;
}

/* Pilares G.P.S. - faixas horizontais (legado, não usado no dashboard) */
.di-pillars-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.di-pillar-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.di-pillar-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: var(--di-fs-body-sm);
  font-weight: 800;
  line-height: 1;
  color: #111827;
  background: #fff;
  border: 1px solid var(--di-border);
  flex-shrink: 0;
}

.di-pillar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--di-bg-soft);
  border: 1px solid var(--di-border);
  overflow: hidden;
  min-width: 0;
}

.di-pillar-fill {
  height: 100%;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #66bb6a 0%, var(--di-accent) 100%);
  transition: width 0.35s ease;
}

.di-pillar-row.is-warn .di-pillar-fill {
  background: linear-gradient(90deg, #fbbf24 0%, var(--di-warn) 100%);
}

.di-pillar-row.is-danger .di-pillar-fill {
  background: linear-gradient(90deg, #f87171 0%, var(--di-danger) 100%);
}

.di-pillar-stat {
  font-size: var(--di-fs-caption);
  font-weight: 500;
  color: var(--di-text-muted);
  white-space: nowrap;
  text-align: right;
  min-width: 68px;
  font-variant-numeric: tabular-nums;
}

.di-pillar-stat strong {
  font-weight: 800;
  color: #111827;
}

.di-priority-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.di-priority-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.di-priority-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.di-priority-label {
  font-size: var(--di-fs-base);
  font-weight: 500;
  color: var(--di-text);
  line-height: 1.4;
  flex: 1;
}

.di-priority-count {
  font-size: var(--di-fs-heading);
  font-weight: 700;
  color: var(--di-accent);
  flex-shrink: 0;
  min-width: 1.5rem;
  text-align: right;
}

.di-priority-track {
  height: 8px;
  border-radius: 999px;
  background: var(--di-bg-soft);
  border: 1px solid var(--di-border);
  overflow: hidden;
}

.di-priority-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #66bb6a, var(--di-accent));
  transition: width 0.4s ease;
  min-width: 4px;
}

.di-reco {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--di-accent-soft);
  border: 1px solid var(--di-border);
}

.di-reco h5 {
  margin: 0 0 10px;
  font-size: var(--di-fs-base);
  font-weight: 700;
  color: #111827;
}

.di-reco p {
  margin: 0 0 6px;
  font-size: var(--di-fs-base);
  line-height: 1.5;
  color: var(--di-text);
}

.di-reco p:last-child { margin-bottom: 0; }

.di-loading,
.di-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--di-text-muted);
  font-size: var(--di-fs-heading);
}

.di-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--di-accent);
  margin-right: 6px;
  animation: di-pulse 1.8s ease infinite;
}

@keyframes di-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.di-updated {
  font-size: var(--di-fs-caption);
  color: #111827;
  margin-top: 16px;
  text-align: left;
  line-height: 1.45;
}

.di-muted {
  color: var(--di-text-muted);
  font-size: var(--di-fs-body-sm);
}

/* Leitura executiva */
.di-ai-hero {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dff3e5 0%, #eef8f1 42%, #ffffff 100%);
  border: 1px solid #9fc0ab;
  box-shadow: var(--di-shadow);
}

.di-ai-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.di-ai-hero-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px 12px;
  margin-left: auto;
}

.di-hero-filters {
  gap: 8px 10px;
  padding-left: 12px;
  border-left: 1px solid #9fc0ab;
}

.di-hero-filters .di-filter label {
  margin-bottom: 4px;
  font-size: var(--di-fs-caption);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2a4034;
}

.di-filter-scope {
  margin: 6px 0 0;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  color: var(--di-accent);
}

.di-hero-filters .di-filter select {
  min-width: 112px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--di-fs-body-sm);
  border: 1.5px solid #8fad9a;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  color: #122018;
  font-weight: 600;
}

.di-ai-hero h4 {
  margin: 0;
  font-size: var(--di-fs-body-sm);
  font-weight: 800;
  color: #122018;
  text-transform: none;
  letter-spacing: -0.01em;
}

.di-ai-text {
  margin: 0;
  font-size: var(--di-fs-base);
  line-height: var(--di-lh-body);
  color: var(--di-text);
  font-weight: 400;
}

.di-ai-bullets {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.di-ai-bullets li {
  font-size: var(--di-fs-base);
  line-height: 1.45;
  color: var(--di-text);
  overflow-wrap: anywhere;
}

.di-engine {
  font-size: var(--di-fs-caption);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--di-text-muted);
  border: 1px solid var(--di-border);
  max-width: 100%;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.di-engine.is-ai {
  color: var(--di-accent);
  border-color: var(--di-border);
  background: var(--di-accent-soft);
}

.di-status {
  display: inline-flex;
  align-items: center;
  font-size: var(--di-fs-caption);
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  margin-left: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.di-status.is-ok { background: #e8f2eb; color: #14502c; border-color: rgba(20, 80, 44, 0.22); }
.di-status.is-attention { background: #ffe8c7; color: #8a4b00; border-color: rgba(180, 83, 9, 0.28); }
.di-status.is-critical { background: #fde2e0; color: #9b2c2c; border-color: rgba(197, 48, 48, 0.28); }
.di-status.is-pending { background: #e8eee9; color: #3f5348; border-color: rgba(63, 83, 72, 0.2); }
.di-status.is-stable { background: #e8f2eb; color: #14502c; border-color: rgba(20, 80, 44, 0.22); }

.di-reading-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--di-border);
}

.di-reading-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.di-reading-block h5 {
  margin: 0;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  color: var(--di-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.di-reading-block p {
  margin: 0;
  font-size: var(--di-fs-base);
  line-height: 1.55;
  color: var(--di-text);
}

.di-pillars-empty {
  padding: 24px 16px;
  text-align: center;
  background: var(--di-bg-soft);
  border-radius: 12px;
  border: 1px dashed var(--di-border-strong);
}

.di-pillars-empty-title {
  margin: 0 0 6px;
  font-size: var(--di-fs-heading);
  font-weight: 700;
  color: var(--di-accent);
}

.di-pillars-empty-sub {
  margin: 0;
  font-size: var(--di-fs-base);
  color: var(--di-text-muted);
  line-height: 1.45;
}

.di-reco-item {
  margin-bottom: 12px;
}

.di-reco-item:last-child { margin-bottom: 0; }

.di-reco-label {
  display: block;
  font-size: var(--di-fs-body-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #111827;
  margin-bottom: 4px;
}

.di-reco-item p {
  margin: 0;
  font-size: var(--di-fs-base);
  line-height: 1.5;
  color: var(--di-text);
}

.di-reco-detail {
  margin: 6px 0 0;
  font-size: var(--di-fs-body-sm);
  line-height: 1.45;
  color: #3f5348;
}

.di-reco-detail span {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6b61;
}

@media (max-width: 640px) {
  .di-root {
    padding: 18px 16px 20px;
    border-radius: 12px;
  }

  .di-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
  }

  .di-cfo-grid {
    grid-template-columns: 1fr;
  }
}

/* Visão CFO - badge de alerta na nav */
.di-nav-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  margin-left: auto;
  flex-shrink: 0;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 0 0 4px rgba(239, 68, 68, 0.22);
}

.di-nav-item.is-active .di-nav-badge {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px rgba(239, 68, 68, 0.2);
}

/* Console de diretoria (sidebar) */
.di-console {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.di-console-block {
  background: var(--green-gradient, linear-gradient(135deg, var(--green-dark, #14502c) 0%, var(--green, #1d6b3b) 58%, #228a48 100%));
  border: 1px solid var(--di-border-strong);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 6px 20px rgba(20, 80, 44, 0.16);
  color: #fff;
}

.di-console-block .di-console-head h4 {
  color: rgba(255, 255, 255, 0.98);
}

.di-console-block .di-console-hint {
  color: rgba(255, 255, 255, 0.72);
}

.di-console-block .di-console-label {
  color: rgba(255, 255, 255, 0.82);
}

.di-console-block .di-console-count {
  color: rgba(255, 255, 255, 0.65);
}

.di-console-block .di-console-empty {
  color: rgba(255, 255, 255, 0.88);
}

.di-console-block .di-console-status.is-ok {
  color: #d4f0dc;
}

.di-console-block .di-console-status.is-error {
  color: #ffd4d4;
}

.di-console-block .di-console-status.is-saving {
  color: rgba(255, 255, 255, 0.72);
}

.di-console-block .di-dispatch-recent {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.di-console-block .di-dispatch-item {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.di-console-block .di-dispatch-item-name {
  color: rgba(255, 255, 255, 0.95);
}

.di-console-block .di-dispatch-item-meta {
  color: rgba(255, 255, 255, 0.62);
}

.di-console-block .di-dispatch-item.is-pending .di-dispatch-item-meta {
  color: #ffe8b8;
}

.di-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.di-console-head-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.di-console-head h4 {
  margin: 0;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--di-accent);
}

.di-console-hint {
  margin: 0;
  font-size: var(--di-fs-label);
  line-height: 1.35;
  color: var(--di-text-muted);
}

.di-console-label {
  display: block;
  margin: 0 0 4px;
  font-size: var(--di-fs-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--di-text-muted);
}

.di-console-label:not(:first-child) {
  margin-top: 7px;
}

.di-console-select,
.di-console-input,
.di-console-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: var(--di-fs-body-sm);
  line-height: 1.4;
  color: var(--di-text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--di-border);
  border-radius: 8px;
  padding: 7px 9px;
}

.di-console-textarea {
  resize: vertical;
  min-height: 48px;
  max-height: 80px;
}

.di-console-textarea-orientacao {
  min-height: 120px;
  max-height: 200px;
  line-height: 1.5;
  padding: 10px 11px;
  font-size: var(--di-fs-body-sm);
}

.di-console-select:focus,
.di-console-input:focus,
.di-console-textarea:focus {
  outline: none;
  border-color: rgba(47, 125, 50, 0.45);
  box-shadow: 0 0 0 2px rgba(47, 125, 50, 0.12);
  background: #fff;
}

.di-console-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.di-console-count {
  font-size: var(--di-fs-label);
  color: var(--di-text-muted);
}

.di-console-btn {
  font-family: inherit;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  color: var(--green-dark, #14502c);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.di-console-btn:hover {
  background: var(--green-light, #fbfcfc);
}

.di-console-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.di-dispatch-sent {
  margin-left: auto;
  font-size: var(--di-fs-caption);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.di-dispatch-sent.is-visible {
  opacity: 1;
}

.di-console-status {
  margin: 8px 0 0;
  font-size: var(--di-fs-caption);
  line-height: 1.4;
}

.di-console-status.is-ok { color: var(--di-accent); }
.di-console-status.is-error { color: var(--di-danger); }
.di-console-status.is-saving { color: var(--di-text-muted); }

.di-console-link {
  font-family: inherit;
  font-size: var(--di-fs-label);
  font-weight: 600;
  color: var(--green-dark, #14502c);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.di-console-link:hover {
  background: #fff;
}

.di-console-empty {
  margin: 0;
  font-size: var(--di-fs-caption);
  line-height: 1.45;
  color: var(--di-text-muted);
  font-style: italic;
}

.di-dispatch-recent {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--di-border);
}

.di-dispatch-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.di-dispatch-item {
  padding: 5px 0;
  border-bottom: 1px solid rgba(227, 235, 230, 0.7);
}

.di-dispatch-item:last-child {
  border-bottom: none;
}

.di-dispatch-item-name {
  display: block;
  font-size: var(--di-fs-caption);
  font-weight: 600;
  color: var(--di-text);
}

.di-dispatch-item-meta {
  display: block;
  font-size: var(--di-fs-label);
  color: var(--di-text-muted);
  margin-top: 1px;
}

.di-dispatch-item.is-pending .di-dispatch-item-meta {
  color: var(--di-warn);
}

.di-console-block .di-dispatch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.di-console-block .di-dispatch-actions .di-console-link {
  font-size: var(--di-fs-label);
}

.di-console-block .di-console-status strong {
  font-weight: 700;
}

.di-tab-cfo .di-header {
  margin-bottom: 16px;
}

.di-header-reg {
  display: none;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
}

.di-tab-cfo .di-header-reg:not([hidden]) {
  display: block;
}

.di-cfo-panel {
  margin-top: 4px;
}

.di-cfo-strip {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--di-border);
  background: #fcfdfc;
}

.di-cfo-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.di-cfo-strip-head strong {
  font-size: var(--di-fs-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--di-text-muted);
}

.di-cfo-strip-verdict {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--di-text);
}

.di-cfo-strip-do {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--di-border);
  font-size: var(--di-fs-base);
  font-weight: 600;
  line-height: 1.4;
  color: var(--di-text);
}

.di-cfo-strip-do span {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #14502c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
}

.di-cfo-strip-drivers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.di-cfo-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--di-border);
  font-size: var(--di-fs-caption);
  font-weight: 600;
  line-height: 1.3;
  color: var(--di-text-muted);
  overflow-wrap: anywhere;
}

.di-cfo-do {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #14502c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
}

.di-cfo-hero {
  margin-bottom: 18px;
}

.di-cfo-hero .di-ai-hero-head > div:first-child {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.di-cfo-hero .di-ai-hero-head h4 {
  margin: 0;
  line-height: 1.2;
}

.di-cfo-hero .di-status {
  margin-left: 0;
  flex-shrink: 0;
}

.di-cfo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.di-cfo-card {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  border: 1px solid #b7cfc0;
  border-left-width: 4px;
  border-left-color: #1d6b3b;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 22px rgba(28, 36, 32, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.di-cfo-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 28px rgba(28, 36, 32, 0.07);
  transform: translateY(-1px);
}

.di-cfo-card.is-critical { border-left-color: rgba(197, 48, 48, 0.55); }
.di-cfo-card.is-attention { border-left-color: rgba(230, 126, 34, 0.55); }
.di-cfo-card.is-pending { border-left-color: var(--di-border-strong); }

.di-cfo-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.di-cfo-card-head h4 {
  margin: 0;
  font-size: var(--di-fs-base);
  font-weight: 700;
  color: var(--di-text);
  letter-spacing: -0.01em;
}

.di-cfo-ref {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: var(--di-fs-caption);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, #14502c 0%, #1d6b3b 52%, #228a48 100%);
  box-shadow: 0 1px 4px rgba(20, 80, 44, 0.16);
}

.di-cfo-body {
  flex: 1 1 auto;
}

.di-cfo-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--di-text);
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

.di-cfo-support {
  margin: 0 0 10px;
  font-size: var(--di-fs-body-sm);
  line-height: 1.45;
  color: var(--di-text-muted);
}

.di-cfo-support.is-alert {
  color: #9b2c2c;
  font-weight: 600;
}

.di-cfo-note {
  display: none;
}

.di-cfo-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--di-border);
}

.di-cfo-foot p {
  margin: 0;
  font-size: var(--di-fs-body-sm);
  line-height: 1.4;
  color: var(--di-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.di-cfo-verdict {
  background: #fff;
  border: 1px solid var(--di-border);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: none;
}

.di-cfo-verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.di-cfo-verdict-head strong {
  font-size: var(--di-fs-body-sm);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--di-text);
}

.di-cfo-verdict-summary {
  margin: 0 0 6px;
  font-size: var(--di-fs-base);
  line-height: 1.5;
  color: var(--di-text);
}

.di-cfo-verdict-drivers {
  margin: 0;
  font-size: var(--di-fs-caption);
  line-height: 1.45;
  color: var(--di-text-muted);
}

.di-cfo-priority {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #fafcfa;
  border: 1px solid var(--di-border);
}

.di-cfo-priority h5 {
  margin: 0 0 6px;
  font-size: var(--di-fs-caption);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--di-text-muted);
}

.di-cfo-priority p {
  margin: 0;
  font-size: var(--di-fs-base);
  line-height: 1.5;
  color: var(--di-text);
}

/* Exposição Financeira Regulatória - faixa dedicada na visão CFO */
.di-tab-cfo .di-pulse-panel {
  display: none !important;
}

.di-reg-exposure-panel {
  position: relative;
  width: 100%;
  min-width: 0;
  display: none !important;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 16px;
  border-radius: 18px;
  border: 1px solid rgba(13, 40, 24, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(247, 250, 248, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 28px rgba(13, 40, 24, 0.07);
  overflow: hidden;
}

.di-reg-exposure-glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.16), transparent 68%);
  pointer-events: none;
}

.di-tab-cfo .di-reg-exposure-panel:not([hidden]) {
  display: flex !important;
}

.di-reg-exposure-panel.is-ok {
  border-color: rgba(31, 94, 52, 0.22);
  background:
    linear-gradient(135deg, #fcfdfc 0%, #ffffff 42%, #fcfdfc 100%);
}
.di-reg-exposure-panel.is-ok .di-reg-exposure-glow {
  background: radial-gradient(circle, rgba(47, 125, 50, 0.16), transparent 68%);
}
.di-reg-exposure-panel.is-attention {
  border-color: rgba(180, 83, 9, 0.22);
  background:
    linear-gradient(135deg, #fffaf3 0%, #ffffff 46%, #fffdf9 100%);
}
.di-reg-exposure-panel.is-critical {
  border-color: rgba(197, 48, 48, 0.24);
  background:
    linear-gradient(135deg, #fff7f7 0%, #ffffff 46%, #fffafa 100%);
}
.di-reg-exposure-panel.is-critical .di-reg-exposure-glow {
  background: radial-gradient(circle, rgba(197, 48, 48, 0.14), transparent 68%);
}

.di-reg-exposure-panel.is-ok,
.di-reg-exposure-panel.is-attention,
.di-reg-exposure-panel.is-critical {
  border-left-width: 1px;
}

.di-reg-exposure-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.di-reg-exposure-titles {
  min-width: 0;
}

.di-reg-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7c72;
}

.di-reg-exposure-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: #0b2d1e;
  line-height: 1.25;
}

.di-reg-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.di-reg-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.di-reg-status.is-low {
  color: #14502c;
  background: rgba(47, 125, 50, 0.12);
  border-color: rgba(31, 94, 52, 0.18);
}

.di-reg-status.is-moderate,
.di-reg-status.is-elevated {
  color: #9a6700;
  background: rgba(230, 126, 34, 0.12);
  border-color: rgba(180, 83, 9, 0.2);
}

.di-reg-status.is-critical {
  color: #9b2c2c;
  background: rgba(197, 48, 48, 0.1);
  border-color: rgba(197, 48, 48, 0.2);
}

.di-reg-exposure-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.di-reg-metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(13, 40, 24, 0.035);
  border: 1px solid rgba(13, 40, 24, 0.06);
}

.di-reg-range {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  color: #0b2d1e;
  line-height: 1.1;
}

.di-reg-range-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5f6f66;
}

.di-reg-framing {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1.55;
  color: #3f5348;
  max-width: none;
  white-space: normal;
  text-wrap: pretty;
}

.di-reg-summary {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #33423a;
  max-width: none;
  white-space: normal;
}

.di-reg-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.di-reg-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #24332b;
  background: #fff;
  border: 1px solid rgba(11, 45, 30, 0.08);
  white-space: normal;
}

.di-reg-chip-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #c47a1a;
  box-shadow: 0 0 0 3px rgba(196, 122, 26, 0.14);
}

.di-reg-exposure-panel.is-ok .di-reg-chip-dot {
  background: #2f7d32;
  box-shadow: 0 0 0 3px rgba(47, 125, 50, 0.14);
}

.di-reg-exposure-panel.is-critical .di-reg-chip-dot {
  background: #c53030;
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.14);
}

.di-reg-exposure-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 45, 30, 0.08);
}

.di-reg-reco {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  color: #14502c;
}

.di-reg-memory-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(20, 80, 44, 0.2);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #14502c;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.di-reg-memory-btn:hover {
  color: #0b2d1e;
  background: #edf6ee;
  border-color: rgba(20, 80, 44, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .di-reg-chips {
    grid-template-columns: 1fr;
  }
  .di-reg-exposure-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .di-reg-memory-btn {
    width: 100%;
    text-align: center;
  }
}

/* Modal memória de cálculo */
.di-reg-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.di-reg-modal[hidden] {
  display: none !important;
}

.di-reg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 45, 30, 0.42);
}

.di-reg-modal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--di-border);
  box-shadow: 0 20px 48px rgba(11, 45, 30, 0.18);
}

.di-reg-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--di-border);
  background: linear-gradient(180deg, #fcfdfc 0%, #fff 100%);
}

.di-reg-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0b2d1e;
}

.di-reg-modal-sub {
  margin: 4px 0 0;
  font-size: var(--di-fs-caption);
  color: #33423a;
}

.di-reg-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #33423a;
  padding: 0 4px;
}

.di-reg-modal-body {
  padding: 18px 20px;
  overflow: auto;
  display: grid;
  gap: 16px;
}

.di-reg-modal-section h4 {
  margin: 0 0 8px;
  font-size: var(--di-fs-body-sm);
  color: #0b2d1e;
}

.di-reg-modal-list {
  margin: 0;
  padding-left: 18px;
  font-size: var(--di-fs-caption);
  line-height: 1.45;
  color: #33423a;
}

.di-reg-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.di-reg-modal-k {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #33423a;
  margin-bottom: 2px;
}

.di-reg-modal-grid strong {
  font-size: var(--di-fs-body-sm);
  color: #0b2d1e;
}

.di-reg-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--di-fs-caption);
}

.di-reg-modal-table th,
.di-reg-modal-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--di-border);
  text-align: left;
}

.di-reg-modal-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #33423a;
}

.di-reg-modal-scope {
  margin: 0;
  font-size: var(--di-fs-caption);
  line-height: 1.5;
  color: #33423a;
}

.di-reg-modal-scope strong {
  color: #0b2d1e;
}

.di-reg-modal-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fcfdfc;
  font-size: var(--di-fs-caption);
  line-height: 1.45;
  color: #33423a;
}

.di-reg-modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--di-border);
  display: flex;
  justify-content: flex-end;
}

.di-reg-modal-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #1f5e34;
  background: #1f5e34;
  color: #fff;
  font-weight: 600;
  font-size: var(--di-fs-body-sm);
  cursor: pointer;
}

body.di-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .di-reg-exposure-panel {
    flex: 1 1 100%;
    max-width: none;
    min-height: 0;
  }

  .di-reg-exposure-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .di-reg-chip {
    white-space: normal;
  }

  .di-reg-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* Plotly hosts - Dashboard Inteligente only (R/plotly) */
.di-plotly-host {
  width: 100%;
  min-width: 0;
  height: 248px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #fbfdfc 0%, #ffffff 100%);
  border: 1px solid #9fc0ab;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  position: relative;
  pointer-events: auto;
  cursor: crosshair;
  padding: 6px 4px 4px;
  flex: 0 0 auto;
}

.di-widget-chart .di-chart-reading {
  margin: 0 0 6px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.3;
}

.di-chart-reading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

.di-chart-reading.is-ok {
  background: #e8f2eb;
  color: #14502c;
}

.di-chart-reading.is-warn {
  background: #ffe8c7;
  color: #8a4b00;
}

.di-chart-reading.is-bad {
  background: #fde2e0;
  color: #9b2c2c;
}

.di-chart-reading.is-neutral {
  background: #e8eee9;
  color: #3f5348;
}

.di-widget-foot strong {
  color: var(--di-text);
}


.di-plotly-host .js-plotly-plot,
.di-plotly-host .plot-container,
.di-plotly-host .svg-container {
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto !important;
}

.di-plotly-host .hoverlayer,
.di-plotly-host .hovertext {
  pointer-events: none !important;
}

/* Modebar oculto - hover nos dados basta; evita ícones gigantes do CSS global */
.di-plotly-host .modebar,
.di-plotly-host .modebar-container {
  display: none !important;
}

.di-plotly-host .modebar-btn,
.di-plotly-host .modebar-btn svg,
.di-plotly-host .modebar-group svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

.di-score-card .di-plotly-host {
  margin-top: 6px;
  height: 72px;
  background: transparent;
  cursor: default;
}

.di-pulse-wave-wrap .di-plotly-host {
  height: 56px !important;
  min-height: 56px !important;
  background: transparent;
}
