/* ==================================================
   Full Width Container Override
   ================================================== */

/* Memperluas area utama dokumen secara proporsional */
.md-grid {
  max-width: 88rem; /* 1408px - lebar dan nyaman dibaca */
}

/* ==================================================
   Sidebar Navigation & TOC Styling
   WAJIB dibungkus Media Query agar tidak merusak
   tampilan Tablet & Mobile (mencegah sidebar overlap teks)
   ================================================== */

/* Sidebar Kiri (Navigasi Dokumen) - Hanya aktif di Desktop (>= 76.25em / 1220px) */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    width: 14rem;
  }
}

/* Sidebar Kanan (Table of Contents) - Aktif mulai breakpoint Laptop (>= 60em / 960px) */
@media screen and (min-width: 60em) {
  .md-sidebar--secondary {
    width: 14rem;
  }
}

/* Ukuran font navigasi kiri */
.md-nav--primary .md-nav__link {
  font-size: 0.75rem;
}

/* Ukuran font Table of Contents (kanan) */
.md-sidebar--secondary .md-nav__link {
  font-size: 0.75rem;
}

/* Judul "Table of contents" di atas sidebar kanan */
.md-nav--secondary .md-nav__title {
  font-size: 0.85rem;
  font-weight: bold;
}

/* ==================================================
   Tables Layout & Styling
   ================================================== */

.md-typeset .md-typeset__scrollwrap,
.md-typeset .md-typeset__table {
  display: block;
  width: 100%;
  margin: 1em 0;
}

.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  table-layout: auto;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: .65rem .45rem;
  vertical-align: top;
}

/* --------------------------------------------------
   1. TABEL 2 KOLOM
   -------------------------------------------------- */
/* Kolom 1 ringkas pas isi */
.md-typeset table:not([class]) th:first-child,
.md-typeset table:not([class]) td:first-child {
  white-space: nowrap;
  width: 10%;
}

/* Kolom 2 menyerap sisa ruang */
.md-typeset table:not([class]) th:last-child,
.md-typeset table:not([class]) td:last-child {
  width: 99%;
}

/* --------------------------------------------------
   2. OVERRIDE KHUSUS TABEL 3 KOLOM (ENHANCED)
   -------------------------------------------------- */
/* Kolom 1: Rapat pas isi */
.md-typeset table:not([class]) tr th:first-child:nth-last-child(3),
.md-typeset table:not([class]) tr td:first-child:nth-last-child(3) {
  white-space: nowrap;
  width: auto;
}

/* Kolom 2: Rapat pas isi */
.md-typeset table:not([class]) tr th:nth-child(2):nth-last-child(2),
.md-typeset table:not([class]) tr td:nth-child(2):nth-last-child(2) {
  white-space: normal;
  width: auto;
}

/* Kolom 3: Menyerap seluruh sisa ruang ke kanan */
.md-typeset table:not([class]) tr th:last-child:nth-child(3),
.md-typeset table:not([class]) tr td:last-child:nth-child(3) {
  white-space: normal;
  width: auto;
}

/* --------------------------------------------------
   3. OVERRIDE KHUSUS TABEL 4 KOLOM
   -------------------------------------------------- */
/* Kolom 1: Rapat pas isi */
.md-typeset table:not([class]) tr th:first-child:nth-last-child(4),
.md-typeset table:not([class]) tr td:first-child:nth-last-child(4) {
  white-space: nowrap;
  width: 10%;
}

/* Kolom 2: Rapat pas isi */
.md-typeset table:not([class]) tr th:nth-child(2):nth-last-child(3),
.md-typeset table:not([class]) tr td:nth-child(2):nth-last-child(3) {
  white-space: normal;
  width: auto;
}

/* Kolom 3: Rapat pas isi */
.md-typeset table:not([class]) tr th:nth-child(3):nth-last-child(2),
.md-typeset table:not([class]) tr td:nth-child(3):nth-last-child(2) {
  white-space: normal;
  width: auto;
}

/* Kolom 4: Menyerap seluruh sisa ruang ke kanan */
.md-typeset table:not([class]) tr th:last-child:nth-child(4),
.md-typeset table:not([class]) tr td:last-child:nth-child(4) {
  white-space: normal;
  width: auto;
}
