/* ==========================================================================
   DUE STRATEGIC INTELLIGENCE — CONSOLE INVESTIGATIVO INSTITUCional (v4.5)
   Paleta Deep Sea Editorial (#081d33 / #0a2540 / #0f2f50 / #143a61)
   Tipografia: Hanken Grotesk + IBM Plex Mono + Newsreader (Peças / Autos)
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg-top: #07192d;
  --bg: #0a2540;
  --bg2: #0f2f50;
  --bg3: #143a61;
  --bg-hover: #194573;
  --line: #234c75;
  --line-strong: #326699;
  --ink: #f3f7fb;
  --mute: #9fb6cc;
  --sky: #8fd3ff;
  --pink: #ff5c8a;
  --lav: #c9a6ff;
  --mint: #7fe3d0;
  --amber: #ffb4a2;
  --gold: #e7cf86;
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto !important;
  min-height: 100vh !important;
  background-color: var(--bg) !important;
  color: var(--ink) !important;
  font-family: var(--font-sans) !important;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: auto !important;
}

/* Trava a tela de fundo quando qualquer gaveta lateral (documento / ficha) estiver aberta */
html.due-drawer-locked,
body.due-drawer-locked {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.due-drawer {
  overscroll-behavior: contain;
}

#appShell {
  zoom: 0.85;
  width: 100%;
  min-height: 117.65vh;
  overflow: visible !important;
}

/* Container centralizado ocupando 96% da tela */
.due-container {
  width: 96%;
  max-width: 96%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* ==========================================================================
   1. BARRA SUPERIOR DE COMANDO (.due-top) — PADRÃO EXECUTIVO INSTITUCIONAL
   ========================================================================== */
.due-top {
  background: linear-gradient(180deg, #04101e 0%, #071b30 100%);
  border-bottom: 1px solid rgba(50, 102, 153, 0.55);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 24px rgba(2, 8, 18, 0.6);
}

.due-top-inner {
  width: 96%;
  max-width: 96%;
  margin: 0 auto;
  min-height: 58px;
  padding: 8px 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 1180px) {
  .due-top-inner {
    flex-wrap: wrap;
  }
}

/* Marca Institucional (Logo livre sem borda + Wordmark Executivo) */
.due-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.due-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 12px rgba(231, 207, 134, 0.28)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.due-brand:hover .due-brand-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 0 16px rgba(231, 207, 134, 0.42)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.due-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.due-brand-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.05;
  white-space: nowrap;
}

.due-brand-word-main {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(143, 211, 255, 0.18);
}

.due-brand-word-accent {
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #f3df9d 0%, #d4b45e 55%, #b8e3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.due-brand-word-light {
  font-size: 18.5px;
  font-weight: 400;
  letter-spacing: 0.09em;
  color: #d6e8fa;
}

.due-brand-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  color: #8fb4d6;
  font-size: 9.8px;
  font-weight: 600;
  letter-spacing: 0.11em;
  margin-top: 4px;
  white-space: nowrap;
}

.due-brand-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  flex-shrink: 0;
}

/* Console Central de Pesquisa Integrado */
.due-search-wrap {
  position: relative;
  flex: 1 1 310px;
  min-width: 285px;
  max-width: 430px;
}

.due-search-field {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 3px 4px 3px 12px;
  border-radius: 9px;
  background: #0a223b;
  border: 1px solid rgba(56, 114, 171, 0.65);
  box-shadow:
    inset 0 1px 3px rgba(2, 8, 16, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.due-search-field:focus-within {
  border-color: var(--sky);
  background: #0d2a48;
  box-shadow:
    inset 0 1px 2px rgba(2, 8, 16, 0.4),
    0 0 0 2.5px rgba(143, 211, 255, 0.18);
}

.due-search-icon {
  width: 16px;
  height: 16px;
  color: var(--sky);
  opacity: 0.85;
  flex-shrink: 0;
  margin-right: 9px;
}

.due-search-input {
  flex: 1;
  height: 100%;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0 8px 0 0;
  box-shadow: none !important;
}

.due-search-input::placeholder {
  font-family: var(--font-sans);
  color: rgba(159, 182, 204, 0.62);
}

.due-search-input:focus {
  outline: none !important;
}

.due-btn-investigar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border-radius: 6px;
  border: 1px solid #a6ddff;
  background: linear-gradient(180deg, #9ed9ff 0%, #7bc7fb 100%);
  color: #051c30;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  box-shadow: 0 2px 8px rgba(143, 211, 255, 0.25);
}

.due-btn-investigar:hover {
  background: linear-gradient(180deg, #b5e4ff 0%, #92d3ff 100%);
  transform: translateY(-0.5px);
  box-shadow: 0 4px 12px rgba(143, 211, 255, 0.35);
}

.due-btn-pri {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--sky);
  background: linear-gradient(180deg, #9ed9ff 0%, #7bc7fb 100%);
  color: #062033;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  box-shadow: 0 2px 10px rgba(143, 211, 255, 0.18);
}

.due-btn-pri:hover {
  background: #a8deff;
  border-color: #a8deff;
  transform: translateY(-0.5px);
}

.due-btn-sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13.5px;
}

/* Estação Direita da Topbar: Caso, Dock de Ferramentas & Credencial */
.due-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.due-top-vsep {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(64, 124, 184, 0.55), transparent);
  flex-shrink: 0;
}

/* Cápsula de Seleção de Caso */
.due-top-case-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 6px 0 11px;
  border-radius: 7px;
  background: #0b243f;
  border: 1px solid rgba(50, 102, 153, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.due-top-case-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sky);
  margin-right: 6px;
  user-select: none;
}

