/* =========================================================
   mobile.css - SHELL & UTIL bersama HRM System (< 768px)
   KONTRAK: desktop tidak boleh berubah. Semua gaya dikunci
   di media query + prefix body.is-mobile / #hr-mobile-root.
   Token mengikuti palet brand (navy #2b3991 + emerald).

   ── KONVENSI FILE (agar gampang dibaca) ─────────────
   • File ini   : SHELL (dock, sheet menu, toast, modal,
                  cardstack generik) + token + font.
                  Dimuat global di semua halaman.
   • Per halaman: css/mobile-<page>.css — dimuat OTOMATIS
                  lewat map $HR_MOBILE_PAGE_CSS di head.php
                  HANYA saat halaman tsb aktif.
   ========================================================= */

/* ── Design tokens (palet existing, brand navy + emerald) ── */
:root {
  /* Primary Brand = navy perusahaan */
  --hrm-primary-50: #eef1ff;
  --hrm-primary-500: #2b3991;
  --hrm-primary-600: #232e78;
  --hrm-primary-700: #1e2a6b;

  /* Status Indicators (sama dgn badge existing) */
  --hrm-success: #10b981; /* Present / Approved / emerald */
  --hrm-warning: #f59e0b; /* Late / Pending / amber */
  --hrm-danger: #f43f5e;  /* Clock Out / Rejected / rose */
  --hrm-info: #3b82f6;    /* WFH / Info / blue */

  /* Neutral Surface */
  --hrm-bg-app: #f8fafc;
  --hrm-bg-card: #ffffff;
  --hrm-text-main: #0f172a;
  --hrm-text-muted: #64748b;
  --hrm-border-light: #e2e8f0;
}

/* ── PWA / mobile: font Plus Jakarta Sans ──
   Desktop memakai Inter (kontrol kpi.css). Untuk layar mobile,
   seluruh teks aplikasi (kecuali ikon FontAwesome) memakai PJS. */
body.is-mobile,
body.is-mobile button,
body.is-mobile input,
body.is-mobile select,
body.is-mobile textarea,
body.is-mobile :not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fat):not(.fad):not(.fak):not(.fa-solid):not(.fa-regular):not(.fa-light):not(.fa-thin):not(.fa-duotone):not(.fa-brands):not(.fa-kit):not(.fa-classic):not(.fa-sharp):not(.fa-sharp-solid):not(.fa-sharp-regular):not(.fa-sharp-light):not(.fa-sharp-thin) {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ── Shell mobile: default tersembunyi di semua ukuran ── */
#hr-mobile-root {
  display: none;
}

