/* =========================================================
   FINANCE ASSISTANT — DOCUMENTATION
   Global Styles
   ========================================================= */


/* =========================================================
   1. RESET & BASE
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  background: #ffffff;
  color: #1f2937;

  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}


/* =========================================================
   2. CSS VARIABLES
   ========================================================= */

:root {

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 260px;
  --content-max-width: 860px;

  /* Colors */
  --color-bg: #ffffff;
  --color-sidebar: #fafafa;
  --color-text: #1f2937;
  --color-text-soft: #6b7280;
  --color-text-muted: #9ca3af;

  --color-border: #e5e7eb;
  --color-border-soft: #f0f0f0;

  --color-primary: #111827;
  --color-primary-soft: #f3f4f6;

  --color-hover: #f5f5f5;
  --color-active: #eeeeee;

  /* Radius */
  --radius-small: 6px;
  --radius-medium: 10px;
  --radius-large: 14px;

  /* Shadow */
  --shadow-header:
    0 1px 2px rgba(0, 0, 0, 0.03);

  --shadow-modal:
    0 20px 60px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   3. HEADER
   ========================================================= */

.docs-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  height: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 24px;

  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);

  box-shadow: var(--shadow-header);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  gap: 14px;
}

.header-right {
  gap: 8px;
}


/* =========================================================
   4. BRAND
   ========================================================= */

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;

  white-space: nowrap;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;

  color: var(--color-primary);
}

.brand-label {
  font-size: 14px;
  color: var(--color-text-muted);
}


/* =========================================================
   5. BUTTONS
   ========================================================= */

.icon-button,
.header-button {
  border: 0;
  background: transparent;
  color: var(--color-text-soft);

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.icon-button {
  width: 36px;
  height: 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: var(--radius-small);

  font-size: 18px;
}

.icon-button:hover,
.header-button:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.header-button {
  height: 36px;

  display: flex;
  align-items: center;
  gap: 7px;

  padding: 0 10px;

  border-radius: var(--radius-small);

  font-size: 13px;
}


/* =========================================================
   6. MAIN LAYOUT
   ========================================================= */

.docs-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}


/* =========================================================
   7. SIDEBAR
   ========================================================= */

.docs-sidebar {
  position: sticky;
  top: var(--header-height);

  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));

  flex-shrink: 0;

  overflow-y: auto;

  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);

  transition:
    transform 0.25s ease,
    width 0.25s ease;
}

.sidebar-inner {
  padding: 28px 16px 40px;
}


/* =========================================================
   8. SIDEBAR CONTENT
   ========================================================= */

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-section-title {
  margin: 0 10px 9px;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--color-text-muted);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;

  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;

  min-height: 36px;

  padding: 7px 10px;

  border-radius: var(--radius-small);

  font-size: 14px;
  line-height: 1.4;

  color: var(--color-text-soft);

  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.sidebar-link:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.sidebar-link.active {
  background: var(--color-active);
  color: var(--color-text);
  font-weight: 600;
}


/* =========================================================
   9. SIDEBAR OVERLAY
   ========================================================= */

.sidebar-overlay {
  display: none;

  position: fixed;
  inset: 0;

  z-index: 900;

  background: rgba(0, 0, 0, 0.35);

  opacity: 0;

  transition: opacity 0.25s ease;
}


/* =========================================================
   10. MAIN CONTENT
   ========================================================= */

.docs-main {
  flex: 1;
  min-width: 0;

  padding: 64px 40px 80px;
}

.docs-article {
  width: 100%;
  max-width: var(--content-max-width);

  margin: 0 auto;
}


/* =========================================================
   11. ARTICLE TYPOGRAPHY
   ========================================================= */

.docs-article h1 {
  margin-bottom: 24px;

  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.15;

  letter-spacing: -0.035em;

  color: var(--color-primary);
}

.docs-article h2 {
  margin-top: 48px;
  margin-bottom: 16px;

  font-size: 27px;
  line-height: 1.3;

  letter-spacing: -0.025em;

  color: var(--color-primary);
}

.docs-article h3 {
  margin-top: 32px;
  margin-bottom: 12px;

  font-size: 20px;
  line-height: 1.4;

  color: var(--color-primary);
}