.due-ctrl-select {
  height: 30px;
  padding: 0 4px;
  border-radius: 5px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  max-width: 145px;
  cursor: pointer;
}

.due-ctrl-select:focus {
  outline: none;
}

.due-ctrl-select option {
  background: #0a2540;
  color: #ffffff;
}

/* Cluster Segmentado de Ferramentas (Sigilo, PDF, Excel, JSON, Sync) */
.due-tool-cluster {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border-radius: 7px;
  background: #0b243f;
  border: 1px solid rgba(50, 102, 153, 0.65);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.due-tool-btn {
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(43, 88, 133, 0.55);
  background: transparent;
  color: #d6e6f5;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.due-tool-btn:last-child {
  border-right: 0;
}

.due-tool-btn:hover {
  background: rgba(25, 69, 115, 0.75);
  color: #ffffff;
}

.due-tool-gold {
  color: var(--gold);
  background: rgba(231, 207, 134, 0.07);
}

.due-tool-gold:hover {
  background: rgba(231, 207, 134, 0.18);
  color: #fff3c4;
}

/* Card Compacto de Credencial do Analista */
.due-operator-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 7px;
  background: rgba(11, 36, 63, 0.75);
  border: 1px solid rgba(43, 88, 133, 0.55);
}

.due-op-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  flex-shrink: 0;
}

.due-op-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.due-op-main {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #ffffff;
}

