/*====================
Blok 1 — Card Mobile Expired: mengatur tabel produk kedaluwarsa menjadi kartu di HP, termasuk kode batch, nama produk, tanggal expired, sisa waktu, stok tersisa, status, dan empty state.
======================*/
@media (max-width:768px) {

  #expiredTableBody {
    display:flex;
    flex-direction:column;
    gap:10px;

  }

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

  }

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

  }

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

  }

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

  }

  .expired-table-row {
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:

      "batch status"
      "product product"
      "date remaining"
      "stock stock";

    gap:7px 14px;
    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;

  }

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

  }

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

  }

  .expired-col-no {
    display:none;

  }

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

  }

  .expired-col-batch::before {
    content:"Batch";
    margin-right:6px;
    color:var(--text-muted,#64748b);

  }

  .expired-col-batch strong {
    font-size:inherit;
    font-weight:600;
    color:var(--text-main,#1e293b);

  }

  .expired-col-product {
    grid-area:product;
    min-width:0;
    padding:0 !important;
    border:none;

  }

  .expired-col-product 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;

  }

  .expired-col-product 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;

  }

  .expired-col-date {
    grid-area:date;
    min-width:0;
    padding:5px 0 0 !important;
    border:none;
    font-size:10px;
    line-height:1.3;
    color:var(--text-muted,#64748b);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;

  }

  .expired-col-date::before {
    content:"Expired";
    display:block;
    margin-bottom:2px;
    color:var(--text-muted,#64748b);

  }

  .expired-col-remaining {
    grid-area:remaining;
    min-width:0;
    padding:5px 0 0 !important;
    border:none;
    font-size:10px;
    line-height:1.3;
    color:var(--text-muted,#64748b);
    text-align:right;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;

  }

  .expired-col-remaining::before {
    content:"Sisa Waktu";
    display:block;
    margin-bottom:2px;
    color:var(--text-muted,#64748b);

  }

  .expired-col-stock {
    grid-area:stock;
    min-width:0;
    padding:5px 0 0 !important;
    border:none;
    font-size:13px;
    font-weight:700;
    line-height:1.3;
    color:var(--text-main,#1e293b);

  }

  .expired-col-stock::before {
    content:"Stok Tersisa: ";
    font-size:10px;
    font-weight:400;
    color:var(--text-muted,#64748b);

  }

  .expired-col-stock small {
    margin-left:4px;
    font-size:10px;
    font-weight:400;
    color:var(--text-muted,#64748b);

  }

  .expired-col-status {
    grid-area:status;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    min-width:0;
    padding:0 !important;
    border:none;

  }

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

  }

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

  }

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

  }

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

  }
}
