/* BUILD423 — Responsive, steady, low-jank Inventory UI. */
#app #invTable{
  padding:0 !important;
  overflow:hidden !important;
  contain:layout paint style;
  background:#fff !important;
}
#app #invTable .inventoryShell423{
  display:flex;
  flex-direction:column;
  min-height:360px;
  width:100%;
  max-width:100%;
  overflow:hidden;
}
#app #invTable .inventoryTableViewport423{
  width:100% !important;
  max-width:100% !important;
  max-height:clamp(340px,52vh,650px);
  overflow:auto !important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
  scroll-behavior:smooth;
  background:#fff;
  border-radius:14px 14px 0 0;
}
#app #invTable .inventoryStableTable423{
  margin:0 !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
#app #invTable .inventoryStableTable423 thead th{
  position:sticky !important;
  top:0 !important;
  z-index:4 !important;
  background:#e4f1e9 !important;
  box-shadow:0 1px 0 rgba(8,72,49,.14);
}
#app #invTable .inventoryStableTable423 thead th:last-child{
  z-index:8 !important;
}
#app #invTable .inventoryRow{
  height:64px !important;
  min-height:64px !important;
  max-height:64px !important;
  content-visibility:auto;
  contain-intrinsic-size:64px;
}
#app #invTable .inventoryRow td{
  transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease !important;
}
#app #invTable .inventoryRow:hover td{
  background:#f8fcfa !important;
}
#app #invTable .inventoryRow.inventorySelected td{
  background:#edf8f2 !important;
}
#app #invTable .inventoryRow td:last-child,
#app #invTable .inventoryRow:hover td:last-child,
#app #invTable .inventoryRow.inventorySelected td:last-child{
  background:#fff !important;
}
#app #invTable .inventoryPager423{
  position:sticky;
  bottom:0;
  z-index:9;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  min-height:58px;
  padding:10px 12px !important;
  background:rgba(255,255,255,.96) !important;
  border-top:1px solid #d9e9df;
  box-shadow:0 -8px 20px rgba(7,50,36,.06);
  backdrop-filter:blur(8px);
}
#app #invTable .inventoryPager423 .actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin:0 !important;
}
#app #invTable .inventoryPager423 button,
#app #invTable .inventoryPager423 select,
#app .inventoryToolbar button,
#app .inventoryShortcutBar span,
#app #invTable .tableActions button{
  transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease,opacity .12s ease !important;
  transform:none !important;
}
#app #invTable .inventoryPager423 button:hover:not(:disabled),
#app .inventoryToolbar button:hover:not(:disabled),
#app #invTable .tableActions button:hover:not(:disabled){
  box-shadow:0 5px 14px rgba(7,55,39,.12) !important;
  transform:none !important;
}
#app .inventoryToolbar{
  position:sticky;
  top:64px;
  z-index:18;
  background:rgba(255,255,255,.97) !important;
  backdrop-filter:blur(8px);
  box-shadow:0 7px 18px rgba(6,55,38,.05);
}
#app .inventoryToolbar #invSearch{
  min-width:220px !important;
  flex:1 1 260px !important;
}
#app .inventoryShortcutBar{
  overflow-x:auto !important;
  scrollbar-width:thin;
  white-space:nowrap;
  flex-wrap:nowrap !important;
  scrollbar-gutter:stable;
}
#app .inventoryShortcutBar > *{ flex:0 0 auto; }
#app .inventoryBackupCard237,
#app #inventoryServerSaveStatus281,
#app .inventoryGuide,
#app .inventoryShortcutBar,
#app .inventoryToolbar{
  contain:layout style;
}
#app .inventorySkeleton423{
  min-height:360px;
  display:grid;
  place-content:center;
  gap:8px;
  text-align:center;
  color:#176b3a;
}
#app .inventorySkeleton423 span{font-size:12px;color:#5d7469}

/* Tablet/mobile: show every field as a stable card; no disappearing ACTION column. */
@media (max-width:900px){
  #app #invTable .inventoryTableViewport423{
    max-height:none !important;
    overflow-x:hidden !important;
    overflow-y:visible !important;
    border-radius:12px 12px 0 0;
  }
  #app #invTable .inventoryStableTable423,
  #app #invTable .inventoryStableTable423 tbody{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
  }
  #app #invTable .inventoryStableTable423 thead{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
  }
  #app #invTable .inventoryRow{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:0 !important;
    width:calc(100% - 16px) !important;
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
    margin:8px !important;
    border:1px solid #dbe9e1 !important;
    border-radius:14px !important;
    overflow:hidden !important;
    background:#fff !important;
    box-shadow:0 4px 14px rgba(6,55,38,.05);
  }
  #app #invTable .inventoryRow td{
    display:block !important;
    position:static !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
    padding:10px 12px !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    border:0 !important;
    border-bottom:1px solid #edf3ef !important;
    box-shadow:none !important;
    background:#fff !important;
  }
  #app #invTable .inventoryRow td::before{
    content:attr(data-label);
    display:block;
    margin-bottom:3px;
    font-size:9px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:.04em;
    color:#5b7468;
    text-transform:uppercase;
  }
  #app #invTable .inventoryRow td:first-child{
    grid-column:1/-1;
    font-size:15px !important;
    font-weight:900;
    background:#f6fbf8 !important;
  }
  #app #invTable .inventoryRow td:last-child{
    grid-column:1/-1;
    background:#f8fcfa !important;
    border-bottom:0 !important;
  }
  #app #invTable .tableActions{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:7px !important;
  }
  #app #invTable .tableActions button{
    min-height:38px !important;
    height:38px !important;
    font-size:10px !important;
  }
  #app #invTable .inventoryPager423{
    position:sticky !important;
    bottom:0 !important;
    flex-direction:column !important;
    align-items:stretch !important;
  }
  #app #invTable .inventoryPager423 .actions{
    justify-content:space-between !important;
    flex-wrap:wrap !important;
  }
  #app .inventoryToolbar{
    position:static !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }
  #app .inventoryToolbar #invSearch{
    grid-column:1/-1;
    width:100% !important;
    min-width:0 !important;
  }
  #app .inventoryToolbar button{width:100% !important;min-width:0 !important;}
  #app .inventoryBackupCard237{display:block !important;}
  #app .inventoryBackupCard237 > .actions{display:grid !important;grid-template-columns:1fr !important;gap:8px !important;}
  #app .inventoryBackupCard237 > .actions button{width:100% !important;}
}
@media (max-width:520px){
  #app #invTable .inventoryRow{grid-template-columns:1fr !important;}
  #app #invTable .inventoryRow td:first-child,
  #app #invTable .inventoryRow td:last-child{grid-column:auto !important;}
  #app #invTable .tableActions{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #app .inventoryToolbar{grid-template-columns:1fr !important;}
  #app .inventoryToolbar #invSearch{grid-column:auto !important;}
  #app #invTable .inventoryPager423 .actions > *{flex:1 1 auto;}
}

/* Respect reduced-motion while keeping UI responsive. */
@media (prefers-reduced-motion:reduce){
  #app #invTable *,#app .inventoryToolbar *{scroll-behavior:auto !important;transition:none !important;animation:none !important;}
}