.due-op-main em {
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.due-op-sub {
  font-size: 11.5px;
  color: var(--mute);
  white-space: nowrap;
}

.due-role-badge {
  display: inline-block;
  padding: 0.5px 5.5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(143, 211, 255, 0.14);
  border: 1px solid rgba(143, 211, 255, 0.35);
  color: var(--sky);
}

.due-btn-logout {
  height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid rgba(255, 92, 138, 0.35);
  background: rgba(255, 92, 138, 0.08);
  color: #ffb8cc;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.due-btn-logout:hover {
  border-color: var(--pink);
  background: rgba(255, 92, 138, 0.22);
  color: #ffffff;
}

/* Botões padrão de controle dentro das abas (.due-ctrl-btn) */
.due-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto !important;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: visible;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.due-ctrl-btn:hover {
  border-color: var(--sky);
  background: var(--bg-hover);
}

.due-ctrl-gold {
  border-color: rgba(231, 207, 134, 0.45);
  color: var(--gold);
}
.due-ctrl-gold:hover {
  border-color: var(--gold);
  background: rgba(231, 207, 134, 0.15);
}

.due-ctrl-exit:hover {
  border-color: var(--pink);
  color: #ffd6e2;
  background: rgba(255, 92, 138, 0.18);
}

/* ==========================================================================
   2. BANNER DE PESQUISA ATIVA FIXADA
   ========================================================================== */
.due-active-banner {
  background: linear-gradient(90deg, #0d3156 0%, #133f6b 50%, #0d3156 100%);
  border-bottom: 1px solid rgba(143, 211, 255, 0.4);
  padding: 10px 0;
}

.due-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  flex-shrink: 0;
}

/* ==========================================================================
   3. CABEÇALHO DO CASO & 4 KPIs GRANDES (.due-case-strip)
   ========================================================================== */
.due-case-strip {
  padding: 24px 0 18px;
  background:
    radial-gradient(ellipse 70% 100% at 15% 0%, rgba(143, 211, 255, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, rgba(15, 47, 80, 0.45) 0%, rgba(10, 37, 64, 0.15) 100%);
  border-bottom: 1px solid rgba(35, 76, 117, 0.45);
}

.due-case-title-block h1.due-case-h1 {
  margin: 0;
  font-size: clamp(24px, 2.75vw, 35px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: #ffffff;
  text-wrap: balance;
}

.due-case-code {
  color: #ffffff;
}

.due-case-sep {
  margin: 0 7px;
  color: var(--sky);
  opacity: 0.7;
  font-weight: 300;
}

.due-case-sub {
  margin-top: 8px;
  color: var(--mute);
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.due-target-select {
  margin-left: 6px;
  height: 29px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(50, 102, 153, 0.75);
  background: rgba(15, 47, 80, 0.85);
  color: var(--sky);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.due-target-select:hover,
.due-target-select:focus {
  border-color: var(--sky);
  background: #143a61;
  outline: none;
}

.due-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 20px;
  margin-top: 18px;
  align-items: stretch;
}

.due-kpi {
  position: relative;
  padding: 13px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(17, 52, 88, 0.72) 0%, rgba(12, 39, 68, 0.55) 100%);
  border: 1px solid rgba(44, 94, 143, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 14px rgba(3, 12, 24, 0.22);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.due-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sky);
  opacity: 0.75;
}

.due-kpi.due-kpi-alert {
  border-color: rgba(255, 92, 138, 0.38);
  background: linear-gradient(180deg, rgba(46, 26, 58, 0.48) 0%, rgba(15, 43, 74, 0.65) 100%);
}

.due-kpi.due-kpi-alert::before {
  background: var(--pink);
  opacity: 1;
}

.due-kpi b {
  display: block;
  font-size: clamp(31px, 3vw, 42px);
  font-weight: 300;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.due-kpi span {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0.005em;
}

/* Valores compostos dentro do número (ex.: "1 · 2 · 0" de alta·média·baixa na aba 08) ficam na mesma linha */
.due-kpi b span {
  display: inline;
  margin-top: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.due-kpi.due-kpi-alert b {
  color: var(--pink);
}

/* ==========================================================================
   4. ABAS HORIZONTAIS DE MÓDULOS (.due-tabs) — SEM BARRA DE ROLAGEM
   ========================================================================== */
.due-tabs {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #081e35 0%, #09223c 100%);
  box-shadow: 0 4px 14px rgba(3, 12, 24, 0.22);
}

.due-tabs-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  overflow: hidden !important;
  scrollbar-width: none !important;
}

.due-tabs-inner::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.due-tabs .nx-nav-item {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 58px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  border-bottom: 2.5px solid transparent;
  border-radius: 0;
  color: var(--mute);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  width: auto;
}

/* Traço vertical separando cada aba para não ficarem coladas */
.due-tabs .nx-nav-item::after {
  content: "";
  position: absolute;
  right: 0;
  top: 13px;
  bottom: 13px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(64, 124, 184, 0.55) 25%,
    rgba(64, 124, 184, 0.55) 75%,
    transparent 100%
  );
}

.due-tabs .nx-nav-item:last-child::after {
  display: none;
}

.due-tabs .nx-nav-item:hover {
  color: var(--ink);
  background: rgba(20, 58, 97, 0.42);
  transform: none;
}

.due-tabs .nx-nav-item.active {
  color: #ffffff;
  border-bottom-color: var(--sky);
  background: linear-gradient(180deg, rgba(20, 58, 97, 0.22) 0%, rgba(143, 211, 255, 0.13) 100%);
  font-weight: 600;
  box-shadow: none;
}

.due-tabs .nx-nav-item.due-tab-final {
  background: rgba(6, 20, 36, 0.28);
}

.due-tabs .nx-nav-item.due-tab-final:hover {
  background: rgba(20, 58, 97, 0.45);
}

.due-tabs .nx-nav-item.due-tab-final.active {
  background: linear-gradient(180deg, rgba(20, 58, 97, 0.25) 0%, rgba(143, 211, 255, 0.14) 100%);
}

.due-tab-main {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.due-tab-sub {
  display: block;
  font-size: 11px;
  line-height: 1.18;
  color: var(--mute);
  font-weight: 400;
  margin-top: 2px;
  white-space: nowrap;
}

.due-tabs .nx-nav-item.active .due-tab-sub {
  color: #b8d4ee;
}

.due-tab-cnt {
  display: inline-block;
  padding: 0.5px 5px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(20, 58, 97, 0.9);
  border: 1px solid var(--line);
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.due-tabs .nx-nav-item.active .due-tab-cnt {
  border-color: rgba(143, 211, 255, 0.5);
  color: var(--sky);
}

.due-tab-cnt-alert {
  color: var(--pink) !important;
  border-color: rgba(255, 92, 138, 0.45) !important;
  background: rgba(255, 92, 138, 0.12) !important;
}

/* Divisor duplo mais forte entre as abas numeradas (01–08) e os 4 últimos módulos */
.due-tabs-group-divider {
  width: 2px;
  align-self: stretch;
  margin: 8px 3px;
  background: linear-gradient(180deg, transparent, rgba(143, 211, 255, 0.55), transparent);
  flex-shrink: 0;
}

/* ==========================================================================
   5. PAINÉIS, TIPOGRAFIA E CONTROLES DO CONSOLE
   ========================================================================== */
.due-main {
  padding-top: 22px;
  padding-bottom: 48px;
}

.due-lead {
  margin: 0 0 16px;
  color: var(--mute);
  font-size: 16.5px;
  max-width: 78ch;
  line-height: 1.5;
}

.nx-panel,
.nx-card {
  background: linear-gradient(180deg, #113559 0%, #0d2b4a 100%) !important;
  border: 1px solid rgba(43, 92, 140, 0.78) !important;
  border-radius: 10px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(3, 12, 24, 0.34) !important;
}

.due-panel-h2 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.due-status-note {
  font-size: 14px;
  color: var(--mute);
}

/* Botões Segmentados (.seg-group / .seg-btn) */
.seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 37, 64, 0.65);
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.seg-btn {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid rgba(35, 76, 117, 0.5);
  border-radius: 0;
  background: transparent;
  color: var(--mute);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.seg-btn:last-child {
  border-right: 0;
}
.seg-btn:hover {
  color: var(--ink);
  background: rgba(20, 58, 97, 0.5);
}
.seg-btn.active {
  background: var(--bg3);
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
}

/* Inputs e Selects Padronizados */
.due-input,
.due-select {
  height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  font-size: 14.5px;
}

.due-input-sm,
.due-select-sm {
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  font-size: 13.5px;
}

.due-input:focus,
.due-select:focus,
.due-input-sm:focus,
.due-select-sm:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

/* ==========================================================================
   6. TAXONOMIA PROBATÓRIA (.ep-pill / .tag)
   ========================================================================== */
.ep-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 99px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid;
  background: rgba(10, 37, 64, 0.55);
  box-shadow: none;
}
.ep-pill::before {
  display: none;
}

.ep-fato {
  color: var(--sky);
  border-color: var(--sky);
}
.ep-vinculo {
  color: var(--mint);
  border-color: var(--mint);
}
.ep-indicio {
  color: var(--pink);
  border-color: var(--pink);
}
.ep-hipotese {
  color: var(--lav);
  border-color: var(--lav);
}
.ep-divergencia {
  color: var(--amber);
  border-color: var(--amber);
}
.ep-lacuna {
  color: var(--mute);
  border-color: var(--mute);
}

/* Badges de Relevância (Alta / Média / Baixa) */
.due-rel-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.due-rel-alta {
  background: var(--pink);
  color: #2a0614;
}
.due-rel-media {
  background: var(--lav);
  color: #1d0d3a;
}
.due-rel-baixa {
  background: var(--sky);
  color: #062033;
}

/* Links sublinhados estilo console analítico */
.link-due {
  background: none;
  border: 0;
  padding: 0;
  color: var(--sky);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
  font-weight: 500;
  transition: color 0.12s ease;
}
.link-due:hover {
  color: #bfe6ff;
}

/* ==========================================================================
   7. ABA 01 · GRAFO RELACIONAL & PAINEL LATERAL
   ========================================================================== */
.due-split-rel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.due-split-int {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.due-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.due-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 980px) {
  .due-split-rel,
  .due-split-int,
  .due-grid-2col,
  .due-grid-3col {
    grid-template-columns: 1fr;
  }
}

.due-fig-box {
  position: relative;
  height: 495px;
  min-height: 495px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 45%, #123a63 0%, #0a2540 72%),
    linear-gradient(to right, rgba(143, 211, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(143, 211, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  border: 1px solid var(--line);
  overflow: hidden;
}

/* ==========================================================================
   REGRAS GERAIS PARA ÍCONES E SVGs NO SISTEMA FORENSE
   ========================================================================== */
/* Ícones vetoriais padronizados com controle estrito de dimensões */
.due-search-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
}
.fin-ico-sm, svg.fin-ico-sm {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
}
.fin-ico-md, svg.fin-ico-md {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
}
.fin-ico-lg, svg.fin-ico-lg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
}

/* Grid Robusto para Aba 04 Financeira */
.fin-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .fin-main-grid {
    grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1.15fr);
  }
}

.fin-bars-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 240px;
  width: 100%;
}

.due-graph-svg {
  width: 100%;
  height: 495px;
  display: block;
}

#graphCanvas text {
  paint-order: stroke;
  stroke: #0a2540;
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes dueOrbitSpinCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dueOrbitSpinCCW {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

#graphCanvas .node-group {
  opacity: 1 !important;
  transition: filter 0.18s ease;
}

#graphCanvas .node-group:hover {
  filter: brightness(1.25) drop-shadow(0 0 10px rgba(143, 211, 255, 0.5));
}

@keyframes dueSonarWave {
  0% {
    transform: scale(0.95);
    opacity: 0.72;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes dueEdgeFlow {
  to {
    stroke-dashoffset: -28;
  }
}

@keyframes dueCoreBreath {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

#graphCanvas .due-orbit-cw {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueOrbitSpinCW 52s linear infinite;
}

#graphCanvas .due-orbit-ccw {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueOrbitSpinCCW 74s linear infinite;
}

#graphCanvas .due-halo-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueOrbitSpinCW 14s linear infinite;
}

#graphCanvas .due-sonar-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueSonarWave 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

#graphCanvas .due-sonar-ring-2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueSonarWave 2.6s cubic-bezier(0.16, 1, 0.3, 1) 1.3s infinite;
}

#graphCanvas .due-core-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: dueCoreBreath 2.4s ease-in-out infinite;
}

