/* ============================================================================
   Console do Córtex — folha única, sem build.

   Todo seletor começa com `cx-`. Sem framework de CSS, o prefixo é o que
   substitui o isolamento — uma colisão de `.card` já quebrou o tema escuro
   nos mockups (spec §11).

   Paleta Vamooh com semântica fixa: magenta é AÇÃO, lime é APROVAÇÃO,
   cinzas são ESTRUTURA. Texto sobre lime é preto, decisão da marca.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --cx-magenta: #c6226f;
  --cx-magenta-600: #a01d5a;
  --cx-magenta-50: #fdf2f7;
  --cx-lime: #bed530;
  --cx-lime-700: #5d6e0e;
  --cx-lime-50: #f1f5d2;
  --cx-amber: #b58308;
  --cx-amber-50: #fef7e0;
  --cx-red: #b42318;
  --cx-red-50: #fee4e2;

  --cx-surface: #ffffff;
  --cx-raise: #f8f8f9;
  --cx-hair: #ececef;
  --cx-hair-2: #dedee2;
  --cx-ink: #111214;
  --cx-dim: #71717a;
  --cx-faint: #9b9ba4;

  --cx-s1: #c6226f;
  --cx-s2: #6b7f0c;
  --cx-s3: #0891b2;
  --cx-ghost: #c8c8ce;
  --cx-grid: #f0f0f2;

  --cx-shadow: 0 1px 2px rgba(17, 18, 20, 0.05), 0 12px 32px rgba(17, 18, 20, 0.09);
  --cx-lw: 1.25;
  --cx-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --cx-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* Degraus próprios para o escuro — validados separadamente, não é inversão. */
html[data-cx-tema='escuro'] {
  --cx-surface: #0a0a0a;
  --cx-raise: #141416;
  --cx-hair: #242427;
  --cx-hair-2: #2f2f33;
  --cx-ink: #ededf0;
  --cx-dim: #9b9ba4;
  --cx-faint: #5f5f68;
  --cx-magenta: #e0468d;
  --cx-magenta-600: #c6226f;
  --cx-magenta-50: #2a0f1c;
  --cx-lime: #c9e03f;
  --cx-lime-700: #c9e03f;
  --cx-lime-50: #1c2109;
  --cx-amber: #e0a800;
  --cx-amber-50: #241c05;
  --cx-red: #f0685c;
  --cx-red-50: #2a1210;
  --cx-s1: #d43f7f;
  --cx-s2: #7d941a;
  --cx-s3: #0d9cbf;
  --cx-ghost: #3a3a40;
  --cx-grid: #1c1c1f;
  --cx-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 12px 32px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  html:not([data-cx-tema='claro']) {
    --cx-surface: #0a0a0a;
    --cx-raise: #141416;
    --cx-hair: #242427;
    --cx-hair-2: #2f2f33;
    --cx-ink: #ededf0;
    --cx-dim: #9b9ba4;
    --cx-faint: #5f5f68;
    --cx-magenta: #e0468d;
    --cx-magenta-600: #c6226f;
    --cx-magenta-50: #2a0f1c;
    --cx-lime: #c9e03f;
    --cx-lime-700: #c9e03f;
    --cx-lime-50: #1c2109;
    --cx-amber: #e0a800;
    --cx-amber-50: #241c05;
    --cx-red: #f0685c;
    --cx-red-50: #2a1210;
    --cx-s1: #d43f7f;
    --cx-s2: #7d941a;
    --cx-s3: #0d9cbf;
    --cx-ghost: #3a3a40;
    --cx-grid: #1c1c1f;
    --cx-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 12px 32px rgba(0, 0, 0, 0.55);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 400 16px/1.65 var(--cx-sans);
  color: var(--cx-ink);
  background: var(--cx-surface);
  -webkit-font-smoothing: antialiased;
}

.cx-mono {
  font-family: var(--cx-mono);
}

/* ——— topo ——— */
.cx-topo {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 44px;
  border-bottom: 1px solid var(--cx-hair);
  background: var(--cx-surface);
}
.cx-marca {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}
.cx-marca-ponto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cx-magenta);
  flex: none;
}
.cx-marca b {
  font: 700 15px/1 var(--cx-sans);
  letter-spacing: -0.03em;
}
.cx-marca span {
  color: var(--cx-faint);
  font-size: 15px;
  letter-spacing: -0.02em;
}
.cx-menu {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 32px;
}
.cx-menu a {
  color: var(--cx-dim);
  text-decoration: none;
  font-size: 14.5px;
  position: relative;
  padding: 2px 0;
}
.cx-menu a:hover {
  color: var(--cx-ink);
}
.cx-menu a[aria-current='page'] {
  color: var(--cx-ink);
  font-weight: 500;
}
.cx-menu a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -21px;
  height: 2px;
  background: var(--cx-magenta);
}
.cx-quem {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 400 13px/1 var(--cx-mono);
  color: var(--cx-faint);
}
.cx-tema-btn,
.cx-sair {
  background: none;
  border: 0;
  color: var(--cx-faint);
  font: 400 13px/1 var(--cx-sans);
  cursor: pointer;
  padding: 0;
}
.cx-tema-btn:hover,
.cx-sair:hover {
  color: var(--cx-magenta);
}