.docs-article p {
  margin-bottom: 18px;

  font-size: 16px;
  color: var(--color-text);
}

.docs-article strong {
  font-weight: 650;
}

.docs-article ul,
.docs-article ol {
  margin: 0 0 20px 24px;
}

.docs-article li {
  margin-bottom: 7px;
}

.docs-article a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* =========================================================
   12. ARTICLE CODE
   ========================================================= */

.docs-article code {
  padding: 3px 6px;

  border-radius: 5px;

  background: #f3f4f6;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;

  font-size: 0.9em;
}

.docs-article pre {
  margin: 24px 0;

  padding: 18px;

  overflow-x: auto;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);

  background: #f8f8f8;

  line-height: 1.6;
}

.docs-article pre code {
  padding: 0;

  background: transparent;

  font-size: 13px;
}


/* =========================================================
   13. ARTICLE BLOCKQUOTE
   ========================================================= */

.docs-article blockquote {
  margin: 24px 0;

  padding: 14px 18px;

  border-left: 3px solid #d1d5db;

  background: #fafafa;

  color: var(--color-text-soft);
}


/* =========================================================
   14. ARTICLE IMAGES
   ========================================================= */

.docs-article img {
  display: block;

  max-width: 100%;
  height: auto;

  margin: 28px auto;

  border-radius: var(--radius-large);
  border: 1px solid var(--color-border);
}


/* =========================================================
   15. ARTICLE NAVIGATION
   ========================================================= */

.article-navigation {
  width: 100%;
  max-width: var(--content-max-width);

  margin: 80px auto 0;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 16px;
}

.article-nav-button {
  display: flex;
  flex-direction: column;

  padding: 16px 18px;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);

  background: var(--color-bg);

  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.article-nav-button:hover {
  background: var(--color-hover);
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.article-nav-button.next {
  text-align: right;
}

.article-nav-label {
  margin-bottom: 5px;

  font-size: 12px;
  color: var(--color-text-muted);
}

.article-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}


/* =========================================================
   16. SEARCH MODAL
   ========================================================= */

.search-modal {
  position: fixed;
  inset: 0;

  z-index: 2000;

  display: none;
  align-items: flex-start;
  justify-content: center;

  padding: 100px 20px 20px;
}

.search-modal.active {
  display: flex;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.35);
}

.search-modal-content {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 640px;

  overflow: hidden;

  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);

  background: #ffffff;

  box-shadow: var(--shadow-modal);
}

.search-header {
  display: flex;
  align-items: center;

  padding: 12px;

  border-bottom: 1px solid var(--color-border);
}

.search-header input {
  flex: 1;

  height: 42px;

  padding: 0 12px;

  border: 0;
  outline: none;

  background: transparent;

  font-size: 15px;
}

.search-results {
  max-height: 420px;

  overflow-y: auto;

  padding: 8px;
}

.search-result {
  display: block;

  padding: 12px;

  border-radius: var(--radius-small);
}

.search-result:hover {
  background: var(--color-hover);
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
}

.search-result-description {
  margin-top: 3px;

  font-size: 12px;
  color: var(--color-text-muted);
}


/* =========================================================
   17. SCROLLBAR
   ========================================================= */

.docs-sidebar::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.docs-article pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.docs-sidebar::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.docs-article pre::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #d1d5db;
}

.docs-sidebar::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.docs-article pre::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================================================
   MODULE OVERVIEW
   ========================================================= */

.module-overview {
  margin: 32px 0 48px;

  padding: 28px;

  border: 1px solid #dbeafe;
  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      #f8fbff,
      #ffffff
    );

  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.04);
}


/* Header */

.module-overview-header {
  display: flex;
  align-items: flex-start;

  gap: 16px;

  margin-bottom: 26px;
}

.module-overview-icon {
  width: 46px;
  height: 46px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: #eef6ff;

  font-size: 22px;
}

.module-overview-header h3 {
  margin: 0 0 6px;

  font-size: 20px;

  color: #172033;
}

.module-overview-header p {
  margin: 0;

  font-size: 14px;

  color: #667085;
}


/* Module list */

.module-list {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 12px;
}


/* Individual module */