#graphCanvas .due-edge-flow {
  animation: dueEdgeFlow 1.6s linear infinite;
}

.due-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--mute);
}

.due-legend i {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 2.5px solid;
  vertical-align: middle;
  margin-right: 7px;
}

.due-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(35, 76, 117, 0.65);
  font-size: 15px;
}
.due-row:last-child {
  border-bottom: 0;
}

/* ==========================================================================
   8. TABELAS EDITORIAIS LIMPAS (02 · CONTRATAÇÕES, 03 · DOCUMENTAL, AUDITORIA)
   ========================================================================== */
.due-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.due-table th,
.due-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.due-table th {
  color: var(--mute);
  font-weight: 500;
  font-size: 14px;
  background: transparent;
}

.due-table tbody tr {
  transition: background-color 0.12s ease;
}

.due-table tbody tr.due-tr-click {
  cursor: pointer;
}

.due-table tbody tr:hover {
  background: var(--bg3) !important;
}

.due-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Barras Horizontais de Concentração e Lances (.due-hb) */
.due-hb {
  display: grid;
  grid-template-columns: minmax(8em, 12.5em) minmax(0, 1fr) max-content;
  gap: 8px 14px;
  align-items: center;
  font-size: 14px;
  margin: 7px 0;
}

.due-hb-track {
  height: 14px;
  border-radius: 3px;
  background: var(--bg3);
  overflow: hidden;
}

