/* =====================================================================
   RSA Panel — sistem visual
   ---------------------------------------------------------------------
   Konsep: perangkat rak. Panel ini pada dasarnya papan status, jadi
   warna aksen adalah warna "hidup/online" (hijau sinyal), bukan warna
   merek yang netral. Nilai teknis (domain, path, kuota, nama user)
   selalu monospace; itu penanda "ini bisa disalin ke terminal atau
   kolom DNS". Teks penjelas selalu sans.

   Ornamen tunggal yang diulang: meter bersegmen. Tidak ada bayangan
   selain pada lapisan mengambang.
   ===================================================================== */

:root {
  /* ---------------------------------------------------------------
     MEREK — diatur admin lewat Pengaturan > Tampilan.
     Nilai di sini hanya bawaan; layout menimpanya saat halaman dimuat.

     Sengaja DIPISAH dari warna status di bawah. Sebelumnya keduanya
     satu, sehingga mengganti warna merek ke merah membuat seluruh
     panel terlihat seperti peringatan. Merek adalah identitas;
     up/warn/down adalah keadaan mesin. Keduanya tidak boleh bertukar.
     --------------------------------------------------------------- */
  --brand:         #00A06B;
  --brand-deep:    #00754F;
  --brand-soft:    #E4F5EE;
  --brand-on:      #FFFFFF;   /* teks di atas --brand, dihitung otomatis */

  /* Sasis */
  --chassis:        #0E1620;
  --chassis-soft:   #17222F;
  --chassis-line:   #24313F;

  /* Permukaan */
  --surface:        #F4F6F8;
  --card:           #FFFFFF;
  --line:           #E3E8ED;
  --line-strong:    #CBD4DD;

  /* Tinta */
  --ink:            #16202B;
  --ink-soft:       #5A6875;
  --ink-faint:      #8A97A3;
  --ink-invert:     #EAF0F5;

  /* Sinyal */
  --up:             #00A06B;
  --up-soft:        #E4F5EE;
  --up-deep:        #00754F;
  --warn:           #C77A05;
  --warn-soft:      #FBF0DC;
  --down:           #CF3238;
  --down-soft:      #FBE9E9;
  --wait:           #4E7FBE;
  --wait-soft:      #E8EFF8;

  --radius:         6px;
  --radius-lg:      10px;

  --font-ui:        'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data:      'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------------
   Tipografi
   ------------------------------------------------------------------ */

.data { font-family: var(--font-data); font-size: 0.9em; letter-spacing: -0.01em; }

/* Label mikro bergaya penandaan perangkat */
.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.page-title {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-sub { color: var(--ink-soft); font-size: 13px; margin: 3px 0 0; }

/* ---------------------------------------------------------------------
   Kerangka
   ------------------------------------------------------------------ */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--chassis);
  color: var(--ink-invert);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--chassis-line);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Titik status pada logo: denyut halus = agent terhubung */
.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--up);
  flex: 0 0 9px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent);
}
.brand-dot.is-down { background: var(--down); box-shadow: 0 0 0 3px rgba(207, 50, 56, 0.18); }

