/* Phones use a compact inventory list; desktop table and card styles stay intact. */
.catalog-mobile-list {display:none}

@media (max-width:700px) {
  .inventory-page {
    --mobile-list-surface:#fffefa;
    --mobile-list-line:#dde3df;
    --mobile-list-muted:#626c66;
    --mobile-list-hover:#f0f4f1;
    --mobile-list-positive:#35654d;
    --mobile-list-warning:#835c18;
    --mobile-list-danger:#a03e36;
  }

  html[data-theme="dark"] .inventory-page {
    --mobile-list-surface:#151b19;
    --mobile-list-line:#2c3530;
    --mobile-list-muted:#aab6ae;
    --mobile-list-hover:#1d2823;
    --mobile-list-positive:#afcdbb;
    --mobile-list-warning:#e5c37c;
    --mobile-list-danger:#f1aaa0;
  }

  .inventory-page .catalog-desktop-view,
  .inventory-page .catalog-view-switch {display:none}

  .inventory-page .catalog-hero.heading {margin-bottom:12px;padding-inline:0}
  .inventory-page .catalog-title-line {gap:10px}
  .inventory-page .catalog-title-row h1,
  .inventory-page .catalog-hero h1 {font-size:36px;line-height:1.06;letter-spacing:-1.6px}
  .inventory-page .catalog-title-row .warehouse-active-name {margin-bottom:10px}
  .inventory-page .catalog-title-line .catalog-add-action {width:44px;min-width:44px;min-height:44px;height:44px}
  .inventory-page .catalog-title-line .invoice-import-action {min-height:44px;padding-block:9px;font-size:14px}
  .inventory-page .catalog-title-row p.catalog-subtitle {margin-top:9px;font-size:12px;line-height:1.4}
  .inventory-page .inventory-category-host {margin-bottom:13px}
  .inventory-page .inventory-category-tab,
  .inventory-page .inventory-category-manage {min-height:48px;padding-block:6px}
  .inventory-page .inventory-category-track {padding-bottom:7px}
  .inventory-page .inventory-catalog-heading {gap:12px;align-items:center;margin:0 0 10px}
  .inventory-page .inventory-catalog-copy>.eyebrow {display:none}
  .inventory-page .inventory-catalog-copy h2 {font-size:20px;line-height:1.15;letter-spacing:-.35px}
  .inventory-page .inventory-catalog-actions {flex-wrap:nowrap;gap:0}
  .inventory-page .inventory-selection-toggle {min-height:44px}
  .inventory-page .inventory-load-status:empty,
  .inventory-page .inventory-alert-host:empty {display:none}
  .inventory-page .catalog-toolbar {gap:7px;min-height:44px;margin-bottom:10px}
  .inventory-page .catalog-toolbar .catalog-search-toggle {width:auto;min-width:44px;min-height:44px;gap:6px;padding-inline:12px}
  .inventory-page .catalog-toolbar .catalog-filter-controls {flex:1;min-width:0}
  .inventory-page .catalog-toolbar .catalog-sort-tool {flex:1;min-width:0;width:auto}
  .inventory-page .catalog-toolbar .catalog-filter-controls .unit-trigger {min-height:44px;padding-inline:11px}
  .inventory-page .catalog-toolbar .catalog-filter-toggle {min-height:44px;margin-left:0;gap:6px;padding:9px 12px}
  .inventory-page .catalog-toolbar .catalog-search-panel {min-width:0}
  .inventory-page .catalog-head {margin:0 2px 9px;font-size:12px}

  .inventory-page .catalog-mobile-list {
    display:block;
    min-width:0;
    width:100%;
    margin:0;
    padding:0;
    border:1px solid var(--mobile-list-line);
    border-radius:20px;
    background:var(--mobile-list-surface);
    list-style:none;
  }

  .inventory-page .catalog-mobile-item {position:relative;min-width:0;margin:0;padding:0;list-style:none}
  .inventory-page .catalog-mobile-item+.catalog-mobile-item {border-top:1px solid var(--mobile-list-line)}
  .inventory-page .catalog-mobile-item:first-child {border-radius:19px 19px 0 0}
  .inventory-page .catalog-mobile-item:last-child {border-radius:0 0 19px 19px}
  .inventory-page .catalog-mobile-item:only-child {border-radius:19px}
  .inventory-page .catalog-mobile-item:has(input:checked) {background:var(--mobile-list-hover)}
  .inventory-page .catalog-mobile-link {
    display:grid;
    grid-template-columns:48px minmax(0,1fr) 92px;
    align-items:start;
    gap:10px;
    min-width:0;
    min-height:108px;
    padding:13px 12px;
    border-radius:inherit;
    color:var(--ink);
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
  }
  .inventory-page .catalog-mobile-link:focus-visible {outline:2px solid var(--focus);outline-offset:-3px;background:var(--mobile-list-hover)}
  .inventory-page .catalog-mobile-link:active {background:var(--mobile-list-hover)}
  .inventory-page .catalog-mobile-image {display:grid;place-items:center;width:48px;height:48px;min-width:0;margin:2px 0 0;overflow:hidden;border-radius:12px;background:#fff;color:#6d7b72}
  .inventory-page .catalog-mobile-image>img {display:block;width:100%;height:100%;padding:3px;object-fit:contain}
  .inventory-page .catalog-mobile-image>svg {width:23px;height:23px}
  .inventory-page .catalog-mobile-image>.catalog-placeholder {position:static;width:24px;height:24px;margin:0;border:0;background:transparent;box-shadow:none;opacity:1;color:inherit}
  .inventory-page .catalog-mobile-image>.catalog-placeholder>svg {width:24px;height:24px}
  .inventory-page .catalog-mobile-copy {display:flex;flex-direction:column;gap:4px;min-width:0}
  .inventory-page .catalog-mobile-name {display:-webkit-box;min-width:0;margin:0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:15px;font-weight:600;line-height:1.25;letter-spacing:0;overflow-wrap:anywhere}
  .inventory-page .catalog-mobile-code {display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mobile-list-muted);font-size:12px;font-weight:400;line-height:1.25}
  .inventory-page .catalog-mobile-status {display:block;min-width:0;color:var(--mobile-list-positive);font-size:12px;font-weight:500;line-height:1.3;overflow-wrap:anywhere}
  .inventory-page .catalog-mobile-status.warning {color:var(--mobile-list-warning)}
  .inventory-page .catalog-mobile-status.danger {color:var(--mobile-list-danger)}
  .inventory-page .catalog-mobile-meta {display:flex;flex-wrap:wrap;gap:3px 7px;min-width:0;color:var(--mobile-list-muted);font-size:12px;line-height:1.3;overflow-wrap:anywhere}
  .inventory-page .catalog-mobile-stock {display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:0;text-align:right;font-variant-numeric:tabular-nums}
  .inventory-page .catalog-mobile-stock>strong {font-size:20px;font-weight:600;line-height:1.1;letter-spacing:-.35px;overflow-wrap:anywhere}
  .inventory-page .catalog-mobile-stock>small {display:block;margin:0;color:var(--mobile-list-muted);font-size:12px;font-weight:400;line-height:1.25;overflow-wrap:normal;word-break:normal}
  .inventory-page .catalog-mobile-value {display:flex;flex-direction:column;gap:2px;min-width:0;max-width:100%;margin-top:7px;color:var(--ink);font-size:13px;font-weight:600;line-height:1.25;overflow-wrap:anywhere;word-break:normal}
  .inventory-page .catalog-mobile-value small {display:block;margin:0;color:var(--mobile-list-muted);font-size:11px;font-weight:400;line-height:1.2;overflow-wrap:normal;word-break:normal}
  .inventory-page .catalog-mobile-value-context {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

  /* Selecting replaces the thumbnail, so the material name keeps its width. */
  .inventory-page .catalog-mobile-item>.inventory-item-select {display:none}
  .inventory-page .is-selection-mode .catalog-mobile-item>.inventory-item-select {position:absolute;top:15px;left:14px;display:grid;place-items:center;width:44px;height:44px;margin:0;grid-template-columns:44px}
  .inventory-page .is-selection-mode .catalog-mobile-item>.inventory-item-select input {width:44px;height:44px;min-height:44px}
  .inventory-page .is-selection-mode .catalog-mobile-item>.inventory-item-select>span[aria-hidden="true"] {width:30px;height:30px}
  .inventory-page .is-selection-mode .catalog-mobile-image {visibility:hidden}
  .inventory-page .catalog-mobile-list+.pagination {margin-top:18px}
}

@media (max-width:360px) {
  .inventory-page .catalog-mobile-link {grid-template-columns:44px minmax(0,1fr) 88px;gap:8px;padding-inline:10px}
  .inventory-page .catalog-mobile-image {width:44px;height:44px}
  .inventory-page .catalog-toolbar .catalog-search-toggle,
  .inventory-page .catalog-toolbar .catalog-filter-toggle {padding-inline:10px}
  .inventory-page .catalog-toolbar .catalog-filter-toggle,
  .inventory-page .catalog-toolbar .catalog-search-toggle .catalog-tool-label {font-size:13px}
  .inventory-page .catalog-toolbar .catalog-filter-controls .unit-trigger {padding-inline:9px}
  .inventory-page .is-selection-mode .catalog-mobile-item>.inventory-item-select {left:10px}
}

@media (forced-colors:active) and (max-width:700px) {
  .inventory-page .catalog-mobile-list,
  .inventory-page .catalog-mobile-item+.catalog-mobile-item {border-color:CanvasText}
  .inventory-page .catalog-mobile-link:focus-visible {outline-color:Highlight}
  .inventory-page .catalog-mobile-item:has(input:checked) {outline:1px solid Highlight;outline-offset:-1px}
}
