/* GSDeluxe Integration API docs — styles */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-code: #f4f5f7;
  --panel: #ffffff;
  --text: #1c2333;
  --muted: #667085;
  --border: #e6e8ee;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --badge-token-bg: #e6f4ea; --badge-token-fg: #1a7f37;
  --badge-jwt-bg: #eef0fe; --badge-jwt-fg: #4338ca;
  --req: #b42318; --opt: #667085;
  --warn-bg: #fff7ed; --warn-border: #fdba74;
  --tok-key: #7c3aed; --tok-str: #0a7d3f; --tok-num: #b45309;
  --tok-kw: #c2255c; --tok-com: #94a3b8; --tok-var: #1d4ed8;
  --sidebar-w: 270px; --topbar-h: 58px;
}
:root[data-theme="dark"], html[data-theme="dark"] {
  --bg: #0f1420; --bg-soft: #141b2b; --bg-code: #0b1120; --panel: #131a29;
  --text: #e6e9f2; --muted: #97a1b6; --border: #26304a; --accent: #8b8bff;
  --accent-soft: #1b2340;
  --badge-token-bg: #123023; --badge-token-fg: #4ade80;
  --badge-jwt-bg: #1b2340; --badge-jwt-fg: #a5b4fc;
  --req: #f87171; --opt: #97a1b6; --warn-bg: #2a2013; --warn-border: #a16207;
  --tok-key: #c4b5fd; --tok-str: #6ee7a8; --tok-num: #fbbf77;
  --tok-kw: #f472b6; --tok-com: #64748b; --tok-var: #93c5fd;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1420; --bg-soft: #141b2b; --bg-code: #0b1120; --panel: #131a29;
    --text: #e6e9f2; --muted: #97a1b6; --border: #26304a; --accent: #8b8bff;
    --accent-soft: #1b2340;
    --badge-token-bg: #123023; --badge-token-fg: #4ade80;
    --badge-jwt-bg: #1b2340; --badge-jwt-fg: #a5b4fc;
    --req: #f87171; --opt: #97a1b6; --warn-bg: #2a2013; --warn-border: #a16207;
    --tok-key: #c4b5fd; --tok-str: #6ee7a8; --tok-num: #fbbf77;
    --tok-kw: #f472b6; --tok-com: #64748b; --tok-var: #93c5fd;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }
:not(pre) > code {
  background: var(--bg-code); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px; font-size: .86em;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
#brand-title { font-weight: 700; font-size: 15px; white-space: nowrap; }
#brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.ctrl { display: flex; align-items: center; gap: 6px; }
.ctrl label { font-size: 12px; color: var(--muted); }
select {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 8px; font-size: 13px; cursor: pointer;
}
.icon-btn {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 15px;
}
#menu-btn { display: none; }

/* Layout */
.layout { display: flex; align-items: flex-start; }
.sidebar {
  position: sticky; top: var(--topbar-h); align-self: flex-start;
  width: var(--sidebar-w); height: calc(100vh - var(--topbar-h));
  overflow-y: auto; border-right: 1px solid var(--border);
  padding: 18px 10px 40px; background: var(--panel);
}
.nav-group {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; margin: 16px 12px 6px;
}
.nav-group:first-child { margin-top: 0; }
.nav-link {
  display: block; padding: 6px 12px; border-radius: 7px; color: var(--text);
  font-size: 13.5px; margin: 1px 4px;
}
.nav-link:hover { background: var(--bg-soft); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.content {
  flex: 1; min-width: 0; max-width: 900px; margin: 0 auto;
  padding: 26px 32px 90px;
}

/* Sections */
.doc-section { padding-top: 14px; margin-bottom: 34px; scroll-margin-top: calc(var(--topbar-h) + 10px); }
.sec-title { font-size: 26px; margin: 8px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-section h3 { font-size: 15px; margin: 22px 0 8px; color: var(--text); }
.anchor { color: var(--muted); opacity: 0; font-weight: 400; text-decoration: none; }
.sec-title:hover .anchor { opacity: 1; }
.prose p, .lead { margin: 10px 0; }
.lead { color: var(--muted); font-size: 15.5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose h3 { font-size: 15px; margin: 20px 0 6px; }

/* Badges */
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge-token { background: var(--badge-token-bg); color: var(--badge-token-fg); }
.badge-jwt { background: var(--badge-jwt-bg); color: var(--badge-jwt-fg); }

/* Notes */
.note {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 11px 14px; margin: 14px 0; font-size: 14px;
}
.note-warn { background: var(--warn-bg); border-left-color: var(--warn-border); border-color: var(--warn-border); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.tbl td.muted, .tbl .muted { color: var(--muted); font-size: 13px; white-space: nowrap; }
.req { color: var(--req); font-size: 12px; font-weight: 600; }
.opt { color: var(--opt); font-size: 12px; }
.tbl-err code.err { color: var(--req); }

/* Code widget */
.code {
  margin: 10px 0 6px; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--bg-code);
}
.code-tabs {
  display: flex; align-items: center; gap: 2px; padding: 6px 8px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.code-tab {
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
}
.code-tab:hover { color: var(--text); }
.code-tab.active { background: var(--panel); color: var(--accent); border: 1px solid var(--border); }
.copy-btn {
  margin-left: auto; background: transparent; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; font-size: 12px; padding: 3px 10px; border-radius: 6px;
}
.copy-btn:hover { color: var(--text); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code, pre[data-lang] code { font-size: 13px; line-height: 1.6; white-space: pre; }
pre[data-lang] {
  background: var(--bg-code); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; margin: 12px 0;
}

/* syntax tokens */
.tok-key { color: var(--tok-key); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-kw  { color: var(--tok-kw); font-weight: 600; }
.tok-com { color: var(--tok-com); font-style: italic; }
.tok-var { color: var(--tok-var); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 20px 32px; color: var(--muted); font-size: 13px; max-width: 900px; margin: 0 auto; }

/* Responsive */
@media (max-width: 900px) {
  #menu-btn { display: inline-block; }
  .sidebar {
    position: fixed; left: 0; top: var(--topbar-h); z-index: 35;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 20px 18px 80px; }
  .brand { max-width: 44vw; }
  #brand-title, #brand-sub { overflow: hidden; text-overflow: ellipsis; }
  .ctrl.hide-sm label { display: none; }
}
