/*====================
Blok 1 — Card Mobile User: mengatur tabel pengguna menjadi kartu di HP, termasuk identitas akun, nama, role, status, tombol aksi, dan empty state.
======================*/
@media (max-width:768px) {
  #userTableBody {
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .table-container:has(#userTableBody) {
    overflow:visible;
    background:transparent;
    border:none;
    box-shadow:none;
  }

  .table-container:has(#userTableBody) .data-table {
    display:block;
    width:100%;
  }

  .table-container:has(#userTableBody) .data-table thead {
    display:none;
  }

  .table-container:has(#userTableBody) .data-table tbody {
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .user-table-row {
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "identity action"
      "name action"
      "role status";
    gap:6px 12px;
    width:100%;
    padding:15px 16px 15px 18px;
    background:var(--bg-card,#ffffff);
    border:1px solid var(--border-color,#e2e8f0);
    border-radius:14px;
    box-shadow:0 1px 3px rgba(15,23,42,.04);
    overflow:hidden;
  }

  .user-table-row:hover {
    background:var(--bg-card,#ffffff);
  }

  .user-table-row::before {
    content:"";
    position:absolute;
    left:0;
    top:14px;
    bottom:14px;
    width:3px;
    background:var(--primary,#2563eb);
    border-radius:0 4px 4px 0;
  }

  .user-col-no {
    display:none;
  }

  .user-col-identity {
    grid-area:identity;
    min-width:0;
    padding:0 !important;
    border:none;
  }

  .user-col-identity strong {
    display:block;
    min-width:0;
    font-size:13px;
    font-weight:600;
    line-height:1.35;
    color:var(--text-main,#1e293b);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .user-col-identity small {
    display:block;
    margin-top:2px;
    font-size:10px;
    line-height:1.3;
    color:var(--text-muted,#64748b);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .user-col-name {
    grid-area:name;
    min-width:0;
    padding:0 !important;
    border:none;
    font-size:10px;
    line-height:1.3;
    color:var(--text-muted,#64748b);
  }

  .user-col-name::before {
    content:"Nama";
    margin-right:6px;
    color:var(--text-muted,#64748b);
  }

  .user-col-name strong {
    font-size:10px;
    font-weight:500;
    color:var(--text-main,#1e293b);
  }

  .user-col-role {
    grid-area:role;
    display:flex;
    align-items:center;
    min-width:0;
    padding:5px 0 0 !important;
    border:none;
  }

  .user-col-role::before {
    content:"Role";
    margin-right:6px;
    font-size:10px;
    color:var(--text-muted,#64748b);
  }

  .user-col-role .badge {
    padding:4px 8px;
    font-size:9px;
    line-height:1;
    white-space:nowrap;
  }

  .user-col-status {
    grid-area:status;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding:5px 0 0 !important;
    border:none;
  }

  .user-col-status .badge {
    padding:4px 8px;
    font-size:9px;
    line-height:1;
    white-space:nowrap;
  }

  .user-col-action {
    grid-area:action;
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    gap:4px;
    padding:0 !important;
    border:none;
  }

  .user-col-action .btn-action {
    width:36px;
    height:36px;
    flex-shrink:0;
    border-radius:9px;
  }

  .user-col-action .btn-action svg {
    width:17px;
    height:17px;
  }

  .table-container:has(#userTableBody) .data-table tbody td {
    border-bottom:none;
  }

  #userTableBody tr:not(.user-table-row) {
    display:block;
    background:transparent;
    border:none;
    box-shadow:none;
  }

  #userTableBody tr:not(.user-table-row) td {
    display:block;
    padding:2rem 1rem;
    border:none;
  }
}