.due-hb-fill {
  display: block;
  height: 100%;
  background: var(--sky);
  border-radius: 3px;
  transition: width 0.35s ease;
}

.due-hb-fill.hot {
  background: var(--pink);
}

.due-hb b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==========================================================================
   9. ABA 04 · FINANCEIRA (COLUNAS INTERATIVAS PAGO × MEDIDO)
   ========================================================================== */
.due-months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 225px;
  padding-top: 12px;
}

.due-mo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 205px;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(10, 37, 64, 0.35);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.due-mo-btn:hover {
  border-color: var(--line);
  background: rgba(20, 58, 97, 0.45);
}

.due-mo-btn.active {
  border-color: var(--sky);
  background: rgba(20, 58, 97, 0.65);
}

.due-mo-pair {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 148px;
}

.due-mo-pair i {
  display: block;
  width: 18px;
  border-radius: 3px 3px 0 0;
  transition: height 0.25s ease;
}

.due-mo-btn span {
  font-size: 13px;
  color: var(--mute);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due-mo-btn.active span {
  color: var(--ink);
  font-weight: 600;
}

.due-dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 14px;
  margin: 10px 0;
  font-size: 14px;
}
.due-dl dt {
  color: var(--mute);
}
.due-dl dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   10. ABA 05 · INTEGRIDADE E RISCOS (ALERTAS + VELOCÍMETRO SVG + 5 DIMENSÕES)
   ========================================================================== */
.due-alert-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: 10px;
  padding: 15px 17px;
  background: var(--bg2);
  transition: border-color 0.15s ease;
}

.due-alert-card.is-hip {
  border-left-color: var(--lav);
}

.due-alert-card.is-done {
  border-left-color: var(--mute);
  opacity: 0.78;
}

.due-alert-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.due-alert-card h3 {
  margin: 0;
  font-size: 18.5px;
  font-weight: 600;
  color: var(--ink);
}

.due-alert-card code {
  font-family: var(--font-mono);
  color: var(--pink);
  font-weight: 700;
  margin-right: 7px;
  font-size: 16px;
}

.due-alert-card.is-hip code {
  color: var(--lav);
}

.due-alert-card ul {
  margin: 8px 0;
  padding-left: 18px;
  font-size: 15px;
}

.due-alert-card textarea,
.due-alert-card input[type="text"] {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}

/* Velocímetro Semicircular SVG */
.due-gauge {
  position: relative;
  aspect-ratio: 2 / 1.15;
  max-width: 390px;
  margin: 0 auto;
}

.due-gauge svg {
  width: 100%;
  height: 100%;
}

.due-gauge-num {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  text-align: center;
}

.due-gauge-num b {
  display: block;
  font-size: clamp(50px, 6.2vw, 76px);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.due-gauge-num span {
  color: var(--mute);
  font-size: 13.5px;
}

.due-prio-label {
  text-align: center;
  margin-top: 6px;
  font-size: 21px;
  font-weight: 600;
}

.due-gauge-note {
  color: var(--mute);
  font-size: 13px;
  text-align: center;
  margin: 4px 0 0;
}

.due-dim-row {
  padding: 12px 0;
}

.due-dim-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14.5px;
}

.due-dim-row header b {
  font-weight: 600;
}