.brand-name { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub  { font-size: 11px; color: #7C8B9A; line-height: 1.2; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 0 20px; }

.nav-section { padding: 14px 18px 5px; }
.nav-section:first-child { padding-top: 2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 15px;
  color: #A9B7C4;
  text-decoration: none;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: color .12s, background .12s, border-color .12s;
}
.nav-link:hover { color: #E7EEF4; background: var(--chassis-soft); }

.nav-link.is-active {
  color: #FFFFFF;
  background: var(--chassis-soft);
  border-left-color: var(--brand);
  font-weight: 550;
}
.nav-link svg { flex: 0 0 auto; opacity: .82; }
.nav-link.is-active svg { opacity: 1; color: var(--brand); }

.sidebar-foot {
  border-top: 1px solid var(--chassis-line);
  padding: 12px 18px;
  font-size: 11.5px;
  color: #7C8B9A;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 13px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.crumb { font-family: var(--font-data); font-size: 12px; color: var(--ink-faint); }
.crumb b { color: var(--ink); font-weight: 500; }

.content { padding: 24px 26px 56px; max-width: 1240px; width: 100%; }

/* ---------------------------------------------------------------------
   Kartu & tabel
   ------------------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 14px; font-weight: 620; margin: 0; letter-spacing: -0.01em; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

table.tbl { width: 100%; border-collapse: collapse; }

table.tbl th {
  text-align: left;
  padding: 9px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  background: #FAFBFC;
  white-space: nowrap;
}

table.tbl td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FBFCFD; }

.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------------
   Meter bersegmen — elemen tanda tangan
   ---------------------------------------------------------------------
   Dibaca sekilas seperti deret LED pada perangkat rak: jumlah segmen
   menyala memberi perkiraan kasar tanpa harus membaca angka.
   ------------------------------------------------------------------ */

.meter { display: block; }

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.meter-value { font-family: var(--font-data); font-size: 12.5px; color: var(--ink); font-weight: 500; }
.meter-value .of { color: var(--ink-faint); }

.meter-track { display: flex; gap: 2px; }

.meter-seg {
  height: 7px;
  flex: 1;
  border-radius: 1.5px;
  background: #E6EBF0;
  transform-origin: bottom;
}

.meter-seg.on          { background: var(--up); }
.meter.is-warn .seg-on { background: var(--warn); }
.meter.is-down .seg-on { background: var(--down); }
.meter.is-warn .meter-seg.on { background: var(--warn); }
.meter.is-down .meter-seg.on { background: var(--down); }

/* Segmen menyala berurutan saat halaman dimuat */
@media (prefers-reduced-motion: no-preference) {
  .meter-seg.on { animation: segIn .22s ease-out backwards; }
}

@keyframes segIn {
  from { opacity: 0; transform: scaleY(.35); }
  to   { opacity: 1; transform: scaleY(1); }
}

.meter-foot { margin-top: 6px; font-size: 11.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------------------
   Indikator status
   ------------------------------------------------------------------ */

.dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  white-space: nowrap;
}
.dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: 0 0 7px;
}
.dot.up::before   { background: var(--up); }
.dot.warn::before { background: var(--warn); }
.dot.down::before { background: var(--down); }
.dot.wait::before { background: var(--wait); }

@media (prefers-reduced-motion: no-preference) {
  .dot.wait::before { animation: pulse 1.4s ease-in-out infinite; }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 550;
  background: #EEF2F5;
  color: var(--ink-soft);
}
.chip.up   { background: var(--up-soft);   color: var(--up-deep); }
.chip.warn { background: var(--warn-soft); color: #8A5400; }
.chip.down { background: var(--down-soft); color: #9E2126; }
.chip.wait { background: var(--wait-soft); color: #2F5A8F; }

/* ---------------------------------------------------------------------
   Tombol
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
  white-space: nowrap;
}
.btn:hover { background: #F5F7F9; border-color: #B4C0CB; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.btn-danger { background: var(--card); border-color: #E9B7B9; color: var(--down); }
.btn-danger:hover { background: var(--down-soft); border-color: var(--down); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: #EFF3F6; color: var(--ink); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Formulir
   ------------------------------------------------------------------ */

.field { margin-bottom: 15px; }

.label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color .12s, box-shadow .12s;
}

.input.data, .textarea.data { font-family: var(--font-data); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.input[aria-invalid="true"] { border-color: var(--down); }

.hint  { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }
.error { font-size: 11.5px; color: var(--down); margin-top: 4px; }

.textarea { min-height: 90px; resize: vertical; }

/* Sakelar izin fitur */
.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-track {
  width: 34px; height: 19px;
  border-radius: 20px;
  background: #CFD8E0;
  position: relative;
  transition: background .15s;
  flex: 0 0 34px;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(15px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.switch input:disabled + .switch-track { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Notifikasi & keadaan kosong
   ------------------------------------------------------------------ */

.alert {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert.ok   { background: var(--up-soft);   border-color: #B7E3D0; color: var(--up-deep); }
.alert.bad  { background: var(--down-soft); border-color: #EFC4C6; color: #9E2126; }
.alert.warn { background: var(--warn-soft); border-color: #EBD5A8; color: #8A5400; }
.alert.info { background: var(--wait-soft); border-color: #C3D5EA; color: #2F5A8F; }
.alert svg { flex: 0 0 auto; margin-top: 1px; }

.empty { padding: 44px 20px; text-align: center; color: var(--ink-soft); }
.empty-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
.empty-text  { font-size: 13px; max-width: 380px; margin: 0 auto 16px; }

/* ---------------------------------------------------------------------
   Modal
   ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(14, 22, 32, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 60;
}

.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  box-shadow: 0 20px 50px rgba(14, 22, 32, .3);
  max-height: 90vh; overflow-y: auto;
}
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; }
.modal-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
  background: #FAFBFC;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Toast */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--chassis);
  color: var(--ink-invert);
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(14,22,32,.28);
  max-width: 340px;
  border-left: 3px solid var(--brand);
}
.toast.bad { border-left-color: var(--down); }

/* ---------------------------------------------------------------------
   Utilitas
   ------------------------------------------------------------------ */

.row       { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap      { flex-wrap: wrap; }
.muted     { color: var(--ink-soft); }
.faint     { color: var(--ink-faint); }
.right     { text-align: right; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.copyable { cursor: pointer; border-bottom: 1px dashed var(--line-strong); }
.copyable:hover { border-bottom-color: var(--brand); color: var(--brand-deep); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

[x-cloak] { display: none !important; }

/* ---------------------------------------------------------------------
   Responsif
   ------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-veil { position: fixed; inset: 0; background: rgba(14,22,32,.5); z-index: 45; }
  .content { padding: 18px 15px 48px; }
  .topbar  { padding: 11px 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  table.tbl th, table.tbl td { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}


/* ---------------------------------------------------------------------
   Aset merek
   ------------------------------------------------------------------ */

.brand-logo {
  height: 26px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}

.brand-logo-lg { height: 38px; max-width: 220px; }

/* Spanduk pada halaman masuk. Gambar dipakai sebagai latar agar rasio
   apa pun tetap rapi tanpa memaksa admin menyiapkan ukuran tertentu. */
.login-banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .34;
}

.login-aside { position: relative; overflow: hidden; }
.login-aside > * { position: relative; z-index: 1; }

/* Lapisan gelap agar teks tetap terbaca di atas gambar apa pun. */
.login-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
      color-mix(in srgb, var(--chassis) 78%, transparent),
      color-mix(in srgb, var(--chassis) 94%, transparent));
  z-index: 0;
}

/* Contoh tampilan di layar pengaturan */
.brand-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.brand-preview-bar {
  background: var(--chassis);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-preview-body { padding: 16px; background: var(--surface); }

.swatch {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  padding: 0;
}
.swatch.is-active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent); }


/* ---------------------------------------------------------------------
   Menu akun

   Dibangun di atas <details> supaya tetap berfungsi tanpa JavaScript.
   Menu ini memuat tautan Keluar, jadi tidak boleh bergantung pada apa pun
   yang bisa gagal dimuat.
   ------------------------------------------------------------------ */

.acct-menu { position: relative; }

.acct-menu > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu > summary::marker { content: ''; }

.acct-menu[open] > summary { background: #EFF3F6; color: var(--ink); }

.acct-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 216px;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(14, 22, 32, .16);
  overflow: hidden;
}

.acct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid var(--line);
  transition: background .12s, color .12s;
}
.acct-item:first-of-type { border-top: 0; }
.acct-item:hover { background: #F5F7F9; color: var(--ink); }

.acct-item-danger { color: var(--down); }
.acct-item-danger:hover { background: var(--down-soft); color: var(--down); }

/* Tirai tak terlihat: klik di luar menutup menu, tanpa JavaScript. */
.acct-menu[open] > summary::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 39;
  display: block;
  cursor: default;
}

/* Tombol navigasi halaman yang tidak dapat ditekan. */
.btn.is-off { opacity: .4; pointer-events: none; }


/* ---------------------------------------------------------------------
   Bilah alat tabel
   ------------------------------------------------------------------ */

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: #FAFBFC;
}

.table-search { position: relative; flex: 1; min-width: 190px; }

.table-search .input { padding-left: 34px; }

.table-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
  display: flex;
}

.table-info    { font-size: 12px; white-space: nowrap; }
.table-info-sm { font-size: 11.5px; }

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

/* Baris "tidak ada hasil" */
.table-empty td {
  padding: 34px 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------------------------------------------------------------------
   Tabel responsif

   Di bawah 780px, tabel diubah menjadi kartu bertumpuk. Ini lebih baik
   daripada menggeser tabel ke samping: pada tabel dengan tombol aksi di
   kolom kanan — dan hampir semua tabel di panel ini begitu — tombolnya
   berada di luar layar dan pengguna tidak tahu ia ada.

   Nama kolom diambil dari atribut data-label pada tiap sel, sehingga
   tidak perlu menulis ulang isinya untuk tampilan kecil.
   ------------------------------------------------------------------ */

@media (max-width: 780px) {
  table.tbl thead { display: none; }

  table.tbl,
  table.tbl tbody,
  table.tbl tr,
  table.tbl td {
    display: block;
    width: 100%;
  }

  table.tbl tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin: 0 12px 10px;
    width: auto;
    background: var(--card);
    overflow: hidden;
  }

  table.tbl tbody tr:hover { background: var(--card); }

  table.tbl td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }

  table.tbl td:last-child { border-bottom: 0; }

  /* Label kolom muncul di kiri tiap sel */
  table.tbl td[data-label]::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    text-align: left;
    flex: 0 0 34%;
    padding-top: 2px;
  }

  /* Sel tanpa label — biasanya kolom aksi — memakai lebar penuh */
  table.tbl td:not([data-label]) {
    text-align: left;
    flex-wrap: wrap;
  }

  /* Tombol aksi ditumpuk agar mudah ditekan dengan jempol */
  table.tbl td .btn { margin: 2px 3px 2px 0; }

  table.tbl td.right { text-align: right; }

  /* Meter perlu ruang penuh agar terbaca */
  table.tbl td .meter { width: 100%; text-align: left; }

  .table-wrap { overflow-x: visible; }

  .table-toolbar { padding: 12px 14px; }
  .table-footer  { padding: 12px 14px; justify-content: center; }
  .table-info    { width: 100%; }
}

@media (max-width: 480px) {
  table.tbl td { flex-direction: column; align-items: stretch; text-align: left; gap: 4px; }
  table.tbl td[data-label]::before { flex: none; }
  table.tbl td.right { text-align: left; }
}
