/* ============================================================
   ATIZAP — Central de Ajuda
   Variáveis de marca: troque aqui para aplicar o visual da Atizap.
   ============================================================ */
:root {
  /* ----- MARCA ATIZAP ----- */
  --brand:        #4f6bff;   /* azul principal (paper plane) */
  --brand-dark:   #3a52d6;   /* hover / ativo */
  --brand-soft:   #ecefff;   /* fundos suaves / item ativo */
  --brand-contrast:#ffffff;  /* texto sobre a cor principal */
  --accent:       #8bc34a;   /* verde de acento (detalhe do logo) */
  --accent-dark:  #689f38;

  /* ----- Neutros ----- */
  --bg:           #ffffff;
  --bg-alt:       #f7f8fa;
  --sidebar-bg:   #fbfcfd;
  --text:         #1c2128;
  --text-soft:    #57606a;
  --text-faint:   #8b949e;
  --border:       #e4e7eb;
  --code-bg:      #f3f4f6;

  --radius:       10px;
  --sidebar-w:    300px;
  --header-h:     60px;
  --maxw:         820px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   GATE (palavra-chave)
   ============================================================ */
#gate {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 24px;
}
#gate.hidden { display: none; }
.gate-card {
  background: var(--bg); border-radius: 16px; padding: 40px 36px;
  width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.gate-card .logo { margin-bottom: 18px; }
.gate-card h1 { font-size: 19px; margin: 0 0 6px; }
.gate-card p { color: var(--text-soft); font-size: 14px; margin: 0 0 22px; }
.gate-card input {
  width: 100%; padding: 13px 14px; font-size: 15px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  outline: none; text-align: center; letter-spacing: .5px;
}
.gate-card input:focus { border-color: var(--brand); }
.gate-card button {
  width: 100%; margin-top: 14px; padding: 13px;
  background: var(--brand); color: var(--brand-contrast);
  border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.gate-card button:hover { background: var(--brand-dark); }
.gate-error { color: #d1242f; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ============================================================
   LAYOUT
   ============================================================ */
#app { display: none; }
#app.ready { display: block; }

header.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar .brand-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.topbar .brand-logo img { height: 28px; width: auto; }
.topbar .search-wrap { flex: 1; max-width: 460px; position: relative; }
.topbar .search-wrap input {
  width: 100%; padding: 9px 14px 9px 36px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-alt); outline: none;
}
.topbar .search-wrap input:focus { border-color: var(--brand); background: var(--bg); }
.topbar .search-wrap .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--text); }

.search-results {
  position: absolute; top: 44px; left: 0; right: 0; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12);
  max-height: 60vh; overflow-y: auto; display: none; z-index: 60;
}
.search-results.show { display: block; }
.search-results a { display: block; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--brand-soft); text-decoration: none; }
.search-results .cat { font-size: 11px; color: var(--text-faint); display: block; }
.search-results .empty { padding: 14px; color: var(--text-faint); font-size: 14px; }

aside.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
  overflow-y: auto; background: var(--sidebar-bg); border-right: 1px solid var(--border);
  padding: 18px 10px 60px;
}
.sidebar .group > .group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-faint); font-weight: 700; padding: 16px 12px 6px;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 1px 0; }
.sidebar a.navlink {
  display: block; padding: 6px 12px; border-radius: 7px; color: var(--text-soft); font-size: 14px;
}
.sidebar a.navlink:hover { background: var(--bg-alt); text-decoration: none; color: var(--text); }
.sidebar a.navlink.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.sidebar .sub { margin-left: 10px; border-left: 1px solid var(--border); padding-left: 6px; }
.sidebar .subhead {
  display: block; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text); cursor: default;
}

main.content {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  padding: 36px 40px 80px; min-height: calc(100vh - var(--header-h));
}
.article { max-width: var(--maxw); margin: 0 auto; }
.breadcrumb { font-size: 13px; color: var(--text-faint); margin-bottom: 14px; }
.breadcrumb span { color: var(--text-faint); }

.article h1 { font-size: 30px; margin: 0 0 18px; line-height: 1.25; }
.article h2 { font-size: 22px; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.article h3 { font-size: 18px; margin: 24px 0 10px; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.article img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.article code { background: var(--code-bg); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.article pre { background: #0d1117; color: #e6edf3; padding: 16px; border-radius: 10px; overflow-x: auto; }
.article pre code { background: none; padding: 0; color: inherit; }
.article blockquote {
  margin: 16px 0; padding: 10px 16px; background: var(--brand-soft);
  border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; color: var(--text);
}
.article table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article th { background: var(--bg-alt); }

.article-footer { max-width: var(--maxw); margin: 48px auto 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13px; }

/* Home / landing cards */
.hero { text-align: center; padding: 30px 0 10px; }
.hero h1 { font-size: 34px; margin: 0 0 10px; }
.hero p { color: var(--text-soft); font-size: 16px; max-width: 560px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 16px; margin-top: 34px; }
.card {
  border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--bg);
  transition: border-color .15s, box-shadow .15s; cursor: pointer;
}
.card:hover { border-color: var(--brand); box-shadow: 0 6px 20px rgba(0,0,0,.06); text-decoration: none; }
.card h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.card p { margin: 0; font-size: 13px; color: var(--text-soft); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
.backdrop { display: none; }
@media (max-width: 900px) {
  :root { --sidebar-w: 280px; }
  .menu-toggle { display: block; }
  aside.sidebar { transform: translateX(-100%); transition: transform .2s; z-index: 70; box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  aside.sidebar.open { transform: translateX(0); }
  main.content { margin-left: 0; padding: 24px 18px 60px; }
  .topbar .brand-logo span.full { display: none; }
  .backdrop.show { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 60; }
}