/* Kill-switch: layar >= 768px selalu tanpa shell mobile */
@media (min-width: 768px) {
  #hr-mobile-root,
  #hr-mobile-sheet-wrap {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Mode aktif (disetel js/mobile-nav.js via matchMedia) ── */
  body.is-mobile #hr-mobile-root {
    display: contents;
  }

  /* Ruang untuk dock mengambang agar footer/konten tidak tertutup */
  body.is-mobile .app-body {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
  }

  /* Hide footer di mobile */
  body.is-mobile footer,
  body.is-mobile .footer,
  body.is-mobile .no-print {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.is-mobile,
  body.is-mobile #view-app,
  body.is-mobile main {
    background: #f8fafc !important;
  }

  body.is-mobile .app-body {
    background: transparent !important;
  }

  /* Padding main lebih rapat ala aplikasi */
  body.is-mobile main.py-6 {
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Halaman settings (Konfigurasi Akun dll.): ruang bawah cukup agar konten
     tidak tertutup dock navbar mobile, dan kontainer memakai lebar penuh layar. */
  body.is-mobile #settings-page {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }
  body.is-mobile #settings-page .max-w-xl {
    max-width: 100%;
  }

  /* ── Topbar mobile: HIDDEN (frameless look) ── */
  body.is-mobile nav.topbar {
    display: none !important;
  }

  /* ── Bottom Tab Bar: DOCK MENGAMBANG, icon-only (iOS-style) ── */
  /* Tombol collapse: panah bawah untuk sembunyikan/tampilkan bar */
  #hr-mobile-toggle {
    position: fixed;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 61;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: #2b3991;
    color: #ffffff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(30, 42, 107, 0.35);
    transition: bottom 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  #hr-mobile-toggle i {
    display: block;
    transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  #hr-mobile-root.nav-hidden #hr-mobile-toggle {
    bottom: 12px;
  }
  #hr-mobile-root.nav-hidden #hr-mobile-toggle i {
    transform: rotate(180deg);
  }

  /* Dock: animasi slide keluar/masuk saat di-hide/show */
  #hr-mobile-bar {
    transition:
      transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 260ms ease;
    will-change: transform;
  }
  #hr-mobile-root.nav-hidden #hr-mobile-bar {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
  }

  #hr-mobile-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(43, 57, 145, 0.12);
    border-radius: 24px;
    box-shadow:
      0 10px 30px rgba(30, 42, 107, 0.18),
      0 3px 10px rgba(15, 23, 42, 0.10);
    height: 62px;
    padding: 6px;
    isolation: isolate;
  }
  #hr-mobile-bar .hmb-tab {
    flex: 1 1 0;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    color: #64748b;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: color 150ms ease, background-color 150ms ease, transform 120ms ease;
  }
  /* Ripple sentuhan saat tab diklik */
  #hr-mobile-bar .hmb-tab.hmb-tap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90px;
    height: 90px;
    margin: -45px 0 0 -45px;
    border-radius: 50%;
    background: rgba(43, 57, 145, 0.14);
    transform: scale(0);
    animation: hmb-ripple 450ms ease-out forwards;
    pointer-events: none;
  }
  @keyframes hmb-ripple {
    from { transform: scale(0); opacity: 0.9; }
    to { transform: scale(2.4); opacity: 0; }
  }
  #hr-mobile-bar .hmb-tab:active {
    background: #eef1ff;
  }
  #hr-mobile-bar .hmb-tab i {
    font-size: 20px;
    line-height: 1;
  }
  /* Icon-only: label teks disembunyikan */
  #hr-mobile-bar .hmb-tab .hmb-lbl {
    display: none;
  }
  #hr-mobile-bar .hmb-tab.active {
    color: #2b3991; /* primary navy (aksi/akselerasi sisi brand) */
  }
  #hr-mobile-bar .hmb-tab.active i {
    transform: translateY(-1px);
  }
  /* Dot indikator aktif di bawah ikon (muncul dengan animasi) */
  #hr-mobile-bar .hmb-tab.active::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 999px;
    background: #2b3991;
    animation: hmb-dot-in 260ms ease;
  }
  @keyframes hmb-dot-in {
    from { transform: translateX(-50%) scaleX(0); opacity: 0; }
    to { transform: translateX(-50%) scaleX(1); opacity: 1; }
  }
  /* Tab tengah (Absen) — highlight aksi tercepat */
  #hr-mobile-bar .hmb-tab.hmb-center i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #2b3991;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(30, 42, 107, 0.35);
  }
  #hr-mobile-bar .hmb-tab.hmb-center.active i {
    background: #223e9b; /* sidebar navy */
  }
  /* Badge merah jumlah pending (di sudut kanan-atas ikon) */
  #hr-mobile-bar .hmb-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #f43f5e; /* rose-500 */
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  /* ── Sheet "Menu": FULLSCREEN ──
     Saat Menu diklik tampil penuh selayar (bukan sheet setengah). */
  #hr-mobile-sheet-wrap {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
  }
  #hr-mobile-sheet-wrap[hidden] {
    display: none;
  }
  #hr-mobile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  #hr-mobile-sheet {
    position: relative;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    height: 100dvh;
    max-height: none;
    display: flex;
    flex-direction: column;
    animation: hrmsheet-up 220ms ease;
  }
  @keyframes hrmsheet-up {
    from { transform: translateY(24px); opacity: 0.4; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  #hr-mobile-sheet.closing {
    animation: hrmsheet-down 180ms ease forwards;
  }
  @keyframes hrmsheet-down {
    from { transform: translateY(0);  opacity: 1; }
    to   { transform: translateY(32px); opacity: 0; }
  }
  .hrm-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 9999px;
    background: #cbd5e1;
    margin: 10px auto 4px;
    touch-action: none;
  }
  .hrm-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 10px;
    border-bottom: none !important;
  }
  .hrm-sheet-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 10px calc(16px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }
  /* Grup menu dalam sheet (collapsible) */
  .hrm-grp-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px 10px 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    min-height: 44px;
  }
  .hrm-grp-label i {
    font-size: 10px;
    transition: transform 150ms ease;
  }
  .hrm-grp.collapsed .hrm-grp-label i {
    transform: rotate(-90deg);
  }
  .hrm-grp.collapsed .hrm-item {
    display: none;
  }
  .hrm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    color: #334155;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 150ms ease;
  }
  .hrm-item:hover,
  .hrm-item:active {
    background: #f8fafc;
  }
  .hrm-item .hi-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
  }
  .hrm-item .hi-txt {
    font-size: 13px;
    font-weight: 600;
  }
  .hrm-item.active {
    background: #eef1ff; /* primary-50 */
    color: #2b3991;
  }

  /* ── Icon system "Tinted squircle" (soft duotone per kategori) ──
     Dipakai BERSAMA oleh Sheet Menu (mobile-nav.js) & tile App
     Favorit (beranda). Karena dipakai shell di semua halaman,
     ia diletakkan di mobile.css (shared), bukan per-halaman. */
  .brt-emerald { --brt-a:#ecfdf5; --brt-b:#d1fae5; --brt-ink:#047857; --brt-line:#a7f3d0; --brt-glow:rgba(16,185,129,0.22); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-blue   { --brt-a:#eff6ff; --brt-b:#dbeafe; --brt-ink:#1d4ed8; --brt-line:#bfdbfe; --brt-glow:rgba(59,130,246,0.22); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-violet { --brt-a:#f5f3ff; --brt-b:#ede9fe; --brt-ink:#6d28d9; --brt-line:#ddd6fe; --brt-glow:rgba(139,92,246,0.20); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-amber  { --brt-a:#fffbeb; --brt-b:#fef3c7; --brt-ink:#b45309; --brt-line:#fde68a; --brt-glow:rgba(245,158,11,0.22); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-sky    { --brt-a:#f0f9ff; --brt-b:#e0f2fe; --brt-ink:#0369a1; --brt-line:#bae6fd; --brt-glow:rgba(14,165,233,0.20); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-slate  { --brt-a:#f8fafc; --brt-b:#eef2f7; --brt-ink:#334155; --brt-line:#cbd5e1; --brt-glow:rgba(100,116,139,0.18); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-rose   { --brt-a:#fff1f2; --brt-b:#ffe4e6; --brt-ink:#be123c; --brt-line:#fecdd3; --brt-glow:rgba(244,63,94,0.20); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }
  .brt-cyan   { --brt-a:#ecfeff; --brt-b:#cffafe; --brt-ink:#0e7490; --brt-line:#a5f3fc; --brt-glow:rgba(6,182,212,0.20); background:linear-gradient(145deg,var(--brt-a),var(--brt-b)); color:var(--brt-ink); border:1px solid var(--brt-line); box-shadow:inset 0 1px 0 rgba(255,255,255,0.65),0 2px 6px var(--brt-glow),0 1px 2px rgba(15,23,42,0.03); }

  /* Kedalaman halus pada glyph ikon */
  .brt-emerald i, .brt-blue i, .brt-violet i, .brt-amber i,
  .brt-sky i, .brt-slate i, .brt-rose i, .brt-cyan i {
    filter: none;
  }

  /* Flat: tanpa shadow pada kotak ikon (App Favorit & Sheet Menu) */
  .brt-emerald, .brt-blue, .brt-violet, .brt-amber,
  .brt-sky, .brt-slate, .brt-rose, .brt-cyan {
    box-shadow: none;
  }

  /* Glyph PNG dari img/icon (fallback FA) di tile App Favorit & Sheet Menu */
  .br-ico-img,
  .hi-img {
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(30, 42, 107, 0.12));
  }
  .hi-img {
    width: 20px;
    height: 20px;
  }
  .br-ico-img {
    width: 36px;
    height: 36px;
  }

  /* ── Toast: banner penuh di atas layar ── */
  :root {
    --toastify-toast-width: calc(100vw - 16px);
  }
  body.is-mobile .Toastify__toast-container--top-right {
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
  }

  /* ── Modal → Bottom Sheet ──
     Semua modal [id^="modal-"] jadi sheet dari bawah, tanpa ubah HTML.
     Kecuali #modal-change-password, #modal-appr-type, #modal-appr-detail,
     #modal-appr-create, #modal-ds-edit, #modal-izin-form, #modal-izin-detail,
     dan #modal-leave-form yang sengaja TIDAK jadi bottom sheet
     (tetap popup di tengah / halaman penuh). */
  body.is-mobile [id^="modal-"]:not(#modal-change-password):not(#modal-appr-type):not(#modal-appr-detail):not(#modal-appr-create):not(#modal-ds-edit):not(#modal-izin-form):not(#modal-izin-detail):not(#modal-leave-form) {
    align-items: flex-end !important;
    justify-content: center;
    padding: 0 !important;
  }
  body.is-mobile [id^="modal-"]:not(#modal-change-password):not(#modal-appr-type):not(#modal-appr-detail):not(#modal-appr-create):not(#modal-ds-edit):not(#modal-izin-form):not(#modal-izin-detail):not(#modal-leave-form) > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18);
    animation: hrmsheet-up 220ms ease;
  }

  /* Modal Change Password khusus: tetap di tengah layar mobile.
     Aturan ini menimpa base utility Tailwind (items-center) yg sama. */
  body.is-mobile #modal-change-password {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.is-mobile #modal-change-password > div:first-child {
    width: 100% !important;
    max-width: 26rem !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  /* Modal Pilih Bagian (Approval): tetap popup di tengah layar.
     Sama pola dengan modal change-password, jangan jadi bottom sheet. */
  body.is-mobile #modal-appr-type {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.is-mobile #modal-appr-type > div:first-child {
    width: 100% !important;
    max-width: 26rem !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  /* Modal Buat Pengajuan (Approval): tetap popup di tengah layar,
     jangan jadi bottom sheet — agar grid pilihan jenis tidak tertutup dock. */
  body.is-mobile #modal-appr-create {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.is-mobile #modal-appr-create > div:first-child {
    width: 100% !important;
    max-width: 26rem !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  /* Modal Detail Pengajuan (Approval): tetap popup di tengah layar,
     jangan jadi bottom sheet — agar isi detail keliatan jelas & lengkap. */
  body.is-mobile #modal-appr-detail {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.is-mobile #modal-appr-detail > div:first-child {
    width: 100% !important;
    max-width: 26rem !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  /* Modal Ajukan Pengunduran Diri (Leave Request): tetap popup di
     tengah layar, jangan jadi bottom sheet. */
  body.is-mobile #modal-leave-form {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }
  body.is-mobile #modal-leave-form > div:first-child {
    width: 100% !important;
    max-width: 26rem !important;
    margin: 0 !important;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  /* ── Hint "Geser tabel ke samping" (tabel kompleks yg overflow) ── */
  .hrm-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 5px 12px;
    border-radius: 9999px;
    background: var(--hrm-bg-card);
    border: 1px dashed var(--hrm-border-light);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    animation: hrmpulse-soft 2s ease infinite;
  }
  @keyframes hrmpulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }
  .hrm-scroll-hint.hrm-hint-off {
    display: none;
  }

  /* Status indicators dengan lebih banyak kontras */
  body.is-mobile .status-badge {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.10),
      inset 0 1px 0 rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  /* ── Card-Stack tabel sederhana ──
     tr → kartu; td[data-label] → baris "label: nilai"; td pertama → header kartu. */
  body.is-mobile .hrm-cardstack {
    border-collapse: separate;
    border-spacing: 0;
  }
  body.is-mobile .hrm-cardstack thead {
    display: none !important;
  }
  body.is-mobile .hrm-cardstack tbody tr {
    display: block;
    background: var(--hrm-bg-card);
    border: 1px solid var(--hrm-border-light);
    border-radius: 16px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }
  body.is-mobile .hrm-cardstack tbody tr:hover {
    background: var(--hrm-bg-card);
  }
  /* Empty state / error row (td colspan tanpa data-label) → kartu pesan */
  body.is-mobile .hrm-cardstack tbody tr:only-child,
  body.is-mobile .hrm-cardstack tbody td:not([data-label]) {
    text-align: center;
  }
  body.is-mobile .hrm-cardstack td {
    display: block;
    padding: 3px 0 !important;
    text-align: left !important;
    white-space: normal !important;
  }
  body.is-mobile .hrm-cardstack td:first-child {
    margin-bottom: 8px;
    padding-top: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px dashed var(--hrm-border-light);
  }
  body.is-mobile .hrm-cardstack td[data-label] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  body.is-mobile .hrm-cardstack td[data-label]::before {
    content: attr(data-label);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    flex-shrink: 0;
  }
  body.is-mobile .hrm-cardstack td[data-label] > span,
  body.is-mobile .hrm-cardstack td[data-label] > div {
    min-width: 0;
  }
  /* Baris aksi: label disembunyikan, tombol rata kanan penuh */
  body.is-mobile .hrm-cardstack td[data-label="Aksi"]::before {
    display: none;
  }
  body.is-mobile .hrm-cardstack td[data-label="Aksi"] {
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 6px !important;
    margin-top: 4px;
    border-top: 1px dashed var(--hrm-border-light);
  }
}