.due-dim-row header span {
  color: var(--mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.due-dim-row small {
  display: block;
  color: var(--mute);
  font-size: 12.5px;
  margin: 2px 0 8px;
}

.due-meter {
  height: 6px;
  border-radius: 3px;
  background: var(--bg3);
  margin-top: 8px;
  overflow: hidden;
}

.due-meter i {
  display: block;
  height: 100%;
  background: var(--sky);
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* ==========================================================================
   11. ABA 06 · PATRIMÔNIO E LARANJAS
   ========================================================================== */
.due-rel-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.due-person-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 17px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.due-person-card:hover {
  border-color: var(--sky);
  transform: translateY(-1px);
}

.due-person-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.due-person-head h3 {
  margin: 0;
  font-size: 17.5px;
  font-weight: 600;
  color: #ffffff;
}

.due-person-role {
  font-size: 13.5px;
  color: var(--sky);
  margin-top: 2px;
}

.due-person-card p {
  margin: 8px 0 0;
  font-size: 14.8px;
  color: var(--mute);
  line-height: 1.48;
}

.due-ind-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--bg2);
}

.due-ind-card.rel-media {
  border-left-color: var(--lav);
}

.due-ind-card.rel-baixa {
  border-left-color: var(--sky);
}

.due-alert-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.due-ind-card h3 {
  margin: 0;
  font-size: 18.5px;
  font-weight: 600;
  color: #ffffff;
}

.due-rf-code {
  font-family: var(--font-mono);
  color: var(--mute);
  font-weight: 700;
  margin-right: 8px;
}

.due-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--mute);
  margin-top: 3px;
}

.due-sub-h {
  margin: 13px 0 4px;
  font-size: 14px;
  color: var(--mute);
  font-weight: 600;
}

.due-ind-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 6px;
}

.due-ind-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

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

.due-ind-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 76, 117, 0.65);
}

.due-plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.due-bullet-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

.due-num-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

.due-drawer-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   12. ABA DOSSIÊ PRELIMINAR — FOLHA DE PAPEL EDITORIAL (#f7f9fc)
   ========================================================================== */
.due-doc-paper {
  background: #f7f9fc !important;
  color: #0a2540 !important;
  border-radius: 10px !important;
  border: 1px solid #d0dce8 !important;
  padding: clamp(22px, 3vw, 38px) !important;
  max-width: 920px;
  box-shadow: 0 18px 48px rgba(3, 12, 24, 0.55) !important;
}

.due-doc-paper h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0a2540 !important;
}

.due-doc-paper h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0a2540 !important;
}

.due-doc-paper .due-doc-meta {
  color: #4b6178;
  font-size: 13px;
  margin-top: 2px;
}

.due-doc-paper .due-doc-stamp {
  display: inline-block;
  border: 2px solid #c2185b;
  color: #c2185b;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12.5px;
  margin: 10px 0 4px;
  letter-spacing: 0.04em;
}

.due-doc-paper p,
.due-doc-paper li {
  color: #0a2540;
  font-size: 15px;
  line-height: 1.6;
}

.due-doc-paper ul {
  margin: 6px 0;
  padding-left: 20px;
}

.due-doc-paper li {
  margin-bottom: 6px;
}