/* ——— estrutura ——— */
.cx-pagina {
  padding: 44px;
}
.cx-md {
  display: grid;
  grid-template-columns: 288px 1fr;
  gap: 76px;
  align-items: start;
}
.cx-olho {
  font: 500 11px/1 var(--cx-sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cx-faint);
  display: block;
  margin-bottom: 20px;
}
.cx-h1 {
  font: 600 26px/1.15 var(--cx-sans);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.cx-sub {
  color: var(--cx-dim);
  font-size: 15px;
  margin: 0 0 40px;
}
.cx-bloco {
  margin-top: 50px;
}

/* ——— lista de apps ——— */
.cx-app {
  display: block;
  padding: 17px 0;
  border-top: 1px solid var(--cx-hair);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.cx-app:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.cx-app-nome {
  font: 500 15px/1.3 var(--cx-mono);
  letter-spacing: -0.02em;
  color: var(--cx-dim);
}
.cx-app-sub {
  font-size: 13px;
  color: var(--cx-faint);
  margin-top: 5px;
}
.cx-app[aria-current='true'] .cx-app-nome {
  color: var(--cx-ink);
}
.cx-app[aria-current='true']::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 26px;
  background: var(--cx-magenta);
  border-radius: 2px;
}
.cx-ponto {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: 1px;
}
.cx-ponto-ok {
  background: var(--cx-lime);
}
.cx-ponto-no {
  background: var(--cx-red);
}

/* ——— detalhe ——— */
.cx-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cx-nome {
  font: 500 26px/1.15 var(--cx-mono);
  letter-spacing: -0.035em;
  margin: 0;
}
.cx-estado {
  color: var(--cx-dim);
  font-size: 14px;
  margin-top: 9px;
}
.cx-pulso {
  margin-top: 26px;
}
.cx-pulso svg {
  display: block;
  width: 100%;
  height: 44px;
}
.cx-pulso-cap {
  display: flex;
  justify-content: space-between;
  font: 400 11px/1 var(--cx-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cx-faint);
  margin-top: 9px;
}

/* ——— permissões ——— */
.cx-grant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--cx-hair);
}
.cx-grant:first-of-type {
  border-top: 0;
}
.cx-grant-alvo {
  font: 400 14.5px/1.5 var(--cx-mono);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cx-grant-alvo b {
  font-weight: 500;
}
.cx-grant-alvo em {
  font-style: normal;
  color: var(--cx-faint);
}

/* ——— números ——— */
.cx-figs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.cx-figs b {
  display: block;
  font: 500 26px/1.2 var(--cx-mono);
  letter-spacing: -0.04em;
}
.cx-figs span {
  font-size: 13.5px;
  color: var(--cx-dim);
}
.cx-neg {
  color: var(--cx-red);
}

/* ——— chips ——— */
.cx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 11.5px/1 var(--cx-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 99px;
  white-space: nowrap;
}
.cx-chip-ok {
  background: var(--cx-lime-50);
  color: var(--cx-lime-700);
}
.cx-chip-warn {
  background: var(--cx-amber-50);
  color: var(--cx-amber);
}
.cx-chip-no {
  background: var(--cx-red-50);
  color: var(--cx-red);
}
.cx-chip-mute {
  background: var(--cx-raise);
  color: var(--cx-dim);
}

/* ——— botões ——— */
.cx-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 10px;
  font: 500 14.5px/1 var(--cx-sans);
  padding: 13px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: none;
  color: var(--cx-ink);
}
.cx-btn-primario {
  background: var(--cx-magenta);
  color: #fff;
}
.cx-btn-primario:hover {
  background: var(--cx-magenta-600);
}
/* Preto sobre lime — decisão consolidada da marca, não escolha de contraste. */
.cx-btn-aprovar {
  background: var(--cx-lime);
  color: #000;
}
.cx-btn-fantasma {
  border-color: var(--cx-hair-2);
  background: var(--cx-surface);
}
.cx-btn-fantasma:hover {
  border-color: var(--cx-magenta);
  color: var(--cx-magenta);
}
.cx-btn-quieto {
  color: var(--cx-dim);
  padding: 13px 10px;
}
.cx-btn-perigo {
  background: var(--cx-red);
  color: #fff;
}
.cx-btn-pequeno {
  padding: 9px 15px;
  font-size: 13.5px;
}
.cx-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.cx-acoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ——— formulários ——— */
.cx-campo {
  margin-bottom: 26px;
}
.cx-campo label {
  display: block;
  font: 500 13.5px/1 var(--cx-sans);
  margin-bottom: 9px;
}
.cx-entrada,
.cx-select {
  width: 100%;
  border: 1px solid var(--cx-hair-2);
  border-radius: 10px;
  padding: 13px 15px;
  font: 400 15px/1.4 var(--cx-sans);
  color: var(--cx-ink);
  background: var(--cx-surface);
}
.cx-entrada.cx-mono {
  font-family: var(--cx-mono);
  font-size: 14px;
}
.cx-entrada:focus,
.cx-select:focus {
  outline: none;
  border-color: var(--cx-magenta);
  box-shadow: 0 0 0 3px var(--cx-magenta-50);
}
.cx-ajuda {
  font-size: 13px;
  color: var(--cx-dim);
  margin-top: 9px;
}
.cx-erro {
  font-size: 13px;
  color: var(--cx-red);
  margin-top: 9px;
}
.cx-so-leitura {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--cx-raise);
  border: 1px dashed var(--cx-hair-2);
  border-radius: 10px;
  padding: 15px 17px;
  font: 400 14px/1.4 var(--cx-mono);
  word-break: break-all;
}

