/* =========================================================
   Elven Docs — design system
   Tokens extraídos de www.elven.works para manter consistência
   visual entre o site institucional e a documentação.
   ========================================================= */

:root {
  --green: #1BB77A;
  --green-dark: #159966;
  --green-deep: #0E3D2E;
  --green-foot: #1F8A5B;
  --blue: #0075FF;
  --cyan: #2BC7DD;
  --ink: #1F2733;
  --ink-soft: #2D2D2D;
  --muted: #515151;
  --muted-2: #6B7280;
  --bg: #FFFFFF;
  --bg-soft: #F6F7F8;
  --line: #E0E0E0;
  --line-soft: #EDEDED;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .14);
  --grad-accent: linear-gradient(90deg, #19B6C9 0%, #1BB77A 100%);
  --font: "Open Sans", -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }
p { color: var(--muted); line-height: 1.7; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.nav-logo img { height: 40px; }
.nav-collapse {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  flex: 1;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--green-dark); background: var(--bg-soft); }
.nav-link .caret { width: 10px; height: 6px; opacity: .6; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: none;
}
.nav-item.open .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.dropdown a:hover { background: var(--bg-soft); color: var(--green-dark); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--green-dark);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-deep); }
.login { font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.login:hover { color: var(--green-dark); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); }

/* ---------- Docs shell (sidebar + content) ---------- */
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 80px;
  align-items: start;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 8px;
}
.sidebar-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  margin-bottom: 16px;
  color: var(--ink);
}
.sidebar-search:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.sidebar-nav a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--bg-soft); }
.sidebar-nav a.active {
  background: rgba(27, 183, 122, .1);
  color: var(--green-dark);
}
.sidebar-nav .sub-list { margin-left: 14px; border-left: 1px solid var(--line-soft); padding-left: 6px; }
.sidebar-nav .sub-list a { font-size: 13.5px; font-weight: 500; }
.sidebar-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 16px 12px 6px;
}
.sidebar-group-title:first-child { padding-top: 0; }

.docs-content { min-width: 0; }
.breadcrumb {
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--green-dark); }
.docs-content h1 { font-size: 34px; margin: 0 0 12px; }
.docs-content .lead { font-size: 17px; color: var(--muted); margin: 0 0 32px; max-width: 68ch; }
.docs-content h2 { font-size: 22px; margin: 40px 0 14px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.docs-content h2:first-of-type { border-top: none; padding-top: 0; }
.docs-content h3 { font-size: 17px; margin: 24px 0 8px; }
.docs-content ul, .docs-content ol { color: var(--muted); line-height: 1.8; padding-left: 20px; }
.docs-content li { margin-bottom: 4px; }
.docs-content li > ul, .docs-content li > ol { margin-top: 4px; }
.docs-content p { margin: 0 0 16px; }
.docs-content a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }
.docs-content a:hover { color: var(--green-deep); }
.docs-content strong { color: var(--ink); }
.docs-content hr { border: none; border-top: 1px solid var(--line-soft); margin: 32px 0; }
.docs-content code {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.docs-content pre {
  background: var(--ink);
  color: #e8f3ee;
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.6;
}
.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}
.docs-content th, .docs-content td {
  border: 1px solid var(--line-soft);
  padding: 10px 12px;
  text-align: left;
}
.docs-content th {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 700;
}
.docs-content td { color: var(--muted); }
.docs-content table + * { margin-top: 20px; }
.docs-content .content-figure {
  margin: 24px 0;
}
.docs-content .content-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.callout {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 24px 0;
}
.callout strong { color: var(--ink); }
.callout-embed a, .callout-file a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--green-dark);
}
.callout-embed a:hover, .callout-file a:hover { color: var(--green-deep); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.topic-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.topic-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-grid a.topic-card, .card-grid a.topic-card:hover { text-decoration: none; }
.topic-card .tc-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green-dark); margin-bottom: 8px; }
.topic-card h3 { margin: 0 0 8px; font-size: 17px; }
.topic-card p { font-size: 14px; margin: 0; }
.topic-card.disabled {
  box-shadow: none;
  background: var(--bg-soft);
  cursor: default;
}
.topic-card.disabled:hover { box-shadow: none; transform: none; }
.topic-card.disabled h3, .topic-card.disabled p { color: var(--muted-2); }
.topic-card.disabled .tc-eyebrow { color: var(--muted-2); }
.sidebar-nav .sub-disabled {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-2);
  padding: 9px 12px;
}
.sidebar-nav .sub-disabled em { font-style: normal; font-size: 11px; color: var(--muted-2); }
.page-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.page-footer-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 12px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.page-footer-nav a:hover { border-color: var(--green); color: var(--green-dark); }

/* ---------- Home hero ---------- */
.docs-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 40px;
}
.docs-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: rgba(27, 183, 122, .1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.docs-hero h1 { font-size: 40px; max-width: 20ch; margin: 0 0 14px; }
.docs-hero .lead { font-size: 18px; max-width: 60ch; margin: 0 0 28px; }
.home-search { max-width: 480px; }
.home-search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 15px;
}
.home-search input:focus { outline: 2px solid var(--green); outline-offset: 1px; }

/* ---------- Error page ---------- */
.error-page {
  padding: 96px 24px 120px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.error-page .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: rgba(27, 183, 122, .1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.error-page h1 { font-size: 32px; max-width: 26ch; margin: 0 0 12px; }
.error-page .lead { font-size: 16px; max-width: 50ch; margin: 0 0 32px; }
.error-page .home-search { margin-bottom: 24px; }
.error-page .error-home-link { text-decoration: none; }
.home-grid { padding-bottom: 24px; }
.home-grid h2 { font-size: 22px; margin: 0 0 20px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-foot);
  color: #fff;
  padding: 56px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand img { height: 38px; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; margin-bottom: 20px; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, .15);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}
.footer-social a:hover { background-color: rgba(255, 255, 255, .28); }
.footer-contact { font-size: 14px; opacity: .9; }
.footer-col h4 {
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .7);
  margin: 0 0 16px;
}
.footer-col a { display: block; font-size: 14px; opacity: .92; margin-bottom: 12px; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px;
  opacity: .8;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar {
    position: static;
    max-height: none;
    order: 2;
    border-top: 1px solid var(--line-soft);
    padding-top: 24px;
    margin-top: 24px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-menu, .nav-actions .login { display: none; }
  .nav-toggle { display: flex; }
  .nav-collapse.open .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
    box-shadow: var(--shadow-md);
  }
  .dropdown { position: static; box-shadow: none; display: none; }
  .nav-item.open .dropdown { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .docs-hero h1 { font-size: 30px; }
}
