/* KLIOS MCP admin + panduan. Mengikuti bahasa visual halaman koneksi KLY Basecamp MCP:
   latar #f6f7fb, kartu putih bersudut besar, ungu KLY #5f4bff sebagai aksen, tipografi Inter/system. */

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fafaff;
  --soft: #f4f2ff;
  --ink: #202238;
  --ink-2: #3c3e57;
  --muted: #62647a;
  --dim: #6c6e83;
  --line: #e9e9f2;
  --line-2: #dedde9;
  --purple: #5f4bff;
  --purple-ink: #4b38e6;
  --purple-hover: #4d3be0;
  --purple-soft: #ebe7ff;
  --purple-ring: #c0b5ff;
  --ok: #1f7a5c;
  --ok-soft: #e5f5ee;
  --warn: #9a5212;
  --warn-soft: #fff3e6;
  --warn-line: #f3d9bd;
  --danger: #b4233c;
  --danger-soft: #fdeef1;
  --danger-line: #f2c8cf;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(32, 34, 56, .04), 0 10px 30px -12px rgba(36, 36, 72, .10);
  --shadow-lg: 0 2px 4px rgba(32, 34, 56, .03), 0 24px 48px -20px rgba(36, 36, 72, .16);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  scrollbar-color: #c9c7dc transparent;
}
::selection { background: #ddd6ff; color: var(--ink); }
img, svg { display: block; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: 28px; font-weight: 680; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 650; line-height: 1.4; }
p { margin: 0; }
strong { font-weight: 650; color: var(--ink); }
a { color: var(--purple-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--soft); color: #3b2fb3; padding: .1em .38em; border-radius: 6px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--purple-ring); outline-offset: 2px; border-radius: 6px; }
.icon { flex-shrink: 0; }
.dim { color: var(--dim); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }
.copy-buffer { position: fixed; opacity: 0; pointer-events: none; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Tombol ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 620; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; border-radius: var(--radius-sm); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: 9px; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 1px 2px rgba(75, 56, 230, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--purple-hover); }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--soft); border-color: #d3cdf3; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(95, 75, 255, .07); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9b1c32; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger-line); }
.btn-danger-outline:hover { background: var(--danger-soft); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-google { width: 100%; min-height: 48px; background: var(--surface); color: var(--ink); border-color: var(--line-2); font-size: 15px; gap: 12px; box-shadow: 0 1px 2px rgba(32, 34, 56, .06); }
.btn-google:hover { background: var(--surface-2); border-color: #c9c5e3; box-shadow: 0 4px 12px -4px rgba(36, 36, 72, .14); }
.copy-btn { display: none; }
.js .copy-btn { display: inline-flex; }
.copy-btn.is-copied { color: var(--ok); border-color: #b9e2d0; background: var(--ok-soft); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 620; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---- Badge ------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 620; line-height: 1; white-space: nowrap;
  background: #f0f0f5; color: var(--ink-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--purple-soft); color: var(--purple-ink); }
.badge-neutral { background: #f0f0f5; color: var(--muted); }
.badge-outline { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge-outline::before, .badge-accent::before { display: none; }
.kind { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; }
.kind .icon { color: var(--dim); }

/* ---- Shell admin ------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(10px); }
.topbar-inner, .doc-top-inner { max-width: 1180px; margin: 0 auto; padding: 10px 28px; display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 58px; height: 36px; object-fit: contain; }
.brand-name { font-size: 13px; font-weight: 750; letter-spacing: .14em; padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 1.25; }
.brand-sub { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 560; text-decoration: none; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--purple-soft); color: var(--purple-ink); }
.session { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.session form { margin: 0; }
.session-email { font-size: 13px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { max-width: 1180px; margin: 0 auto; padding: 36px 28px 24px; }
.site-footer { max-width: 1180px; margin: 0 auto; padding: 24px 28px 40px; color: var(--dim); font-size: 12px; text-align: center; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.page-head form { margin: 0; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.mono-sub { font-family: var(--mono); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 14px; font-weight: 560; text-decoration: none; }
.back-link:hover { color: var(--purple-ink); }

/* ---- Panel, tabel ------------------------------------------------------- */
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { margin-bottom: 24px; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.panel-sub { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 75ch; }
.panel-bar { padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; background: var(--surface-2); }
.table-wrap { width: 100%; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 620; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .12s; }
.table tbody tr:hover { background: #fcfbff; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.table-dense td { padding-top: 11px; padding-bottom: 11px; font-size: 13.5px; white-space: nowrap; }
.table-dense td.wrap { white-space: normal; min-width: 160px; }
.row-muted td { color: var(--dim); }
.row-link { display: block; text-decoration: none; color: inherit; border-radius: 6px; }
.row-link:hover .row-title { color: var(--purple-ink); text-decoration: underline; }
.row-title { display: block; font-weight: 620; color: var(--ink); }
.row-meta { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.tid { font-size: 13px; background: #f1f0f7; color: var(--ink-2); white-space: nowrap; overflow-wrap: normal; }
.args { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; background: #f1f0f7; color: var(--ink-2); font-size: 12.5px; }
.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline; margin: 0; }
.actions .btn + form { margin-left: 4px; }

/* ---- Formulir ------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; padding: 22px 24px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 620; color: var(--ink-2); }
.optional { font-weight: 450; color: var(--dim); margin-left: 4px; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], input:not([type]), select {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: #717388; }
input:hover, select:hover { border-color: #cdcbe0; }
input:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(95, 75, 255, .18); }
input:user-invalid { border-color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.field-check { justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; font-size: 14px; font-weight: 560; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--purple); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px 16px; align-items: end; padding: 18px 20px; overflow: visible; }
.filter-actions { display: flex; gap: 8px; }

/* ---- Callout, catatan, fakta ---------------------------------------------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.callout .icon { margin-top: 1px; }
.callout-warn { background: var(--warn-soft); border-color: var(--warn-line); color: #6b3a0e; }
.callout-warn .icon, .callout-warn strong { color: var(--warn); }
.callout-danger { background: var(--danger-soft); border-color: var(--danger-line); color: #7d1a2c; }
.callout-danger .icon, .callout-danger strong { color: var(--danger); }
.callout-info { border-color: #dcd5ff; }
.callout-info .icon { color: var(--purple); }
.panel > .callout { margin: 20px 24px 0; }
.page > .callout { margin-bottom: 24px; }
.note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.note .icon { margin-top: 3px; color: var(--purple); }
.facts { display: flex; flex-wrap: wrap; margin: 0 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* Garis pemisah di kanan/bawah tiap sel; margin negatif menyembunyikan garis di tepi luar. */
.facts > div { flex: 1 1 220px; padding: 14px 18px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts > .facts-wide { flex-basis: 100%; }
.facts dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.facts-compact { box-shadow: none; }

/* ---- State kosong --------------------------------------------------------- */
.empty { text-align: center; padding: 48px 24px 52px; max-width: 460px; margin: 0 auto; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--purple-soft); color: var(--purple); margin-bottom: 16px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.empty-actions { margin-top: 18px; }

/* ---- Kartu terpusat: login, pesan, konfirmasi, token ------------------------ */
.centered-shell { max-width: 920px; margin: 0 auto; padding: 44px 28px 32px; min-height: 100vh; display: flex; flex-direction: column; }
.centered-brand { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 28px; }
.centered-brand img { width: 120px; height: 74px; object-fit: contain; }
.product-label { font-size: 11px; font-weight: 750; letter-spacing: .18em; color: var(--muted); }
.centered-footer { margin-top: auto; padding-top: 28px; text-align: center; color: var(--dim); font-size: 12px; }
.card { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.auth-card { display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; }
.auth-main { padding: 44px 44px 40px; }
.auth-main h1 { font-size: 30px; }
.lead { color: var(--muted); font-size: 16px; margin-top: 12px; max-width: 60ch; }
.auth-main .btn-google { margin-top: 30px; }
.fine { font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-aside { padding: 44px 36px 40px; background: var(--soft); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.auth-aside p { color: var(--muted); font-size: 14px; }
.auth-aside .text-link { margin-top: 6px; }
.message-card { max-width: 620px; width: 100%; margin: 0 auto; padding: 40px 40px 36px; }
.message-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; }
.message-icon-warn { background: var(--warn-soft); color: var(--warn); }
.message-icon-danger { background: var(--danger-soft); color: var(--danger); }
.message-icon-neutral { background: #f0f0f5; color: var(--muted); }
.message-icon-ok { background: var(--ok-soft); color: var(--ok); }
.status-code { margin-top: 22px; font-size: 13px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.message-card h1 { margin-top: 4px; font-size: 26px; }
.message-text { font-size: 16px; color: var(--ink-2); margin-top: 12px; overflow-wrap: anywhere; }
.message-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.confirm-card, .token-card { max-width: 760px; padding: 32px 36px 32px; display: flex; flex-direction: column; gap: 22px; }
.token-card { margin: 0 auto; }
.confirm-head { display: flex; align-items: center; gap: 16px; }
.confirm-head h1 { font-size: 24px; }
.confirm-head .page-sub { margin-top: 4px; }
.confirm-form { display: flex; flex-direction: column; gap: 20px; }
.confirm-form .field { max-width: 320px; }
.confirm-card .facts, .token-card .facts { margin: 0; }
.secret-block { border: 1px solid #d9d2ff; border-radius: 14px; background: var(--soft); overflow: hidden; }
.secret-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #e2dcff; }
.secret-label { font-size: 12px; font-weight: 650; color: var(--purple-ink); }
.secret { display: block; padding: 18px 16px; background: transparent; color: var(--ink); font-size: 15px; line-height: 1.6; word-break: break-all; user-select: all; border-radius: 0; }

/* ---- Panduan (/guidance) ---------------------------------------------------- */
.doc-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.doc-top-inner { justify-content: space-between; }
.doc-hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.doc-hero-inner { max-width: 1180px; margin: 0 auto; padding: 56px 28px 44px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.quickstart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px 28px 14px; }
.quickstart h2 { font-size: 16px; margin-bottom: 4px; }
.quickstart .steps li { font-size: 14px; color: var(--ink-2); }
.quickstart .text-link { font-size: 13px; margin-left: 2px; }
.doc-hero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -.03em; max-width: 18ch; }
.doc-hero .lead { font-size: 17px; max-width: 64ch; margin-top: 16px; }
.endpoint { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 640px; margin-top: 28px; padding: 14px 14px 14px 20px; background: var(--surface); border: 1px solid #d9d2ff; border-radius: 14px; box-shadow: var(--shadow); }
.endpoint-text { min-width: 0; }
.endpoint-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.endpoint code { display: block; background: none; padding: 0; margin-top: 2px; font-size: 16px; color: var(--ink); font-weight: 560; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--purple); }
.doc { max-width: 1180px; margin: 0 auto; padding: 44px 28px 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc-title { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc ol ol { padding-left: 14px; border-left: 1px solid var(--line); margin: 4px 0 6px 2px; }
.toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.toc a:hover { background: var(--soft); color: var(--purple-ink); }
.toc ol ol a { font-size: 13px; color: var(--muted); padding: 3px 10px; }
.prose { max-width: 760px; min-width: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose > .doc-section + .doc-section, .prose > section + section { margin-top: 56px; }
.doc-section > h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 14px; padding-top: 4px; }
.doc-section > p + p, .doc-section > p + ul, .doc-section > ul + p, .doc-section > p + .callout, .doc-section > .steps + .note { margin-top: 14px; }
.tight { padding-left: 20px; margin: 14px 0 0; }
.tight li + li { margin-top: 6px; }
.tight li::marker { color: var(--purple); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 0 40px; margin-bottom: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--purple-soft); color: var(--purple-ink); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.client { margin-top: 28px; padding: 26px 28px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.client h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 10px; }
.client h3 .icon { color: var(--purple); }
.client h3 code { font-size: .85em; }
.client > p + .code, .client > .code + .tight, .client > .code + .steps, .client > .tight + .callout { margin-top: 16px; }
.client .facts { margin: 16px 0 0; }
.code { margin-top: 14px; border-radius: 12px; background: #1d1f33; overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.code-lang { font-family: var(--mono); font-size: 12px; color: #a9abc8; }
.code .btn-secondary { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #e6e6f5; }
.code .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.code .copy-btn.is-copied { background: rgba(63, 191, 140, .16); border-color: rgba(63, 191, 140, .4); color: #9ee8c8; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: #ecebff; font-size: 13.5px; line-height: 1.65; scrollbar-color: #4a4c6a transparent; }
.code pre code { background: none; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.code ::selection { background: #4b3fb8; color: #fff; }
.tool-list { display: grid; gap: 1px; margin-top: 18px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tool { background: var(--surface); padding: 20px 22px; }
.tool h3 code { background: none; padding: 0; color: var(--purple-ink); font-size: 15px; }
.tool p { margin-top: 6px; font-size: 14.5px; }
.tool .params { color: var(--muted); font-size: 13px; }
.tool .ask { color: var(--ink); font-style: italic; }
.doc-section > .tool-list + p { margin-top: 16px; }
.defs { margin: 16px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.defs > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 650; color: var(--ink); }
.defs dd { margin: 0; color: var(--ink-2); }
.defs + .callout { margin-top: 20px; }
.rules { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.rules .icon { color: var(--purple); margin-top: 2px; }
.doc-table { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.doc-table td { vertical-align: top; font-size: 14px; }
.doc-table td:first-child { width: 22%; }
.doc-footer { max-width: 1180px; margin: 40px auto 0; padding: 28px 28px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---- Responsif ---------------------------------------------------------------- */
/* OAuth consent (spec D19), meniru halaman connect basecamp-mcp */
.message-icon-accent { background: var(--purple-soft); color: var(--purple-ink); }
.consent-card { max-width: 620px; width: 100%; margin: 0 auto; padding: 36px 40px 32px; }
.consent-head { display: flex; gap: 16px; align-items: flex-start; }
.consent-head h1 { font-size: 26px; margin-top: 2px; }
.consent-head .lead { margin-top: 8px; }
.identity-list { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.identity-list > div { padding: 14px 18px; min-width: 0; }
.identity-list > div + div { border-left: 1px solid var(--line); }
.identity-list dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.identity-list dd { margin: 4px 0 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.identity-list .row-meta { display: block; }
.identity-list > .identity-wide { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
.consent-card > .callout { margin-top: 16px; }
.consent-details { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--surface-2); }
.consent-details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.consent-details .facts { margin: 12px 0 0; }
.permission { margin-top: 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--soft); }
.permission h2 { font-size: 15px; margin: 0; }
.permission-list { list-style: none; padding: 0; margin: 10px 0 0; }
.permission-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.permission-list .icon { color: var(--ok); flex-shrink: 0; margin-top: 2px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

@media (max-width: 960px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px 16px; padding: 10px 20px 0; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none; }
  .nav a { flex-shrink: 0; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .doc-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .quickstart { max-width: 640px; }
  .toc { position: static; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .consent-card { padding: 28px 22px; }
  .identity-list { grid-template-columns: minmax(0, 1fr); }
  .identity-list > div + div { border-left: 0; border-top: 1px solid var(--line); }
  body { font-size: 15px; }
  h1 { font-size: 24px; }
  .page { padding: 24px 16px 16px; }
  .topbar-inner, .doc-top-inner { padding-left: 16px; padding-right: 16px; }
  .nav { margin: 0 -16px; padding: 0 16px 8px; }
  .session-email { display: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .page-head > .btn, .page-head form .btn { width: 100%; }
  .panel-head { padding: 18px 16px 14px; }
  .form-grid { padding: 18px 16px 20px; grid-template-columns: minmax(0, 1fr); }
  .form-actions .btn { flex: 1; }
  .filters { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .filter-actions .btn { flex: 1; }
  .panel > .callout { margin: 16px 16px 0; }

  /* Tabel menjadi daftar kartu: label kolom dari data-label. */
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td, .table-stack td:first-child, .table-stack td:last-child { padding: 5px 0; border: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: baseline; text-align: left; }
  .table-stack td > * { justify-self: start; max-width: 100%; }
  .table-stack td > .row-meta { grid-column: 2; margin-top: -8px; }
  .table-stack td:first-child > .row-meta { grid-column: 1; margin-top: 2px; }
  .table-stack td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); }
  .table-stack td:first-child { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
  .table-stack td:first-child::before { display: none; }
  .table-stack td.actions { grid-template-columns: minmax(0, 1fr); padding-top: 10px; display: flex; gap: 8px; }
  .table-stack td.actions::before { display: none; }
  .table-stack td.actions:empty { display: none; }
  .table-stack .num { text-align: left; }
  .doc-table td:first-child { width: 100%; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .table th:last-child, .table td:last-child { padding-right: 16px; }
  .table-stack td:first-child, .table-stack td:last-child { padding-left: 0; padding-right: 0; }

  .centered-shell { padding: 22px 16px 20px; }
  .centered-brand { margin-bottom: 20px; }
  .centered-brand img { width: 96px; height: 60px; }
  .auth-card { grid-template-columns: minmax(0, 1fr); }
  .auth-main, .auth-aside { padding: 28px 22px; }
  .auth-main h1 { font-size: 25px; }
  .auth-aside { border-left: 0; border-top: 1px solid var(--line); }
  .message-card { padding: 28px 22px; }
  .confirm-card, .token-card { padding: 24px 20px; }
  .confirm-head { align-items: flex-start; }
  .confirm-head h1 { font-size: 21px; }
  .card { border-radius: 18px; }

  .doc-hero-inner { padding: 36px 16px 32px; }
  .doc-hero h1 { font-size: 30px; }
  .endpoint { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .endpoint code { font-size: 14.5px; }
  .doc { padding: 28px 16px 16px; }
  .client { padding: 20px 18px 22px; }
  .defs > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .doc-footer { padding: 24px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