/* ——— avisos ——— */
.cx-aviso {
  background: var(--cx-amber-50);
  border-radius: 11px;
  padding: 16px 18px;
  color: var(--cx-amber);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 18px 0;
}
.cx-aviso b {
  display: block;
  color: var(--cx-ink);
  font-size: 14px;
  margin-bottom: 5px;
}

/* ——— login ——— */
.cx-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cx-login-caixa {
  width: min(400px, 100%);
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair);
  border-radius: 16px;
  padding: 44px 40px;
}
.cx-login-caixa h1 {
  font: 600 21px/1.25 var(--cx-sans);
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.cx-login-caixa p {
  color: var(--cx-dim);
  font-size: 14.5px;
  margin: 0 0 32px;
}

/* ——— vazio ——— */
.cx-vazio {
  border: 1px dashed var(--cx-hair-2);
  border-radius: 18px;
  padding: 88px 40px 92px;
  text-align: center;
  background: var(--cx-surface);
}
.cx-vazio svg {
  margin: 0 auto 40px;
  display: block;
}
.cx-vazio h2 {
  font: 600 23px/1.3 var(--cx-sans);
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.cx-vazio p {
  color: var(--cx-dim);
  font-size: 15.5px;
  margin: 0 auto 32px;
  max-width: 50ch;
}

/* ——— erro contido, na horizontal ——— */
.cx-falha {
  border: 1px solid var(--cx-hair-2);
  border-radius: 18px;
  padding: 32px 34px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--cx-surface);
}
.cx-falha-marca {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cx-red);
  color: var(--cx-red);
  font: 500 19px/1 var(--cx-sans);
}
.cx-falha h2 {
  font: 600 18px/1.3 var(--cx-sans);
  margin: 0 0 8px;
}
.cx-falha p {
  color: var(--cx-dim);
  font-size: 14.5px;
  margin: 0 0 8px;
}
.cx-falha-detalhe {
  font: 400 13px/1.6 var(--cx-mono);
  color: var(--cx-faint);
  margin: 14px 0 22px;
}