.module-card {
  display: flex;
  align-items: flex-start;

  gap: 13px;

  padding: 18px;

  border: 1px solid #e5e7eb;
  border-radius: 14px;

  background: #ffffff;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.module-card:hover {
  transform: translateY(-2px);

  border-color: #cbd5e1;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.05);
}


/* Icon */

.module-icon {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #f8fafc;

  font-size: 20px;
}


/* Text */

.module-info h3 {
  margin: 0 0 6px;

  font-size: 16px;

  line-height: 1.4;

  color: #172033;
}

.module-info p {
  margin: 0;

  font-size: 13px;

  line-height: 1.6;

  color: #667085;
}


/* Footer */

.module-overview-footer {
  display: flex;
  align-items: center;

  gap: 10px;

  margin-top: 18px;

  padding: 13px 16px;

  border-radius: 10px;

  background: #f1f6ff;
}

.module-overview-footer span {
  font-size: 18px;
}

.module-overview-footer p {
  margin: 0;

  font-size: 13px;

  color: #475467;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .module-overview {
    margin-top: 28px;

    padding: 18px;

    border-radius: 16px;
  }

  .module-overview-header {
    gap: 12px;

    margin-bottom: 18px;
  }

  .module-overview-header h3 {
    font-size: 18px;
  }

  .module-overview-header p {
    font-size: 13px;
  }

  .module-list {
    grid-template-columns: 1fr;

    gap: 10px;
  }

  .module-card {
    padding: 15px;
  }

  .module-info h3 {
    font-size: 15px;
  }

  .module-info p {
    font-size: 13px;
  }

}


/* =========================================================
   18. TABLET
   ========================================================= */

@media (max-width: 900px) {

  :root {
    --sidebar-width: 230px;
  }

  .docs-main {
    padding: 48px 28px 64px;
  }

}


/* =========================================================
   19. MOBILE
   ========================================================= */

@media (max-width: 700px) {

  :root {
    --header-height: 60px;
  }


  /* Header */

  .docs-header {
    padding: 0 14px;
  }

  .brand {
    gap: 5px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-label {
    display: none;
  }

  .header-button span {
    display: none;
  }


  /* Sidebar */

  .docs-sidebar {
    position: fixed;

    top: var(--header-height);
    left: 0;

    z-index: 950;

    width: min(290px, 82vw);
    height: calc(100vh - var(--header-height));

    transform: translateX(-100%);

    box-shadow:
      10px 0 30px rgba(0, 0, 0, 0.08);
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }


  /* Main */

  .docs-main {
    width: 100%;

    padding:
      42px
      20px
      50px;
  }

  .docs-article h1 {
    font-size: 34px;
  }

  .docs-article h2 {
    margin-top: 38px;
    font-size: 25px;
  }

  .docs-article h3 {
    font-size: 19px;
  }

  .docs-article p {
    font-size: 15px;
  }


  /* Navigation */

  .article-navigation {
    grid-template-columns: 1fr;

    margin-top: 56px;
  }

  .article-nav-button.next {
    text-align: left;
  }

}


/* =========================================================
   20. SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

  .docs-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .docs-article h1 {
    font-size: 30px;
  }

}


/* =========================================================
   21. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

}

/* =====================================================
   DOCUMENTATION
   Info / Tips Box
===================================================== */

.doc-info-box {
    margin: 28px 0;
    padding: 20px 22px;

    background: linear-gradient(
        135deg,
        #f8fbff 0%,
        #eef5ff 100%
    );

    border: 1px solid #d7e5f8;
    border-left: 5px solid #2f6fed;

    border-radius: 16px;

    box-shadow:
        0 6px 18px rgba(30, 70, 120, 0.08);

    box-sizing: border-box;
}


/* Judul Tips */

.doc-info-box strong {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 8px;

    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;

    color: #172033;
}


/* Isi Tips */

.doc-info-box p {
    margin: 0;

    font-size: 1rem;
    line-height: 1.7;

    color: #5f6878;
}


/* =====================================================
   HOVER / INTERACTION
===================================================== */

.doc-info-box {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.doc-info-box:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 24px rgba(30, 70, 120, 0.12);
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .doc-info-box {
        margin: 24px 0;
        padding: 18px 18px;

        border-radius: 14px;
        border-left-width: 4px;
    }

    .doc-info-box strong {
        font-size: 1rem;
    }

    .doc-info-box p {
        font-size: 0.98rem;
        line-height: 1.65;
    }

}

/* =====================================================
   DOCUMENTATION FOOTER
===================================================== */

.docs-footer {

  width: 100%;

  margin-top: 70px;

  padding: 32px 24px 42px;

  text-align: center;

  border-top: 1px solid #E5E7EB;

}


.docs-footer-links {

  display: flex;

  justify-content: center;

  align-items: center;

  flex-wrap: wrap;

  gap: 8px;

}


.docs-footer-links a {

  color: #94A3B8;

  text-decoration: none;

  font-size: 14px;

  transition:
    color 0.2s ease;

}


.docs-footer-links a:hover {

  color: #2563EB;

}


.docs-footer-links span {

  color: #CBD5E1;

  font-size: 14px;

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

  .docs-footer {

    margin-top: 50px;

    padding:
      28px 16px 36px;

  }


  .docs-footer-links {

    line-height: 1.8;

    gap: 6px;

  }


  .docs-footer-links a,
  .docs-footer-links span {

    font-size: 13px;

  }

}


/* =========================================================
   SIDEBAR FOOTER
   Tautan tambahan di bawah menu dokumentasi
   ========================================================= */

.sidebar-footer {
  margin-top: 12px;
  padding: 20px 10px 8px;

  border-top: 1px solid var(--color-border);
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sidebar-footer-links a {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.6;

  text-decoration: none;

  transition: color 0.18s ease;
}

.sidebar-footer-links a:hover {
  color: var(--color-primary);
}

@media (max-width: 700px) {
  .sidebar-footer {
    padding-bottom: 24px;
  }
}


/* =========================================================
   FINANCE ASSISTANT — DOCUMENTATION
   Compatibility Fix: HTML + JavaScript + Layout
   Tambahkan di bagian paling bawah style.css
   ========================================================= */

/* 1. LAYOUT UTAMA
   Struktur HTML: header, sidebar, overlay, main */

body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--header-height) auto;
  align-items: start;
}

