:root {
  --doc-bg: #f7f8fa;
  --doc-surface: #ffffff;
  --doc-surface-2: #f1f3f6;
  --doc-foreground: #171a21;
  --doc-heading-soft: #656d79;
  --doc-muted: #6d7480;
  --doc-border: #dfe3e8;
  --doc-primary: #da2827;
  --doc-primary-soft: #f4e5e2;
  --doc-primary-strong: #b94f44;
  --doc-success: #4e9b62;
  --doc-success-soft: #e8f5eb;
  --doc-info: #58a7c7;
  --doc-warning: #d9983d;
  --doc-danger: #cc554c;
  --doc-code: #10151d;
  --doc-code-text: #d8dee9;
  --doc-shadow: 0 18px 44px rgba(30, 38, 52, .08);
  --header-height: 72px;
  --sidebar-width: 272px;
  --toc-width: 220px;
}

[data-bs-theme="dark"] {
  --doc-bg: #090d13;
  --doc-surface: #0e141c;
  --doc-surface-2: #151c27;
  --doc-foreground: #edf0f5;
  --doc-heading-soft: #8993a2;
  --doc-muted: #929cab;
  --doc-border: #242d39;
  --doc-primary: #da2827;
  --doc-primary-soft: #2b1d1f;
  --doc-primary-strong: #da2827;
  --doc-success: #73bd81;
  --doc-success-soft: #12251a;
  --doc-info: #71b9d5;
  --doc-warning: #e3aa57;
  --doc-danger: #ec7a70;
  --doc-code: #070a0f;
  --doc-code-text: #dce3ed;
  --doc-shadow: 0 18px 52px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 28px); }
body {
  margin: 0;
  background: var(--doc-bg);
  color: var(--doc-foreground);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

/* Secara default sembunyikan kedua logo */
.logo .logo-putih,
.logo .logo-hitam {
  display: none;
}

/* Saat Tema Dark (data-bs-theme="dark"): Tampilkan logo putih */
[data-bs-theme="dark"] .logo .logo-putih {
  display: inline-block; /* atau block sesuai kebutuhan layout */
}

/* Saat Tema Light (data-bs-theme="light"): Tampilkan logo hitam */
[data-bs-theme="light"] .logo .logo-hitam {
  display: inline-block; /* atau block sesuai kebutuhan layout */
}
#menuButton {
  display: none;
}

/* Pastikan wrapper GTranslate fleksibel dan terlihat di sidebar */
.gtranslate_wrapper {
  display: block !important;
  width: 100% !important;
}

