/* mobile-fix.css v1 - rapikan tampilan HP (<=768px): header kartu, grup tombol, kontrol DataTables, paginasi. Desktop tidak berubah. */
@media (max-width: 768px) {
  html body .page-title h1 { font-size: 20px; line-height: 1.3; }
  html body .page-title .page-subtitle { font-size: 12.5px; }

  /* kepala kartu / judul halaman: judul di atas, tombol rapi di bawahnya */
  html body .card-header { flex-wrap: wrap; gap: 8px 10px; padding: 14px 16px; align-items: center; }
  html body .card-header h5, html body .card-header .card-title { font-size: 15px; margin: 0; flex: 1 1 auto; min-width: 0; }
  html body .card-header > div:not(:first-child), html body .card-header > .d-flex { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
  html body .card-header .badge.me-2 { margin-right: 0 !important; }
  html body .page-title.d-flex, html body .page-title > .d-flex { flex-wrap: wrap; gap: 10px; }

  /* grup tombol (2 tombol atau lebih): grid 2 kolom, ukuran sama */
  html body .main-content .d-flex.gap-2:has(> .btn ~ .btn):not(.tk-flyout),
  html body .main-content .d-flex.gap-3:has(> .btn ~ .btn) {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; flex-direction: row !important; gap: 8px; width: 100%; flex-basis: 100%;
  }
  html body .main-content .d-flex.gap-2:has(> .btn ~ .btn) > .btn,
  html body .main-content .d-flex.gap-3:has(> .btn ~ .btn) > .btn,
  html body .main-content .d-flex.gap-2:has(> .btn ~ .btn) > a.btn {
    width: 100%; margin: 0; justify-content: center; text-align: center; white-space: normal; font-size: 13px; padding: 9px 8px; line-height: 1.25;
  }
  /* tombol utama tunggal di samping judul (mis. Tambah) tidak melebar */
  html body .card-header .btn { white-space: nowrap; font-size: 12.5px; padding: 7px 12px; }

  /* filter / form: tombol aksi sejajar */
  html body .filter-actions { display: flex; gap: 8px; }
  html body .filter-actions .btn { flex: 1 1 0; min-width: 0; justify-content: center; }
  html body .form-select, html body .form-control { font-size: 14px; }

  /* DataTables */
  html body .dataTables_wrapper .dataTables_length, html body .dataTables_wrapper .dataTables_filter {
    float: none; text-align: left; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; width: 100%;
  }
  html body .dataTables_wrapper .dataTables_length label, html body .dataTables_wrapper .dataTables_filter label {
    display: flex; align-items: center; gap: 8px; margin: 0; width: 100%; font-size: 13px; white-space: nowrap; color: var(--tk-muted, #6b7a8a);
  }
  html body .dataTables_wrapper .dataTables_length select { width: auto; min-width: 64px; flex: 0 0 auto; padding: 6px 28px 6px 10px; }
  html body .dataTables_wrapper .dataTables_filter input { flex: 1 1 auto; min-width: 0; width: 100%; margin: 0 !important; padding: 7px 12px; }
  html body .dataTables_wrapper .dataTables_info { float: none; text-align: center; font-size: 12px; padding: 8px 0 4px; white-space: normal; }
  html body .dataTables_wrapper .dataTables_paginate { float: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px; text-align: center; }
  html body .dataTables_wrapper .dataTables_paginate .paginate_button { padding: 7px 12px !important; font-size: 13px; margin: 0 !important; }

  /* paginasi Bootstrap */
  html body .pagination { flex-wrap: wrap; justify-content: center; gap: 4px; }
  html body .pagination .page-link { padding: 7px 12px; font-size: 13px; }

  /* tab / pil yang panjang membungkus rapi */
  html body .nav-pills, html body .nav-tabs { flex-wrap: wrap; gap: 6px; }
  html body .main-content .row > [class*="col-"] .btn.w-auto { width: auto; }
}