.due-doc-paper .ep-pill {
  background: #ffffff;
}
.due-doc-paper .ep-fato { color: #0b5c8a; border-color: #0b5c8a; }
.due-doc-paper .ep-vinculo { color: #0f766e; border-color: #0f766e; }
.due-doc-paper .ep-indicio { color: #c2185b; border-color: #c2185b; }
.due-doc-paper .ep-hipotese { color: #6b3fb3; border-color: #6b3fb3; }
.due-doc-paper .ep-divergencia { color: #b45309; border-color: #b45309; }
.due-doc-paper .ep-lacuna { color: #4b6178; border-color: #4b6178; }

.due-doc-paper .link-due {
  color: #0b5c8a !important;
  font-weight: 600;
}
.due-doc-paper .link-due:hover {
  color: #063957 !important;
}

/* ==========================================================================
   13. GAVETA LATERAL DE DOCUMENTO (.due-drawer) & TRECHO GRIFADO (.paper-excerpt)
   ========================================================================== */
.due-drawer {
  width: min(560px, 100%);
  height: 100%;
  background: #0c2b4a;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 20px 22px 42px;
  box-shadow: -16px 0 48px rgba(2, 10, 20, 0.75);
  animation: dueDrawerIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.due-drawer-wide {
  width: min(720px, 100%);
}

@keyframes dueDrawerIn {
  from { transform: translateX(24px); opacity: 0.8; }
  to { transform: translateX(0); opacity: 1; }
}

.due-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.due-drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.due-cruz-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
}

.due-cruz-body {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}

.due-drawer-h2 {
  margin: 3px 0 0;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.18;
  color: #ffffff;
}

.due-drawer-crumbs {
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 5px;
}

.due-drawer h3 {
  margin: 18px 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mute);
}

.paper-excerpt {
  background: #f7f9fc;
  color: #0a2540;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.62;
  box-shadow: inset 0 0 0 1px rgba(10, 37, 64, 0.08);
}

.paper-excerpt mark {
  background: #ffd6e2;
  color: #0a2540;
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 600;
}

/* ==========================================================================
   14. DROPDOWN DE BUSCA RÁPIDA, PILLS E TOAST
   ========================================================================== */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0c2b4a;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(3, 12, 24, 0.85);
  max-height: 380px;
  overflow-y: auto;
  z-index: 90;
}

.search-item {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.search-item:hover {
  background: var(--bg3);
}
.search-item-meta {
  font-size: 12px;
  color: var(--mute);
}
.search-footer {
  padding: 8px 13px;
  background: #081d33;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--mute);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid transparent;
}
.pill-pj { background: rgba(143, 211, 255, 0.14); color: var(--sky); border-color: rgba(143, 211, 255, 0.35); }
.pill-pf { background: rgba(127, 227, 208, 0.14); color: var(--mint); border-color: rgba(127, 227, 208, 0.35); }
.pill-orgao { background: rgba(201, 166, 255, 0.14); color: var(--lav); border-color: rgba(201, 166, 255, 0.35); }

.section-h {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin: 16px 0 8px;
}

.kv-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.kv {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
.kv span {
  display: block;
  font-size: 11.5px;
  color: var(--mute);
}
.kv strong {
  font-size: 13.5px;
  color: var(--ink);
}

.chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  margin: 2px 4px 2px 0;
}

.due-footer {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
  color: var(--mute);
  background: #081d33;
}

.due-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sky);
  color: #062033;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  display: none;
  z-index: 80;
  box-shadow: 0 10px 30px rgba(3, 12, 24, 0.65);
}

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

@media (max-width: 600px) {
  .due-hb {
    grid-template-columns: minmax(0, 1fr) max-content;
  }
  .due-hb-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ==========================================================================
   15. ANIMAÇÕES COREOGRAFADAS & ACABAMENTO EXECUTIVO DAS TELAS INTERNAS
   ========================================================================== */
@keyframes dueTabFadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dueCardStagger {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dueBarGrowX {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes dueBarGrowY {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}

@keyframes duePulseRing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 92, 138, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 92, 138, 0);
  }
}

@keyframes dueSweepShimmer {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(220%);
  }
}

.tab-pane:not(.hidden) {
  animation: dueTabFadeUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.due-stagger-item {
  animation: dueCardStagger 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Banner Editorial de Síntese no topo de cada aba (.due-lead) */
.due-lead {
  position: relative;
  margin: 0 0 18px;
  padding: 13px 18px 13px 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(20, 62, 104, 0.72) 0%, rgba(13, 43, 74, 0.38) 100%);
  border: 1px solid rgba(56, 118, 178, 0.48);
  border-left: 3.5px solid var(--sky);
  color: #eaf3fc;
  font-size: 16px;
  max-width: 100%;
  line-height: 1.5;
  box-shadow: 0 6px 20px rgba(3, 12, 24, 0.22);
}

/* Tabelas Executivas com Hover Luminoso, Pills e Botões Cápsula */
.due-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

.due-table thead th {
  padding: 12px 14px;
  color: #a9c5e0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(7, 25, 45, 0.55);
  border-bottom: 1px solid rgba(56, 114, 171, 0.55);
}

.due-table thead th:first-child {
  border-top-left-radius: 8px;
}
.due-table thead th:last-child {
  border-top-right-radius: 8px;
}

.due-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(38, 82, 125, 0.55);
  vertical-align: middle;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.due-table tbody tr {
  animation: dueCardStagger 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.due-table tbody tr:hover td {
  background: rgba(25, 72, 120, 0.55) !important;
}

.due-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--sky);
}

/* Chips e Badges internos das tabelas */
.due-doc-title-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #ffffff;
}

.due-doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(14, 42, 74, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.due-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.due-org-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #e2e8f0;
}

.due-ext-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.15);
}

.due-rf-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255, 92, 138, 0.14);
  border: 1px solid rgba(255, 92, 138, 0.45);
  color: #ff94b2;
  cursor: pointer;
  transition: all 0.15s ease;
}

.due-rf-pill-btn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  animation: duePulseRing 2s infinite;
}

