/* Geolocalizador Docs — tema claro, standalone (não depende de style.css) */

/* ── Tokens ── */
:root {
  --bg:            #ffffff;
  --surface:       #f8fafc;
  --surface-2:     #f1f5f9;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --text:          #0f172a;
  --muted:         #475569;
  --subtle:        #94a3b8;
  --accent:        #16a34a;
  --accent-tint:   rgba(22, 163, 74, 0.10);
  --accent-ring:   rgba(22, 163, 74, 0.25);
  --warning:       #d97706;
  --warning-tint:  rgba(217, 119, 6, 0.10);
  --danger:        #dc2626;
  --radius:        10px;
  --nav-h:         60px;
  --sidebar-w:     264px;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:          ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Top nav ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.nav .wrap {
  width: min(1280px, 100% - 32px);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 15px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
}
.brand-mark svg { width: 16px; height: 16px; }
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-links a {
  padding: 6px 12px; border-radius: 7px;
  font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-links .btn, .btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.12s;
}
.nav-links .btn:hover, .btn-primary:hover { background: #15803d; color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13px; }

/* ── Page shell ── */
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100svh - var(--nav-h));
  max-width: 1280px;
  margin-inline: auto;
}
@media (max-width: 960px) { .docs-layout { grid-template-columns: 1fr; } }

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100svh - var(--nav-h));
  overflow-y: auto;
  padding: 24px 12px 40px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
@media (max-width: 960px) { .docs-sidebar { display: none; } }

.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 14px;
  padding: 4px 8px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo svg { fill: var(--accent); }

.sidebar-group { margin-bottom: 2px; }
.sidebar-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--subtle);
  padding: 12px 8px 4px;
}
.sidebar-link {
  display: block;
  padding: 6px 10px; border-radius: 7px;
  font-size: 14px; line-height: 1.4;
  color: var(--muted); text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--text); }
.sidebar-link.active {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 600;
}

/* ── Mobile nav dropdown ── */
.docs-mobile-nav {
  display: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
@media (max-width: 960px) { .docs-mobile-nav { display: block; } }
.mobile-nav-select {
  width: 100%; padding: 9px 12px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--text); font: inherit; font-size: 14px;
  cursor: pointer; appearance: auto;
}

/* ── Conteúdo principal ── */
.docs-content {
  padding: 48px 56px 80px;
  min-width: 0;
  max-width: 780px;
}
@media (max-width: 1200px) { .docs-content { padding: 40px 36px 72px; } }
@media (max-width: 960px)  { .docs-content { padding: 28px 20px 60px; max-width: 100%; } }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px; color: var(--subtle);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border-strong); font-size: 12px; }

/* ── Tipografia ── */
.docs-content h1 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 10px;
}
.docs-content > p:first-of-type {
  font-size: 17px; color: var(--muted); line-height: 1.7;
  margin: 0 0 36px; max-width: 60ch;
}
.docs-content h2 {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.25;
  color: var(--text);
  margin: 48px 0 14px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.docs-content h2:first-of-type,
.docs-content .doc-note + h2,
.docs-content > p:first-of-type + h2,
.docs-hub + h2 {
  border-top: none; padding-top: 0; margin-top: 24px;
}
.docs-content h3 {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.docs-content p { color: var(--muted); line-height: 1.75; font-size: 15px; margin: 0 0 14px; }
.docs-content strong { color: var(--text); font-weight: 600; }
.docs-content a { color: var(--accent); }

/* ── Listas ── */
.docs-content ul {
  margin: 0 0 18px; padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}
.docs-content ul li {
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--muted); font-size: 15px; line-height: 1.65;
}
.docs-content ul li::before {
  content: '';
  flex-shrink: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
}

/* ── Steps numerados (ol) ── */
.docs-content ol {
  margin: 0 0 24px; padding: 0;
  list-style: none;
  counter-reset: step-c;
}
.docs-content ol li {
  counter-increment: step-c;
  position: relative;
  padding: 0 0 20px 42px;
  color: var(--muted); font-size: 15px; line-height: 1.65;
}
.docs-content ol li::before {
  content: counter(step-c);
  position: absolute;
  left: 0; top: 1px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-tint);
  border: 1.5px solid var(--accent-ring);
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.docs-content ol li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 12.5px; top: 28px;
  width: 1px; bottom: 4px;
  background: var(--border);
}
.docs-content ol li ul { margin: 8px 0 0; }
.docs-content ol li ul li { padding-left: 0; }
.docs-content ol li ul li::before { display: none; }

/* ── Código ── */
.docs-content code {
  font-family: var(--mono); font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--accent);
}
.docs-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  overflow-x: auto;
  margin: 0 0 22px;
}
.docs-content pre code { background: none; border: none; padding: 0; font-size: 13px; }

/* ── Callouts ── */
.doc-note, .doc-warn {
  display: flex; gap: 12px;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
}
.doc-note {
  background: var(--accent-tint);
  border: 1px solid var(--accent-ring);
}
.doc-note::before {
  content: 'ℹ';
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--accent-ring);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.doc-warn {
  background: var(--warning-tint);
  border: 1px solid rgba(217,119,6,0.25);
}
.doc-warn::before {
  content: '!';
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(217,119,6,0.3);
  color: var(--warning);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.doc-note p, .doc-warn p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.doc-note p + p, .doc-warn p + p { margin-top: 6px; }

/* ── Tabelas ── */
.docs-content table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.docs-content thead tr { background: var(--surface); border-bottom: 1px solid var(--border); }
.docs-content thead th {
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--subtle);
}
.docs-content thead th:not(:first-child) { text-align: center; }
.docs-content tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted); line-height: 1.5;
}
.docs-content tbody td:not(:first-child) { text-align: center; }
.docs-content tbody tr:last-child td { border-bottom: none; }
.docs-content tbody tr:hover td { background: var(--surface); }

/* ── Hub de cards (index) ── */
.docs-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-top: 32px;
}
.hub-card {
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hub-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.hub-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-tint);
  display: grid; place-items: center;
  color: var(--accent);
}
.hub-card .icon svg { width: 20px; height: 20px; }
.hub-card h3 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text); }
.hub-card p  { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.hub-card .arrow {
  margin-top: auto; padding-top: 8px;
  font-size: 13px; color: var(--accent); font-weight: 600;
}

/* ── Nav próxima página ── */
.docs-next {
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
.docs-next a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 18px;
  text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 14px;
  transition: border-color 0.15s;
}
.docs-next a:hover { border-color: var(--accent); color: var(--accent); }
.docs-next small { display: block; font-size: 12px; font-weight: 400; color: var(--subtle); margin-bottom: 2px; }