/* ——— toasts ——— */
.cx-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  z-index: 50;
  max-width: 430px;
}
.cx-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair);
  border-left: 3px solid var(--cx-lime);
  border-radius: 12px;
  padding: 15px 17px;
  box-shadow: var(--cx-shadow);
  overflow: hidden;
}
.cx-toast-bad {
  border-left-color: var(--cx-red);
}
.cx-toast-info {
  border-left-color: var(--cx-hair-2);
}
.cx-toast-texto {
  flex: 1;
  font-size: 14.5px;
  line-height: 1.5;
}
.cx-toast-texto small {
  display: block;
  color: var(--cx-dim);
  font-size: 13px;
  margin-top: 3px;
}
.cx-toast-acao {
  background: none;
  border: 0;
  color: var(--cx-magenta);
  font: 500 13.5px/1 var(--cx-sans);
  cursor: pointer;
  white-space: nowrap;
}
.cx-toast-x {
  background: none;
  border: 0;
  color: var(--cx-faint);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}
.cx-toast-barra {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--cx-lime);
}

/* ——— diálogo ——— */
.cx-dialogo {
  border: 1px solid var(--cx-hair);
  border-radius: 18px;
  box-shadow: var(--cx-shadow);
  background: var(--cx-surface);
  color: var(--cx-ink);
  padding: 32px 34px;
  width: min(460px, 92vw);
}
.cx-dialogo::backdrop {
  background: rgba(17, 18, 20, 0.45);
}
.cx-dialogo h2 {
  font: 600 18px/1.35 var(--cx-sans);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.cx-dialogo p {
  color: var(--cx-dim);
  font-size: 14.5px;
  margin: 0;
}
.cx-dialogo-acoes {
  display: flex;
  gap: 11px;
  justify-content: flex-end;
  margin-top: 26px;
}

/* ——— formulários largos e estreitos ——— */
.cx-form-estreito {
  max-width: 520px;
}
.cx-conceder {
  max-width: 560px;
}

/* ——— filtros ——— */
.cx-filtros {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.cx-seg {
  display: inline-flex;
  border: 1px solid var(--cx-hair-2);
  border-radius: 10px;
  overflow: hidden;
}
.cx-seg button {
  border: 0;
  background: var(--cx-surface);
  color: var(--cx-dim);
  padding: 11px 17px;
  font: 500 13.5px/1 var(--cx-sans);
  cursor: pointer;
  border-right: 1px solid var(--cx-hair);
}
.cx-seg button:last-child {
  border-right: 0;
}
.cx-seg button.cx-seg-on {
  background: var(--cx-magenta-50);
  color: var(--cx-magenta);
}
.cx-select-curto {
  width: auto;
  min-width: 170px;
}

/* ——— tabela: sem zebra, sem grade vertical ——— */
.cx-tabela-caixa {
  border: 1px solid var(--cx-hair);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cx-surface);
}
.cx-tabela {
  width: 100%;
  border-collapse: collapse;
}
.cx-tabela thead th {
  position: sticky;
  top: 0;
  background: var(--cx-raise);
  text-align: left;
  font: 500 11px/1 var(--cx-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cx-faint);
  padding: 16px 22px;
  border-bottom: 1px solid var(--cx-hair);
  white-space: nowrap;
}
.cx-tabela td {
  padding: 19px 22px;
  border-bottom: 1px solid var(--cx-hair);
  font-size: 14.5px;
  vertical-align: middle;
}
.cx-tabela tbody tr:last-child td {
  border-bottom: 0;
}
.cx-tabela tbody tr:hover td {
  background: var(--cx-raise);
}
.cx-tabela th.cx-num,
.cx-tabela td.cx-num {
  text-align: right;
  font-family: var(--cx-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.cx-tabela thead th.cx-num {
  font-family: var(--cx-sans);
}
.cx-tabela-quem {
  font: 500 14px/1.3 var(--cx-mono);
}
.cx-tabela-acao {
  color: var(--cx-dim);
  font-size: 13.5px;
  margin-top: 3px;
}

/* ——— drawer: 740px, sem escurecer o fundo ——— */
.cx-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(740px, 92vw);
  background: var(--cx-surface);
  border-left: 1px solid var(--cx-hair);
  box-shadow: var(--cx-shadow);
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.cx-drawer[hidden] {
  display: none;
}
.cx-drawer-topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 30px 18px;
  border-bottom: 1px solid var(--cx-hair);
}
.cx-drawer-titulo {
  font: 600 17px/1.3 var(--cx-sans);
  margin: 0 0 9px;
  letter-spacing: -0.02em;
}
.cx-drawer-quem {
  color: var(--cx-dim);
  font-size: 13.5px;
  margin-top: 9px;
}
.cx-drawer-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--cx-faint);
  font-size: 13px;
  white-space: nowrap;
}
.cx-drawer-nav a,
.cx-drawer-nav-off {
  border: 1px solid var(--cx-hair-2);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--cx-ink);
  text-decoration: none;
}
.cx-drawer-nav-off {
  opacity: 0.35;
  cursor: default;
}
.cx-drawer-pos {
  margin: 0 6px;
}
.cx-drawer-corpo {
  padding: 26px 30px;
  overflow: auto;
  flex: 1;
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.cx-drawer-secao .cx-olho {
  margin-bottom: 14px;
}
.cx-kv {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 11px 18px;
  font-size: 14px;
  margin: 0;
}
.cx-kv dt {
  color: var(--cx-dim);
}
.cx-kv dd {
  margin: 0;
  font-family: var(--cx-mono);
  font-size: 13.5px;
  word-break: break-word;
}

/* ——— custos ——— */
.cx-bloco-custo {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--cx-hair);
}
.cx-bloco-custo:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.cx-pergunta {
  font: 500 13px/1.5 var(--cx-sans);
  color: var(--cx-magenta);
  margin: 0 0 5px;
}
.cx-h2 {
  font: 600 20px/1.3 var(--cx-sans);
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}
.cx-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--cx-hair);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cx-surface);
}
.cx-kpi {
  padding: 26px 28px;
  border-right: 1px solid var(--cx-hair);
}
.cx-kpi:last-child {
  border-right: 0;
}
.cx-kpi-rot {
  font-size: 13.5px;
  color: var(--cx-dim);
}
.cx-kpi-val {
  font: 600 34px/1.15 var(--cx-sans);
  letter-spacing: -0.035em;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}
