/* Penyesuaian tema Tabler untuk aplikasi ASL */
:root { --tblr-font-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
body { font-feature-settings: "cv03", "cv04", "cv11"; }
.table { font-variant-numeric: tabular-nums; }

/* Menu atas: boleh turun baris pada layar sedang agar tidak terpotong */
@media (min-width: 768px) { .navbar-expand-md .navbar-nav { flex-wrap: wrap; } }
.navbar-brand-image { height: 2rem; width: auto; }
/* Header + menu menempel di atas saat scroll */
.asl-sticky { background: var(--tblr-bg-surface); box-shadow: 0 1px 0 var(--tblr-border-color), 0 2px 8px rgba(24, 36, 51, .06); }
@media (max-width: 767.98px) { .asl-sticky .navbar-collapse { max-height: 70vh; overflow-y: auto; } }   /* menu HP panjang tetap bisa di-scroll */

/* Tombol mode gelap / terang */
.theme-light-ico { display: none; }
[data-bs-theme="dark"] .theme-dark-ico { display: none; }
[data-bs-theme="dark"] .theme-light-ico { display: inline-block; }

/* DataTables (Bootstrap 5) */
div.dataTables_wrapper div.dataTables_filter input { margin-left: 0; width: 220px; }
div.dataTables_wrapper div.dataTables_length select { width: auto; display: inline-block; }
div.dataTables_wrapper .row:first-child { margin-bottom: .5rem; }
table.dataTable td, table.dataTable th { white-space: normal; }
.btn-xs { --tblr-btn-padding-y: .125rem; --tblr-btn-padding-x: .375rem; --tblr-btn-font-size: .75rem; }

/* Dashboard utama */
.dash-hero { background: linear-gradient(120deg, #1d3f63, #206bc4); color: #fff; border: 0; }
.dash-hero h3, .dash-hero .small { color: #fff; }
.dash-hero .small { opacity: .9; }
.row-cards > [class*="col"] > .card .empty { justify-content: flex-start; }
.dash-search { min-width: 280px; }
.dash-search .form-control { border-color: transparent; }
.dash-kpi { transition: transform .15s, box-shadow .15s; }
.dash-kpi:hover { transform: translateY(-2px); }
.dash-group-title { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--tblr-secondary); margin-bottom: .5rem; }
.dash-tile-wrap { padding-left: 6px; padding-right: 6px; }
.dash-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 4px; margin-bottom: 12px; border-radius: var(--tblr-border-radius);
             color: var(--tblr-body-color); border: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface); height: calc(100% - 12px);
             transition: box-shadow .15s, transform .15s, border-color .15s; }
.dash-tile:hover { color: var(--tblr-primary); text-decoration: none; border-color: var(--tblr-primary); box-shadow: var(--tblr-shadow-card); transform: translateY(-2px); }
.dash-ico { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-bottom: 8px; color: #fff; }
.dash-lbl { font-size: .78rem; line-height: 1.25; }
@media (prefers-reduced-motion: reduce) { .dash-tile, .dash-kpi { transition: none; } .dash-tile:hover, .dash-kpi:hover { transform: none; } }

/* ---------- Tampilan HP (< 768 px) ---------- */
@media (max-width: 767.98px) {
  /* Header satu baris: tombol menu + logo + ikon (nama perusahaan disembunyikan, tetap ada di halaman login) */
  .asl-sticky .navbar > .container-xl { flex-wrap: nowrap; }
  .asl-sticky .navbar-brand { min-width: 0; margin-right: auto; }
  .asl-sticky .navbar-brand .brand-name { display: none; }
  .asl-sticky .navbar-collapse { position: absolute; top: 100%; left: 0; right: 0; background: var(--tblr-bg-surface); box-shadow: 0 6px 12px rgba(24, 36, 51, .12); z-index: 1030; }
  .page-header { margin-top: .75rem; }
  .page-title { font-size: 1.15rem; }
  .card-header { flex-wrap: wrap; gap: .5rem; }
  .card-header .card-actions { margin-left: 0; }
  div.dataTables_wrapper div.dataTables_filter input { width: 100%; }

  /* Tabel data -> kartu bertumpuk: setiap baris = kartu "Label: nilai", tombol aksi di bawah kartu */
  .table-responsive:has(> .table-stack), .table-responsive:has(.dataTables_wrapper .table-stack) { overflow-x: visible; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100% !important; }
  .table-stack tr { border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); margin-bottom: .75rem; padding: .25rem .75rem; background: var(--tblr-bg-surface); }
  .table-stack > tbody > tr > td { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; text-align: right !important; white-space: normal !important;
                                    border: 0 !important; border-bottom: 1px solid var(--tblr-border-color-translucent) !important; padding: .4rem 0 !important; box-shadow: none !important; background: none !important; }
  .table-stack > tbody > tr > td:last-child { border-bottom: 0 !important; }
  .table-stack > tbody > tr > td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; font-weight: 600; color: var(--tblr-secondary); font-size: .8rem; }
  .table-stack > tbody > tr > td:not([data-label])::before, .table-stack > tbody > tr > td[data-label=""]::before { display: none; }
  .table-stack > tbody > tr > td.stack-actions { justify-content: flex-end; gap: .25rem; }
  .table-stack > tbody > tr > td.stack-actions::before { display: none; }
  .table-stack > tbody > tr.stack-group { background: var(--tblr-bg-surface-tertiary); border-style: dashed; display: flex; gap: .5rem; font-weight: 600; }   /* baris judul kelompok (mis. I. Ijazah) */
  .table-stack > tbody > tr.stack-group > td { width: auto !important; border: 0 !important; justify-content: flex-start; text-align: left !important; }
  .table-stack > tbody > tr.stack-group > td::before { display: none; }
  .table-stack td.dataTables_empty { justify-content: center; text-align: center !important; }
  .table-stack > tbody > tr > td.stack-empty { display: none !important; }
}

/* Halaman login / setup */
.auth-bg { background: linear-gradient(160deg, #1d3f63 0%, #206bc4 55%, #4299e1 100%); }
.auth-bg .text-white h1, .auth-bg .text-white .h2 { color: #fff; }

/* Marketing > Analisa (kalkulator): hasil tetap terlihat saat menggulir isian di layar lebar */
@media (min-width: 1200px) { .calc-sticky { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding-right: 2px; } }
.calc-busy { opacity: .55; transition: opacity .15s; }
.calc-actions { position: sticky; bottom: 0; z-index: 5; background: var(--tblr-body-bg); padding: .5rem 0; border-top: 1px solid var(--tblr-border-color); }
.calc-table th { vertical-align: bottom; }
.calc-table thead th div { text-transform: none; letter-spacing: 0; }