.due-rf-pill-btn:hover {
  background: rgba(255, 92, 138, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.due-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 6px;
  background: rgba(143, 211, 255, 0.11);
  border: 1px solid rgba(143, 211, 255, 0.32);
  color: var(--sky);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.due-action-pill:hover {
  background: var(--sky);
  color: #051c30;
  border-color: var(--sky);
  transform: translateX(1px);
}

/* Barras Horizontais Animadas (02 · Contratações) */
.due-hb {
  display: grid;
  grid-template-columns: minmax(9em, 13em) minmax(0, 1fr) max-content;
  gap: 10px 14px;
  align-items: center;
  font-size: 14.5px;
  margin: 10px 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(8, 28, 49, 0.35);
  border: 1px solid rgba(43, 88, 133, 0.35);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.due-hb:hover {
  border-color: rgba(143, 211, 255, 0.45);
  background: rgba(16, 48, 82, 0.55);
}

.due-hb-track {
  height: 16px;
  border-radius: 5px;
  background: rgba(7, 23, 41, 0.85);
  border: 1px solid rgba(43, 88, 133, 0.45);
  overflow: hidden;
  position: relative;
}

.due-hb-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b9eff 0%, #8fd3ff 100%);
  border-radius: 4px;
  transform-origin: left center;
  animation: dueBarGrowX 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 0 12px rgba(143, 211, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.due-hb-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  animation: dueSweepShimmer 3.2s infinite ease-in-out;
}

.due-hb-fill.hot {
  background: linear-gradient(90deg, #e11d74 0%, #ff5c8a 100%);
  box-shadow: 0 0 14px rgba(255, 92, 138, 0.45);
}

/* Colunas Verticais Animadas (04 · Financeira) */
.due-mo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 230px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 40, 72, 0.45) 0%, rgba(9, 23, 44, 0.85) 100%);
  border: 1px solid rgba(56, 114, 173, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: visible;
}

.due-mo-btn:hover {
  border-color: rgba(143, 211, 255, 0.7);
  background: linear-gradient(180deg, rgba(22, 56, 98, 0.65) 0%, rgba(12, 32, 60, 0.95) 100%);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 12px rgba(143, 211, 255, 0.2);
}

.due-mo-btn.active {
  border-color: #38bdf8 !important;
  background: linear-gradient(180deg, rgba(28, 70, 120, 0.85) 0%, rgba(14, 38, 70, 0.98) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 24px rgba(56, 189, 248, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(-2px);
}

.due-mo-pair {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  height: 160px;
}

.due-mo-pair i {
  display: block;
  width: 24px;
  border-radius: 6px 6px 0 0;
  transform-origin: bottom center;
  animation: dueBarGrowY 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}

.due-mo-pair i.bar-pago {
  background: linear-gradient(180deg, #ff7ea5 0%, #e11d74 70%, #9f1239 100%) !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.due-mo-pair i.bar-medido {
  background: linear-gradient(180deg, #bae6fd 0%, #38bdf8 70%, #0284c7 100%) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

/* Cards de Alertas (05) & Indicadores Patrimoniais (06) */
.due-alert-card,
.due-ind-card {
  position: relative;
  border: 1px solid rgba(50, 102, 153, 0.68);
  border-left: 4px solid var(--pink);
  border-radius: 11px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #12385e 0%, #0d2b4a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(3, 12, 24, 0.3);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: dueCardStagger 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.due-alert-card:hover,
.due-ind-card:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 211, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 32px rgba(2, 10, 20, 0.48);
}

.due-person-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #133b63 0%, #0d2b4a 100%);
  border: 1px solid rgba(56, 114, 171, 0.65);
  border-top: 3px solid var(--pink);
  border-radius: 11px;
  padding: 17px 19px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(3, 12, 24, 0.3);
  transition: all 0.18s ease;
  animation: dueCardStagger 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.due-person-card:nth-child(3) {
  border-top-color: var(--lav);
}

.due-person-card:hover {
  border-color: var(--sky);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2, 10, 20, 0.5);
}

.due-ind-box {
  padding: 13px 15px;
  border-radius: 9px;
  background: rgba(8, 27, 48, 0.55);
  border: 1px solid rgba(43, 88, 133, 0.45);
}

/* ==========================================================================
   TIPOGRAFIA INSTITUCIONAL AMPLIADA E VIVA (LEGIBILIDADE TOTAL)
   ========================================================================== */
.due-money-flow-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #102a4a 0%, #0a1c32 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.due-money-flow-card.is-highlight {
  border-color: rgba(231, 207, 134, 0.6) !important;
  background: linear-gradient(180deg, #18385e 0%, #0e2440 100%) !important;
  box-shadow: 0 0 20px rgba(231, 207, 134, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* Badges e Padrões de Desvio (Aba 08) */
.rd-padrao-card {
  padding: 14px 18px;
  border-radius: 10px;
  transition: all 0.18s ease;
}

.rd-padrao-card:hover {
  transform: translateX(3px);
}

/* Tipografia aumentada para Matriz e Rastreamento */
#tab-rastreio-dinheiro, #tab-visao-geral {
  font-size: 14.5px;
}

#topEntidadesTable td {
  padding: 14px 16px !important;
  font-size: 14px !important;
}

#topEntidadesTable th {
  padding: 12px 16px !important;
  font-size: 12px !important;
  color: #7dd3fc !important;
}

.due-kpi b {
  font-size: 28px !important;
  letter-spacing: -0.02em;
}

.due-kpi span {
  font-size: 13px !important;
  font-weight: 600;
  color: #cbd5e1;
}
.due-stage-card {
  position: relative;
  padding: 14px 15px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(19, 58, 97, 0.78) 0%, rgba(11, 36, 63, 0.85) 100%);
  border: 1px solid rgba(56, 114, 171, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.due-stage-card:hover {
  transform: translateY(-2px);
  border-color: var(--sky);
}

.due-money-flow-card {
  position: relative;
  padding: 16px 17px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 54, 92, 0.82) 0%, rgba(10, 33, 58, 0.9) 100%);
  border: 1px solid rgba(56, 114, 171, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(3, 12, 24, 0.28);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.due-money-flow-card.is-highlight {
  border-color: rgba(231, 207, 134, 0.75);
  background: linear-gradient(180deg, rgba(32, 65, 102, 0.9) 0%, rgba(14, 41, 71, 0.95) 100%);
}

.due-money-flow-card:hover {
  transform: translateY(-2px);
  border-color: var(--sky);
}