.cx-kpi-delta {
  font-size: 13.5px;
  margin-top: 9px;
  display: flex;
  gap: 9px;
  align-items: center;
}
/* Custo subindo NÃO é aprovação — âmbar, nunca lime. */
.cx-delta-alta {
  color: var(--cx-amber);
}
.cx-delta-baixa {
  color: var(--cx-lime-700);
}
.cx-delta-neutro,
.cx-faint {
  color: var(--cx-faint);
}
.cx-cartao {
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair);
  border-radius: 14px;
  padding: 26px 28px 22px;
}
.cx-plot {
  display: block;
  width: 100%;
  height: auto;
}
.cx-plot text {
  font-family: var(--cx-sans);
  font-size: 10.5px;
  fill: var(--cx-faint);
}
.cx-gl {
  stroke: var(--cx-grid);
  stroke-width: 1;
}
.cx-zero {
  stroke: var(--cx-hair-2);
  stroke-width: 1;
}
.cx-linha {
  stroke: var(--cx-magenta);
  stroke-width: var(--cx-lw);
}
.cx-ghost-linha {
  stroke: var(--cx-ghost);
  stroke-width: calc(var(--cx-lw) * 0.85);
}
.cx-area {
  fill: var(--cx-magenta);
  opacity: 0.08;
}
.cx-sm {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cx-smc {
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair);
  border-radius: 13px;
  padding: 20px 22px;
}
.cx-smc-topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.cx-smc-nome {
  font: 500 14px/1 var(--cx-mono);
  letter-spacing: -0.02em;
}
.cx-smc-valor {
  font: 500 16px/1 var(--cx-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.cx-smc-nota {
  color: var(--cx-faint);
  font-size: 12.5px;
  margin-top: 5px;
}
.cx-smc-alerta {
  color: var(--cx-amber);
  font-size: 12.5px;
  margin-top: 5px;
}
.cx-plot-pequeno {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 14px;
}
.cx-barras {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 14px 18px;
  align-items: center;
  font-size: 14px;
}
.cx-barras-nome {
  font: 400 13.5px/1 var(--cx-mono);
  color: var(--cx-dim);
  text-align: right;
}
.cx-barra {
  height: 20px;
  border-radius: 4px;
  display: block;
  background: var(--cx-hair-2);
}
.cx-barra-destaque {
  background: var(--cx-magenta);
}
.cx-barras-valor {
  font: 500 14px/1 var(--cx-mono);
  font-variant-numeric: tabular-nums;
}
.cx-tabela-alt {
  margin-top: 18px;
}
.cx-tabela-alt summary {
  color: var(--cx-dim);
  font-size: 13.5px;
  cursor: pointer;
}
.cx-tabela-alt table {
  margin-top: 14px;
}
.cx-ajuda-topo {
  margin-top: -12px;
  margin-bottom: 20px;
}
.cx-visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ——— painel ———
   A hierarquia da tela é a hierarquia da atenção: a frase de estado, depois o
   que precisa de ação, depois o pulso, e só então o histórico e o dinheiro. */
.cx-painel {
  max-width: 1320px;
}
.cx-painel-hero {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--cx-hair);
}
.cx-frase {
  font: 600 40px/1.1 var(--cx-sans);
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  max-width: 22ch;
}
.cx-frase-sub {
  color: var(--cx-dim);
  font-size: 15.5px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cx-painel-secao {
  margin-bottom: 52px;
}
.cx-painel-cab {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.cx-painel-cab .cx-h2 {
  margin: 0;
}
.cx-painel-mais {
  color: var(--cx-magenta);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.cx-painel-mais:hover {
  text-decoration: underline;
}

/* Achados: um cartão por coisa que precisa de decisão. */
.cx-achados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}
.cx-achado {
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair);
  border-left: 3px solid var(--cx-hair-2);
  border-radius: 14px;
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
}
.cx-achado-incidente {
  border-left-color: var(--cx-red);
}
.cx-achado-atencao {
  border-left-color: var(--cx-amber);
}
.cx-achado-nota {
  border-left-color: var(--cx-hair-2);
}
.cx-achado-topo {
  margin-bottom: 12px;
}
/* Selo com marca + palavra: estado nunca fica só na cor. */
.cx-selo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 11px/1 var(--cx-sans);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.cx-selo-marca {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cx-selo-incidente {
  color: var(--cx-red);
}
.cx-selo-incidente .cx-selo-marca {
  background: var(--cx-red-50);
  color: var(--cx-red);
}
.cx-selo-atencao {
  color: var(--cx-amber);
}
.cx-selo-atencao .cx-selo-marca {
  background: var(--cx-amber-50);
  color: var(--cx-amber);
}
.cx-selo-nota {
  color: var(--cx-faint);
}
.cx-selo-nota .cx-selo-marca {
  background: var(--cx-raise);
  color: var(--cx-faint);
}
.cx-achado-titulo {
  font: 600 17.5px/1.3 var(--cx-sans);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.cx-achado-detalhe {
  color: var(--cx-dim);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.cx-achado-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--cx-magenta);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.cx-achado-link:hover {
  text-decoration: underline;
}

/* Nada pendente é uma resposta, não uma tela vazia. */
.cx-tranquilo {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--cx-lime-50);
  border: 1px solid var(--cx-hair);
  border-radius: 14px;
  padding: 22px 26px;
}
.cx-tranquilo b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
}
.cx-tranquilo span {
  color: var(--cx-dim);
  font-size: 14px;
}

.cx-cartao-pulso {
  padding-bottom: 12px;
}
.cx-plot-pulso {
  margin-bottom: 6px;
}
.cx-ponta {
  fill: var(--cx-magenta);
}
.cx-pico {
  fill: var(--cx-surface);
  stroke: var(--cx-magenta);
  stroke-width: 1.5;
}
.cx-plot-pico {
  font-size: 11px !important;
  fill: var(--cx-dim) !important;
}
.cx-pulso-figs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--cx-hair);
  margin-top: 14px;
  padding-top: 20px;
}
.cx-pulso-figs b {
  display: block;
  font: 600 26px/1.1 var(--cx-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.cx-pulso-figs span {
  display: block;
  color: var(--cx-faint);
  font-size: 12.5px;
  margin-top: 4px;
}

.cx-duas {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 64px;
  align-items: start;
}

/* Linha do tempo: execuções e mudanças humanas no mesmo trilho. */
.cx-lt {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.cx-lt::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--cx-hair);
}
.cx-lt-item {
  display: grid;
  grid-template-columns: 17px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid var(--cx-hair);
}
.cx-lt-item:last-child {
  border-bottom: 0;
}
.cx-lt-marca {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--cx-surface);
  border: 1px solid var(--cx-hair-2);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--cx-faint);
  z-index: 1;
}
.cx-lt-incidente .cx-lt-marca {
  border-color: var(--cx-red);
  background: var(--cx-red-50);
  color: var(--cx-red);
}
.cx-lt-permissao .cx-lt-marca {
  border-color: var(--cx-magenta);
  background: var(--cx-magenta-50);
  color: var(--cx-magenta);
}
.cx-lt-texto {
  font-size: 14.5px;
  line-height: 1.4;
}
.cx-lt-meta {
  color: var(--cx-faint);
  font-size: 12.5px;
  margin-top: 3px;
}
.cx-lt-lado {
  text-align: right;
  white-space: nowrap;
}
.cx-lt-quando {
  display: block;
  color: var(--cx-faint);
  font-size: 12.5px;
}
.cx-lt-valor {
  display: block;
  font: 500 12.5px/1.5 var(--cx-mono);
  font-variant-numeric: tabular-nums;
  color: var(--cx-dim);
}
/* Do lado direito de uma mudança vem o PORQUÊ, que é prosa — mono ali faria
   uma frase parecer identificador. */
.cx-lt-permissao .cx-lt-valor,
.cx-lt-sistema .cx-lt-valor {
  font-family: var(--cx-sans);
  font-weight: 400;
  font-style: italic;
  max-width: 22ch;
  white-space: normal;
}

@media (max-width: 1100px) {
  .cx-duas {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .cx-frase {
    font-size: 32px;
  }
  .cx-pulso-figs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cx-cartao-lista {
  padding: 8px 22px;
}
.cx-mini-app {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--cx-hair);
  color: inherit;
  text-decoration: none;
}
.cx-mini-app:last-child {
  border-bottom: 0;
}
.cx-mini-app:hover .cx-mini-app-nome {
  color: var(--cx-magenta);
}
.cx-mini-app-nome {
  font-size: 14.5px;
  font-weight: 500;
}
.cx-mini-app-quando {
  color: var(--cx-faint);
  font-size: 12.5px;
  white-space: nowrap;
}

/* Na coluna estreita do painel, o rótulo da barra não precisa dos 130px da
   tela de Custos — o espaço vale mais para a barra. */
.cx-duas .cx-barras {
  grid-template-columns: 92px 1fr auto;
}
