/* Documentação de utilizador (pública e gestores) */
.docs-page { background: #f4f7fb; min-height: 100vh; }
.docs-main { padding: 28px 16px 48px; }
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.docs-sidebar {
  position: sticky; top: 16px;
  background: #fff; border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px; padding: 16px;
  box-shadow: 0 4px 16px rgba(15, 42, 85, .04);
}
.docs-audience {
  margin: 0 0 12px; font-size: .78rem; font-weight: 700;
  color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 6px;
}
.docs-search { margin-bottom: 14px; }
.docs-search-label {
  display: block; font-size: .72rem; font-weight: 700; color: var(--muted, #64748b);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.docs-search-field {
  position: relative; display: flex; align-items: center;
}
.docs-search-field .bi {
  position: absolute; left: 10px; color: var(--muted, #64748b); font-size: .9rem; pointer-events: none;
}
.docs-search-field input {
  width: 100%; padding: 9px 10px 9px 32px;
  border: 1.5px solid var(--line, #e2e8f0); border-radius: 9px;
  font: inherit; font-size: .9rem; color: var(--navy, #0f2a55); background: #fff;
}
.docs-search-field input:focus {
  outline: none; border-color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .14);
}
.docs-search-results {
  margin-top: 10px; max-height: min(42vh, 360px); overflow-y: auto;
  border: 1px solid #d7e8f4; border-radius: 10px; background: #f8fbff;
}
.docs-search-results.hidden { display: none !important; }
.docs-search-count, .docs-search-empty {
  margin: 0; padding: 8px 10px; font-size: .78rem; color: var(--muted, #64748b);
  border-bottom: 1px solid #e2eef6;
}
.docs-search-empty { border-bottom: 0; }
.docs-search-list { list-style: none; margin: 0; padding: 4px; }
.docs-search-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit;
}
.docs-search-item:hover { background: #fff; box-shadow: 0 1px 6px rgba(15, 42, 85, .06); }
.docs-search-item-page {
  font-size: .82rem; font-weight: 800; color: var(--navy, #0f2a55);
}
.docs-search-item-sec {
  font-size: .78rem; font-weight: 700; color: var(--teal-dark, #0f766e);
}
.docs-search-item-snip {
  font-size: .76rem; color: var(--muted, #64748b); line-height: 1.35;
}
.docs-nav-dimmed { opacity: .45; }
.docs-body h2.docs-heading-flash,
.docs-body h3.docs-heading-flash {
  animation: docs-flash 1.6s ease;
}
@keyframes docs-flash {
  0%, 100% { background: transparent; }
  25% { background: #fff3df; }
}
.docs-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.docs-nav-link {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--navy, #0f2a55); text-decoration: none; font-size: .9rem;
  border: 1px solid transparent;
}
.docs-nav-link:hover { background: #f4fafd; border-color: #d7e8f4; }
.docs-nav-link.active {
  background: #e8f4fb; border-color: #b9d9ec; font-weight: 700; color: var(--navy, #0f2a55);
}
.docs-sidebar-links { display: flex; flex-direction: column; gap: 8px; }
.docs-article {
  background: #fff; border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px; padding: 28px 28px 36px;
  box-shadow: 0 8px 28px rgba(15, 42, 85, .06);
}
.docs-article-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line, #e2e8f0); }
.docs-kicker {
  margin: 0 0 6px; font-size: .78rem; font-weight: 700;
  color: var(--teal, #0d9488); text-transform: uppercase; letter-spacing: .04em;
}
.docs-article-head h1 {
  margin: 0 0 8px; font-size: 1.55rem; color: var(--navy, #0f2a55); line-height: 1.25;
}
.docs-summary { margin: 0; color: var(--muted, #64748b); font-size: .95rem; line-height: 1.45; }
.docs-body { color: var(--text, #1e293b); font-size: .95rem; line-height: 1.6; }
.docs-body h2 {
  margin: 1.6em 0 .55em; font-size: 1.2rem; color: var(--navy, #0f2a55);
}
.docs-body h3 {
  margin: 1.3em 0 .45em; font-size: 1.05rem; color: var(--navy, #0f2a55);
}
.docs-body p { margin: 0 0 .9em; }
.docs-body ul, .docs-body ol { margin: 0 0 1em; padding-left: 1.3em; }
.docs-body li { margin-bottom: .35em; }
.docs-body a { color: #0b6e99; font-weight: 600; }
.docs-body code {
  font-size: .88em; background: #f1f5f9; padding: 1px 6px; border-radius: 4px;
}
.docs-body pre {
  background: #0f2a55; color: #e2e8f0; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-size: .85rem; margin: 0 0 1em;
}
.docs-body pre code { background: transparent; color: inherit; padding: 0; }
.docs-body hr { border: 0; border-top: 1px solid var(--line, #e2e8f0); margin: 1.5em 0; }
.docs-table-wrap { overflow-x: auto; margin: 0 0 1.1em; }
.docs-table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
  border: 1px solid var(--line, #e2e8f0); border-radius: 8px;
}
.docs-table th, .docs-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line, #e2e8f0);
  vertical-align: top;
}
.docs-table th {
  background: #f4fafd; color: var(--navy, #0f2a55); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .02em;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.docs-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px; border-radius: 10px; text-decoration: none;
  border: 1px solid #d7e8f4; background: #f8fbff; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.docs-card:hover {
  border-color: var(--teal, #0d9488);
  box-shadow: 0 6px 18px rgba(15, 42, 85, .08);
}
.docs-card strong { color: var(--navy, #0f2a55); font-size: .95rem; }
.docs-card span { color: var(--muted, #64748b); font-size: .84rem; line-height: 1.4; }
.docs-mermaid-wrap {
  margin: 0 0 1.25em; padding: 16px 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border: 1px solid #d7e8f4; border-radius: 12px;
  overflow-x: auto;
}
.docs-mermaid-wrap .mermaid,
.docs-mermaid-wrap svg {
  display: block; margin: 0 auto; max-width: 100%;
}
.docs-body pre.mermaid {
  background: transparent; color: var(--navy, #0f2a55);
  padding: 0; margin: 0; overflow: visible; font-size: inherit;
}
.docs-footer { margin-top: 0; }
.docs-gestores-header .container {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.docs-gestores-header .nav-links { margin-left: auto; }
.docs-user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 999px; background: #f1f5f9;
}
.docs-user-av {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy, #0f2a55); color: #fff; font-size: .75rem; font-weight: 700;
}
.docs-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.docs-user-meta strong { font-size: .82rem; color: var(--navy, #0f2a55); }
.docs-user-meta span { font-size: .72rem; color: var(--muted, #64748b); }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; }
  .docs-article { padding: 20px 16px 28px; }
  .docs-gestores-header .nav-links { margin-left: 0; width: 100%; }
}
