/* SENDAL WAGU - tema ringan di atas Filament. Tanpa build; dimuat lewat render hook HEAD_END. */

:root {
  --sw-accent: #0d9f6e;
  --sw-accent-strong: #087a55;
  --sw-accent-soft: rgba(13, 159, 110, .10);
  --sw-ink: #12211b;
  --sw-muted: #5b6d66;
  --sw-line: rgba(18, 33, 27, .10);
  --sw-surface: #fff;
  --sw-bg: #f3f6f4;
  --sw-code-bg: #0f1d18;
  --sw-code-text: #d5e7df;
  --sw-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}
.dark {
  --sw-accent-strong: #5fdcb0;
  --sw-accent-soft: rgba(95, 220, 176, .12);
  --sw-ink: #e8f1ed;
  --sw-muted: #93a69d;
  --sw-line: rgba(255, 255, 255, .10);
  --sw-surface: #18181b;
  --sw-bg: #09090b;
  --sw-code-bg: #0b1511;
}

/* ── Chrome Filament ─────────────────────────────── */
html:not(.dark) .fi-body { background: var(--sw-bg); }
.fi-header-heading { font-weight: 700; letter-spacing: -.02em; }
.fi-btn { border-radius: 10px; font-weight: 600; }
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat { border-radius: 14px; }
.fi-wi-stats-overview-stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.fi-ta-header-cell { font-weight: 600; }
.fi-sidebar-item-btn { border-radius: 10px; font-weight: 500; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { font-weight: 600; }
.fi-sidebar-group-label { font-size: .75rem; font-weight: 600; color: var(--sw-muted); }
html:not(.dark) .fi-sidebar, html:not(.dark) .fi-sidebar-nav, html:not(.dark) .fi-sidebar-header { background: #fff; }
html:not(.dark) .fi-sidebar { border-right: 1px solid var(--sw-line); }

/* Halaman login / daftar — split-screen modern */
html:not(.dark) .fi-simple-layout { background: linear-gradient(180deg, #f3f8f6, #eaf1ed); }
.dark .fi-simple-layout { background: #09090b; }
.fi-simple-layout { align-items: stretch; }
@media (min-width: 1024px) { .fi-simple-layout { flex-direction: row; } }

.fi-simple-main-ctn { padding: 1.5rem; }
.fi-simple-main {
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(18, 33, 27, .05), 0 20px 45px -18px rgba(18, 33, 27, .22);
  position: relative;
  overflow: hidden;
  animation: sw-auth-in .5s ease both;
}
.fi-simple-main::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--sw-accent), #5fdcb0, var(--sw-accent));
}
.fi-simple-header { align-items: flex-start !important; }
.fi-simple-header-heading { font-weight: 800; letter-spacing: -.03em; font-size: 1.6rem; }
.fi-simple-header-subheading { color: var(--sw-muted); }
@keyframes sw-auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.fi-simple-main .fi-input, .fi-simple-main .fi-fo-text-input { border-radius: 12px; }
.fi-simple-main .fi-input:focus-within { box-shadow: 0 0 0 3px var(--sw-accent-soft); }
.fi-simple-main .fi-btn.fi-color-primary { border-radius: 12px; font-weight: 700; box-shadow: 0 10px 22px -8px rgba(13, 159, 110, .55); transition: transform .15s ease, box-shadow .15s ease; }
.fi-simple-main .fi-btn.fi-color-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -8px rgba(13, 159, 110, .6); }

.sw-auth-note { margin-top: 1.25rem; text-align: center; font-size: .85rem; color: var(--sw-muted); }
.sw-auth-note a { color: var(--sw-accent-strong); font-weight: 600; }

.sw-login-tabs { display: flex; gap: .25rem; padding: .25rem; margin-bottom: 1.5rem; background: rgba(18, 33, 27, .06); border-radius: 12px; }
.dark .sw-login-tabs { background: rgba(255, 255, 255, .07); }
.sw-login-tabs a { flex: 1; text-align: center; padding: .5rem .75rem; border-radius: 9px; font-size: .875rem; font-weight: 600; color: var(--sw-muted); text-decoration: none; transition: background .15s ease, color .15s ease; }
.sw-login-tabs a.is-on { background: var(--sw-surface); color: var(--sw-ink); box-shadow: 0 1px 2px rgba(18, 33, 27, .08); }

/* Panel kiri (aside) — hanya muncul di layar lebar */
.sw-auth-aside { display: none; }
@media (min-width: 1024px) {
  .sw-auth-aside {
    display: flex; flex: 0 0 44%; position: relative; overflow: hidden;
    background: linear-gradient(155deg, var(--sw-accent-strong), var(--sw-accent) 55%, #0a6b4a);
    color: #fff;
  }
}
.sw-auth-aside-glow { position: absolute; border-radius: 999px; filter: blur(60px); opacity: .55; pointer-events: none; }
.sw-auth-aside-glow-a { width: 22rem; height: 22rem; background: #5fdcb0; top: -6rem; right: -6rem; }
.sw-auth-aside-glow-b { width: 18rem; height: 18rem; background: #0a4d38; bottom: -5rem; left: -4rem; }
.sw-auth-aside-grid { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.sw-auth-aside-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1.75rem; padding: 3.5rem 3rem; max-width: 30rem; margin: auto; }
.sw-auth-aside-brand { display: flex; align-items: center; gap: .6rem; }
.sw-auth-aside-mark { width: 2rem; height: 2rem; flex: none; }
.sw-auth-aside-name { font-weight: 700; letter-spacing: .06em; font-size: .95rem; }
.sw-auth-aside-badge { font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: rgba(255,255,255,.18); }
.sw-auth-aside-headline { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.sw-auth-aside-list { display: flex; flex-direction: column; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.sw-auth-aside-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: .95rem; color: rgba(255,255,255,.92); }
.sw-auth-aside-list svg { width: 1.15rem; height: 1.15rem; flex: none; margin-top: .1rem; color: #bff7de; }
.sw-auth-aside-foot { font-size: .8rem; color: rgba(255,255,255,.65); line-height: 1.6; margin-top: auto; }

/* ── Brand ───────────────────────────────────────── */
.sw-brand { display: flex; align-items: center; gap: .6rem; color: var(--sw-ink); }
.sw-brand-mark { width: 2rem; height: 2rem; flex: none; }
.sw-brand-name { font-weight: 700; font-size: 1rem; letter-spacing: .04em; white-space: nowrap; }
.sw-brand-tag { font-size: .7rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--sw-accent-soft); color: var(--sw-accent-strong); }

/* ── Komponen umum ───────────────────────────────── */
.sw-stack { display: flex; flex-direction: column; gap: 1rem; }
.sw-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.sw-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 14px; }
.sw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sw-card-head h3 { font-size: 1rem; font-weight: 700; }
.sw-card-foot { margin-top: auto; }
.sw-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sw-muted { color: var(--sw-muted); font-size: .875rem; line-height: 1.6; }
.sw-muted code, .sw-prose code { font-family: var(--sw-mono); font-size: .85em; }
.sw-link { color: var(--sw-accent-strong); font-weight: 600; font-size: .875rem; }
.sw-pill { font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: rgba(18, 33, 27, .07); color: var(--sw-muted); }
.sw-pill.is-ok { background: var(--sw-accent-soft); color: var(--sw-accent-strong); }
.dark .sw-pill { background: rgba(255, 255, 255, .08); }
.sw-token { padding: .75rem .9rem; border: 1px solid var(--sw-line); border-radius: 10px; background: rgba(18, 33, 27, .04); overflow-x: auto; }
.dark .sw-token { background: rgba(255, 255, 255, .04); }
.sw-token code { font-family: var(--sw-mono); font-size: .85rem; word-break: break-all; color: var(--sw-ink); }

.sw-banner { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; margin-bottom: 1.25rem; border: 1px solid rgba(13, 159, 110, .28); border-radius: 14px; background: var(--sw-accent-soft); color: var(--sw-ink); }
.sw-banner svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--sw-accent); }
.sw-banner span { display: block; margin-top: .15rem; font-size: .875rem; color: var(--sw-muted); }

/* Dashboard: langkah awal */
.sw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.sw-steps a { display: flex; gap: .75rem; height: 100%; padding: .9rem; border: 1px solid var(--sw-line); border-radius: 12px; color: inherit; text-decoration: none; }
.sw-steps a:hover { border-color: var(--sw-accent); }
.sw-steps-mark { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 999px; background: rgba(18, 33, 27, .07); color: var(--sw-muted); font-size: .8rem; font-weight: 700; }
.dark .sw-steps-mark { background: rgba(255, 255, 255, .09); }
.sw-steps-mark svg { width: 1rem; height: 1rem; }
.sw-steps strong { display: block; font-size: .9rem; }
.sw-steps small { display: block; margin-top: .15rem; font-size: .8rem; line-height: 1.45; color: var(--sw-muted); }
.sw-steps .is-done a { opacity: .7; }
.sw-steps .is-done .sw-steps-mark { background: var(--sw-accent); color: #fff; }

/* Pilih paket */
.sw-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.sw-plan { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.4rem; background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 16px; }
.sw-plan.is-current { border-color: var(--sw-accent); box-shadow: 0 0 0 1px var(--sw-accent); }
.sw-plan-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sw-plan-head h3 { font-size: 1.05rem; font-weight: 700; }
.sw-plan-price { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.sw-plan-price small { font-size: .85rem; font-weight: 500; letter-spacing: 0; color: var(--sw-muted); }
.sw-duration { display: flex; gap: .35rem; flex-wrap: wrap; }
.sw-duration button { flex: 1 1 auto; min-width: 4.2rem; padding: .35rem .3rem; border: 1px solid var(--sw-line); border-radius: 10px; background: transparent; font-size: .76rem; font-weight: 600; color: var(--sw-muted); cursor: pointer; text-align: center; line-height: 1.25; }
.sw-duration button small { display: block; font-weight: 500; font-size: .66rem; color: inherit; }
.sw-duration button.is-on { border-color: var(--sw-accent); background: var(--sw-accent-soft); color: var(--sw-accent-strong); }
.sw-plan-sub { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--sw-muted); margin-top: -.6rem; }
.sw-plan-list { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 0; list-style: none; flex: 1; }
.sw-plan-list li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.sw-plan-list svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--sw-accent); }
.sw-plan .fi-btn { width: 100%; justify-content: center; }

/* Modal QR */
.sw-qr { text-align: center; }
.sw-qr img { display: block; width: 100%; max-width: 15rem; margin: 0 auto 1rem; padding: .5rem; border: 1px solid var(--sw-line); border-radius: 12px; background: #fff; }
.sw-qr ol { max-width: 20rem; margin: 0 auto; padding-left: 1.25rem; text-align: left; list-style: decimal; font-size: .9rem; line-height: 1.75; }
.sw-qr p { margin-top: .9rem; font-size: .8rem; color: var(--sw-muted); }
.sw-qr .is-error { color: #b42318; }
.dark .sw-qr .is-error { color: #fda29b; }

/* ── Dokumentasi ─────────────────────────────────── */
.sw-docs { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 2.25rem; align-items: start; color: var(--sw-ink); }
.sw-lang { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.sw-toc { position: sticky; top: 5.5rem; }
.sw-toc nav { display: flex; flex-direction: column; border-left: 1px solid var(--sw-line); }
.sw-toc a { margin-left: -1px; padding: .45rem .9rem; border-left: 2px solid transparent; color: var(--sw-muted); font-size: .875rem; font-weight: 500; text-decoration: none; }
.sw-toc a:hover { color: var(--sw-ink); }
.sw-toc a.is-active { border-left-color: var(--sw-accent); color: var(--sw-accent-strong); font-weight: 600; }
.sw-toc a:focus-visible, .sw-btn:focus-visible, .sw-faq summary:focus-visible { outline: 2px solid var(--sw-accent); outline-offset: 2px; }

.sw-main { min-width: 0; }
.sw-sec { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--sw-line); scroll-margin-top: 5.5rem; }
.sw-sec:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.sw-sec h2 { margin-bottom: .6rem; font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.sw-sec h3 { margin: 1.5rem 0 .5rem; font-size: 1rem; font-weight: 700; }
.sw-sec p { max-width: 70ch; margin: .5rem 0; line-height: 1.75; color: var(--sw-muted); }
.sw-sec a:not(.sw-btn) { color: var(--sw-accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sw-sec em { font-style: normal; font-weight: 600; color: var(--sw-ink); }
.sw-sec code { padding: .1rem .4rem; border-radius: 6px; background: var(--sw-accent-soft); color: var(--sw-accent-strong); font-family: var(--sw-mono); font-size: .85em; }
.sw-list { margin: .75rem 0 0; padding-left: 1.2rem; list-style: disc; line-height: 1.75; color: var(--sw-muted); }
.sw-list li { margin: .35rem 0; padding-left: .2rem; }
.sw-list li::marker { color: var(--sw-accent); }
.sw-prose { max-width: 70ch; line-height: 1.75; color: var(--sw-muted); }
.sw-prose p, .sw-prose ul, .sw-prose ol { margin: .6rem 0; }
.sw-prose ul { list-style: disc; padding-left: 1.2rem; }

/* Langkah berurutan */
.sw-flow { margin: 1.25rem 0; padding: 0; list-style: none; counter-reset: sw-step; }
.sw-flow li { position: relative; margin: 0; padding: 0 0 1.25rem 2.75rem; line-height: 1.7; color: var(--sw-muted); counter-increment: sw-step; }
.sw-flow li strong { color: var(--sw-ink); }
.sw-flow li::before { content: counter(sw-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 999px; background: var(--sw-accent-soft); color: var(--sw-accent-strong); font-size: .8rem; font-weight: 700; }
.sw-flow li:not(:last-child)::after { content: ""; position: absolute; left: .9rem; top: 2.1rem; bottom: .25rem; width: 1px; background: var(--sw-line); }

/* Endpoint */
.sw-endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1rem 0; padding: .6rem .7rem; border: 1px solid var(--sw-line); border-radius: 12px; background: var(--sw-surface); }
.sw-sec .sw-endpoint code { flex: 1; min-width: 0; padding: 0; background: none; color: var(--sw-ink); font-size: .9rem; overflow-wrap: anywhere; }
.sw-method { padding: .25rem .6rem; border-radius: 8px; background: var(--sw-accent); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.sw-method.is-base { background: rgba(18, 33, 27, .09); color: var(--sw-muted); }
.dark .sw-method.is-base { background: rgba(255, 255, 255, .1); }
.sw-endpoint .sw-copy { color: var(--sw-muted); background: rgba(18, 33, 27, .06); }
.dark .sw-endpoint .sw-copy { background: rgba(255, 255, 255, .08); }

/* Blok kode */
.sw-code { margin: 0 0 1rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, .05); border-radius: 14px; background: var(--sw-code-bg); }
.sw-code-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .55rem .4rem .4rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sw-code-title { display: flex; align-items: center; gap: .5rem; padding-left: .5rem; color: #a9c2b7; font-size: .8rem; font-weight: 600; }
.sw-dot { width: .5rem; height: .5rem; border-radius: 999px; background: #6f8b80; }
.sw-dot.is-ok { background: #34d399; }
.sw-tabs { display: flex; gap: .15rem; overflow-x: auto; }
.sw-tabs label { padding: .35rem .75rem; border-radius: 8px; color: #8fa89d; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sw-tabs label:hover { color: #e3f0ea; }
.sw-copy { padding: .35rem .7rem; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #b5cbc1; font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; }
.sw-copy:hover { color: #fff; }
.sw-copy.is-done { color: #7ee2b8; }
.sw-code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; color: var(--sw-code-text); font: .8125rem/1.7 var(--sw-mono); tab-size: 2; white-space: pre; }
.sw-sec .sw-code pre code, .sw-code pre code { padding: 0; background: none; color: inherit; font: inherit; }
.sw-pane { display: none; }

.sw-docs:has(#sw-lang-curl:checked) .sw-pane-curl,
.sw-docs:has(#sw-lang-php:checked) .sw-pane-php,
.sw-docs:has(#sw-lang-js:checked) .sw-pane-js,
.sw-docs:has(#sw-lang-python:checked) .sw-pane-python { display: block; }
.sw-docs:has(#sw-lang-curl:checked) .sw-tabs label[data-lang="curl"],
.sw-docs:has(#sw-lang-php:checked) .sw-tabs label[data-lang="php"],
.sw-docs:has(#sw-lang-js:checked) .sw-tabs label[data-lang="js"],
.sw-docs:has(#sw-lang-python:checked) .sw-tabs label[data-lang="python"] { background: rgba(255, 255, 255, .1); color: #fff; }
.sw-docs:has(#sw-lang-curl:focus-visible) .sw-tabs label[data-lang="curl"],
.sw-docs:has(#sw-lang-php:focus-visible) .sw-tabs label[data-lang="php"],
.sw-docs:has(#sw-lang-js:focus-visible) .sw-tabs label[data-lang="js"],
.sw-docs:has(#sw-lang-python:focus-visible) .sw-tabs label[data-lang="python"] { outline: 2px solid #7ee2b8; outline-offset: -2px; }

.t-k { color: #7ee2b8; } .t-s { color: #f2c879; } .t-c { color: #6f8b80; font-style: italic; }
.t-n { color: #f0a48a; } .t-f { color: #9ec5fe; } .t-p { color: #9ec5fe; } .t-v { color: #e8b4f8; }

/* Tabel */
.sw-tbl-wrap { margin: .75rem 0 1rem; overflow-x: auto; border: 1px solid var(--sw-line); border-radius: 12px; background: var(--sw-surface); }
.sw-tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.sw-tbl th { padding: .65rem .9rem; border-bottom: 1px solid var(--sw-line); background: rgba(18, 33, 27, .03); text-align: left; font-weight: 600; color: var(--sw-muted); white-space: nowrap; }
.dark .sw-tbl th { background: rgba(255, 255, 255, .03); }
.sw-tbl td { padding: .8rem .9rem; border-bottom: 1px solid var(--sw-line); vertical-align: top; line-height: 1.6; color: var(--sw-muted); }
.sw-tbl tr:last-child td { border-bottom: 0; }
.sw-tbl td strong { color: var(--sw-ink); }
.sw-tbl td:first-child { white-space: nowrap; }
.sw-tbl td code { word-break: break-word; }
.sw-tag { margin-left: .35rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(18, 33, 27, .07); color: var(--sw-muted); font-size: .7rem; font-weight: 600; }
.sw-tag.is-req { background: rgba(217, 45, 32, .1); color: #b42318; }
.dark .sw-tag { background: rgba(255, 255, 255, .08); }
.dark .sw-tag.is-req { background: rgba(240, 68, 56, .16); color: #fda29b; }

.sw-badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-family: var(--sw-mono); font-size: .78rem; font-weight: 600; }
.sw-badge.is-success { background: rgba(13, 159, 110, .13); color: #087a55; }
.sw-badge.is-warning { background: rgba(217, 119, 6, .14); color: #a15c07; }
.sw-badge.is-danger { background: rgba(217, 45, 32, .12); color: #b42318; }
.dark .sw-badge.is-success { color: #5fdcb0; }
.dark .sw-badge.is-warning { color: #f5b85a; }
.dark .sw-badge.is-danger { color: #fda29b; }

.sw-note { margin: 1.25rem 0 0; padding: .85rem 1rem; border: 1px solid rgba(217, 119, 6, .3); border-radius: 12px; background: rgba(245, 158, 11, .08); font-size: .875rem; line-height: 1.65; color: var(--sw-ink); }

.sw-faq { margin: .5rem 0; padding: 0 1rem; border: 1px solid var(--sw-line); border-radius: 12px; background: var(--sw-surface); }
.sw-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; font-weight: 600; cursor: pointer; list-style: none; }
.sw-faq summary::-webkit-details-marker { display: none; }
.sw-faq summary::after { content: "+"; color: var(--sw-muted); font-size: 1.2rem; font-weight: 500; }
.sw-faq[open] summary::after { content: "\2212"; }
.sw-faq p { margin: 0 0 1rem; }

.sw-btn { display: inline-flex; align-items: center; padding: .55rem 1.05rem; border: 1px solid var(--sw-accent); border-radius: 10px; background: var(--sw-accent); color: #fff; font-size: .875rem; font-weight: 600; text-decoration: none; }
.sw-btn:hover { background: var(--sw-accent-strong); border-color: var(--sw-accent-strong); }
.sw-btn.is-ghost { background: transparent; border-color: var(--sw-line); color: var(--sw-ink); }
.dark .sw-btn:hover { color: #06231a; }

@media (max-width: 1180px) {
  .sw-docs { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .sw-toc { position: static; }
  .sw-toc nav { flex-direction: row; flex-wrap: wrap; gap: .35rem; border-left: 0; }
  .sw-toc a { margin: 0; padding: .3rem .75rem; border: 1px solid var(--sw-line); border-radius: 999px; }
  .sw-toc a.is-active { border-color: var(--sw-accent); }
}

/* ── Halaman /docs publik ────────────────────────── */
.sw-public { margin: 0; background: var(--sw-bg); color: var(--sw-ink); font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
:where(.sw-public) *, :where(.sw-public) *::before, :where(.sw-public) *::after { box-sizing: border-box; }
:where(.sw-public) a { text-decoration: none; }
:where(.sw-public) :where(h1, h2, h3, p, ul, ol) { margin: 0; }
:where(.sw-public) table { border-spacing: 0; }
:where(.sw-public) :where(pre, code) { font-family: var(--sw-mono); }
.sw-public summary { outline-offset: 2px; }
.sw-public-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: .8rem clamp(1rem, 4vw, 2.5rem); border-bottom: 1px solid var(--sw-line); background: var(--sw-surface); }
.sw-public-bar nav { display: flex; align-items: center; gap: 1rem; font-size: .875rem; font-weight: 600; }
.sw-public-bar nav a:not(.sw-btn) { color: var(--sw-muted); }
.sw-public-main { max-width: 1240px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.sw-public-hero { margin-bottom: 2.5rem; }
.sw-public-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; }
.sw-public-hero p { margin-top: .5rem; max-width: 64ch; font-size: 1.05rem; line-height: 1.6; color: var(--sw-muted); }
.sw-public .sw-toc { top: 5rem; }

/* ── Chat ────────────────────────────────────────── */
.sw-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 3rem 1.5rem; text-align: center; }
.sw-empty > svg { width: 2.5rem; height: 2.5rem; color: var(--sw-accent); }
.sw-empty h3 { font-size: 1.05rem; font-weight: 700; }
.sw-empty p { max-width: 34ch; }
.sw-input { width: 100%; padding: .55rem .8rem; border: 1px solid var(--sw-line); border-radius: 10px; background: var(--sw-surface); color: var(--sw-ink); font: inherit; font-size: .875rem; }
.sw-input:focus { outline: 2px solid var(--sw-accent); outline-offset: -1px; border-color: transparent; }
textarea.sw-input { resize: none; max-height: 8rem; line-height: 1.5; }
.sw-send { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 10px; background: var(--sw-accent); color: #fff; cursor: pointer; }
.sw-send:hover { background: var(--sw-accent-strong); }
.sw-send:disabled { opacity: .5; cursor: default; }
.sw-send svg { width: 1.15rem; height: 1.15rem; }
.dark .sw-send { color: #06231a; }

.sw-chat { display: grid; grid-template-columns: 20rem minmax(0, 1fr); height: calc(100dvh - 11.5rem); min-height: 28rem; overflow: hidden; border: 1px solid var(--sw-line); border-radius: 16px; background: var(--sw-surface); }
.sw-chat-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--sw-line); }
.sw-chat-tools { display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border-bottom: 1px solid var(--sw-line); }
.sw-chat-new { display: flex; gap: .5rem; }
.sw-chat-list { flex: 1; margin: 0; padding: .35rem; overflow-y: auto; list-style: none; }
.sw-chat-note { padding: 1rem; font-size: .85rem; line-height: 1.6; color: var(--sw-muted); text-align: center; }
.sw-chat-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .65rem; border: 0; border-radius: 12px; background: none; color: inherit; text-align: left; cursor: pointer; }
.sw-chat-item:hover { background: rgba(18, 33, 27, .04); }
.dark .sw-chat-item:hover { background: rgba(255, 255, 255, .05); }
.sw-chat-item.is-active { background: var(--sw-accent-soft); }
.sw-avatar { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 999px; background: var(--sw-accent-soft); color: var(--sw-accent-strong); font-weight: 700; }
.sw-chat-item-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: .1rem; }
.sw-chat-item-top { display: flex; justify-content: space-between; gap: .5rem; }
.sw-chat-item-top strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.sw-chat-item-top small { flex: none; font-size: .72rem; color: var(--sw-muted); }
.sw-chat-item-preview { overflow: hidden; font-size: .8rem; color: var(--sw-muted); text-overflow: ellipsis; white-space: nowrap; }

.sw-chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sw-chat-main > .sw-empty { flex: 1; }
.sw-chat-head { display: flex; align-items: center; gap: .75rem; padding: .65rem .9rem; border-bottom: 1px solid var(--sw-line); }
.sw-chat-head strong { display: block; font-size: .95rem; }
.sw-chat-head small { display: block; font-family: var(--sw-mono); font-size: .72rem; color: var(--sw-muted); }
.sw-chat-back { display: none; padding: .25rem; border: 0; background: none; color: inherit; cursor: pointer; }
.sw-chat-back svg { width: 1.25rem; height: 1.25rem; }
.sw-chat-msgs { display: flex; flex: 1; flex-direction: column; gap: .3rem; min-height: 0; padding: 1rem clamp(.75rem, 3vw, 1.75rem); overflow-y: auto; background: #eef3f0; }
.dark .sw-chat-msgs { background: #0d1512; }
.sw-day { align-self: center; margin: .6rem 0; }
.sw-day span { padding: .2rem .7rem; border-radius: 999px; background: var(--sw-surface); color: var(--sw-muted); font-size: .72rem; font-weight: 600; }
.sw-msg { display: flex; flex-direction: column; align-self: flex-start; max-width: min(34rem, 82%); padding: .45rem .7rem .3rem; border-radius: 12px 12px 12px 4px; background: var(--sw-surface); box-shadow: 0 1px 1px rgba(18, 33, 27, .08); font-size: .9rem; line-height: 1.5; }
.sw-msg.is-mine { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: #d6f5e3; color: #0f2a1f; }
.dark .sw-msg.is-mine { background: #12503a; color: #e8f6ef; }
.sw-msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sw-msg-meta { align-self: flex-end; margin-top: .1rem; font-size: .68rem; color: var(--sw-muted); }
.sw-msg.is-mine .sw-msg-meta { color: rgba(15, 42, 31, .6); }
.dark .sw-msg.is-mine .sw-msg-meta { color: rgba(232, 246, 239, .65); }
.sw-ack { margin-left: .3rem; font-style: normal; letter-spacing: -.15em; }
.sw-ack.is-read { color: #0b8f63; }
.dark .sw-ack.is-read { color: #5fdcb0; }
.sw-chat-composer { display: flex; align-items: flex-end; gap: .6rem; padding: .7rem .9rem; border-top: 1px solid var(--sw-line); }

.sw-attach-btn { position: relative; display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 10px; background: transparent; color: var(--sw-muted); cursor: pointer; }
.sw-attach-btn:hover { background: var(--sw-line); }
.sw-attach-btn svg { width: 1.1rem; height: 1.1rem; }
.sw-attach-btn.is-recording { background: #fee2e2; color: #dc2626; }
.sw-hidden-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw-chat-attach-preview { display: flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-top: 1px solid var(--sw-line); font-size: .85rem; }
.sw-chat-attach-preview .sw-input { flex: 1; }

@media (max-width: 860px) {
  .sw-chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 9.5rem); }
  .sw-chat.has-chat .sw-chat-side, .sw-chat:not(.has-chat) .sw-chat-main { display: none; }
  .sw-chat-side { border-right: 0; }
  .sw-chat-back { display: block; }
}

.sw-chat-free { margin: 0; padding: .4rem .9rem 0; font-size: .75rem; color: var(--sw-muted); }
.sw-plan-list li.is-off { color: var(--sw-muted); }
.sw-plan-list li.is-off svg { color: var(--sw-muted); }
