/* Identidade visual do painel: preto, amarelo e destaques em ciano. */
:root {
  --bg: #08090b;
  --panel: #121417;
  --panel2: #191c20;
  --line: #303439;
  --muted: #acb5b9;
  --accent: #f4d35e;
  --cyan: #62dce8;
  --warn: #f4d35e;
  --danger: #f19399;
  background: var(--bg);
  color: #f1f3f3;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); }
a { color: var(--cyan); }
:focus-visible { outline-color: var(--cyan); }

/* Navegação discreta; o item atual é o elemento de maior destaque. */
.sidebar {
  background: #0d0f12;
  border-right-color: var(--line);
}
.brand { color: #f7f7f4; }
.brand small { color: #9ca8ad; }
.brand-mark {
  border-color: var(--accent);
  color: var(--accent);
  background: #242116;
}
.nav-stack a { color: #c7ccce; }
.nav-stack a:hover { background: #1a1d20; color: #fff; }
.nav-stack a[aria-current="page"] {
  background: #2a2619;
  color: #ffe78a;
  box-shadow: inset 3px 0 var(--accent);
}
.nav-caption { color: #929c9f; }
.nav-badge { color: #d9c681; }
.sidebar-footer { border-top-color: var(--line); }
.text-button { color: var(--cyan); }
.topbar { border-bottom-color: var(--line); }
.topbar a { color: var(--cyan); }
.eyebrow { color: var(--accent); }
.heading h1 { color: #fff; }

/* Superfícies simples e bastante espaço entre grupos de informação. */
.stat-card, .card, .callout {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}
.stat-card strong { color: #f8f8f5; }
.stat-card[data-state="ok"] strong { color: var(--cyan); }
.stat-card[data-state="bad"] strong { color: var(--danger); }
.card h2, .section-header h2 { color: #f8f8f5; }
.metric-row b { color: #e9eeee; }
.footnote { color: #9ca8ad; }
.status-ok { color: var(--cyan); }
.status-bad { color: var(--danger); }
.request-row { border-bottom-color: var(--line); }
.request-row code, .route code { color: #e7ecee; }

.meter {
  width: 100%;
  height: 8px;
  background: #292c30;
  border-radius: 99px;
}
.meter::-webkit-meter-bar { background: #292c30; border: 0; border-radius: 99px; }
.meter::-webkit-meter-optimum-value { background: var(--cyan); border-radius: 99px; }
.meter::-moz-meter-bar { background: var(--cyan); border-radius: 99px; }

/* Três passos visíveis no início de cada módulo. */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.section-nav a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17191c;
  color: #f4d35e;
  font-size: 13px;
  font-weight: 700;
}
.section-nav a:hover { background: #262416; text-decoration: none; }
.quick-actions { margin-bottom: 4px; }
.quick-actions a, .secondary, .pill {
  background: #191c20;
  border-color: #39434a;
  color: var(--cyan);
}
.quick-actions a:hover, .secondary:hover { background: #23282d; }
.pill { color: #d3d9da; }
.route { background: #0d0f12; border-color: var(--line); }
.route details { color: var(--muted); }
.route summary:hover { color: var(--cyan); }
.method { background: var(--accent); color: #171407; }
.method.get { background: var(--cyan); color: #071b1d; }
.method.patch { background: #eec887; color: #201608; }

/* Ações amarelas; entrada de dados neutra e foco ciano. */
input, select, textarea {
  background: #0b0d10;
  border-color: #3b4145;
  color: #f0f3f3;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
.primary { background: var(--accent); color: #1b1708; }
.primary:hover { background: #ffe48a; }
.result { border-top-color: var(--line); }
.result pre { background: #090b0d; border-color: var(--line); color: #e8eff0; }
.alert { background: #2b1d20; border-color: #78474d; color: #ffd3d5; }
.callout { background: #262216; border-color: #75683d; color: #f8e5a4; }

/* Entrada consistente com o restante do painel, sem efeitos excessivos. */
.login-body {
  background: radial-gradient(circle at 50% -15%, #2b2819 0, #08090b 52%);
}
.login-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 20px 60px #0008;
}
.login-card h1 { color: #fff; margin-bottom: 28px; }
.login-card .primary { justify-self: stretch; }

/* Guias, exemplos copiáveis e fluxos acessíveis nas páginas dos módulos. */
.route-top { align-items: flex-start; }
.route-top .route-url { flex: 1 1 360px; padding-top: 5px; font-size: 12px; }
.route-top button { margin-left: 0; white-space: nowrap; font-size: 12px; padding: 7px 10px; }
.route-top button:last-child { margin-left: auto; }
.route details { border-top: 1px solid var(--line); padding-top: 10px; }
.example-toolbar { display: flex; justify-content: flex-end; margin: 12px 0 7px; }
.example-toolbar button { margin-left: 0; font-size: 12px; }
.request-example { padding: 15px; margin: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #090b0d; color: #e9eff0; font: 12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: pre; }
.example-block + .example-block { margin-top: 22px; }
.example-block h3 { font-size: 14px; margin: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.guide-card { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #0d0f12; }
.guide-card h3 { color: var(--accent); font-size: 14px; margin: 0 0 7px; }
.guide-card p { color: var(--muted); font-size: 13px; margin: 0; }
.integration-base { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 20px 0 2px; padding: 12px 15px; border: 1px solid #46636b; border-radius: 9px; background: #11232a; font-size: 13px; }
.integration-base code { flex: 1; min-width: 200px; color: #e6f7f8; overflow-wrap: anywhere; }
.integration-base button { font-size: 12px; }
.integration-downloads { margin-top: 14px; }
.flow-diagram { display: flex; align-items: stretch; gap: 8px; margin-top: 23px; overflow-x: auto; }
.flow-box { flex: 1 0 140px; position: relative; display: grid; place-items: center; min-height: 86px; padding: 12px; border: 1px solid #46636b; border-radius: 9px; background: #11232a; color: #e6f7f8; text-align: center; font-size: 12px; font-weight: 700; }
.flow-box + .flow-box { margin-left: 12px; }
.flow-box + .flow-box::before { content: "→"; position: absolute; left: -21px; color: var(--accent); font-size: 21px; }
.flow-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.flow-lane { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #0d0f12; }
.flow-lane h3 { margin: 0 0 16px; color: var(--accent); font-size: 15px; }
.flow-steps { list-style: none; display: grid; gap: 20px; margin: 0; padding: 0; counter-reset: stage; }
.flow-steps li { position: relative; min-height: 38px; padding: 8px 8px 8px 43px; border: 1px solid #375058; border-radius: 8px; background: #142127; font-size: 13px; counter-increment: stage; }
.flow-steps li::before { content: counter(stage); position: absolute; top: 6px; left: 9px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: #09171b; font-weight: 800; }
.flow-steps li:not(:last-child)::after { content: "↓"; position: absolute; left: 17px; bottom: -21px; color: var(--accent); font-size: 18px; }
.flow-outcome { margin: 18px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: #252318; color: #f6e4a7; font-size: 13px; }
.guide-rules { margin: 20px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.guide-rules li + li { margin-top: 7px; }
.protocol-form { display: flex; align-items: end; gap: 12px; margin: 20px 0; }
.protocol-form label { flex: 1; }
.protocol-form button { flex: 0 0 auto; }
.protocol-status { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #0d0f12; }
.protocol-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; overflow-wrap: anywhere; }
.protocol-timeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; padding: 0; margin: 21px 0; list-style: none; }
.protocol-step { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 7px 2px; color: #8e9a9f; text-align: center; font-size: 11px; }
.step-dot { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid #526068; border-radius: 50%; font-size: 14px; font-weight: 900; }
.protocol-step.done .step-dot { background: var(--cyan); border-color: var(--cyan); color: #071517; }
.protocol-step.current .step-dot { border-color: var(--accent); box-shadow: 0 0 0 3px #f4d35e22; }
.protocol-step.error .step-dot { border-color: var(--danger); color: var(--danger); }
.protocol-step.done { color: #d9f7f7; }
.protocol-step.current { color: var(--accent); }
.protocol-step.error { color: var(--danger); }
.status-line { color: var(--cyan); font-weight: 700; }
.protocol-links { display: flex; flex-wrap: wrap; gap: 18px; }
.request-id-link { display: block; margin-top: 3px; color: var(--cyan); font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-nav a { text-align: center; padding: 9px 5px; font-size: 11px; }
  .sidebar { border-bottom: 1px solid var(--line); }
  .guide-grid, .flow-lanes { grid-template-columns: 1fr; }
  .flow-diagram { flex-direction: column; overflow: visible; }
  .flow-box { flex-basis: auto; min-height: 54px; }
  .flow-box + .flow-box { margin-left: 0; margin-top: 13px; }
  .flow-box + .flow-box::before { content: "↓"; left: 50%; top: -23px; transform: translateX(-50%); }
  .protocol-form { flex-wrap: wrap; }
  .protocol-form label { flex-basis: 100%; }
  .protocol-timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .request-example { white-space: pre-wrap; overflow-wrap: anywhere; }
}