.docs-header {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

.docs-sidebar {
  grid-column: 1;
  grid-row: 2;
  width: var(--sidebar-width);
  min-width: 0;
  min-height: calc(100vh - var(--header-height));
  z-index: 950;
}

#sidebarContent {
  padding: 28px 16px 40px;
}

.docs-main {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
}

/* 2. HEADER DAN BRAND
   Cocok dengan .docs-brand pada HTML */

.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
}

.docs-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.docs-brand span {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
}

/* 3. TOMBOL MENU SIDEBAR */

#sidebarToggle {
  display: inline-flex;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

#sidebarToggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

#sidebarToggle:hover {
  background: var(--color-hover);
}

#searchButton {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--color-text-soft);
  font-size: 13px;
  cursor: pointer;
}

#searchButton:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

/* 4. SIDEBAR CONTENT */

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-section-title {
  margin: 0 10px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-list li {
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: var(--radius-small);
  color: var(--color-text-soft);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--color-hover);
  color: var(--color-text);
}

.sidebar-link.active {
  background: var(--color-active);
  color: var(--color-text);
  font-weight: 600;
}

/* 5. SIDEBAR FOOTER */

.sidebar-footer {
  margin-top: 12px;
  padding: 20px 10px 8px;
  border-top: 1px solid var(--color-border);
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.sidebar-footer-links a {
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none;
}

.sidebar-footer-links a:hover {
  color: var(--color-primary);
}

/* 6. OVERLAY SIDEBAR */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* 7. SEARCH MODAL
   Cocok dengan .search-modal-header dan ID HTML */

.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  background: rgba(0, 0, 0, 0.35);
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: #fff;
  box-shadow: var(--shadow-modal);
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.search-modal-header h2 {
  margin: 0;
  font-size: 17px;
  color: var(--color-text);
}

#searchClose {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--color-text-soft);
  font-size: 13px;
}

#searchInput {
  display: block;
  width: calc(100% - 24px);
  height: 44px;
  margin: 12px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  outline: none;
  font-size: 15px;
}

