/* BrowserMate Help — Shared Styles */
:root {
  --sidebar-bg: #1a1f2e;
  --sidebar-text: #94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-hover: #2d3748;
  --sidebar-accent: #3b82f6;
  --sidebar-group: #4b5563;
  --content-bg: #ffffff;
  --content-text: #1e293b;
  --content-muted: #64748b;
  --border: #e2e8f0;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --note-bg: #eff6ff;
  --note-border: #3b82f6;
  --warn-bg: #fffbeb;
  --warn-border: #f59e0b;
  --tip-bg: #f0fdf4;
  --tip-border: #22c55e;
  --danger-bg: #fef2f2;
  --danger-border: #ef4444;
  --sidebar-width: 262px;
  --header-height: 54px;
}

*{box-sizing:border-box;margin:0;padding:0}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--content-text);
  background: #f8fafc;
}

/* ── Header ─────────────────────────────────────── */
.doc-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--sidebar-bg);
  border-bottom: 1px solid #2d3748;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 200;
  gap: 1rem;
}

.doc-header .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  white-space: nowrap;
}

.logo-ring-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-ring-wrap::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(from 0deg, #2f89fc, #a855f7, #06b6d4, #7c3aed, #2f89fc);
  animation: logo-ring-spin 2s linear infinite;
  z-index: 0;
}

@keyframes logo-ring-spin {
  to { transform: rotate(360deg); }
}

.logo-ring-inner {
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  background: #0d1117;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(47,137,252,0.45));
}

.logo-text {
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 40%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-header .spacer { flex: 1; }

.header-badge {
  background: #1e3a5f;
  color: #7dd3fc;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ── Layout ──────────────────────────────────────── */
.doc-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ── Sidebar ─────────────────────────────────────── */
.doc-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 1.25rem 0 2rem;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
  z-index: 100;
}

.doc-sidebar::-webkit-scrollbar { width: 7px; }
.doc-sidebar::-webkit-scrollbar-track { background: transparent; }
.doc-sidebar::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb:hover { background: var(--sidebar-accent); }

.nav-group { margin-bottom: 1.5rem; }

.nav-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sidebar-accent);
  padding: 0 1.25rem 0.5rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.nav-group a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 1.25rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.865rem;
  border-left: 2px solid transparent;
  transition: all 0.12s;
}

.nav-group a:hover {
  color: var(--sidebar-active);
  background: var(--sidebar-hover);
  text-decoration: none;
}

.nav-group a.active {
  color: var(--sidebar-active);
  border-left-color: var(--sidebar-accent);
  background: rgba(59,130,246,0.1);
}

.nav-group a .ni { font-size: 0.85rem; flex-shrink: 0; }

/* ── Main Content ────────────────────────────────── */
.doc-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2.5rem 3rem 4rem;
  max-width: calc(var(--sidebar-width) + 860px);
  background: var(--content-bg);
  min-height: 100%;
}

/* ── Typography ──────────────────────────────────── */
h1 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--content-text);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--content-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--content-text);
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  padding-top: 0.5rem;
}

h2:first-of-type { margin-top: 1rem; }

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--content-text);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--content-text);
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

p { margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0.4rem 0 0.9rem 1.4rem; }
li { margin-bottom: 0.22rem; }

a { color: var(--sidebar-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--content-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--content-muted); }
.breadcrumb a:hover { color: var(--sidebar-accent); text-decoration: none; }

/* ── Code ────────────────────────────────────────── */
code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.855em;
  background: #f1f5f9;
  color: #be185d;
  padding: 0.1em 0.38em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  font-size: 0.85rem;
  line-height: 1.75;
  border: 1px solid #1e293b;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

.code-block { margin: 1rem 0 1.25rem; }

.code-label {
  display: inline-block;
  background: #1e293b;
  color: #64748b;
  font-size: 0.72rem;
  padding: 0.35rem 1rem;
  border-radius: 6px 6px 0 0;
  font-family: monospace;
  letter-spacing: 0.02em;
  border: 1px solid #2d3748;
  border-bottom: none;
}

