/* CS4 ADM API docs — own CSS, no external assets (strict CSP). Design tokens from the VeeCloud / Wi5River console. */
:root {
  --page: #f1f4f8; --card: #ffffff; --line: #e6eaf0; --line-2: #eef1f5; --head: #f8fafc;
  --ink: #0f172a; --ink-2: #1e293b; --text: #334155; --muted: #64748b; --faint: #94a3b8;
  --blue: #206bc4; --blue-600: #1a5fb4; --blue-50: #eaf2fd; --blue-100: #dbe8fb;
  --green: #16a34a; --green-ink: #15803d; --green-50: #e7f8ee;
  --red: #dc2626; --red-ink: #b91c1c; --red-50: #fdecec;
  --amber: #d97706; --amber-ink: #a15c07; --amber-50: #fff7e6;
  --violet: #5b4bd1; --teal: #0d9488; --teal-50: #e6f6f4;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .05);
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; scroll-padding-top: 68px; }
body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--text); background: var(--page); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
:not(pre) > code { background: var(--line-2); color: var(--ink-2); padding: 1px 5px; border-radius: 5px; }
strong, b { color: var(--ink-2); font-weight: 650; }
.muted { color: var(--muted); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; height: 52px; display: flex; align-items: center; gap: 4px; padding: 0 22px;
  background: #fff; border-bottom: 1px solid var(--line); }
.topbar-brand { display: flex; align-items: center; gap: 9px; margin-right: 6px; color: var(--ink); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.topbar-brand:hover { text-decoration: none; }
.brand-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2f7fd8, #1a5fb4); box-shadow: 0 2px 6px rgba(32, 107, 196, .35); }
.topbar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px 0 4px; }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav-item { display: inline-flex; align-items: center; height: 32px; padding: 0 11px; border-radius: 7px; color: #475569; font: 500 13.5px var(--sans); white-space: nowrap;
  transition: background-color .15s ease, color .15s ease; }
.topnav-item:hover { background: #eef2ff; color: #1e40af; text-decoration: none; }
.topnav-item.active { background: var(--blue); color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(32, 107, 196, .3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; background: var(--blue-50); color: var(--blue); font-size: 12px; }

/* Layout */
.layout { display: flex; gap: 28px; max-width: 1240px; margin: 0 auto; padding: 26px 22px 40px; }
.toc { position: sticky; top: 78px; align-self: flex-start; width: 210px; flex: none; display: flex; flex-direction: column; gap: 1px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.toc-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 2px 8px 8px; }
.toc a { padding: 6px 8px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.toc a:hover { background: var(--blue-50); color: var(--blue); text-decoration: none; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.foot { padding: 10px 2px; font-size: 12.5px; }

/* Cards */
.hero, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.hero { background: linear-gradient(135deg, #ffffff 0%, #f4f8fe 100%); }
h1 { margin: 0 0 8px; color: var(--ink); font-size: 26px; letter-spacing: -.02em; }
h2 { margin: 0 0 12px; color: var(--ink); font-size: 18px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { margin: 18px 0 8px; color: var(--ink-2); font-size: 14.5px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin: 4px 0; }
.lead { font-size: 15px; color: var(--text); max-width: 820px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.kv > div { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.kv .k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.kv .v { color: var(--ink-2); }
.tag { font: 600 11.5px var(--mono); color: var(--violet); background: #efedfc; border-radius: 6px; padding: 2px 7px; }

/* Code */
pre { margin: 0 0 14px; padding: 14px 16px; overflow-x: auto; background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.6; tab-size: 4; }
pre code { color: inherit; background: none; padding: 0; white-space: pre; }

/* Tables */
table.grid { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; }
table.grid th { text-align: left; background: var(--head); color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.grid tr:last-child td { border-bottom: 0; }
table.endpoints td:first-child { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; color: var(--ink-2); }
table.endpoints td:nth-child(2) { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
table.endpoints tr.grp td { background: var(--head); font-family: var(--sans); font-weight: 700; color: var(--ink); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.m { display: inline-block; min-width: 52px; text-align: center; font: 700 11px var(--mono); border-radius: 5px; padding: 2px 6px; margin-right: 6px; }
.m.get { background: var(--blue-50); color: var(--blue); }
.m.post { background: var(--green-50); color: var(--green-ink); }
.m.put { background: var(--amber-50); color: var(--amber-ink); }
.m.del { background: var(--red-50); color: var(--red-ink); }

/* Command lifecycle */
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.flow .arrow { color: var(--faint); font-weight: 700; }
.st { font: 600 12px var(--mono); padding: 4px 10px; border-radius: 14px; border: 1px solid transparent; }
.st-pending { background: var(--line-2); color: var(--ink-2); border-color: var(--line); }
.st-sent { background: var(--blue-50); color: var(--blue); border-color: var(--blue-100); }
.st-ok { background: var(--green-50); color: var(--green-ink); }
.st-bad { background: var(--red-50); color: var(--red-ink); }
.st-warn { background: var(--amber-50); color: var(--amber-ink); }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .toc { position: static; width: auto; }
  .topnav-item { padding: 0 8px; }
  .pill { display: none; }
}
