/* =========================================
   Tipografia geral do Mermaid (fora do bloco)
========================================= */
.mermaid{
  font-size:28px !important;
  line-height:1.3 !important;
}

/* =========================================
   Caixa do fluxo (flow-wrap)
========================================= */
.flow-wrap{
  position:relative;
  box-sizing:border-box;
  width:100%;
  margin:1rem 0 2rem;
  padding:.75rem;
  border-radius:14px;

  /* Base (modo claro) */
  --flow-bg: var(--md-default-bg-color, #ffffff);
  --flow-border: var(--md-default-fg-color--lighter, rgba(0,0,0,.12));

  /* Painéis (subgrafos) e contraste */
  --cluster-bg:#f8fafc;
  --cluster-stroke:#cbd5e1;

  /* Arestas e rótulos */
  --edge-stroke:#475569;
  --edge-label-bg:rgba(15,23,42,.04);

  /* Texto e sombras */
  --node-fg:#0f172a;
  --shadow: drop-shadow(0 1px .4px rgba(2,6,23,.15))
            drop-shadow(0 8px 12px rgba(2,6,23,.06));

  background:var(--flow-bg);
  border:1px solid var(--flow-border);

  height:auto;
  min-height:72vh;
  max-height:none;
  overflow:visible;
}

/* Tema escuro (Material: slate) – CONTRASTE REFORÇADO */
[data-md-color-scheme="slate"] .flow-wrap{
  --flow-bg:#0b1220;
  --flow-border:rgba(255,255,255,.10);

  /* painel do subgrafo (fundo) e borda */
  --cluster-bg:#0f172a;         /* +claro que o fundo da página */
  --cluster-stroke:#39557a;     /* azul-acinzentado visível */

  /* arestas e chips mais legíveis */
  --edge-stroke:#b7cde3;
  --edge-label-bg:rgba(255,255,255,.12);

  /* texto claro + sombra mais presente */
  --node-fg:#f8fafc;
  --shadow: drop-shadow(0 1px .6px rgba(0,0,0,.55))
            drop-shadow(0 12px 22px rgba(0,0,0,.35));
}

/* Tipografia dentro do diagrama */
.flow-wrap .mermaid{ font-size:20px !important; line-height:1.35 !important; }

/* Palco do pan/zoom */
.flow-wrap .pz-stage{ display:inline-block; width:auto; height:auto; will-change:transform; touch-action:none; }

/* SVG alvo do pan/zoom */
.flow-wrap .mermaid svg{
  display:block; width:100%; height:auto; max-width:none; max-height:none;
  transform-origin:0 0; cursor:grab;
}
.flow-wrap.is-grabbing .mermaid svg{ cursor:grabbing; user-select:none; }

/* =========================================
   Controles de zoom
========================================= */
.pz-controls{ position:absolute; top:.5rem; right:.5rem; display:flex; gap:.4rem; z-index:2; }
.pz-btn{
  border:1px solid var(--flow-border);
  background:var(--flow-bg);
  color:var(--node-fg);
  border-radius:.6rem; padding:.38rem .62rem; font:inherit; line-height:1; cursor:pointer;
  box-shadow:0 1px 2px rgba(0,0,0,.06); transition:.16s ease;
}
.pz-btn:hover{ transform:translateY(-1px); }
.pz-btn:focus{ outline:2px solid var(--md-accent-fg-color, #3f51b5); outline-offset:2px; }
[data-md-color-scheme="slate"] .flow-wrap .pz-btn{ box-shadow:none; border-color:#2a3f5a; background:#0f172a; color:#f8fafc; }

/* =========================================
   Arestas e rótulos
========================================= */
.flow-wrap .mermaid .edgePath path{
  stroke:var(--edge-stroke) !important; stroke-width:1.8px;
  vector-effect:non-scaling-stroke;
}
.flow-wrap .mermaid .edgeLabel rect{ fill:var(--edge-label-bg); stroke:transparent; rx:4; ry:4; }
.flow-wrap .mermaid .edgeLabel text{ fill:var(--node-fg) !important; font-weight:600; }

/* =========================================
   SUBGRAFOS (LOGIN, MENU…)
========================================= */
.flow-wrap .mermaid g.cluster > rect{
  fill:var(--cluster-bg) !important; stroke:var(--cluster-stroke) !important;
  stroke-width:1.4px; rx:12; ry:12; filter:var(--shadow);
}
.flow-wrap .mermaid g.cluster text{ fill:var(--node-fg) !important; font-weight:700; letter-spacing:.02em; }

/* =========================================
   SOMBRA nos nós
========================================= */
.flow-wrap .mermaid g.node > rect,
.flow-wrap .mermaid g.node > circle,
.flow-wrap .mermaid g.node > path{ filter:var(--shadow); }

/* Texto dos nós (inclui htmlLabels) */
.flow-wrap .mermaid g.node foreignObject,
.flow-wrap .mermaid g.node foreignObject *{ color:var(--node-fg) !important; }

/* ====== AJUSTE CRÍTICO DE LEGIBILIDADE (ESCURO) ====== */
/* Força texto claro mesmo que o Mermaid 'classDef' defina outra cor */
[data-md-color-scheme="slate"] .flow-wrap .mermaid .node text,
[data-md-color-scheme="slate"] .flow-wrap .mermaid .node tspan,
[data-md-color-scheme="slate"] .flow-wrap .mermaid .label text,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.cluster text{
  fill:#f8fafc !important;
}

/* =========================================
   PALETA (modo CLARO)
========================================= */
:root{
  --c-blue-50:#dbeafe; --c-sky-700:#0369a1;
  --c-green-50:#dcfce7; --c-green-600:#16a34a; --c-emerald-500:#10b981;
  --c-indigo-50:#eef2ff; --c-indigo-600:#4f46e5;
  --c-violet-50:#ede9fe; --c-violet-500:#a78bfa;
  --c-rose-50:#ffe4e6; --c-rose-600:#e11d48;
  --c-slate-50:#f8fafc; --c-slate-400:#94a3b8;
  --c-amber-50:#fff7ed; --c-amber-600:#d97706;
}

.flow-wrap .mermaid g.node[class*="endpoint_get"] rect,
.flow-wrap .mermaid g.node[class*="endpoint_get"] circle,
.flow-wrap .mermaid g.node[class*="endpoint_get"] path{ fill:var(--c-blue-50) !important; stroke:var(--c-sky-700) !important; }
.flow-wrap .mermaid g.node[class*="endpoint_post"] rect,
.flow-wrap .mermaid g.node[class*="endpoint_post"] circle,
.flow-wrap .mermaid g.node[class*="endpoint_post"] path{ fill:var(--c-green-50) !important; stroke:var(--c-green-600) !important; }
.flow-wrap .mermaid g.node[class*="endpoint_auto"] rect,
.flow-wrap .mermaid g.node[class*="endpoint_auto"] circle,
.flow-wrap .mermaid g.node[class*="endpoint_auto"] path{ fill:#e0f2fe !important; stroke:#38bdf8 !important; stroke-dasharray:4 2; }
.flow-wrap .mermaid g.node[class*="ui_input"] rect,
.flow-wrap .mermaid g.node[class*="ui_input"] circle,
.flow-wrap .mermaid g.node[class*="ui_input"] path{ fill:var(--c-indigo-50) !important; stroke:var(--c-indigo-600) !important; }
.flow-wrap .mermaid g.node[class*="ui_button"] rect,
.flow-wrap .mermaid g.node[class*="ui_button"] circle,
.flow-wrap .mermaid g.node[class*="ui_button"] path{ fill:var(--c-violet-50) !important; stroke:var(--c-violet-500) !important; }
.flow-wrap .mermaid g.node[class*="ui_button_primary"] rect,
.flow-wrap .mermaid g.node[class*="ui_button_primary"] circle,
.flow-wrap .mermaid g.node[class*="ui_button_primary"] path{ fill:#d1fae5 !important; stroke:var(--c-emerald-500) !important; }
.flow-wrap .mermaid g.node[class*="ui_button_upload"] rect,
.flow-wrap .mermaid g.node[class*="ui_button_upload"] circle,
.flow-wrap .mermaid g.node[class*="ui_button_upload"] path{ fill:var(--c-rose-50) !important; stroke:var(--c-rose-600) !important; }
.flow-wrap .mermaid g.node[class*="auto_evt"] rect,
.flow-wrap .mermaid g.node[class*="auto_evt"] circle,
.flow-wrap .mermaid g.node[class*="auto_evt"] path{ fill:var(--c-slate-50) !important; stroke:var(--c-slate-400) !important; stroke-dasharray:4 2; }
.flow-wrap .mermaid g.node[class*="decision"] rect,
.flow-wrap .mermaid g.node[class*="decision"] circle,
.flow-wrap .mermaid g.node[class*="decision"] path{ fill:var(--c-amber-50) !important; stroke:var(--c-amber-600) !important; }
.flow-wrap .mermaid g.node[class*="done"] rect,
.flow-wrap .mermaid g.node[class*="done"] circle,
.flow-wrap .mermaid g.node[class*="done"] path{ fill:#d1fae5 !important; stroke:#059669 !important; stroke-dasharray:4 2; }

/* htmlLabels (CLARO) */
.flow-wrap .mermaid g.node foreignObject > div{
  padding:.2rem .5rem; border-radius:.6rem; border:1px solid currentColor; filter:var(--shadow);
}
.flow-wrap .mermaid g.node[class*="endpoint_get"]    foreignObject > div{ background:#dbeafe !important; color:#0f172a !important; border-color:#0369a1 !important; }
.flow-wrap .mermaid g.node[class*="endpoint_post"]   foreignObject > div{ background:#dcfce7 !important; color:#0f172a !important; border-color:#16a34a !important; }
.flow-wrap .mermaid g.node[class*="endpoint_auto"]   foreignObject > div{ background:#e0f2fe !important; color:#0f172a !important; border-color:#38bdf8 !important; }
.flow-wrap .mermaid g.node[class*="ui_input"]        foreignObject > div{ background:#eef2ff !important; color:#111827 !important; border-color:#4f46e5 !important; }
.flow-wrap .mermaid g.node[class*="ui_button"]       foreignObject > div{ background:#ede9fe !important; color:#1f2937 !important; border-color:#a78bfa !important; }
.flow-wrap .mermaid g.node[class*="ui_button_primary"] foreignObject > div{ background:#bbf7d0 !important; color:#064e3b !important; border-color:#10b981 !important; }
.flow-wrap .mermaid g.node[class*="ui_button_upload"] foreignObject > div{ background:#ffe4e6 !important; color:#7f1d1d !important; border-color:#e11d48 !important; }
.flow-wrap .mermaid g.node[class*="auto_evt"]        foreignObject > div{ background:#f8fafc !important; color:#0f172a !important; border-color:#94a3b8 !important; }
.flow-wrap .mermaid g.node[class*="decision"]        foreignObject > div{ background:#fff7ed !important; color:#78350f !important; border-color:#d97706 !important; }
.flow-wrap .mermaid g.node[class*="done"]            foreignObject > div{ background:#d1fae5 !important; color:#064e3b !important; border-color:#059669 !important; }

/* =========================================
   PALETA — MODO ESCURO (AJUSTE DE CONTRASTE)
   > fundos dos nós MAIS CLAROS que o painel
   > bordas bem luminosas
========================================= */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] path{ fill:#123e71 !important; stroke:#7cc0ff !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] path{ fill:#144b36 !important; stroke:#4ade80 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] path{ fill:#164564 !important; stroke:#7cc0ff !important; stroke-dasharray:4 2; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] path{ fill:#2a3a85 !important; stroke:#a5b4fc !important; }

/* Botões (retângulos) */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] path:not(circle){
  fill:#46308a !important; stroke:#c4b5fd !important;
}
/* Botão circular "Contrate Agora" – roxo padrão, borda luminosa */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] circle{
  fill:#5b48d6 !important;           /* um pouco mais claro que o retangular */
  stroke:#e2dcff !important;
  stroke-width:2px;
}

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] path{ fill:#115e49 !important; stroke:#34d399 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] path{ fill:#71243b !important; stroke:#ff8da1 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] path{ fill:#132135 !important; stroke:#b7cde3 !important; stroke-dasharray:4 2; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] path{ fill:#4a2f0f !important; stroke:#fbbf24 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] path{ fill:#0b6b52 !important; stroke:#34d399 !important; }

/* htmlLabels (ESCURO) – mesmas cores dos nós + texto claro */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"]    foreignObject > div{ background:#123e71 !important; border-color:#7cc0ff !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"]   foreignObject > div{ background:#144b36 !important; border-color:#4ade80 !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"]   foreignObject > div{ background:#164564 !important; border-color:#7cc0ff !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"]        foreignObject > div{ background:#2a3a85 !important; border-color:#a5b4fc !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"]       foreignObject > div{ background:#46308a !important; border-color:#c4b5fd !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] foreignObject > div{ background:#115e49 !important; border-color:#34d399 !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] foreignObject > div{ background:#71243b !important; border-color:#ff8da1 !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"]        foreignObject > div{ background:#132135 !important; border-color:#b7cde3 !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"]        foreignObject > div{ background:#4a2f0f !important; border-color:#fbbf24 !important; color:#f8fafc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"]            foreignObject > div{ background:#0b6b52 !important; border-color:#34d399 !important; color:#f8fafc !important; }

/* =========================================
   Layout opcional
========================================= */
@media (min-width:76.1875em){ .md-grid{ max-width:90rem; } }
.md-typeset .flow-wrap{ height:auto !important; min-height:72vh !important; max-height:none !important; }

/* ============================
   Dark mode — contrast & text
============================ */
[data-md-color-scheme="slate"] .flow-wrap{
  --flow-bg:#0b1220;
  --flow-border:rgba(255,255,255,.10);

  /* painéis (subgrafos) com contraste real */
  --cluster-bg:#0f172a;
  --cluster-stroke:#39557a;

  /* arestas e chips legíveis */
  --edge-stroke:#b7cde3;
  --edge-label-bg:rgba(255,255,255,.12);

  /* texto claro */
  --node-fg:#f9fbff;

  --shadow: drop-shadow(0 1px .6px rgba(0,0,0,.55))
            drop-shadow(0 12px 22px rgba(0,0,0,.35));
}

/* força TEXTO CLARO em qualquer label (SVG e htmlLabels) */
[data-md-color-scheme="slate"] .flow-wrap .mermaid text,
[data-md-color-scheme="slate"] .flow-wrap .mermaid tspan,
[data-md-color-scheme="slate"] .flow-wrap .mermaid .label text,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.cluster text{
  fill:#f9fbff !important;
}
[data-md-color-scheme="slate"] .flow-wrap .mermaid .nodeLabel,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node foreignObject > div,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node foreignObject *{
  color:#f9fbff !important;
}

/* bordas e chips */
[data-md-color-scheme="slate"] .flow-wrap .mermaid .edgePath path{
  stroke:var(--edge-stroke) !important; stroke-width:1.8px;
}
[data-md-color-scheme="slate"] .flow-wrap .mermaid .edgeLabel rect{
  fill:var(--edge-label-bg); stroke:transparent; rx:4; ry:4;
}
[data-md-color-scheme="slate"] .flow-wrap .mermaid .edgeLabel text{
  fill:#f9fbff !important; font-weight:600;
}

/* subgrafos/cartões */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.cluster > rect{
  fill:var(--cluster-bg) !important; stroke:var(--cluster-stroke) !important;
  stroke-width:1.4px; rx:12; ry:12; filter:var(--shadow);
}

/* paleta dos nós no dark — fundos mais claros que o painel */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"] path{ fill:#123e71 !important; stroke:#7cc0ff !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"] path{ fill:#144b36 !important; stroke:#4ade80 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"] path{ fill:#164564 !important; stroke:#7cc0ff !important; stroke-dasharray:4 2; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"] path{ fill:#2a3a85 !important; stroke:#a5b4fc !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] path:not(circle){
  fill:#46308a !important; stroke:#c4b5fd !important;
}
/* CÍRCULO “Contrate Agora” – roxo do tema + borda luminosa */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"] circle{
  fill:#6b5cff !important;
  stroke:#e8e4ff !important;
  stroke-width:2px;
}

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] path{ fill:#115e49 !important; stroke:#34d399 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] path{ fill:#71243b !important; stroke:#ff8da1 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"] path{ fill:#132135 !important; stroke:#b7cde3 !important; stroke-dasharray:4 2; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"] path{ fill:#4a2f0f !important; stroke:#fbbf24 !important; }

[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] rect,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] circle,
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"] path{ fill:#0b6b52 !important; stroke:#34d399 !important; }

/* htmlLabels no dark (mesmas cores dos nós) */
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_get"]    foreignObject > div{ background:#123e71 !important; border-color:#7cc0ff !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_post"]   foreignObject > div{ background:#144b36 !important; border-color:#4ade80 !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="endpoint_auto"]   foreignObject > div{ background:#164564 !important; border-color:#7cc0ff !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_input"]        foreignObject > div{ background:#2a3a85 !important; border-color:#a5b4fc !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button"]       foreignObject > div{ background:#46308a !important; border-color:#c4b5fd !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_primary"] foreignObject > div{ background:#115e49 !important; border-color:#34d399 !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="ui_button_upload"] foreignObject > div{ background:#71243b !important; border-color:#ff8da1 !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="auto_evt"]        foreignObject > div{ background:#132135 !important; border-color:#b7cde3 !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="decision"]        foreignObject > div{ background:#4a2f0f !important; border-color:#fbbf24 !important; }
[data-md-color-scheme="slate"] .flow-wrap .mermaid g.node[class*="done"]            foreignObject > div{ background:#0b6b52 !important; border-color:#34d399 !important; }

/* ============================
   Cards de fornecedores
   ============================ */

/* Garante 2 ou mais cards por linha, com largura mínima agradável */
.md-typeset .grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* Link ocupando todo o card, mas com cor de texto herdada (preta) */
.md-typeset .card-link {
  display: block;
  height: 100%;
  color: inherit;              /* tira aquele verde do link */
  text-decoration: none;
}

/* Mantém texto preto também no hover */
.md-typeset .card-link:hover {
  color: inherit;
  text-decoration: none;
}

/* Centraliza a logo dentro do card */
.md-typeset img.card-logo {
  display: block;
  margin: 0 auto 0.75rem;      /* centralizado + espaço embaixo */
}

/* Status “Documentação em construção” mais discreto */
.md-typeset .card-status {
  display: block;
  margin-top: 0.5rem;
  opacity: .6;
  font-size: .9em;
}
