/* Komponen <k-data-table> (V54): tabel data, kotak putih bersudut dengan garis tipis; judul kolom huruf kapital kecil hijau,
   kelompok baris di pita hijau muda. data-variant="matriks": kolom tanda ✓ / — di tengah (ditulis dengan :where, jadi bobotnya
   sama dengan aturan dasar dan aturan ponsel tetap menang). Di ponsel (≤ 760 px) setiap baris menjadi kartu (sejak 12 Nov 2026):
   kepala kartu = nama baris, lalu baris "nama kolom | isi"; kolom uraian (kolom[].uraian) = nama kolom di atas isinya; sel
   kosong tidak tampil; judul kolom disembunyikan dari layar (tetap dibaca pembaca layar). data-ponsel="tabel": di ponsel tetap
   tabel, dengan judul kolom singkat (kolom[].singkat) dan baris judul yang menempel di bawah kepala situs. overflow:clip (bukan
   hanya hidden) agar baris judul itu bisa menempel; peramban tanpa clip memakai hidden dan baris judulnya ikut bergulir.
   Skrip: data-table.js. Lebar kolom tertentu diatur halaman yang memakainya (mis. roles-halaman.css, #rl-tabel). */
.nk-tabel{width:100%;border:1px solid var(--nk-line);border-radius:8px;border-collapse:separate;border-spacing:0;overflow:hidden;overflow:clip;background:#fff;font-family:var(--nk-font);text-align:left}
.nk-tabel th,.nk-tabel td{padding:16px 24px;border-top:1px solid var(--nk-line);vertical-align:top}
.nk-tabel thead th{border-top:0;font:700 12px/16px var(--nk-font);letter-spacing:.14em;text-transform:uppercase;color:var(--nk-forest)}
.nk-tabel__grup th{padding-top:12px;padding-bottom:12px;background:var(--leaf-wash);font-weight:400}
.nk-tabel tbody th[scope="row"]{font:700 16px/24px var(--nk-font);color:var(--nk-ink)}
.nk-tabel td{font:400 16px/24px var(--nk-font);color:var(--nk-ink-soft)}
.nk-tabel td svg{display:inline-block;width:20px;height:20px;vertical-align:middle}
.nk-tabel__tidak{color:var(--nk-ink-soft)}

/* matriks: a column per option, a tick or a dash in each cell */
.nk-tabel:where([data-variant="matriks"]) th,.nk-tabel:where([data-variant="matriks"]) td{padding-top:12px;padding-bottom:12px}
.nk-tabel:where([data-variant="matriks"]) thead th{vertical-align:middle}   /* a head on two lines keeps the others level with its middle */
.nk-tabel:where([data-variant="matriks"]) thead th:nth-child(n+2){width:16%;text-align:center}
.nk-tabel:where([data-variant="matriks"]) tbody th[scope="row"]{font-weight:400}
.nk-tabel:where([data-variant="matriks"]) .nk-tabel__grup th{font-weight:700;color:var(--nk-ink)}
.nk-tabel:where([data-variant="matriks"]) td{text-align:center;vertical-align:middle;font-weight:400;color:var(--nk-forest)}

/* phones (12 Nov 2026, user, after a reference: "how do you know that's 3 rows?"): every table without data-ponsel="tabel" shows
   each row as a card. A row = a white card (1px --line, the table's 8 px radius), 12 px apart, on the section's background (the
   table's own box and row hairlines go); its first column (the row's name) is the card's head in bold with a divider under it;
   every other cell is a line "column name | value" (a grid: the name ~40 % in --ink-soft 14 px, the value wrapping), with thin
   dividers between lines. A column marked uraian (kolom[].uraian: long text) puts its name above the value at full width. An
   empty cell (data-kosong) is left out; a ✓ / — cell shows its mark. A group's head row becomes a heading above its cards. The
   column heads leave the screen, not the reader: the table keeps its semantics, only the CSS changes. :where keeps the weight
   of these rules as low as the base ones, so a page's own rules still apply */
@media (max-width:760px){
  .nk-tabel:where(:not([data-ponsel="tabel"])){display:block;border:0;border-radius:0;background:none;overflow:visible}
  .nk-tabel:where(:not([data-ponsel="tabel"])) tbody,.nk-tabel:where(:not([data-ponsel="tabel"])) tr,.nk-tabel:where(:not([data-ponsel="tabel"])) th,.nk-tabel:where(:not([data-ponsel="tabel"])) td{display:block}
  .nk-tabel:where(:not([data-ponsel="tabel"])) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .nk-tabel:where(:not([data-ponsel="tabel"])) tbody tr:not(.nk-tabel__grup){margin-top:12px;border:1px solid var(--nk-line);border-radius:8px;background:#fff;overflow:hidden}
  .nk-tabel:where(:not([data-ponsel="tabel"])) tbody:first-of-type tr:first-child{margin-top:0}
  /* the group head: a heading above its cards, the level badge kept */
  :where(.nk-tabel:not([data-ponsel="tabel"])) .nk-tabel__grup th{padding:32px 0 0;border:0;background:none}
  :where(.nk-tabel:not([data-ponsel="tabel"])) tbody:first-of-type .nk-tabel__grup th{padding-top:0}
  /* the card's head: the row's name */
  .nk-tabel:where(:not([data-ponsel="tabel"])) tbody th[scope="row"]{padding:12px 16px;border-top:0;border-bottom:1px solid var(--nk-line);font-weight:700;color:var(--nk-ink)}
  /* a line: its column name left, the value right */
  .nk-tabel:where(:not([data-ponsel="tabel"])) td{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:4px 12px;align-items:baseline;padding:12px 16px;
    border-top:1px solid var(--nk-line);text-align:left;vertical-align:top}
  .nk-tabel:where(:not([data-ponsel="tabel"])) th[scope="row"] + td{border-top:0}
  .nk-tabel:where(:not([data-ponsel="tabel"])) td::before{content:attr(data-kolom);font:400 var(--fs-sm)/var(--lh-sm) var(--nk-font);color:var(--nk-ink-soft)}
  .nk-tabel:where(:not([data-ponsel="tabel"])) td[data-uraian]{display:block}
  .nk-tabel:where(:not([data-ponsel="tabel"])) td[data-uraian]::before{display:block;margin-bottom:4px}
  .nk-tabel:where(:not([data-ponsel="tabel"])) td[data-kosong]{display:none}
  .nk-tabel:where(:not([data-ponsel="tabel"])) td svg{margin-top:2px}   /* a ✓ level with the first line of its column name */

  /* data-ponsel="tabel": still a table, for ✓ / — with few columns: narrow mark columns under their short heads (kolom[].singkat),
     the head row pinned under the site header (it needs the table's overflow:clip, above); a mark sits on its row's first line */
  .nk-tabel:where([data-ponsel="tabel"]) th,.nk-tabel:where([data-ponsel="tabel"]) td{padding:12px 4px}
  .nk-tabel:where([data-ponsel="tabel"]) thead th:first-child,
  .nk-tabel:where([data-ponsel="tabel"]) tbody th[scope="row"]{padding-left:16px;padding-right:8px;overflow-wrap:anywhere}
  .nk-tabel:where([data-ponsel="tabel"]) thead th{position:sticky;top:var(--head-h-s);z-index:1;background:#fff;box-shadow:inset 0 -1px 0 var(--nk-line)}
  .nk-tabel:where([data-ponsel="tabel"]) thead th:nth-child(n+2){width:44px}
  .nk-tabel:where([data-ponsel="tabel"]) td{vertical-align:top}
  .nk-tabel:where([data-ponsel="tabel"]) .nk-tabel__grup th{padding:12px 16px}
  .nk-tabel:where([data-ponsel="tabel"]) .nk-tabel__panjang{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  .nk-tabel:where([data-ponsel="tabel"]) .nk-tabel__singkat{display:inline}
}
/* a short column head (kolom[].singkat) shows only on phones, in a data-ponsel="tabel" table */
.nk-tabel__singkat{display:none}
/* a column marked tebal in the data (kolom[].tebal): its cells in bold ink, as ROLES' "Terlacak sampai" */
.nk-tabel td[data-tebal]{font-weight:600;color:var(--nk-ink)}