.code-block pre { border-radius: 0 8px 8px 8px; margin-top: 0; }

/* Syntax highlight hints */
.k { color: #c084fc; }   /* keyword */
.s { color: #86efac; }   /* string */
.c { color: #475569; font-style: italic; } /* comment */
.n { color: #7dd3fc; }   /* number/builtin */
.f { color: #fde68a; }   /* function */
.o { color: #f1f5f9; }   /* operator */

/* ── Callouts ─────────────────────────────────────── */
.callout {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 3px solid;
  font-size: 0.9rem;
}

.callout > strong:first-child { display: block; margin-bottom: 0.3rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

.callout-note   { background: var(--note-bg);   border-color: var(--note-border);   }
.callout-note   > strong:first-child { color: #1d4ed8; }
.callout-warn   { background: var(--warn-bg);   border-color: var(--warn-border);   }
.callout-warn   > strong:first-child { color: #b45309; }
.callout-tip    { background: var(--tip-bg);    border-color: var(--tip-border);    }
.callout-tip    > strong:first-child { color: #15803d; }
.callout-danger { background: var(--danger-bg); border-color: var(--danger-border); }
.callout-danger > strong:first-child { color: #dc2626; }

/* ── Tables ───────────────────────────────────────── */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.doc-table th {
  background: #f8fafc;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--content-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.doc-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.doc-table tr:last-child td { border-bottom: none; }
.doc-table tr:hover td { background: #f8fafc; }
.doc-table td code { font-size: 0.8rem; }
/* Tabela de referência (campo, ação, termo): a primeira coluna é o nome e se destaca. */
.doc-table.ref td:first-child { font-weight: 600; }

/* ── Field Blocks ─────────────────────────────────── */
.field-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0.6rem 0;
  overflow: hidden;
}

.field-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.field-name {
  font-family: 'Cascadia Code', monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: #7c3aed;
}

.field-type {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: lowercase;
}

.type-text     { background: #dbeafe; color: #1d4ed8; }
.type-select   { background: #dcfce7; color: #15803d; }
.type-number   { background: #fef3c7; color: #92400e; }
.type-boolean  { background: #fae8ff; color: #6d28d9; }
.type-array    { background: #fee2e2; color: #b91c1c; }
.type-password { background: #fff7ed; color: #c2410c; }
.type-email    { background: #f0fdf4; color: #166534; }
.type-textarea { background: #f1f5f9; color: #475569; }

.field-req {
  margin-left: auto;
  font-size: 0.7rem;
  color: #dc2626;
  font-weight: 700;
}

.field-body {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.field-body p { margin-bottom: 0.5rem; }
.field-body ul { margin-top: 0.3rem; }

/* ── Numbered Steps ───────────────────────────────── */
.steps {
  counter-reset: step-c;
  list-style: none;
  margin-left: 0;
}

.steps li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-left: 0;
}

.steps li::before {
  counter-increment: step-c;
  content: counter(step-c);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--sidebar-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* ── Badges ───────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* Variante para uso dentro de headings — herda o tamanho do texto ao redor
   em vez do font-size fixo do badge normal, evitando o descompasso visual. */
.badge.badge-inline {
  font-size: 1em;
  font-weight: inherit;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.05em 0.4em;
  border-radius: 0.35em;
}

/* ── Connector Cards ──────────────────────────────── */
.connector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.connector-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem;
  background: #fff;
  text-decoration: none;
  color: var(--content-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.connector-card:hover {
  border-color: var(--sidebar-accent);
  box-shadow: 0 2px 10px rgba(59,130,246,0.12);
  text-decoration: none;
}

.connector-card .cc-icon { font-size: 1.4rem; margin-bottom: 0.4rem; display: block; }
.connector-card .cc-name { font-weight: 600; font-size: 0.875rem; }
.connector-card .cc-desc { font-size: 0.78rem; color: var(--content-muted); margin-top: 0.2rem; }

/* ── Connector Entry (collapsible catalog item) ───── */
.connector-entry {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 0 0.6rem;
  background: var(--content-bg);
  overflow: hidden;
}

.connector-entry summary {
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
}

.connector-entry summary::-webkit-details-marker { display: none; }
.connector-entry summary::before { display: none; }

.connector-entry summary:hover { background: #f8fafc; }

.connector-entry .ce-icon {
  width: 1.85rem;
  height: 1.85rem;
  min-width: 1.85rem;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.connector-entry summary .ce-name { font-weight: 700; flex-shrink: 0; }
.connector-entry summary .ce-desc {
  color: var(--content-muted);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector-entry .ce-expand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sidebar-accent);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  transition: background 0.15s;
}
.connector-entry summary:hover .ce-expand { background: #dbeafe; }
.connector-entry[open] .ce-expand { background: #dbeafe; }
.connector-entry .ce-expand .chev { display: inline-block; font-size: 0.65rem; transition: transform 0.15s; }
.connector-entry[open] .ce-expand .chev { transform: rotate(180deg); }
.connector-entry .ce-expand .txt-open { display: none; }
.connector-entry[open] .ce-expand .txt-closed { display: none; }
.connector-entry[open] .ce-expand .txt-open { display: inline; }

.connector-entry .ce-body {
  padding: 0.1rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.connector-entry .ce-body p { margin: 0.75rem 0 0.4rem; font-size: 0.875rem; }
.connector-entry .ce-body .doc-table { margin: 0.5rem 0 0.9rem; }
.connector-entry .ce-body .callout { margin: 0.75rem 0; }
.connector-entry .ce-config { font-size: 0.85rem; color: var(--content-muted); margin: 0.6rem 0 0; }
.connector-entry .ce-config strong { color: var(--content-text); font-weight: 600; }

/* ── TOC ──────────────────────────────────────────── */
.toc {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  display: inline-block;
  min-width: 220px;
}

.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--content-muted);
  margin-bottom: 0.6rem;
}

.toc ul { margin: 0; padding-left: 1rem; list-style: none; }
.toc li { margin-bottom: 0.2rem; }
.toc a { font-size: 0.845rem; color: var(--content-text); }
.toc a:hover { color: var(--sidebar-accent); text-decoration: none; }

/* ── Page Nav ─────────────────────────────────────── */
.page-nav {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.page-nav a {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--content-text);
  transition: border-color 0.15s;
}

.page-nav a:hover { border-color: var(--sidebar-accent); text-decoration: none; }
.page-nav .prev { text-align: left; }
.page-nav .next { text-align: right; }
.page-nav .pn-label { font-size: 0.72rem; color: var(--content-muted); display: block; margin-bottom: 0.2rem; }
.page-nav .pn-title { font-weight: 600; font-size: 0.875rem; }

/* ── Section Anchor ───────────────────────────────── */
h2[id], h3[id] { scroll-margin-top: calc(var(--header-height) + 1rem); }

/* ── Feature Grid ─────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: #fff;
  text-decoration: none;
  display: block;
  color: var(--content-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.feature-card:hover {
  border-color: var(--sidebar-accent);
  box-shadow: 0 3px 12px rgba(59,130,246,0.1);
  text-decoration: none;
}

.feature-card .fc-icon { font-size: 1.75rem; margin-bottom: 0.75rem; display: block; }
.feature-card .fc-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.3rem; }
.feature-card .fc-desc { font-size: 0.8rem; color: var(--content-muted); line-height: 1.5; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .doc-sidebar { display: none; }
  .doc-content { margin-left: 0; padding: 1.5rem; max-width: 100%; }
}

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .connector-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .page-nav { flex-direction: column; }
}

/* ─── Caminho de menu (como chegar) ─── */
.menu-path {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--note-bg);
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 0.9rem;
  color: #1e3a5f;
  margin: 16px 0 24px;
  line-height: 1.5;
}
.menu-path .mp-icon { flex-shrink: 0; }
.menu-path strong { color: #1d4ed8; }

/* ─── Screenshots ─── */
.doc-shot { margin: 20px 0 28px; }
.doc-shot img {
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.4);
  display: block;
}
.doc-shot figcaption {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 9px;
}

/* ─── Menu em árvore + busca ─── */
.nav-search {
  position: relative;
  margin: 0 4px 14px;
}
.nav-search .ns-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  opacity: 0.6;
  pointer-events: none;
}
.nav-search input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 10px 8px 30px;
  color: #c8ddf0;
  font-size: 0.83rem;
  outline: none;
  transition: border-color .15s;
}
.nav-search input::placeholder { color: #4b5d75; }
.nav-search input:focus { border-color: rgba(47,137,252,0.55); background: rgba(47,137,252,0.06); }

.nav-block-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.ngt-caret {
  font-size: 0.65rem;
  color: #4b5d75;
  transition: transform .15s;
  margin-right: 4px;
}
.nav-group.open > .nav-group-title .ngt-caret { transform: rotate(90deg); }
.nav-group > .nav-items { display: none; }
.nav-group.open > .nav-items { display: block; }

.nav-item-row {
  display: flex;
  align-items: center;
}
.nav-item-row a { flex: 1; min-width: 0; }
.nav-caret {
  cursor: pointer;
  font-size: 0.65rem;
  color: #4b5d75;
  padding: 4px 7px;
  border-radius: 6px;
  transition: transform .15s, color .15s;
  flex-shrink: 0;
}
.nav-caret:hover { color: #c8ddf0; }
.nav-item.open > .nav-item-row .nav-caret { transform: rotate(90deg); }

.nav-item > .nav-topics { display: none; }
.nav-item.open > .nav-topics { display: block; padding: 1px 0 5px 27px; }
.nav-topics a {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  border-left: 1px solid rgba(255,255,255,0.08);
  transition: color .12s, background .12s;
}
.nav-topics a:hover { color: #c8ddf0; background: rgba(47,137,252,0.08); }

.nav-hidden { display: none !important; }
.nav-topic-hidden { display: none !important; }

.nav-results { padding: 0 4px; }
.nav-result {
  display: block;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.nav-result:hover { background: var(--sidebar-hover); border-left-color: var(--sidebar-accent); }
.nr-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sidebar-active);
  font-size: 0.83rem;
  font-weight: 600;
}
.nr-sep { color: #4b5d75; font-weight: 400; }
.nr-snippet {
  margin-top: 3px;
  padding-left: 1.4rem;
  color: #8698ad;
  font-size: 0.76rem;
  line-height: 1.45;
}
.nr-snippet mark {
  background: rgba(59,130,246,0.35);
  color: #e6f0ff;
  border-radius: 2px;
  padding: 0 1px;
}
.nr-empty {
  padding: 10px;
  color: #64748b;
  font-size: 0.8rem;
}

/* ─── Badges de método HTTP (catálogo de rotas) ─── */
.rt-method {
  display: inline-block;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 7px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.rt-get    { background: #dbeafe; color: #1d4ed8; }
.rt-post   { background: #dcfce7; color: #15803d; }
.rt-patch  { background: #fef3c7; color: #92400e; }
.rt-delete { background: #fee2e2; color: #b91c1c; }

.rt-auth-tags { margin-left: 6px; }
.rt-auth-tags .badge { margin-left: 4px; }

/* ─── Testador de API embutido na documentação ─── */
.apitester {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #f8fafc;
  margin: 1rem 0 1.5rem;
}
.apt-row { margin-bottom: 0.9rem; }
.apt-row:last-child { margin-bottom: 0; }
.apt-row > label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--content-muted);
  margin-bottom: 0.3rem;
}
.apt-optional { font-weight: 400; color: #94a3b8; }
.apt-row-2, .apt-row-4 {
  display: grid;
  gap: 1rem;
}
.apt-row-2 { grid-template-columns: 1fr 1fr; }
.apt-row-4 { grid-template-columns: repeat(4, 1fr); }
.apt-row-2 > div > label, .apt-row-4 > div > label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--content-muted);
  margin-bottom: 0.3rem;
}
.apt-row input[type="text"],
.apt-row input[type="password"],
.apt-row select,
.apt-row textarea,
.apt-row-2 input, .apt-row-4 input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  background: #fff;
  color: var(--content-text);
}
.apt-row select { font-family: -apple-system, 'Segoe UI', sans-serif; }
.apt-row textarea { resize: vertical; line-height: 1.5; }
.apt-row input:focus, .apt-row select:focus, .apt-row textarea:focus {
  outline: none; border-color: var(--sidebar-accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.apt-row input[readonly] {
  background: #f1f5f9;
  color: var(--content-muted);
  cursor: default;
}
.apt-row input[readonly]:focus {
  box-shadow: none;
}
.apt-hint {
  font-size: 0.78rem;
  color: var(--content-muted);
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  background: #eff6ff;
  border-radius: 6px;
}
.apt-params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 0.7rem 0 0;
}
.apt-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}
.apt-btn-send {
  background: var(--sidebar-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.65rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.apt-btn-send:hover { background: #2563eb; }
.apt-btn-send:disabled { background: #94a3b8; cursor: wait; }
.apt-preview {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--content-muted);
  word-break: break-all;
}
.apt-result { margin-top: 1.25rem; }
.apt-result-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.apt-status {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 9px;
  border-radius: 5px;
}
.apt-status.ok   { background: #dcfce7; color: #15803d; }
.apt-status.warn { background: #fef3c7; color: #92400e; }
.apt-status.err  { background: #fee2e2; color: #b91c1c; }
.apt-timing { font-size: 0.78rem; color: var(--content-muted); }
.apt-result pre { margin: 0; max-height: 420px; }

@media (max-width: 900px) {
  .apt-row-2, .apt-row-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .apt-row-2, .apt-row-4 { grid-template-columns: 1fr; }
}

/* ─── Diagrama de Arquitetura (caixas + fluxo) ─── */
.arch-diagram {
  margin: 1.75rem 0 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.arch-layer { min-width: 640px; }
.arch-layer-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--content-muted);
  text-align: center;
  margin-bottom: 0.55rem;
}
.arch-row {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: nowrap;
}
.arch-box {
  border: 1px solid var(--border);
  border-top-width: 3px;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: #fff;
  flex: 1 1 0;
  min-width: 150px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
.arch-box-icon { font-size: 1.25rem; display: block; margin-bottom: 0.3rem; }
.arch-box-title { font-weight: 700; font-size: 0.83rem; color: var(--content-text); line-height: 1.3; }
.arch-box-desc { font-size: 0.72rem; color: var(--content-muted); margin-top: 0.3rem; line-height: 1.42; }

.arch-box-user    { border-top-color: #64748b; background: #f8fafc; }
.arch-box-ui      { border-top-color: #3b82f6; }
.arch-box-runtime { border-top-color: #22c55e; }
.arch-box-router  { border-top-color: #f59e0b; }
.arch-box-cloud   { border-top-color: #7c3aed; }

.arch-arrow {
  text-align: center;
  color: var(--sidebar-accent);
  font-size: 1.15rem;
  line-height: 1;
  margin: 0.4rem 0;
}
.arch-arrow-label {
  display: block;
  font-size: 0.68rem;
  color: var(--content-muted);
  font-weight: 600;
  margin-top: 0.2rem;
  letter-spacing: 0.01em;
}

.arch-legend {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.74rem;
  color: var(--content-muted);
  margin-top: 1rem;
  min-width: 640px;
}
.arch-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}
.arch-legend .dot-user    { background: #64748b; }
.arch-legend .dot-ui      { background: #3b82f6; }
.arch-legend .dot-runtime { background: #22c55e; }
.arch-legend .dot-router  { background: #f59e0b; }
.arch-legend .dot-cloud   { background: #7c3aed; }