#searchInput:focus {
  border-color: #93b4f5;
}

#searchResults {
  max-height: 55vh;
  overflow-y: auto;
  padding: 8px 12px 12px;
}

#searchResults .search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-small);
  text-decoration: none;
}

#searchResults .search-result:hover {
  background: var(--color-hover);
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.search-result-snippet {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.search-empty {
  padding: 12px;
  color: var(--color-text-soft);
  font-size: 14px;
}

/* 8. MOBILE */

@media (max-width: 700px) {
  body {
    display: block;
  }

  .docs-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    padding: 0 12px;
    gap: 8px;
  }

  .docs-brand {
    flex: 1;
    gap: 5px;
    overflow: hidden;
    font-size: 14px;
    white-space: normal;
  }

  .docs-brand span {
    font-size: 12px;
  }

  #searchButton {
    max-width: 84px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 950;
    width: min(290px, 82vw);
    height: calc(100vh - var(--header-height));
    min-height: 0;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    background: var(--color-sidebar);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.08);
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .docs-main {
    width: 100%;
    padding: 42px 20px 50px;
  }

  .article-navigation {
    grid-template-columns: 1fr;
  }

  .article-nav-button.next {
    text-align: left;
  }

  .sidebar-footer {
    padding-bottom: 24px;
  }
}

@media (max-width: 400px) {
  .docs-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .docs-brand {
    font-size: 13px;
  }
}


/* =========================================================
   SEARCH MODAL — SOLID WHITE & MOBILE FRIENDLY
   ========================================================= */

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: none;
  align-items: flex-start;
  justify-content: center;

  padding: 80px 16px 24px;

  /* Latar belakang di belakang modal */
  background: rgba(15, 23, 42, 0.45);

  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.search-modal.active {
  display: flex;
}

/* Panel pencarian putih solid */

.search-modal-content {
  position: relative;
  z-index: 2001;

  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 110px);

  overflow-y: auto;

  padding: 20px;

  background: #ffffff;
  color: #1f2937;

  border: 1px solid #d1d5db;
  border-radius: 16px;

  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);

  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Header modal */

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 16px;
}

.search-modal-header h2 {
  margin: 0;

  color: #111827;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
}

/* Tombol tutup */

#searchClose {
  flex-shrink: 0;

  min-height: 42px;
  padding: 9px 16px;

  border: 1px solid #d1d5db;
  border-radius: 9px;

  background: #f3f4f6;
  color: #111827;

  font-size: 14px;
  font-weight: 600;

  opacity: 1;
  visibility: visible;

  cursor: pointer;
}

#searchClose:hover {
  background: #e5e7eb;
}

/* Kolom ketikan pencarian */

#searchInput {
  display: block;

  width: 100%;
  min-height: 50px;

  padding: 12px 14px;

  border: 2px solid #2563eb;
  border-radius: 10px;

  outline: none;

  background: #ffffff;
  color: #111827;

  font-size: 16px;
  line-height: 1.5;

  opacity: 1;
  visibility: visible;
  box-shadow: none;
}

#searchInput::placeholder {
  color: #6b7280;
  opacity: 1;
}

#searchInput:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Hasil pencarian */

#searchResults {
  margin-top: 12px;

  max-height: 45vh;
  overflow-y: auto;

  background: #ffffff;
  color: #1f2937;
}

.search-result {
  display: block;

  padding: 13px 12px;

  border-bottom: 1px solid #e5e7eb;
  border-radius: 8px;

  background: #ffffff;
  color: #1f2937;

  text-decoration: none;
}

.search-result:hover {
  background: #f3f4f6;
}

.search-result-title {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.search-result-description {
  margin-top: 4px;

  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

/* Tampilan HP */

@media (max-width: 700px) {
  .search-modal {
    align-items: flex-start;

    padding: 18px 12px 24px;
  }

  .search-modal-content {
    width: 100%;
    max-height: calc(100dvh - 36px);

    padding: 16px;

    border-radius: 14px;
  }

  .search-modal-header h2 {
    font-size: 18px;
  }

  #searchClose {
    min-height: 42px;
    padding: 9px 14px;
  }

  #searchInput {
    min-height: 50px;
    font-size: 16px;
  }
}