/* Styling dropdown GTranslate agar cocok dengan tema Dark Mode */
.gtranslate_wrapper select {
  background-color: var(--bs-body-bg, #1e293b) !important;
  color: var(--bs-body-color, #f8fafc) !important;
  border: 1px solid var(--bs-border-color, #334155) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  width: 100% !important;
  font-size: 0.875rem !important;
  outline: none;
}

.gtranslate_wrapper select option {
  background-color: #1e293b;
  color: #f8fafc;
}

.overview-desc {
  padding-top: 30px;
}
.overview-desc a {
  color: #0d6efd !important;
}
.doc-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1040;
  height: var(--header-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(280px, 620px) 1fr;
  align-items: center;
  border-bottom: 1px solid var(--doc-border);
  background: color-mix(in srgb, var(--doc-bg) 94%, transparent);
  backdrop-filter: blur(18px);
}
.brand-wrap { height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.menu-button { border: 0; background: transparent; color: var(--doc-muted); width: 34px; height: 34px; border-radius: 6px; }
.menu-button:hover { background: var(--doc-surface-2); color: var(--doc-foreground); }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px;
  color: #fff; background: var(--doc-primary); box-shadow: 0 8px 22px color-mix(in srgb, var(--doc-primary) 28%, transparent);
}
.brand-name { font-size: 13px; font-weight: 800; line-height: 1.15; }
.brand-sub { color: var(--doc-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
.version { padding: 4px 7px; border-radius: 999px; background: var(--doc-surface-2); color: var(--doc-muted); font-size: 9px; }
.search-trigger {
  height: 44px; 
  margin: 0 24px; 
  display: flex; 
  align-items: center; 
  gap: 11px; padding: 0 14px;
  border: 1px solid transparent; 
  border-radius: 7px; 
  /*background: var(--doc-surface-2); */
  background: none;
  cursor: default !important;
  color: var(--doc-muted); cursor: pointer;
}
.search-trigger:hover {
  border: none !important;
}
.search-trigger:hover { border-color: var(--doc-border); }
.search-trigger .shortcut { margin-left: auto; padding: 2px 6px; border: 1px solid var(--doc-border); border-radius: 4px; font-size: 10px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 16px; padding-right: 28px; color: var(--doc-muted); font-size: 12px; }
.header-link:hover { color: var(--doc-primary); }
.theme-switch { display: flex; padding: 3px; border: 1px solid var(--doc-border); border-radius: 7px; background: var(--doc-surface); }
.theme-btn { width: 30px; height: 30px; border: 0; border-radius: 5px; background: transparent; color: var(--doc-muted); }
.theme-btn.active { background: var(--doc-primary-soft); color: var(--doc-primary-strong); }

.doc-sidebar {
  position: fixed; top: var(--header-height); bottom: 0; left: 0; z-index: 1030;
  width: var(--sidebar-width); padding: 24px 18px; overflow-y: auto;
  border-right: 1px solid var(--doc-border); background: var(--doc-bg); transition: transform .25s ease;
}
.nav-section { margin-bottom: 24px; }
.nav-title { margin: 0 10px 9px; color: var(--doc-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; }
.side-link {
  display: flex; align-items: center; gap: 12px; min-height: 39px; padding: 9px 11px; border-radius: 6px;
  color: var(--doc-muted); font-size: 12px; font-weight: 500;
}
.side-link i { width: 16px; font-size: 14px; }
.side-link:hover { color: var(--doc-foreground); background: var(--doc-surface-2); }
.side-link.active { color: var(--doc-primary-strong); background: var(--doc-primary-soft); font-weight: 700; }
.live-badge { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: var(--doc-success-soft); color: var(--doc-success); font-size: 8px; font-weight: 800; }
.help-card { display: grid; grid-template-columns: 34px 1fr 16px; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--doc-border); border-radius: 7px; background: var(--doc-surface); box-shadow: var(--doc-shadow); }
.help-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: var(--doc-info); background: color-mix(in srgb, var(--doc-info) 12%, transparent); }
.help-card strong { display: block; font-size: 10px; }
.help-card small { display: block; margin-top: 2px; color: var(--doc-muted); font-size: 8px; line-height: 1.45; }

.doc-toc {
  position: fixed; top: var(--header-height); right: 0; bottom: 0; width: var(--toc-width);
  padding: 46px 28px 20px 14px; overflow-y: auto; background: var(--doc-bg);
}
.toc-title { margin-bottom: 13px; color: var(--doc-muted); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.toc-list { border-left: 1px solid var(--doc-border); }
.toc-link { display: block; padding: 7px 0 7px 13px; color: var(--doc-muted); font-size: 10px; }
.toc-link.active { margin-left: -1px; border-left: 2px solid var(--doc-primary); color: var(--doc-primary-strong); font-weight: 700; }
.service-status { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--doc-border); color: var(--doc-muted); font-size: 9px; }
.service-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--doc-success); box-shadow: 0 0 0 4px var(--doc-success-soft); }

.doc-main { margin-left: var(--sidebar-width); margin-right: var(--toc-width); padding-top: var(--header-height); }
.content { width: min(850px, calc(100% - 64px)); margin: 0 auto; padding: 45px 0 100px; }
.doc-section { padding: 18px 0 64px; border-bottom: 1px solid var(--doc-border); }
.doc-section:last-child { border-bottom: 0; }
.status-line { display: flex; align-items: center; gap: 9px; color: var(--doc-success); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.status-line .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--doc-success); box-shadow: 0 0 0 5px var(--doc-success-soft); }
.display-title { max-width: 760px; margin: 22px 0 20px; font-size: clamp(48px, 6vw, 76px); line-height: .98; font-weight: 800; letter-spacing: 0; }
.display-title span { color: var(--doc-heading-soft); }
.lead-copy { max-width: 700px; color: var(--doc-muted); font-size: 16px; line-height: 1.75; }
.section-kicker { color: var(--doc-primary-strong); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.section-title { margin: 8px 0 14px; font-size: 32px; font-weight: 800; letter-spacing: 0; }
.section-copy { max-width: 740px; color: var(--doc-muted); line-height: 1.8; }
.doc-actions { display: flex; gap: 10px; margin: 24px 0 42px; }
.btn-doc-primary { border: 1px solid var(--doc-primary); background: var(--doc-primary); color: #fff; box-shadow: 0 10px 25px color-mix(in srgb, var(--doc-primary) 22%, transparent); }
.btn-doc-primary:hover { border-color: var(--doc-primary-strong); background: var(--doc-primary-strong); color: #fff; }
.btn-doc-ghost { border: 1px solid transparent; color: var(--doc-foreground); }
.btn-doc-ghost:hover { border-color: var(--doc-border); background: var(--doc-surface); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--doc-border); border-radius: 7px; overflow: hidden; box-shadow: var(--doc-shadow); }
.feature-item { min-height: 150px; padding: 24px; background: var(--doc-surface); }
.feature-item + .feature-item { border-left: 1px solid var(--doc-border); }
.feature-item i { color: var(--doc-info); font-size: 20px; }
.feature-item strong { display: block; margin-top: 26px; font-size: 12px; }
.feature-item p { margin: 6px 0 0; color: var(--doc-muted); font-size: 10px; line-height: 1.65; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; }
.flow-step { position: relative; padding: 0 16px 0 0; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 42px; right: 8px; height: 1px; background: var(--doc-border); }
.flow-number { position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--doc-border); border-radius: 50%; background: var(--doc-surface); color: var(--doc-primary-strong); font-size: 11px; font-weight: 800; }
.flow-step h3 { margin: 14px 0 5px; font-size: 12px; font-weight: 800; }
.flow-step p { color: var(--doc-muted); font-size: 10px; line-height: 1.55; }
.note { margin: 24px 0; padding: 16px 18px; border-left: 3px solid var(--doc-info); background: color-mix(in srgb, var(--doc-info) 8%, var(--doc-surface)); border-radius: 0 6px 6px 0; color: var(--doc-muted); line-height: 1.65; }
.note.warning { border-color: var(--doc-warning); background: color-mix(in srgb, var(--doc-warning) 10%, var(--doc-surface)); }
.note.danger { border-color: var(--doc-danger); background: color-mix(in srgb, var(--doc-danger) 10%, var(--doc-surface)); }
.note strong { color: var(--doc-foreground); }
.endpoint { margin: 24px 0; display: flex; align-items: center; min-width: 0; border: 1px solid var(--doc-border); border-radius: 7px; overflow: hidden; background: var(--doc-surface); }
.method { align-self: stretch; display: grid; place-items: center; padding: 0 16px; background: var(--doc-success-soft); color: var(--doc-success); font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 800; }
.method.post { background: color-mix(in srgb, var(--doc-info) 12%, transparent); color: var(--doc-info); }
.endpoint code { min-width: 0; padding: 14px; overflow-x: auto; color: var(--doc-foreground); font-family: "IBM Plex Mono", monospace; font-size: 11px; white-space: nowrap; }
.code-block { position: relative; margin: 20px 0; border: 1px solid var(--doc-border); border-radius: 7px; overflow: hidden; background: var(--doc-code); }
.code-head { display: flex; align-items: center; padding: 10px 13px; border-bottom: 1px solid #242c37; color: #8e9aaa; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.code-dots { display: flex; gap: 5px; margin-right: 10px; }
.code-dots span { width: 7px; height: 7px; border-radius: 50%; background: #3b4553; }
.copy-btn { margin-left: auto; border: 0; background: transparent; color: #8e9aaa; }
.copy-btn:hover { color: #fff; }
pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--doc-code-text); font: 11px/1.75 "IBM Plex Mono", monospace; }
.code-key { color: #80bfff; } .code-string { color: #a8d4a2; } .code-number { color: #e8b872; }
.table-wrap { margin-top: 20px; border: 1px solid var(--doc-border); border-radius: 7px; overflow-x: auto; background: var(--doc-surface); }
.doc-table { width: 100%; min-width: 650px; margin: 0; color: var(--doc-foreground); font-size: 11px; }
.doc-table th { padding: 12px 14px; border-bottom: 1px solid var(--doc-border); background: var(--doc-surface-2); color: var(--doc-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .7px; }
.doc-table td { padding: 13px 14px; border-bottom: 1px solid var(--doc-border); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table code, .inline-code { padding: 2px 5px; border-radius: 4px; background: var(--doc-surface-2); color: var(--doc-primary-strong); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.required { color: var(--doc-danger); font-size: 9px; font-weight: 800; }
.status-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.status-card { padding: 18px; border: 1px solid var(--doc-border); border-radius: 7px; background: var(--doc-surface); }
.status-card i { font-size: 17px; }
.status-card.success i { color: var(--doc-success); } .status-card.pending i { color: var(--doc-warning); } .status-card.failed i { color: var(--doc-danger); }
.status-card h3 { margin: 14px 0 5px; font-size: 12px; }
.status-card p { margin: 0; color: var(--doc-muted); font-size: 10px; line-height: 1.55; }
.glossary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.glossary > div { padding: 18px; border-top: 2px solid var(--doc-primary); background: var(--doc-surface); }
.glossary dt { font-weight: 800; }
.glossary dd { margin: 7px 0 0; color: var(--doc-muted); font-size: 11px; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 30px; color: var(--doc-muted); font-size: 9px; }

.sandbox-panel { margin-top: 24px; border: 1px solid var(--doc-border); border-radius: 7px; overflow: hidden; background: var(--doc-surface); box-shadow: var(--doc-shadow); }
.sandbox-banner { position: relative; min-height: 116px; padding: 25px 26px 20px; background: var(--doc-primary); color: #fff; }
.sandbox-banner-copy { display: flex; align-items: center; gap: 12px; }
.sandbox-banner h3 { margin: 0; font-size: 18px; font-weight: 800; }
.sandbox-banner small { display: block; margin-top: 2px; font-size: 10px; opacity: .86; }
.sandbox-banner p { margin: 12px 0 0; font-size: 10px; opacity: .9; }
.sandbox-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: color-mix(in srgb, #fff 28%, transparent); }
.sandbox-dot.dark { width: 14px; height: 14px; background: var(--doc-foreground); }
.sandbox-badge { position: absolute; top: 34px; right: 24px; padding: 7px 17px; border-radius: 999px; background: #fff; color: var(--doc-primary-strong); font-size: 8px; font-weight: 800; }
.sandbox-body { padding: 22px; }
.sandbox-intro { padding: 18px 22px; border: 1px solid var(--doc-border); border-radius: 6px; }
.sandbox-intro strong { font-size: 12px; }
.sandbox-intro p { margin: 6px 0 0; color: var(--doc-muted); font-size: 10px; line-height: 1.6; }
.sandbox-form, .sandbox-result-card { margin-top: 18px; border: 1px solid var(--doc-border); border-radius: 6px; overflow: hidden; }
.sandbox-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--doc-border); background: var(--doc-surface-2); }
.sandbox-card-head strong { display: block; font-size: 12px; }
.sandbox-card-head small { display: block; margin-top: 2px; color: var(--doc-muted); font-size: 9px; }
.sandbox-fields { display: grid; gap: 20px; padding: 22px 26px 24px; }
.sandbox-field { display: block; color: var(--doc-foreground); font-size: 11px; font-weight: 700; }
.sandbox-field > span { display: block; margin-bottom: 8px; }
.sandbox-field b { color: var(--doc-danger); }
.sandbox-field small { display: block; margin-top: 6px; color: var(--doc-muted); font-size: 9px; font-weight: 400; }
.sandbox-field .form-control, .sandbox-field .input-group-text, .invoice-detail .form-control { border-color: var(--doc-border); background: var(--doc-surface); color: var(--doc-foreground); font-size: 11px; }
.sandbox-field .form-control { min-height: 40px; }
.sandbox-field .input-group-text { background: var(--doc-surface-2); }
.sandbox-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sandbox-submit { width: 100%; background: var(--doc-primary); color: #fff; font-size: 11px; }
.sandbox-submit:hover, .sandbox-submit:focus { background: var(--doc-primary-strong); color: #fff; }
.sandbox-submit:disabled { background: var(--doc-muted); color: #fff; }
.sandbox-result[hidden] { display: none; }
.sandbox-result { margin-top: 28px; }
.sandbox-success { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--doc-success) 45%, var(--doc-border)); border-radius: 5px; background: var(--doc-success-soft); color: var(--doc-success); font-size: 10px; }
.sandbox-success strong { color: var(--doc-foreground); font-size: 11px; }
.sandbox-result-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.qris-preview { display: flex; min-height: 330px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
#sandboxQrCode { padding: 10px; background: #fff; }
#sandboxQrCode img, #sandboxQrCode canvas { display: block; width: 190px !important; height: 190px !important; }
.qris-preview > strong { margin-top: 14px; font-size: 11px; }
.qris-preview > small { margin-top: 5px; color: var(--doc-muted); font-size: 8px; }
.invoice-detail { display: grid; gap: 16px; margin: 0; padding: 22px; }
.invoice-detail div { display: grid; gap: 4px; }
.invoice-detail dt { color: var(--doc-muted); font-size: 9px; font-weight: 500; }
.invoice-detail dd { margin: 0; font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 600; }
.invoice-detail textarea { resize: vertical; font-family: "IBM Plex Mono", monospace; line-height: 1.55; }

.search-modal .modal-content { border: 1px solid var(--doc-border); border-radius: 8px; background: var(--doc-surface); color: var(--doc-foreground); box-shadow: var(--doc-shadow); }
.search-modal .modal-header { border-color: var(--doc-border); }
.search-input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--doc-foreground); font-size: 16px; }
.search-result { display: block; padding: 12px; border-radius: 6px; }
.search-result:hover, .search-result:focus { background: var(--doc-surface-2); }
.search-result strong { display: block; font-size: 12px; }
.search-result span { display: block; margin-top: 3px; color: var(--doc-muted); font-size: 10px; }
.empty-result { padding: 28px; color: var(--doc-muted); text-align: center; }
.sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
  :root { --toc-width: 0px; }
  .doc-toc { display: none; }
  .header-actions .header-link { display: none; }
  #menuButton {
    display: block;
  }
}
@media (max-width: 780px) {
  :root { --header-height: 64px; --sidebar-width: 268px; }
  .doc-header { grid-template-columns: 1fr auto; }
  .brand-wrap { padding: 0 14px; }
  .search-trigger { width: 40px; height: 40px; margin: 0; padding: 0; justify-content: center; background: transparent; }
  .search-trigger span, .search-trigger .shortcut { display: none; }
  .header-actions { padding-right: 12px; gap: 6px; }
  .doc-sidebar { transform: translateX(-100%); }
  .doc-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: var(--header-height) 0 0; z-index: 1020; background: rgba(0,0,0,.42); }
  .sidebar-backdrop.show { display: block; }
  .doc-main { margin: 0; }
  .content { width: calc(100% - 36px); padding-top: 28px; }
  .display-title { font-size: 46px; }
  .feature-grid, .status-cards, .glossary { grid-template-columns: 1fr; }
  .sandbox-field-grid, .sandbox-result-grid { grid-template-columns: 1fr; }
  .sandbox-banner { padding: 22px 18px; }
  .sandbox-banner h3 { font-size: 15px; }
  .sandbox-banner p { padding-right: 76px; line-height: 1.5; }
  .sandbox-badge { top: 24px; right: 16px; }
  .sandbox-body { padding: 14px; }
  .sandbox-fields { padding: 18px 16px; }
  .feature-item + .feature-item { border-left: 0; border-top: 1px solid var(--doc-border); }
  .flow { grid-template-columns: 1fr 1fr; gap: 24px 8px; }
  .flow-step:nth-child(2)::after { display: none; }
  .doc-actions { flex-wrap: wrap; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
