/*
 * Inventory Maestro visual layer
 * Presentation-only override: no site/item/role/storage/work-area business rules live here.
 * Existing inventory API, RBAC, PostgreSQL authority and transaction handlers remain untouched.
 */

/* Inventory route shell: visual scope only. Uses existing rendered classes; no route/data logic. */
.page-content:has(.branch-ops-tabs),
.page-content:has(.inventory-table),
.page-content:has(.inventory-operations-host),
.page-content:has(.central-kitchen-shell){
  max-width:1180px;
  border:1px solid #202846;
  border-radius:20px;
  background:
    radial-gradient(circle at 88% 2%,rgb(43 84 103 / 18%),transparent 29%),
    linear-gradient(180deg,#0f1429,#0c1123);
  color:#e8ebf6;
  box-shadow:0 24px 60px rgb(15 23 42 / 12%);
}
.page-content:has(.branch-ops-tabs) .page-heading,
.page-content:has(.inventory-table) .page-heading,
.page-content:has(.inventory-operations-host) .page-heading,
.page-content:has(.central-kitchen-shell) .page-heading{
  margin-bottom:18px;
}
.page-content:has(.branch-ops-tabs) .page-heading h1,
.page-content:has(.inventory-table) .page-heading h1,
.page-content:has(.inventory-operations-host) .page-heading h1,
.page-content:has(.central-kitchen-shell) .page-heading h1{
  color:#f8faff;
  font-weight:780;
  letter-spacing:-.035em;
}
.page-content:has(.branch-ops-tabs) .page-heading p,
.page-content:has(.inventory-table) .page-heading p,
.page-content:has(.inventory-operations-host) .page-heading p,
.page-content:has(.central-kitchen-shell) .page-heading p{
  color:#8d99b9;
}
.page-content:has(.branch-ops-tabs) .page-heading .primary-button,
.page-content:has(.inventory-table) .page-heading .primary-button,
.page-content:has(.inventory-operations-host) .page-heading .primary-button{
  border:1px solid #397468;
  background:#1d5148;
  color:#b8ffeb;
  box-shadow:0 7px 18px rgb(0 0 0 / 14%);
}
.page-content:has(.branch-ops-tabs) .page-heading .primary-button:hover,
.page-content:has(.inventory-table) .page-heading .primary-button:hover,
.page-content:has(.inventory-operations-host) .page-heading .primary-button:hover{
  border-color:#67efca;
  background:#236357;
  color:#fff;
}
.inventory-readonly-notice,
.inventory-history-notice{
  margin:0 0 12px;
  padding:11px 13px;
  border:1px solid #4d4562;
  border-radius:12px;
  background:#211d35;
  color:#d8d7e8;
}
.inventory-readonly-notice small{color:#9795ad}
.inventory-history-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.inventory-history-notice .secondary-button{
  flex:0 0 auto;
  border-color:#3d496f;
  background:#202746;
  color:#e4e8f7;
}
.page-content:has(.branch-ops-tabs) :is(button,select,input:not([type="checkbox"]):not([type="radio"])),
.page-content:has(.inventory-table) :is(button,select,input:not([type="checkbox"]):not([type="radio"])),
.page-content:has(.inventory-operations-host) :is(button,select,input:not([type="checkbox"]):not([type="radio"])),
.page-content:has(.central-kitchen-shell) :is(button,select,input:not([type="checkbox"]):not([type="radio"])){
  font-size:12px;
}
.inventory-table .inventory-action-button{
  width:32px;
  height:32px;
}
.inventory-table .restock-button{
  min-height:34px;
  font-size:12px;
}
.inventory-table .inventory-select,
.inventory-table .minimum-input{
  font-size:12px;
}

/* Existing inventory operation forms: visual override only. */
.inventory-operations-host{
  min-width:0;
}
.inventory-operations-host .inventory-ops-shell{
  display:grid;
  gap:12px;
}
.inventory-operations-host .inventory-ops-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid #252b47;
  border-radius:13px;
  background:#151a33;
}
.inventory-operations-host .op-search{
  min-width:0;
  flex:1;
}
.inventory-operations-host .op-search input{
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:1px solid #343d60;
  border-radius:10px;
  outline:none;
  background:#0f1429;
  color:#f5f7ff;
}
.inventory-operations-host .op-search input:focus{
  border-color:#5b6a97;
  box-shadow:0 0 0 3px rgb(91 106 151 / 14%);
}
.inventory-operations-host .op-search input::placeholder{color:#697596}
.inventory-operations-host .op-count{
  display:grid;
  min-width:34px;
  height:34px;
  place-items:center;
  border:1px solid #385c59;
  border-radius:999px;
  background:#173630;
  color:#7aefd1;
  font-size:10px;
  font-weight:850;
}
.inventory-operations-host .inventory-ops-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.inventory-operations-host .inventory-op-card{
  min-width:0;
  overflow:hidden;
  padding:14px;
  border:1px solid #293151;
  border-radius:14px;
  background:#11162d;
  color:#e7ebf7;
  box-shadow:0 10px 24px rgb(0 0 0 / 10%);
}
.inventory-operations-host .inventory-op-card:hover{
  border-color:#3b466c;
  background:#151b35;
}
.inventory-operations-host .op-item-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:11px;
  border-bottom:1px solid #252c49;
}
.inventory-operations-host .op-item-head>div,
.inventory-operations-host .op-item-head>span{
  display:grid;
  min-width:0;
  gap:3px;
}
.inventory-operations-host .op-item-head>span{text-align:right}
.inventory-operations-host .op-item-head strong{color:#f8f9ff}
.inventory-operations-host .op-item-head small{color:#808bab}
.inventory-operations-host .op-location-list{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  padding-top:11px;
}
.inventory-operations-host .op-location-pill{
  display:grid;
  min-width:0;
  gap:3px;
  padding:8px 10px;
  border:1px solid #303858;
  border-radius:10px;
  background:#181e38;
}
.inventory-operations-host .op-location-pill small{color:#8792b2}
.inventory-operations-host .op-location-pill strong{color:#eef2fb}
.inventory-operations-host .op-location-pill-use{
  border-color:#315d56;
  background:#173630;
}
.inventory-operations-host .op-select-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:11px;
}
.inventory-operations-host .op-select-grid label,
.inventory-operations-host .pick-return-row label{
  display:grid;
  min-width:0;
  gap:5px;
  color:#8994b3;
  font-size:9.5px;
  font-weight:720;
}
.inventory-operations-host select{
  width:100%;
  min-width:0;
  min-height:38px;
  padding:0 10px;
  border:1px solid #343d60;
  border-radius:9px;
  outline:none;
  background:#0d1226;
  color:#f3f5fb;
}
.inventory-operations-host select:focus{
  border-color:#5e6b9a;
  box-shadow:0 0 0 3px rgb(94 107 154 / 12%);
}
.inventory-operations-host .inventory-readonly-field{
  display:flex;
  min-height:38px;
  align-items:center;
  padding:0 10px;
  border:1px solid #2f3657;
  border-radius:9px;
  background:#171c34;
  color:#aeb7ce;
}
.inventory-operations-host .op-transfer-balance,
.inventory-operations-host .pick-followup{
  margin-top:10px;
  padding:10px;
  border:1px solid #293151;
  border-radius:11px;
  background:#0f1429;
}
.inventory-operations-host .op-transfer-balance{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#9aa5c2;
  font-size:10px;
}
.inventory-operations-host .op-transfer-balance strong{color:#f4f6fb}
.inventory-operations-host .op-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  margin-top:11px;
}
.inventory-operations-host .op-quantity{
  display:grid;
  grid-template-columns:40px minmax(54px,74px) 40px;
  align-items:center;
  overflow:hidden;
  border:1px solid #343d60;
  border-radius:10px;
  background:#0d1226;
}
.inventory-operations-host .op-quantity button{
  min-height:40px;
  border:0;
  background:#181e38;
  color:#b9c2dc;
  font-size:16px;
}
.inventory-operations-host .op-quantity input{
  width:100%;
  min-width:0;
  height:40px;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  text-align:center;
  font-weight:760;
}
.inventory-operations-host .op-primary,
.inventory-operations-host .op-secondary{
  min-height:40px;
  padding:0 13px;
  border:1px solid #397468;
  border-radius:10px;
  background:#1d5148;
  color:#b8ffeb;
  font-size:12px;
  font-weight:820;
}
.inventory-operations-host .op-primary:hover,
.inventory-operations-host .op-secondary:hover{
  border-color:#67efca;
  background:#236357;
  color:#fff;
}
.inventory-operations-host .op-primary:disabled,
.inventory-operations-host .op-secondary:disabled{
  cursor:not-allowed;
  opacity:.45;
}
.inventory-operations-host .op-out{
  border-color:#615137;
  background:#342b1e;
  color:#f1ca7b;
}
.inventory-operations-host .pick-followup{
  display:grid;
  gap:9px;
}
.inventory-operations-host .pick-status,
.inventory-operations-host .pick-use-row,
.inventory-operations-host .pick-return-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.inventory-operations-host .pick-status{
  justify-content:space-between;
  color:#8893b0;
  font-size:10px;
}
.inventory-operations-host .pick-use-row,
.inventory-operations-host .pick-return-row{
  justify-content:flex-end;
}
.inventory-operations-host .pick-return-row label{flex:1}
.inventory-operations-host .ship-fixed-hint,
.inventory-operations-host .op-message,
.inventory-operations-host .inventory-ops-empty,
.inventory-operations-host .inventory-ops-loading{
  color:#8994b3;
  font-size:10px;
  line-height:1.5;
}
.inventory-operations-host .ship-fixed-hint{grid-column:1/-1}
.inventory-operations-host .op-message{min-height:16px;margin:0}
[data-branch-inventory-history]{
  min-width:0;
  color:#e7ebf7;
}
[data-branch-inventory-history] .history-title,
[data-branch-inventory-history] article{
  border-color:#293151;
  background:#11162d;
  color:#e7ebf7;
}
[data-branch-inventory-history] small,
[data-branch-inventory-history] p{color:#8994b3}

.branch-ops-tabs{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(118px,1fr));
  gap:8px;
  margin:0 0 12px;
  padding:8px;
  border:1px solid #252b47;
  border-radius:16px;
  background:#11162d;
  box-shadow:0 14px 34px rgb(15 23 42 / 12%);
}
.branch-ops-tabs button{
  min-height:44px;
  padding:9px 12px;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:#9ca7c7;
  font-size:12px;
  font-weight:780;
  line-height:1.3;
}
.branch-ops-tabs button:hover{
  border-color:#353d61;
  background:#191f3b;
  color:#f7f9ff;
}
.branch-ops-tabs button.active{
  border-color:#5e6b9a;
  background:#242b4f;
  color:#fff;
  box-shadow:0 5px 16px rgb(0 0 0 / 18%);
}

.inventory-op-guide{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:0 0 12px;
  padding:11px 13px;
  border:1px solid #252b47;
  border-radius:12px;
  background:#151a33;
  color:#aeb7d1;
}
.inventory-op-guide strong{
  flex:0 0 auto;
  color:#67efca;
  font-size:10px;
  letter-spacing:.04em;
}
.inventory-op-guide span{
  font-size:10.5px;
  line-height:1.55;
}

.inventory-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0 0 12px;
}
.inventory-summary .summary-pill{
  display:grid;
  min-width:0;
  min-height:76px;
  align-content:center;
  gap:5px;
  padding:14px 16px;
  border:1px solid #2a3152;
  border-radius:14px;
  background:linear-gradient(145deg,#1d2342,#171c36);
  color:#f5f7ff;
  box-shadow:0 10px 24px rgb(15 23 42 / 10%);
  font-size:16px;
  font-weight:820;
}
.inventory-summary .summary-pill .summary-dot{
  width:8px;
  height:8px;
  margin:0 0 2px;
  border-radius:999px;
  box-shadow:0 0 0 4px rgb(255 255 255 / 5%);
}
.inventory-summary .summary-pill .summary-dot.green{background:#55e8bd}
.inventory-summary .summary-pill .summary-dot.amber{background:#f1bd57}

:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:0 0 12px;
  padding:7px;
  border:1px solid #252b47;
  border-radius:14px;
  background:#11162d;
}
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch .inventory-view-button{
  min-height:44px;
  justify-content:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:#9da8c6;
  font-weight:760;
}
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch .inventory-view-button:hover{
  background:#191f3b;
  color:#fff;
}
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch .inventory-view-button.selected{
  border-color:#465078;
  background:#242b4f;
  color:#fff;
  box-shadow:0 4px 14px rgb(0 0 0 / 17%);
}

.storage-tab-groups,
.zone-tabs.work-area-tabs{
  margin:0 0 12px;
  padding:10px;
  border:1px solid #252b47;
  border-radius:14px;
  background:#11162d;
}
.storage-tab-groups{
  display:grid;
  gap:10px;
}
.storage-tab-group{
  display:grid;
  gap:7px;
}
.storage-group-label{
  color:#7783aa;
  font-size:9px;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.storage-tab-groups .zone-tabs,
.zone-tabs.work-area-tabs{
  display:flex;
  gap:7px;
  overflow-x:auto;
  flex-wrap:nowrap;
  scrollbar-width:none;
}
.storage-tab-groups .zone-tabs::-webkit-scrollbar,
.zone-tabs.work-area-tabs::-webkit-scrollbar{display:none}
.storage-tab-groups .filter-tab,
.zone-tabs.work-area-tabs .filter-tab{
  flex:0 0 auto;
  min-height:36px;
  padding:7px 10px;
  border:1px solid #303858;
  border-radius:10px;
  background:#181e38;
  color:#aeb7d1;
  font-size:12px;
  font-weight:760;
}
.storage-tab-groups .filter-tab > span:last-child,
.zone-tabs.work-area-tabs .filter-tab > span:last-child{
  display:inline-grid;
  min-width:20px;
  height:20px;
  place-items:center;
  margin-left:5px;
  padding:0 5px;
  border-radius:999px;
  background:#242b4f;
  color:#cfd6eb;
  font-size:8.5px;
}
.storage-tab-groups .filter-tab:hover,
.zone-tabs.work-area-tabs .filter-tab:hover{
  border-color:#4b567c;
  color:#fff;
}
.storage-tab-groups .filter-tab.selected,
.zone-tabs.work-area-tabs .filter-tab.selected{
  border-color:#67efca;
  background:#1d3f42;
  color:#8cf4d7;
}
.storage-tab-groups .filter-tab.selected > span:last-child,
.zone-tabs.work-area-tabs .filter-tab.selected > span:last-child{
  background:#2d625d;
  color:#b9ffe9;
}

.filters-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(240px,420px);
  gap:12px;
  align-items:center;
  margin:0 0 10px;
  padding:10px 12px;
  border:1px solid #252b47;
  border-radius:13px;
  background:#151a33;
}
.filters-row .inventory-view-description{
  margin:0;
  color:#8e99bb;
  font-size:10px;
  line-height:1.5;
}
.filters-row .search-box{
  min-height:40px;
  border:1px solid #343d60;
  border-radius:10px;
  background:#0f1429;
  color:#7f8aad;
}
.filters-row .search-box:focus-within{
  border-color:#5b6a97;
  box-shadow:0 0 0 3px rgb(91 106 151 / 14%);
}
.filters-row .search-box input{
  color:#f5f7ff;
  background:transparent;
}
.filters-row .search-box input::placeholder{color:#697596}

.inventory-table{
  overflow:hidden;
  border:1px solid #252b47;
  border-radius:15px;
  background:#10152a;
  box-shadow:0 14px 32px rgb(15 23 42 / 10%);
}
.inventory-table .inventory-table-head{
  min-height:44px;
  border-bottom:1px solid #2b3252;
  background:#151a33;
  color:#7783a8;
  font-size:9px;
  font-weight:850;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.inventory-table .inventory-group{
  border:0;
  background:transparent;
}
.inventory-table .inventory-group + .inventory-group{
  border-top:1px solid #2a3150;
}
.inventory-table .inventory-group-heading{
  padding-top:9px;
  padding-bottom:9px;
  border-bottom:1px solid #252c49;
  background:#12182f;
  color:#dbe1f2;
}
.inventory-table .inventory-group-heading strong{
  font-size:10px;
  letter-spacing:.02em;
}
.inventory-table .inventory-group-heading span{
  color:#7783a8;
  font-size:9px;
}
.inventory-table .inventory-row{
  border-bottom:1px solid #222945;
  background:#11162d;
  color:#e8ebf6;
}
.inventory-table .inventory-row:last-child{border-bottom:0}
.inventory-table .inventory-row:hover{background:#171d38}
.inventory-table .inventory-item-name strong{color:#f8f9ff}
.inventory-table .inventory-item-name small,
.inventory-table .inventory-working small,
.inventory-table .inventory-minimum small,
.inventory-table .inventory-source small{
  color:#7f8aa8;
}
.inventory-table .inventory-readonly-field{
  color:#c8cfe4;
}
.inventory-table .inventory-select,
.inventory-table .number-input,
.inventory-table .minimum-input{
  border-color:#343d60;
  background:#0d1226;
  color:#f3f5fb;
}
.inventory-table .inventory-select:focus,
.inventory-table .number-input:focus,
.inventory-table .minimum-input:focus{
  border-color:#5e6b9a;
  box-shadow:0 0 0 3px rgb(94 107 154 / 12%);
}
.inventory-table .source-quantity{
  border-color:#303858;
  background:#181e38;
  color:#b6bfd6;
}
.inventory-table .source-quantity strong{color:#f6f8ff}
.inventory-table .source-quantity.source-empty{
  color:#687391;
  opacity:.8;
}
.inventory-table .tag-ok{
  border-color:#285b54;
  background:#173630;
  color:#7aefd1;
}
.inventory-table .tag-low{
  border-color:#6d5525;
  background:#392d19;
  color:#f3c76e;
}
.inventory-table .inventory-action-button,
.inventory-table .restock-button{
  border-color:#3a4569;
  background:#202746;
  color:#dfe5f6;
}
.inventory-table .inventory-action-button:hover,
.inventory-table .restock-button:hover{
  border-color:#67efca;
  background:#1d3f42;
  color:#8cf4d7;
}

.inventory-sql-status.inventory-sql-ready,
.inventory-cloud-notice{
  margin:0 0 12px;
  border:1px solid #2e3658;
  border-radius:12px;
  background:#151a33;
  color:#dce2f3;
}
.inventory-sql-status.inventory-sql-ready strong{color:#74edcd}
.inventory-sql-status.inventory-sql-ready small,
.inventory-cloud-notice small{color:#8490b0}
.inventory-fallback-notice{
  border-color:#6b3e45;
  background:#311b24;
}

/* Existing central kitchen markup: visual override only. */
.central-kitchen-shell{
  color:#dfe5f6;
}
.central-kitchen-hero,
.central-kitchen-kpis article,
.central-kitchen-priority,
.central-kitchen-context,
.central-kitchen-location-card,
.central-kitchen-section-head,
.central-kitchen-dbstate{
  border-color:#293151;
  background:#141a32;
  box-shadow:0 12px 28px rgb(15 23 42 / 10%);
}
.central-kitchen-hero{
  background:
    radial-gradient(circle at 88% 12%,rgb(54 94 103 / 35%),transparent 32%),
    linear-gradient(145deg,#151a33,#10152a);
}
.central-kitchen-identity h1,
.central-kitchen-priority>header h2,
.central-kitchen-section-head h2,
.central-kitchen-context strong,
.central-kitchen-location-card>strong{color:#f7f9ff}
.central-kitchen-identity p,
.central-kitchen-kpis span,
.central-kitchen-kpis small,
.central-kitchen-priority>header p,
.central-kitchen-context p,
.central-kitchen-location-card>span,
.central-kitchen-location-card>small,
.central-kitchen-dbstate small{color:#8792b0}
.central-kitchen-eyebrow,
.central-kitchen-section-head span,
.central-kitchen-priority>header span{color:#67efca}
.central-kitchen-kpis article.is-warning{
  border-color:#68502a;
  background:#2d2519;
}
.central-kitchen-dbstate.is-ready .central-kitchen-db-dot{background:#55e8bd}
.central-kitchen-dbstate.is-checking .central-kitchen-db-dot{background:#f1bd57}
.central-kitchen-dbstate.is-offline .central-kitchen-db-dot{background:#f1767a}
.central-kitchen-modebar.central-tabs{
  border-color:#252b47;
  background:#11162d;
}
.central-kitchen-modebar.central-tabs button.central-kitchen-mode{
  color:#929dbb;
}
.central-kitchen-modebar.central-tabs button.central-kitchen-mode:hover{
  background:#191f3b;
  color:#fff;
}
.central-kitchen-modebar.central-tabs button.central-kitchen-mode.active{
  border-color:#465078;
  background:#242b4f;
  color:#fff;
}
.central-kitchen-mode-icon,
.central-kitchen-mode.active .central-kitchen-mode-icon{
  background:#1b2240;
  color:#73eccc;
}
.central-kitchen-location-card{
  color:#cfd6ea;
}
.central-kitchen-location-card:hover,
.central-kitchen-location-card.is-selected{
  border-color:#4f806f;
  background:#183431;
}
.central-kitchen-location-card.has-alert{
  border-color:#725a31;
  background:#2a2318;
}
.central-kitchen-priority-row{
  border-color:#2b3252;
  background:#11162d;
  color:#dce2f3;
}
.central-kitchen-priority-row:hover{
  border-color:#4d587f;
  background:#171d38;
}
.central-kitchen-priority-row.is-empty{
  border-color:#67414a;
  background:#2a1a22;
}
.central-kitchen-priority-receive,
.central-kitchen-row-operation{
  border-color:#35695d;
  background:#173b35;
  color:#83f0d3;
}
.central-kitchen-priority-clear{
  background:#17322e;
}
.central-kitchen-priority-count{
  background:#3b2c18;
  color:#f3c56d;
}
.central-kitchen-overview-head .central-search-box,
.central-kitchen-shell .search-box{
  border-color:#343d60;
  background:#0f1429;
  color:#f5f7ff;
}

@media(max-width:760px){
  .branch-ops-tabs{
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
  }
  .branch-ops-tabs::-webkit-scrollbar{display:none}
  .branch-ops-tabs button{
    flex:0 0 132px;
    scroll-snap-align:start;
  }
  .inventory-summary{
    grid-template-columns:1fr 1fr;
    gap:7px;
  }
  .inventory-summary .summary-pill{
    min-height:66px;
    padding:11px 12px;
    font-size:13px;
  }
  .filters-row{
    grid-template-columns:1fr;
    gap:8px;
  }
  .filters-row .search-box{
    width:100%;
    min-width:0;
  }
  .inventory-table{
    overflow:visible;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .inventory-table .inventory-table-head{display:none}
  .inventory-table .inventory-group{
    display:grid;
    gap:7px;
    margin:0 0 10px;
  }
  .inventory-table .inventory-group + .inventory-group{border-top:0}
  .inventory-table .inventory-group-heading{
    border:1px solid #293151;
    border-radius:10px;
  }
  .inventory-table .inventory-row{
    overflow:hidden;
    border:1px solid #293151;
    border-radius:12px;
    box-shadow:0 8px 20px rgb(15 23 42 / 8%);
  }
}

@media(max-width:420px){
  .inventory-summary{grid-template-columns:1fr 1fr}
  :where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch{gap:5px;padding:5px}
  :where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) .inventory-view-switch .inventory-view-button{
    min-height:40px;
    padding:7px 8px;
    font-size:12px;
  }
  .storage-tab-groups,
  .zone-tabs.work-area-tabs{padding:8px}
  .inventory-op-guide{
    display:grid;
    gap:5px;
  }
}

@media(max-width:900px){
  .inventory-operations-host .inventory-ops-list{grid-template-columns:1fr}
}
@media(max-width:760px){
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell){
    border-radius:14px;
  }
  .inventory-history-notice{
    align-items:stretch;
    flex-direction:column;
  }
  .inventory-history-notice .secondary-button{width:100%}
  .inventory-operations-host .inventory-ops-toolbar{padding:8px}
  .inventory-operations-host .op-search input,
  .inventory-operations-host select,
  .inventory-operations-host .op-quantity input,
  .inventory-table .inventory-select,
  .inventory-table .number-input,
  .inventory-table .minimum-input{
    font-size:16px;
  }
  .inventory-operations-host .op-select-grid{grid-template-columns:1fr}
  .inventory-operations-host .op-action-row,
  .inventory-operations-host .pick-use-row,
  .inventory-operations-host .pick-return-row{
    align-items:stretch;
    flex-wrap:wrap;
  }
  .inventory-operations-host .op-quantity{flex:1 1 150px}
  .inventory-operations-host .op-primary,
  .inventory-operations-host .op-secondary{
    min-height:44px;
    flex:1 1 120px;
  }
  .inventory-operations-host .pick-return-row label{
    flex:1 0 100%;
  }
}


/* Phase 2 inventory polish — visual-only, scoped to the existing inventory route. */
.main-shell:has(.page-content .branch-ops-tabs),
.main-shell:has(.page-content .inventory-table),
.main-shell:has(.page-content .inventory-operations-host),
.main-shell:has(.page-content .central-kitchen-shell){
  background:
    radial-gradient(circle at 86% 8%,rgb(38 83 108 / 16%),transparent 26rem),
    linear-gradient(180deg,#0a0f20 0%,#080c18 100%);
}
.main-shell:has(.page-content .branch-ops-tabs) > .page-content,
.main-shell:has(.page-content .inventory-table) > .page-content,
.main-shell:has(.page-content .inventory-operations-host) > .page-content,
.main-shell:has(.page-content .central-kitchen-shell) > .page-content{
  margin-top:22px;
  margin-bottom:28px;
}

.inventory-table .inventory-table-head{
  color:#929dbc;
  font-size:10px;
}
.inventory-table .inventory-row{
  min-height:72px;
}
.inventory-table .inventory-status-dot{
  width:9px;
  height:9px;
  flex:0 0 9px;
  border-radius:999px;
  box-shadow:0 0 0 4px rgb(255 255 255 / 4%);
}
.inventory-table .inventory-status-dot.ok{
  background:#56e3ba;
  box-shadow:0 0 0 4px rgb(86 227 186 / 9%);
}
.inventory-table .inventory-status-dot.low{
  background:#efbb5a;
  box-shadow:0 0 0 4px rgb(239 187 90 / 9%);
}
.inventory-table .inventory-status-dot.empty{
  background:#ef737d;
  box-shadow:0 0 0 4px rgb(239 115 125 / 10%);
}
.inventory-table .inventory-item-name{
  min-width:0;
}
.inventory-table .inventory-item-name>div{
  min-width:0;
}
.inventory-table .inventory-item-name strong{
  overflow-wrap:anywhere;
  color:#fbfcff;
  font-size:12px;
  line-height:1.35;
}
.inventory-table .inventory-item-name small{
  overflow-wrap:anywhere;
  color:#7f8aa8;
  line-height:1.35;
}
.inventory-table .inventory-work-area,
.inventory-table .inventory-zone{
  min-width:0;
}
.inventory-table .inventory-readonly-field{
  display:flex;
  min-height:34px;
  align-items:center;
  min-width:0;
  padding:5px 7px;
  border:1px solid #2e3656;
  border-radius:8px;
  background:#151a31;
  color:#cbd2e6;
  overflow-wrap:anywhere;
}
.inventory-table .quantity-control{
  min-width:0;
}
.inventory-table .quantity-button{
  width:32px;
  height:32px;
  border-color:#343d60;
  background:#181e38;
  color:#b7c0da;
}
.inventory-table .quantity-button:hover{
  border-color:#4b587f;
  background:#202847;
  color:#fff;
}
.inventory-table .quantity-button.plus{
  color:#79e9cb;
}
.inventory-table .quantity-input,
.inventory-table .minimum-input{
  min-height:32px;
  border-color:#343d60;
  background:#0d1226;
  color:#f5f7ff;
}
.inventory-table .quantity-input:focus,
.inventory-table .minimum-input:focus{
  border-color:#5e6b9a;
  outline:none;
  box-shadow:0 0 0 3px rgb(94 107 154 / 12%);
}
.inventory-table .quantity-sync-status{
  color:#8792b0;
}
.inventory-table .storage-threshold{
  color:#8792b0;
  white-space:normal;
}
.inventory-table .minimum-readonly{
  color:#dfe4f3;
}
.inventory-table .inventory-working strong{
  color:#f6f8ff;
  font-size:13px;
}
.inventory-table .inventory-working small,
.inventory-table .inventory-source small{
  color:#7f8aa8;
}
.inventory-table .source-quantities{
  gap:6px;
}
.inventory-table .source-quantity{
  border:1px solid #303858;
  background:#181e38;
  color:#aeb7cf;
}
.inventory-table .source-quantity strong{
  color:#80e9cc;
}
.inventory-table .source-quantity.source-empty{
  border-color:#2b3150;
  background:#14192e;
  color:#66718f;
}
.inventory-table .source-quantity.source-empty strong{
  color:#747e9a;
}
.inventory-table .tag{
  min-height:27px;
  border:1px solid transparent;
  border-radius:999px;
  padding:0 9px;
  font-size:10px;
  font-weight:800;
}
.inventory-table .tag-ok{
  border-color:#285b54;
  background:#173630;
  color:#7aefd1;
}
.inventory-table .tag-low{
  border-color:#6d5525;
  background:#392d19;
  color:#f3c76e;
}
.inventory-table .tag-empty{
  border-color:#6e3944;
  background:#351d25;
  color:#ff99a0;
}
.inventory-table .tag-neutral{
  border-color:#39415f;
  background:#1a2039;
  color:#aeb7d1;
}
.inventory-table .inventory-item-tools{
  gap:6px;
}
.inventory-table .inventory-action-button{
  border-color:#303858;
  background:#181e38;
  color:#b7c0da;
}
.inventory-table .inventory-action-button:hover{
  border-color:#67efca;
  background:#1d3f42;
  color:#8cf4d7;
}
.inventory-table .inventory-action-button.delete-action:hover{
  border-color:#7a3f4b;
  background:#381f28;
  color:#ff98a1;
}
.inventory-table .inventory-action-button.restock-location{
  border-color:#35695d;
  background:#173b35;
  color:#83f0d3;
}
.inventory-table .restock-button:disabled{
  border-color:#2e3553;
  background:#171c31;
  color:#68738f;
}
.inventory-table .mobile-field-label{
  color:#7f8aa8;
}
.inventory-table .empty-state,
.inventory-operations-host .inventory-ops-empty{
  color:#7f8aa8;
}
.inventory-table :is(button,select,input):focus-visible,
.inventory-operations-host :is(button,select,input):focus-visible,
.branch-ops-tabs button:focus-visible,
.storage-tab-groups .filter-tab:focus-visible,
.zone-tabs.work-area-tabs .filter-tab:focus-visible{
  outline:2px solid #67efca;
  outline-offset:2px;
}
.inventory-table,
.branch-ops-tabs,
.storage-tab-groups,
.zone-tabs.work-area-tabs,
.inventory-operations-host .inventory-ops-list{
  scrollbar-color:#3d496e #11162d;
}

@media(max-width:760px){
  .main-shell:has(.page-content .branch-ops-tabs) > .page-content,
  .main-shell:has(.page-content .inventory-table) > .page-content,
  .main-shell:has(.page-content .inventory-operations-host) > .page-content,
  .main-shell:has(.page-content .central-kitchen-shell) > .page-content{
    margin-top:12px;
    margin-bottom:18px;
  }
  .inventory-table .inventory-row,
  .inventory-table .work-row{
    background:#11162d;
  }
  .inventory-table .inventory-group-heading{
    padding:9px 10px;
    background:#12182f;
  }
  .inventory-table .inventory-readonly-field{
    flex:1;
  }
  .inventory-table .inventory-work-area,
  .inventory-table .inventory-zone{
    gap:8px;
    padding-left:0;
  }
  .inventory-table .mobile-field-label{
    min-width:86px;
    flex:0 0 86px;
    color:#8a96b6;
  }
  .inventory-table .quantity-control{
    padding-left:0;
  }
  .inventory-table .storage-threshold{
    padding-left:0;
  }
  .inventory-table .inventory-source{
    padding-left:0;
  }
}

@media(max-width:390px){
  .inventory-summary .summary-pill{
    min-height:62px;
    padding:10px;
  }
  .inventory-table .inventory-row,
  .inventory-table .work-row{
    padding:11px;
  }
  .inventory-table .mobile-field-label{
    min-width:76px;
    flex-basis:76px;
    font-size:9.5px;
  }
}


/* Phase 3 responsive polish — presentation only.
 * Improves density, touch ergonomics and breakpoint behavior without changing
 * inventory DOM, handlers, API calls, permissions or database-backed values.
 */
@media(min-width:1200px){
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell){
    max-width:1360px;
  }
  .inventory-table .inventory-item-name strong{
    font-size:13px;
  }
  .inventory-table .inventory-item-name small,
  .inventory-table .inventory-working small,
  .inventory-table .inventory-source small{
    font-size:10.5px;
  }
  .inventory-table .inventory-action-button,
  .inventory-table .quantity-button{
    width:36px;
    height:36px;
  }
  .inventory-table .quantity-input,
  .inventory-table .minimum-input{
    min-height:36px;
  }
  .inventory-summary{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  }
}

@media(min-width:761px) and (max-width:1100px){
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell){
    max-width:100%;
  }
  .inventory-operations-host .inventory-ops-list{
    grid-template-columns:1fr;
  }
  .branch-ops-tabs{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell){
    max-width:100%;
    border-radius:12px;
    box-shadow:0 12px 32px rgb(15 23 42 / 10%);
  }

  .page-content:has(.branch-ops-tabs) .page-heading,
  .page-content:has(.inventory-table) .page-heading,
  .page-content:has(.inventory-operations-host) .page-heading,
  .page-content:has(.central-kitchen-shell) .page-heading{
    display:grid;
    gap:9px;
    margin-bottom:12px;
  }
  .page-content:has(.branch-ops-tabs) .page-heading .primary-button,
  .page-content:has(.inventory-table) .page-heading .primary-button,
  .page-content:has(.inventory-operations-host) .page-heading .primary-button{
    width:100%;
    min-height:44px;
  }

  .branch-ops-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    overflow:visible;
    padding:6px;
    scroll-snap-type:none;
  }
  .branch-ops-tabs button{
    min-width:0;
    min-height:46px;
    padding:7px 6px;
    white-space:normal;
    overflow-wrap:anywhere;
    line-height:1.25;
  }

  .storage-tab-groups .zone-tabs,
  .zone-tabs.work-area-tabs{
    padding-bottom:2px;
    scroll-snap-type:x proximity;
  }
  .storage-tab-groups .filter-tab,
  .zone-tabs.work-area-tabs .filter-tab{
    min-height:40px;
    scroll-snap-align:start;
  }

  .filters-row{
    padding:9px;
  }
  .filters-row .inventory-view-description{
    font-size:10.5px;
  }

  .inventory-table .inventory-row,
  .inventory-table .work-row{
    padding:12px;
  }
  .inventory-table .inventory-item-name strong{
    font-size:13px;
    line-height:1.4;
  }
  .inventory-table .inventory-item-name small{
    font-size:10.5px;
    line-height:1.4;
  }
  .inventory-table .quantity-button{
    width:42px;
    height:42px;
  }
  .inventory-table .quantity-input,
  .inventory-table .minimum-input{
    min-height:42px;
  }
  .inventory-table .inventory-item-tools{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:7px;
  }
  .inventory-table .inventory-action-button{
    width:40px;
    height:40px;
  }
  .inventory-table .restock-button{
    min-height:40px;
    padding-inline:11px;
  }
  .inventory-table .source-quantities{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }
  .inventory-table .source-quantity{
    flex:1 1 130px;
    min-width:0;
  }

  .inventory-operations-host .inventory-op-card{
    padding:12px;
  }
  .inventory-operations-host .op-item-head{
    gap:8px;
  }
  .inventory-operations-host .op-location-pill{
    flex:1 1 150px;
  }
  .inventory-operations-host .op-action-row .op-quantity{
    flex:1 0 100%;
    grid-template-columns:44px minmax(64px,1fr) 44px;
  }
  .inventory-operations-host .op-quantity button,
  .inventory-operations-host .op-quantity input{
    min-height:44px;
  }

  .central-kitchen-modebar.central-tabs{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    overflow:visible;
  }
  .central-kitchen-modebar.central-tabs button.central-kitchen-mode{
    min-width:0;
    min-height:56px;
    padding:8px;
  }
  .central-kitchen-mode strong{
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    line-height:1.3;
  }
  .central-kitchen-location-card>span{
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    line-height:1.3;
  }
}

@media(max-width:420px){
  .branch-ops-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .inventory-table .source-quantity{
    flex-basis:100%;
  }
  .inventory-operations-host .op-primary,
  .inventory-operations-host .op-secondary{
    flex-basis:100%;
  }
}

@media(max-width:359px){
  .inventory-summary{
    grid-template-columns:1fr;
  }
  .inventory-table .mobile-field-label{
    min-width:70px;
    flex-basis:70px;
  }
  .central-kitchen-kpis{
    grid-template-columns:1fr;
  }
}

@media(pointer:coarse){
  .inventory-table .inventory-action-button,
  .inventory-table .quantity-button,
  .storage-tab-groups .filter-tab,
  .zone-tabs.work-area-tabs .filter-tab{
    min-height:44px;
  }
}

@media(prefers-reduced-motion:reduce){
  .branch-ops-tabs,
  .storage-tab-groups .zone-tabs,
  .zone-tabs.work-area-tabs,
  .central-kitchen-modebar.central-tabs{
    scroll-behavior:auto;
  }
}


/* Desktop operation repair — pick/transfer carry denser controls than receive/ship.
 * CSS-only: selectors key off existing rendered markup and do not add data authority.
 */
@media(min-width:901px){
  .inventory-operations-host .inventory-op-card:has(.pick-followup),
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance){
    grid-column:1 / -1;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .op-select-grid,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance) .op-select-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .op-action-row,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance) .op-action-row{
    justify-content:flex-end;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-followup{
    padding:12px;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status{
    min-width:0;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status small{
    min-width:0;
    overflow-wrap:anywhere;
    text-align:right;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-use-row,
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row{
    min-width:0;
  }

  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row label{
    min-width:220px;
    flex:1 1 320px;
  }

  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance) .op-transfer-balance{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:12px;
  }

  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance) .op-transfer-balance span{
    min-width:0;
    overflow-wrap:anywhere;
  }

  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance) .op-transfer-balance span:last-child{
    text-align:right;
  }
}
/* Operation-card structural reset: legacy ui-refresh.css still defines each
 * card as a three-column grid with 240px + 320px intrinsic minimums. Maestro
 * owns presentation now, so collapse that legacy internal grid without touching
 * any operation markup or handlers.
 */
.inventory-operations-host .inventory-op-card{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
}
.inventory-operations-host .inventory-overview-card{
  grid-template-columns:minmax(180px,.85fr) minmax(0,1.15fr);
  align-items:center;
}
.inventory-operations-host .op-select-grid>:only-child{
  grid-column:1 / -1;
}
@media(max-width:760px){
  .inventory-operations-host .inventory-overview-card{
    grid-template-columns:minmax(0,1fr);
    align-items:stretch;
  }
}

/* Phase 4 inventory density + overflow hardening — presentation only.
 * Keeps existing DOM, handlers and PostgreSQL-backed values intact.
 * Goal: dense Desktop pick flow when space is available and no text/control
 * should protrude from Inventory cards, rows, tabs or Central Kitchen panels.
 */
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) *,
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) *::before,
:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) *::after{
  box-sizing:border-box;
}

:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) :is(
  .page-heading,
  .page-heading>div,
  .inventory-summary,
  .summary-pill,
  .inventory-view-switch,
  .storage-tab-groups,
  .storage-tab-group,
  .filters-row,
  .inventory-table,
  .inventory-table-head,
  .inventory-row,
  .work-row,
  .inventory-group-heading,
  .inventory-item-name,
  .inventory-item-name>div,
  .inventory-work-area,
  .inventory-zone,
  .inventory-storage,
  .inventory-minimum,
  .inventory-badge,
  .inventory-working,
  .inventory-source,
  .inventory-transfer,
  .inventory-actions,
  .inventory-item-tools,
  .inventory-operations-host,
  .inventory-ops-shell,
  .inventory-ops-toolbar,
  .inventory-ops-list,
  .inventory-op-card,
  .op-item-head,
  .op-select-grid,
  .op-select-grid>label,
  .op-location-list,
  .op-location-pill,
  .op-action-row,
  .pick-followup,
  .pick-status,
  .pick-use-row,
  .pick-return-row,
  .ship-fixed-hint,
  .central-kitchen-shell,
  .central-kitchen-hero,
  .central-kitchen-kpis,
  .central-kitchen-priority,
  .central-kitchen-context,
  .central-kitchen-section-head,
  .central-kitchen-location-card,
  .central-kitchen-priority-row,
  .central-kitchen-modebar
){
  min-width:0;
  max-width:100%;
}

:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) :is(
  h1,h2,h3,p,label,small,strong,
  .inventory-view-description,
  .inventory-readonly-field,
  .inventory-op-guide span,
  .op-item-head span,
  .op-item-head small,
  .op-item-head strong,
  .op-location-pill small,
  .op-location-pill strong,
  .ship-fixed-hint,
  .central-kitchen-location-card>span,
  .central-kitchen-location-card>small,
  .central-kitchen-context p,
  .central-kitchen-priority-row
){
  overflow-wrap:anywhere;
  word-break:break-word;
}

:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) select{
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

:where(
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell)
) :is(
  .primary-button,
  .secondary-button,
  .branch-ops-tabs button,
  .inventory-view-button,
  .filter-tab,
  .restock-button,
  .op-primary,
  .op-secondary,
  .central-kitchen-mode,
  .central-kitchen-priority-receive,
  .central-kitchen-row-operation
){
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.25;
  text-align:center;
}

.branch-ops-tabs button,
.storage-tab-groups .filter-tab,
.zone-tabs.work-area-tabs .filter-tab{
  overflow:hidden;
}
.storage-tab-groups .filter-tab,
.zone-tabs.work-area-tabs .filter-tab{
  display:inline-flex;
  max-inline-size:240px;
  align-items:center;
  justify-content:center;
  gap:5px;
  white-space:normal;
}
.storage-tab-groups .filter-tab span,
.zone-tabs.work-area-tabs .filter-tab span{
  margin-left:0;
  flex:0 0 auto;
}

.inventory-table .inventory-row>*,
.inventory-table .work-row>*{
  min-width:0;
  max-width:100%;
}
.inventory-table .quantity-control,
.inventory-table .storage-threshold,
.inventory-table .inventory-minimum,
.inventory-table .inventory-badge,
.inventory-table .inventory-working,
.inventory-table .inventory-transfer,
.inventory-table .inventory-actions,
.inventory-table .inventory-item-tools{
  flex-wrap:wrap;
}
.inventory-table .quantity-sync-status{
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
.inventory-table .storage-threshold{
  white-space:normal;
}
.inventory-table .source-quantities{
  min-width:0;
  max-width:100%;
}
.inventory-table .source-quantity{
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
.inventory-table .tag{
  max-width:100%;
  justify-content:center;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
}
.inventory-table .restock-button{
  flex:0 1 auto;
}

/* ui-refresh.css uses a 240px + 320px + auto internal card grid.
 * That minimum cannot fit inside the normal two-column operation list.
 * Default operation cards therefore stack internally; only dense Pick/Transfer
 * cards restore a flexible three-zone Desktop header because they already span
 * the full operation list width.
 */
.inventory-operations-host .inventory-op-card{
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
}
.inventory-operations-host .inventory-op-card> :is(
  .op-item-head,
  .op-select-grid,
  .op-transfer-balance,
  .op-action-row,
  .pick-followup
){
  grid-column:1 / -1;
}
.inventory-operations-host .inventory-op-card:has([data-op-submit="in"]) .op-select-grid{
  grid-template-columns:minmax(0,1fr);
}

@media(min-width:901px){
  .inventory-operations-host .inventory-op-card:has(.pick-followup),
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance){
    grid-template-columns:minmax(220px,.9fr) minmax(0,1.35fr) auto;
    align-items:end;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup)>.op-item-head,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance)>.op-item-head{
    grid-column:1;
    grid-row:1;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup)>.op-select-grid,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance)>.op-select-grid{
    grid-column:2;
    grid-row:1;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup)>.op-action-row,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance)>.op-action-row{
    grid-column:3;
    grid-row:1;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup)>.pick-followup,
  .inventory-operations-host .inventory-op-card:has(.op-transfer-balance)>.op-transfer-balance{
    grid-column:1 / -1;
    grid-row:2;
  }
}

.inventory-operations-host .op-item-head>*,
.inventory-operations-host .op-select-grid>*,
.inventory-operations-host .pick-followup>*{
  min-width:0;
  max-width:100%;
}
.inventory-operations-host .op-item-head strong,
.inventory-operations-host .op-item-head small{
  overflow-wrap:anywhere;
}
.inventory-operations-host .op-location-pill{
  overflow:hidden;
}
.inventory-operations-host .op-action-row{
  flex-wrap:wrap;
}
.inventory-operations-host .op-quantity{
  flex:0 0 auto;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.inventory-operations-host .op-quantity button{
  width:100%;
  min-width:0;
  max-width:100%;
  padding:0;
  overflow:hidden;
}
.inventory-operations-host .op-quantity input{
  min-width:0;
  max-width:100%;
  padding-inline:0;
  overflow:hidden;
}
.inventory-operations-host .op-primary,
.inventory-operations-host .op-secondary{
  flex:0 1 auto;
}
.inventory-operations-host .pick-status{
  flex-wrap:wrap;
}
.inventory-operations-host .pick-status small{
  flex:1 1 160px;
  min-width:0;
}
.inventory-operations-host .pick-use-row,
.inventory-operations-host .pick-return-row{
  flex-wrap:wrap;
}
.inventory-operations-host .pick-return-row label{
  min-width:0;
  max-width:100%;
  flex:1 1 260px;
}
.inventory-operations-host .op-transfer-balance span{
  min-width:0;
  overflow-wrap:anywhere;
}

.central-kitchen-shell :is(
  .central-kitchen-identity,
  .central-kitchen-identity>*,
  .central-kitchen-kpis article,
  .central-kitchen-priority>header,
  .central-kitchen-priority>header>*,
  .central-kitchen-section-head>*,
  .central-kitchen-location-card>*,
  .central-kitchen-priority-row>*
){
  min-width:0;
  max-width:100%;
}
.central-kitchen-shell :is(
  .central-kitchen-mode,
  .central-kitchen-location-card,
  .central-kitchen-priority-row,
  .central-kitchen-priority-receive,
  .central-kitchen-row-operation
){
  overflow-wrap:anywhere;
}

/* Tablet / landscape inventory rows: legacy styles keep a 945px table
 * minimum between 761px and 1100px. The actual content area is narrower when
 * the sidebar is visible, so use the same semantic row content as responsive
 * cards instead of forcing horizontal table overflow.
 */
@media(min-width:761px) and (max-width:1100px){
  .inventory-table{
    overflow:visible;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .inventory-table .inventory-table-head{
    display:none;
  }
  .inventory-table .inventory-group{
    display:grid;
    gap:8px;
    margin:0 0 10px;
  }
  .inventory-table .inventory-group + .inventory-group{
    margin-top:12px;
    border-top:0;
  }
  .inventory-table .inventory-group-heading{
    min-width:0;
    min-height:36px;
    padding:8px 10px;
    border:1px solid #293151;
    border-radius:10px;
    background:#12182f;
  }
  .inventory-table .inventory-row,
  .inventory-table .work-row{
    min-width:0;
    min-height:0;
    grid-template-columns:minmax(0,1fr) minmax(130px,auto);
    gap:8px 12px;
    padding:12px;
    border:1px solid #293151;
    border-radius:12px;
    background:#11162d;
    box-shadow:0 8px 20px rgb(15 23 42 / 8%);
  }
  .inventory-table .inventory-row:last-child{
    border-bottom:1px solid #293151;
  }
  .inventory-table .inventory-item-name{
    grid-column:1;
    grid-row:1;
  }
  .inventory-table .inventory-work-area,
  .inventory-table .inventory-zone{
    display:flex;
    grid-column:1 / -1;
    min-width:0;
    align-items:center;
    gap:8px;
    padding-left:0;
  }
  .inventory-table .inventory-work-area{grid-row:2}
  .inventory-table .inventory-zone{grid-row:3}
  .inventory-table .mobile-field-label{
    display:inline;
    min-width:90px;
    flex:0 0 90px;
    color:#8a96b6;
    font-size:10px;
  }
  .inventory-table .inventory-select{
    width:100%;
    min-width:0;
    flex:1 1 180px;
  }
  .inventory-table .quantity-control{
    grid-column:1;
    grid-row:4;
    margin-top:4px;
    padding-left:0;
  }
  .inventory-table .inventory-storage{
    grid-column:1;
    grid-row:4;
    min-width:0;
    padding:0;
  }
  .inventory-table .inventory-storage>.quantity-control{
    margin-top:0;
  }
  .inventory-table .storage-threshold{
    padding-left:0;
  }
  .inventory-table .inventory-minimum{
    grid-column:2;
    grid-row:4;
    justify-content:flex-end;
  }
  .inventory-table .inventory-badge,
  .inventory-table .inventory-actions{
    grid-column:2;
    grid-row:1;
    justify-content:flex-end;
  }
  .inventory-table .inventory-actions>.inventory-badge{
    grid-column:auto;
    grid-row:auto;
  }
  .inventory-table .inventory-working{
    grid-column:2;
    grid-row:4;
    justify-content:flex-end;
  }
  .inventory-table .inventory-working>.mobile-field-label{
    min-width:auto;
    flex-basis:auto;
  }
  .inventory-table .work-row>.inventory-work-area{
    grid-column:1 / -1;
    grid-row:2;
  }
  .inventory-table .work-row>.quantity-control{
    grid-column:1;
    grid-row:3;
  }
  .inventory-table .work-row>.inventory-minimum{
    grid-column:2;
    grid-row:3;
  }
  .inventory-table .work-row>.inventory-source{
    grid-column:1;
    grid-row:4;
    min-width:0;
    padding-left:0;
  }
  .inventory-table .work-row>.inventory-transfer{
    grid-column:2;
    grid-row:4;
    justify-content:flex-end;
  }
}

/* Tablet/small Desktop: keep dense Pick controls compact without forcing a
 * three-column row when the actual workspace is narrow.
 */
@media(min-width:901px) and (max-width:1199px){
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-followup{
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:10px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status{
    grid-column:1 / -1;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-use-row{
    grid-column:2;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:minmax(220px,1fr) auto auto;
    align-items:end;
    gap:8px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row label{
    min-width:0;
    flex:none;
  }
}

/* Wide Desktop: 已領貨 + 使用 + 歸位 become one compact row.
 * The layout reuses the current Pick markup and action handlers.
 */
@media(min-width:1200px){
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-followup{
    display:grid;
    grid-template-columns:minmax(200px,.72fr) auto minmax(400px,1.55fr);
    align-items:end;
    gap:10px;
    padding:10px 12px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status{
    display:grid;
    grid-template-columns:auto auto minmax(0,1fr);
    align-items:center;
    align-self:center;
    justify-content:initial;
    gap:8px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status>span,
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status>strong{
    white-space:nowrap;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status small{
    min-width:0;
    text-align:right;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-use-row{
    display:grid;
    grid-template-columns:auto auto;
    align-items:end;
    justify-content:end;
    gap:8px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row{
    display:grid;
    grid-template-columns:minmax(250px,1fr) auto auto;
    align-items:end;
    justify-content:stretch;
    gap:8px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row label{
    min-width:0;
    flex:none;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) :is(.op-primary,.op-secondary){
    white-space:nowrap;
    overflow-wrap:normal;
    word-break:normal;
  }
}

@media(max-width:760px){
  .storage-tab-groups .zone-tabs > .filter-tab,
  .zone-tabs.work-area-tabs > .filter-tab{
    flex:0 0 150px !important;
    width:150px;
    max-width:150px;
    min-width:150px;
    min-height:48px;
    padding:6px 9px;
    overflow:hidden;
  }
  .storage-tab-groups .zone-tabs > .filter-tab:first-child,
  .zone-tabs.work-area-tabs > .filter-tab:first-child{
    flex-basis:150px !important;
    width:150px;
    min-width:150px;
  }
  .storage-tab-groups .filter-tab .bilingual-control-label,
  .zone-tabs.work-area-tabs .filter-tab .bilingual-control-label{
    display:grid;
    width:auto;
    min-width:0;
    max-width:100%;
    flex:1 1 0;
    gap:1px;
    overflow:hidden;
    line-height:1.15;
  }
  .storage-tab-groups .filter-tab .label-primary,
  .storage-tab-groups .filter-tab .label-secondary,
  .zone-tabs.work-area-tabs .filter-tab .label-primary,
  .zone-tabs.work-area-tabs .filter-tab .label-secondary{
    min-width:0;
    max-width:100%;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .storage-tab-groups .filter-tab>span:last-child,
  .zone-tabs.work-area-tabs .filter-tab>span:last-child{
    flex:0 0 auto;
  }

  .inventory-table .inventory-select{
    width:100%;
    min-width:0;
  }
  .inventory-table .inventory-work-area,
  .inventory-table .inventory-zone{
    align-items:stretch;
    flex-wrap:wrap;
  }
  .inventory-table .mobile-field-label{
    flex:0 0 86px;
  }
  .inventory-operations-host .op-action-row,
  .inventory-operations-host .pick-use-row,
  .inventory-operations-host .pick-return-row{
    width:100%;
  }
  .inventory-operations-host .op-primary,
  .inventory-operations-host .op-secondary{
    min-width:0;
  }
  .central-kitchen-shell :is(
    .central-kitchen-priority-row,
    .central-kitchen-section-head,
    .central-kitchen-context
  ){
    overflow:hidden;
  }
}



/* Inventory low-stock notification center — thresholds are PostgreSQL-backed. */
.inventory-alert-shortcut{
  border:0;
  cursor:pointer;
  font:inherit;
}
.inventory-alert-shortcut:hover{border-color:#e0bd68;background:#fff9e8;color:#755a16}
.inventory-alert-center{display:grid;gap:14px}
.inventory-alert-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:17px 18px;border:1px solid #dfe8e3;border-radius:14px;background:#fff;
}
.inventory-alert-heading>div{min-width:0}
.inventory-alert-heading small{color:var(--muted);font-size:9px}
.inventory-alert-heading h2{margin:4px 0 6px;font-size:20px}
.inventory-alert-heading p{max-width:760px;margin:0;color:var(--muted);font-size:10px;line-height:1.55}
.inventory-alert-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.inventory-alert-stats article{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-width:0;padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:#fff;
}
.inventory-alert-stats article small{font-size:10px;color:var(--muted)}
.inventory-alert-stats article strong{font-size:22px}
.inventory-alert-stats .critical{border-color:#edbbb0;background:#fff7f5}
.inventory-alert-stats .critical strong{color:#b74d39}
.inventory-alert-stats .low{border-color:#ecc9a3;background:#fff9f1}
.inventory-alert-stats .low strong{color:#a76821}
.inventory-alert-stats .near{border-color:#e8d89d;background:#fffcef}
.inventory-alert-stats .near strong{color:#8d741b}
.inventory-alert-filters{display:flex;gap:7px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.inventory-alert-filters::-webkit-scrollbar{display:none}
.inventory-alert-filters button{
  display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;
  min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;
  color:var(--muted);font:inherit;font-size:10px;font-weight:750;cursor:pointer;
}
.inventory-alert-filters button strong{
  display:grid;min-width:22px;height:22px;place-items:center;border-radius:999px;background:#eef3f0;color:var(--ink);font-size:9px;
}
.inventory-alert-filters button.active{border-color:#b7d8ca;background:var(--green-soft);color:var(--green)}
.inventory-alert-list{display:grid;gap:8px}
.inventory-alert-row{
  display:grid;grid-template-columns:minmax(190px,1.25fr) minmax(150px,1fr) 110px minmax(155px,.9fr) auto;
  align-items:center;gap:12px;min-width:0;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;
}
.inventory-alert-row.state-empty{border-color:#edbbb0;background:#fffafa}
.inventory-alert-row.state-low{border-color:#ecc9a3;background:#fffdf9}
.inventory-alert-row.state-near{border-color:#e8d89d;background:#fffef8}
.inventory-alert-product{display:flex;align-items:center;gap:9px;min-width:0}
.inventory-alert-product>div,.inventory-alert-location,.inventory-alert-quantity,.inventory-alert-threshold{min-width:0}
.inventory-alert-product strong,.inventory-alert-product small,
.inventory-alert-location span,.inventory-alert-location strong,
.inventory-alert-quantity span,.inventory-alert-quantity strong,
.inventory-alert-threshold small{display:block}
.inventory-alert-product strong{font-size:11px;overflow-wrap:anywhere}
.inventory-alert-product small,.inventory-alert-location span,.inventory-alert-quantity span,.inventory-alert-threshold small{margin-top:3px;color:var(--muted);font-size:8px;overflow-wrap:anywhere}
.inventory-alert-location strong,.inventory-alert-quantity strong{font-size:11px;overflow-wrap:anywhere}
.inventory-alert-quantity strong small{display:inline;color:var(--muted);font-size:8px;font-weight:500}
.inventory-alert-threshold{display:grid;justify-items:start;gap:3px}
.inventory-alert-row>.secondary-button{min-width:96px}
.inventory-alert-empty{
  display:grid;place-items:center;gap:6px;min-height:180px;padding:28px;border:1px dashed #cfe0d8;border-radius:13px;background:#fbfdfc;text-align:center;
}
.inventory-alert-empty .icon{width:28px;height:28px;color:var(--green)}
.inventory-alert-empty strong{font-size:12px}
.inventory-alert-empty small{color:var(--muted);font-size:9px}

@media(max-width:980px){
  .inventory-alert-row{grid-template-columns:minmax(0,1fr) minmax(140px,.85fr) 100px auto}
  .inventory-alert-threshold{grid-column:1/4;grid-row:2}
  .inventory-alert-row>.secondary-button{grid-column:4;grid-row:1/3}
}
@media(max-width:680px){
  .inventory-alert-heading{align-items:stretch;flex-direction:column;padding:14px}
  .inventory-alert-heading>.secondary-button{width:100%}
  .inventory-alert-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .inventory-alert-stats article{align-items:flex-start;flex-direction:column;gap:4px;padding:10px}
  .inventory-alert-stats article small{font-size:8px}
  .inventory-alert-stats article strong{font-size:19px}
  .inventory-alert-row{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:9px;padding:12px;
  }
  .inventory-alert-product{grid-column:1;grid-row:1}
  .inventory-alert-quantity{grid-column:2;grid-row:1;text-align:right}
  .inventory-alert-location{grid-column:1/-1;grid-row:2;padding-left:18px}
  .inventory-alert-threshold{grid-column:1;grid-row:3;padding-left:18px}
  .inventory-alert-row>.secondary-button{grid-column:2;grid-row:3;align-self:end;min-width:92px}
}

/* Approved UI lock — 2026-10-06: Inventory product-centric multi-location view.
 * Presentation only. Product/location order, PostgreSQL quantities, permissions,
 * transactions and alert semantics remain owned by the existing renderer/API.
 */
.inventory-product-table{
  overflow:visible;
  border:1px solid #252e4b;
  border-radius:15px;
  background:#0f1428;
  box-shadow:0 16px 42px rgb(2 6 23 / 20%);
}
.inventory-product-table .inventory-product-head{
  display:grid;
  grid-template-columns:minmax(180px,1.2fr) 72px 82px minmax(360px,2.25fr) minmax(130px,.85fr);
  gap:12px;
  min-height:42px;
  align-items:center;
  padding:0 14px;
  border-bottom:1px solid #252e4b;
  background:#11172d;
  color:#8692af;
  font-size:9px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.inventory-product-table .inventory-product-row{
  display:grid;
  grid-template-columns:minmax(180px,1.2fr) 72px 82px minmax(360px,2.25fr) minmax(130px,.85fr);
  gap:12px;
  min-width:0;
  min-height:94px;
  align-items:center;
  padding:12px 14px;
  border:0;
  border-bottom:1px solid #202844;
  border-radius:0;
  background:#10162b;
  box-shadow:none;
}
.inventory-product-table .inventory-product-row:last-of-type{border-bottom:0}
.inventory-product-table .inventory-product-row:hover{background:#121a32}
.inventory-product-table .inventory-product-identity{min-width:0}
.inventory-product-table .inventory-product-identity strong{
  color:#f8faff;
  font-size:13px;
  line-height:1.35;
}
.inventory-product-table .inventory-product-identity small{
  color:#7e89a7;
  font-size:9px;
  line-height:1.35;
}
.inventory-product-table .inventory-product-unit,
.inventory-product-table .inventory-product-total{min-width:0}
.inventory-product-table .inventory-product-unit strong{color:#cbd3e8}
.inventory-product-table .inventory-product-total strong{
  color:#f8faff;
  font-size:16px;
  font-variant-numeric:tabular-nums;
}
.inventory-product-table .inventory-product-total small{color:#7783a0}
.inventory-product-table .inventory-location-chips{
  display:flex;
  min-width:0;
  align-items:stretch;
  gap:8px;
  overflow:hidden;
}
.inventory-product-table .inventory-location-chip,
.inventory-product-table .inventory-location-more{
  min-width:112px;
  max-width:150px;
  min-height:62px;
  padding:8px 10px;
  border:1px solid #303958;
  border-radius:11px;
  background:#161c34;
  color:#edf2ff;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 2%);
}
.inventory-product-table .inventory-location-chip:hover,
.inventory-product-table .inventory-location-more:hover{
  border-color:#4b587e;
  background:#1b2340;
}
.inventory-product-table .inventory-location-chip.primary{
  border-color:#406b9d;
  background:linear-gradient(180deg,#182c49,#14243d);
}
.inventory-product-table .inventory-location-chip.work{
  border-color:#347060;
  background:linear-gradient(180deg,#173b35,#142e2d);
}
.inventory-product-table .inventory-location-chip.state-near{
  border-color:#735f2e;
  background:linear-gradient(180deg,#352e1c,#29251b);
}
.inventory-product-table .inventory-location-chip.state-low{
  border-color:#815435;
  background:linear-gradient(180deg,#39271e,#2d211c);
}
.inventory-product-table .inventory-location-chip.state-empty{
  border-color:#7b3f4b;
  background:linear-gradient(180deg,#361f28,#2a1b24);
}
.inventory-product-table .inventory-location-chip span{
  color:#aeb8d0;
  font-size:8px;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.inventory-product-table .inventory-location-chip span b{
  padding:2px 5px;
  border-radius:999px;
  background:rgb(255 255 255 / 8%);
  color:#9debd4;
}
.inventory-product-table .inventory-location-chip.primary span b{color:#a8cdf7}
.inventory-product-table .inventory-location-chip strong{
  color:#f7f9ff;
  font-size:14px;
  font-variant-numeric:tabular-nums;
}
.inventory-product-table .inventory-location-chip strong small{color:#8995b2}
.inventory-product-table .inventory-location-more{
  display:grid;
  place-items:center;
  align-content:center;
  border-style:dashed;
  color:#9fe7d2;
  text-align:center;
}
.inventory-product-table .inventory-location-more span{color:#71809f}
.inventory-product-table .inventory-product-status{min-width:0;flex-wrap:wrap}
.inventory-product-table .inventory-more-menu>summary{
  border-color:#343d5d;
  background:#171e37;
  color:#aeb8d0;
}
.inventory-product-table .inventory-more-menu>summary:hover{
  border-color:#566486;
  background:#202947;
  color:#fff;
}
.inventory-product-table .inventory-more-menu-popover,
.inventory-detail-sheet .inventory-more-menu-popover{
  border-color:#303a59;
  background:#11172d;
  box-shadow:0 18px 48px rgb(0 0 0 / 34%);
}
.inventory-product-table .inventory-more-menu-popover button,
.inventory-detail-sheet .inventory-more-menu-popover button{
  color:#dce3f5;
}
.inventory-product-table .inventory-more-menu-popover button:hover,
.inventory-detail-sheet .inventory-more-menu-popover button:hover{
  background:#1b2541;
  color:#8cebd1;
}
.inventory-product-table .inventory-more-menu-popover button.danger,
.inventory-detail-sheet .inventory-more-menu-popover button.danger{color:#ff9ca5}

/* Approved detail drawer: same permission-controlled controls, visual layer only. */
.inventory-detail-backdrop{
  background:rgb(3 8 22 / 68%);
  backdrop-filter:blur(5px);
}
.inventory-detail-sheet{
  border-left:1px solid #293350;
  background:#0f152a;
  color:#f3f6ff;
  box-shadow:-24px 0 70px rgb(0 0 0 / 38%);
}
.inventory-detail-sheet>header{
  padding:20px 20px 16px;
  border-bottom-color:#28314d;
  background:#11182f;
}
.inventory-detail-sheet>header small{color:#7f8caa}
.inventory-detail-sheet>header h2{color:#fbfcff}
.inventory-detail-sheet>header p{color:#8e9ab7}
.inventory-detail-sheet>header .icon-button{
  border-color:#343d5d;
  background:#171e37;
  color:#c8d0e4;
}
.inventory-detail-locations{
  gap:11px;
  padding:15px;
  background:
    radial-gradient(circle at 100% 0,rgb(38 83 108 / 12%),transparent 24rem),
    #0c1122;
}
.inventory-detail-location{
  padding:14px;
  border-color:#2d3654;
  background:#141a31;
  box-shadow:0 8px 20px rgb(2 6 23 / 10%);
}
.inventory-detail-location.state-near{
  border-color:#6e5b2f;
  background:#272319;
}
.inventory-detail-location.state-low{
  border-color:#7a5138;
  background:#2b211c;
}
.inventory-detail-location.state-empty{
  border-color:#733f4a;
  background:#2b1d24;
}
.inventory-detail-location-head strong{
  color:#f4f7ff;
  font-size:13px;
  line-height:1.4;
  flex-wrap:wrap;
}
.inventory-detail-location-head strong>span{
  background:#183d35;
  color:#8ce8ce;
}
.inventory-detail-location-head small{color:#8f9bb6}
.inventory-detail-control{min-width:0;flex-wrap:wrap}
.inventory-detail-control .quantity-control{min-width:0;flex-wrap:wrap}
.inventory-detail-control .quantity-button{
  border-color:#3a4467;
  background:#19213c;
  color:#c5cee4;
}
.inventory-detail-control .quantity-button:hover{
  border-color:#60709a;
  background:#232d50;
  color:#fff;
}
.inventory-detail-control .quantity-button.plus{color:#80e8cb}
.inventory-detail-control .quantity-input,
.inventory-detail-control .minimum-input{
  border-color:#394361;
  background:#0d1327;
  color:#f8faff;
}
.inventory-detail-control .quantity-input:focus,
.inventory-detail-control .minimum-input:focus{
  border-color:#5e70a1;
  outline:none;
  box-shadow:0 0 0 3px rgb(94 112 161 / 16%);
}
.inventory-detail-control .quantity-readonly,
.inventory-detail-control>label strong{color:#f4f7ff}
.inventory-detail-control>label{color:#8d99b6}
.inventory-detail-sheet>footer{
  border-top-color:#28314d;
  background:#11182f;
}
.inventory-detail-sheet>footer>.primary-button{
  background:#15835f;
  border-color:#15835f;
}
.inventory-detail-sheet>footer>.primary-button:hover{
  background:#117151;
  border-color:#117151;
}

/* Tablet: product cards instead of forcing the legacy wide table grid. */
@media(max-width:1100px){
  .inventory-product-table{
    overflow:visible;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .inventory-product-table .inventory-product-head{display:none}
  .inventory-product-table .inventory-product-row{
    min-width:0;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:9px 12px;
    min-height:0;
    margin-bottom:10px;
    padding:13px;
    border:1px solid #293351;
    border-radius:13px;
    background:#11172d;
    box-shadow:0 10px 24px rgb(2 6 23 / 12%);
  }
  .inventory-product-table .inventory-product-row:last-of-type{border-bottom:1px solid #293351}
  .inventory-product-table .inventory-product-identity{
    grid-column:1;
    grid-row:1;
  }
  .inventory-product-table .inventory-product-status{
    grid-column:2;
    grid-row:1;
    align-self:start;
    justify-content:flex-end;
  }
  .inventory-product-table .inventory-product-unit{display:none}
  .inventory-product-table .inventory-product-total{
    grid-column:1;
    grid-row:2;
    padding-left:19px;
  }
  .inventory-product-table .inventory-product-total>.mobile-field-label{
    display:inline;
    color:#8290ae;
  }
  .inventory-product-table .inventory-location-chips{
    grid-column:1 / -1;
    grid-row:3;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .inventory-product-table .inventory-location-chips::-webkit-scrollbar{display:none}
  .inventory-product-table .inventory-location-chip,
  .inventory-product-table .inventory-location-more{
    flex:0 0 126px;
    min-height:64px;
  }
}
@media(max-width:680px){
  .inventory-product-table .inventory-product-row{
    padding:12px;
    border-color:#28314e;
    background:#10162b;
  }
  .inventory-product-table .inventory-product-identity strong{font-size:12px}
  .inventory-product-table .inventory-location-chip,
  .inventory-product-table .inventory-location-more{flex-basis:122px}
  .inventory-detail-backdrop{
    display:block;
    background:#0f152a;
  }
  .inventory-detail-sheet{
    position:fixed;
    inset:0;
    width:100%;
    max-width:none;
    height:100dvh;
    border-left:0;
    box-shadow:none;
    padding-top:env(safe-area-inset-top);
  }
  .inventory-detail-sheet>header{padding:14px 15px 12px}
  .inventory-detail-locations{padding:12px}
  .inventory-detail-location{padding:13px}
  .inventory-detail-control{align-items:flex-end}
  .inventory-detail-control .quantity-button{width:38px;height:38px}
  .inventory-detail-control .quantity-input{width:62px;min-height:38px}
  .inventory-detail-control .minimum-input{width:62px;min-height:36px}
  .inventory-detail-sheet>footer{
    position:sticky;
    bottom:0;
    padding-bottom:calc(12px + env(safe-area-inset-bottom));
  }
  .inventory-detail-sheet .inventory-more-menu>summary{
    width:42px;
    height:42px;
    border-color:#343d5d;
    background:#171e37;
    color:#d3daeb;
  }
}
@media(max-width:390px){
  .inventory-product-table .inventory-product-row{gap:8px}
  .inventory-product-table .inventory-product-status{gap:5px}
  .inventory-product-table .inventory-location-chip,
  .inventory-product-table .inventory-location-more{
    flex-basis:116px;
    min-width:116px;
  }
  .inventory-detail-control{
    align-items:stretch;
    flex-direction:column;
  }
  .inventory-detail-control>label{justify-content:space-between}
}



/* Visual parity polish — 2026-10-06.
 * High-fidelity light Inventory presentation based on the approved visual mockup.
 * CSS only: renderer, PostgreSQL quantities, transactions, RBAC and routing stay unchanged.
 */
.page-content:has(.branch-ops-tabs),
.page-content:has(.inventory-table),
.page-content:has(.inventory-operations-host),
.page-content:has(.central-kitchen-shell){
  --inv-canvas:#f7f8fa;
  --inv-surface:#ffffff;
  --inv-surface-soft:#f8faf9;
  --inv-ink:#17211d;
  --inv-ink-2:#44524c;
  --inv-muted:#7b8782;
  --inv-line:#e3e9e6;
  --inv-line-strong:#d5ded9;
  --inv-accent:#147a59;
  --inv-accent-strong:#0f684c;
  --inv-accent-soft:#e9f6f0;
  --inv-blue-soft:#eef5fb;
  --inv-blue-line:#c5dcec;
  --inv-warning-soft:#fff9ea;
  --inv-warning-line:#ecd89a;
  max-width:1220px;
  border:1px solid var(--inv-line);
  border-radius:22px;
  background:var(--inv-surface);
  color:var(--inv-ink);
  box-shadow:0 14px 44px rgba(24,40,33,.065);
  font-family:Inter,"Noto Sans TC","Noto Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-feature-settings:"cv02","cv03","cv04","cv11";
  -webkit-font-smoothing:antialiased;
}
.page-content:has(.branch-ops-tabs) .page-heading h1,
.page-content:has(.inventory-table) .page-heading h1,
.page-content:has(.inventory-operations-host) .page-heading h1,
.page-content:has(.central-kitchen-shell) .page-heading h1{
  color:var(--inv-ink);
  font-weight:780;
  letter-spacing:-.035em;
}
.page-content:has(.branch-ops-tabs) .page-heading p,
.page-content:has(.inventory-table) .page-heading p,
.page-content:has(.inventory-operations-host) .page-heading p,
.page-content:has(.central-kitchen-shell) .page-heading p{
  color:var(--inv-muted);
  line-height:1.55;
}
.page-content:has(.branch-ops-tabs) .page-heading .primary-button,
.page-content:has(.inventory-table) .page-heading .primary-button,
.page-content:has(.inventory-operations-host) .page-heading .primary-button{
  border:1px solid var(--inv-accent);
  border-radius:10px;
  background:var(--inv-accent);
  color:#fff;
  box-shadow:0 7px 18px rgba(20,122,89,.16);
}
.page-content:has(.branch-ops-tabs) .page-heading .primary-button:hover,
.page-content:has(.inventory-table) .page-heading .primary-button:hover,
.page-content:has(.inventory-operations-host) .page-heading .primary-button:hover{
  border-color:var(--inv-accent-strong);
  background:var(--inv-accent-strong);
  color:#fff;
}
.inventory-readonly-notice,
.inventory-history-notice{
  border-color:#e6ddd0;
  background:#fffaf2;
  color:#625644;
}
.inventory-readonly-notice small{color:#8b7c68}
.inventory-history-notice .secondary-button{
  border-color:var(--inv-line-strong);
  background:#fff;
  color:#34423c;
}

/* Existing Inventory operation cards */
.inventory-operations-host .inventory-ops-toolbar{
  padding:11px;
  border-color:var(--inv-line);
  border-radius:14px;
  background:var(--inv-surface-soft);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.inventory-operations-host .op-search input{
  min-height:42px;
  border-color:var(--inv-line-strong);
  border-radius:10px;
  background:#fff;
  color:var(--inv-ink);
}
.inventory-operations-host .op-search input:focus{
  border-color:#91c3ad;
  box-shadow:0 0 0 3px rgba(20,122,89,.1);
}
.inventory-operations-host .op-search input::placeholder{color:#9aa59f}
.inventory-operations-host .op-count{
  border-color:#b9dbcB;
  background:var(--inv-accent-soft);
  color:#176348;
}
.inventory-operations-host .inventory-op-card{
  border-color:var(--inv-line);
  border-radius:16px;
  background:#fff;
  color:var(--inv-ink);
  box-shadow:0 7px 22px rgba(22,38,31,.045);
}
.inventory-operations-host .inventory-op-card:hover{
  border-color:#ccd9d3;
  background:#fff;
  box-shadow:0 10px 28px rgba(22,38,31,.07);
}
.inventory-operations-host .op-item-head{border-bottom-color:#edf1ef}
.inventory-operations-host .op-item-head strong{color:var(--inv-ink)}
.inventory-operations-host .op-item-head small{color:var(--inv-muted)}
.inventory-operations-host .op-location-pill{
  border-color:var(--inv-line);
  background:#f8faf9;
}
.inventory-operations-host .op-location-pill small{color:var(--inv-muted)}
.inventory-operations-host .op-location-pill strong{color:#314039}
.inventory-operations-host .op-location-pill-use{
  border-color:#b8d9ca;
  background:var(--inv-accent-soft);
}
.inventory-operations-host .op-select-grid label,
.inventory-operations-host .pick-return-row label{
  color:#718078;
}
.inventory-operations-host select{
  border-color:var(--inv-line-strong);
  background:#fff;
  color:#2c3933;
}
.inventory-operations-host select:focus{
  border-color:#91c3ad;
  box-shadow:0 0 0 3px rgba(20,122,89,.1);
}
.inventory-operations-host .inventory-readonly-field{
  border-color:var(--inv-line);
  background:#f7f9f8;
  color:#64716b;
}
.inventory-operations-host .op-transfer-balance,
.inventory-operations-host .pick-followup{
  border-color:var(--inv-line);
  background:#f8faf9;
  color:#68756f;
}
.inventory-operations-host .op-transfer-balance strong{color:#28352f}

/* Product-centric list: visual parity with approved light dashboard */
.inventory-product-table{
  overflow:visible;
  border:1px solid var(--inv-line);
  border-radius:17px;
  background:#fff;
  box-shadow:0 8px 28px rgba(24,40,33,.05);
}
.inventory-product-table .inventory-product-head{
  grid-template-columns:minmax(190px,1.25fr) 72px 86px minmax(370px,2.35fr) minmax(132px,.82fr);
  min-height:46px;
  padding:0 16px;
  border-bottom:1px solid var(--inv-line);
  background:#f8faf9;
  color:#74817b;
  font-size:9px;
  font-weight:820;
  letter-spacing:.065em;
}
.inventory-product-table .inventory-product-row{
  grid-template-columns:minmax(190px,1.25fr) 72px 86px minmax(370px,2.35fr) minmax(132px,.82fr);
  min-height:96px;
  padding:13px 16px;
  border-bottom:1px solid #edf1ef;
  background:#fff;
  color:var(--inv-ink);
}
.inventory-product-table .inventory-product-row:last-of-type{border-bottom:0}
.inventory-product-table .inventory-product-row:hover{background:#fbfcfc}
.inventory-product-table .inventory-product-identity strong{
  color:#1b2722;
  font-size:13px;
  font-weight:760;
  letter-spacing:-.012em;
}
.inventory-product-table .inventory-product-identity small{
  color:#89948f;
  font-size:9px;
}
.inventory-product-table .inventory-product-unit strong{
  color:#56635d;
  font-weight:700;
}
.inventory-product-table .inventory-product-total strong{
  color:#17211d;
  font-size:17px;
  font-weight:780;
  letter-spacing:-.025em;
}
.inventory-product-table .inventory-product-total small{color:#8b9691}
.inventory-product-table .inventory-location-chips{gap:8px}
.inventory-product-table .inventory-location-chip,
.inventory-product-table .inventory-location-more{
  min-width:116px;
  max-width:154px;
  min-height:64px;
  padding:9px 10px;
  border:1px solid var(--inv-line);
  border-radius:12px;
  background:#f8faf9;
  color:#28362f;
  box-shadow:none;
}
.inventory-product-table .inventory-location-chip:hover,
.inventory-product-table .inventory-location-more:hover{
  border-color:#cbd8d2;
  background:#f5f8f6;
}
.inventory-product-table .inventory-location-chip.primary{
  border-color:var(--inv-blue-line);
  background:var(--inv-blue-soft);
}
.inventory-product-table .inventory-location-chip.work{
  border-color:#b8daca;
  background:var(--inv-accent-soft);
}
.inventory-product-table .inventory-location-chip.state-near{
  border-color:var(--inv-warning-line);
  background:var(--inv-warning-soft);
}
.inventory-product-table .inventory-location-chip.state-low{
  border-color:#eccaa7;
  background:#fff7ef;
}
.inventory-product-table .inventory-location-chip.state-empty{
  border-color:#ebc2c2;
  background:#fff6f6;
}
.inventory-product-table .inventory-location-chip span{
  color:#74817b;
  font-size:8px;
}
.inventory-product-table .inventory-location-chip span b{
  background:rgba(20,122,89,.075);
  color:#176448;
}
.inventory-product-table .inventory-location-chip.primary span b{
  background:rgba(63,122,166,.08);
  color:#356985;
}
.inventory-product-table .inventory-location-chip strong{
  color:#20302a;
  font-size:14px;
  font-weight:780;
}
.inventory-product-table .inventory-location-chip strong small{color:#86918c}
.inventory-product-table .inventory-location-more{
  border-style:dashed;
  color:#176448;
  background:#fbfcfc;
}
.inventory-product-table .inventory-location-more span{color:#8a9690}
.inventory-product-table .inventory-more-menu>summary{
  border-color:var(--inv-line-strong);
  background:#fff;
  color:#6c7973;
}
.inventory-product-table .inventory-more-menu>summary:hover{
  border-color:#bbc9c2;
  background:#f7f9f8;
  color:#26342e;
}
.inventory-product-table .inventory-more-menu-popover,
.inventory-detail-sheet .inventory-more-menu-popover{
  border-color:var(--inv-line);
  background:#fff;
  box-shadow:0 18px 46px rgba(24,40,33,.14);
}
.inventory-product-table .inventory-more-menu-popover button,
.inventory-detail-sheet .inventory-more-menu-popover button{color:#33413b}
.inventory-product-table .inventory-more-menu-popover button:hover,
.inventory-detail-sheet .inventory-more-menu-popover button:hover{
  background:#f1f7f4;
  color:#126044;
}
.inventory-product-table .inventory-more-menu-popover button.danger,
.inventory-detail-sheet .inventory-more-menu-popover button.danger{color:#b24848}

/* Light detail drawer, still permission-controlled by the existing renderer */
.inventory-detail-backdrop{
  background:rgba(16,27,22,.32);
  backdrop-filter:blur(5px);
}
.inventory-detail-sheet{
  border-left:1px solid var(--inv-line);
  background:#fff;
  color:var(--inv-ink);
  box-shadow:-26px 0 68px rgba(17,32,25,.18);
}
.inventory-detail-sheet>header{
  padding:20px 20px 17px;
  border-bottom-color:var(--inv-line);
  background:#fff;
}
.inventory-detail-sheet>header small{color:#7f8b85}
.inventory-detail-sheet>header h2{
  color:#18241f;
  font-weight:790;
  letter-spacing:-.025em;
}
.inventory-detail-sheet>header p{color:#7f8b85}
.inventory-detail-sheet>header .icon-button{
  border-color:var(--inv-line-strong);
  background:#f8faf9;
  color:#53615b;
}
.inventory-detail-locations{
  gap:10px;
  padding:15px;
  background:#f7f9f8;
}
.inventory-detail-location{
  padding:14px;
  border-color:var(--inv-line);
  background:#fff;
  box-shadow:0 5px 16px rgba(24,40,33,.035);
}
.inventory-detail-location.state-near{
  border-color:var(--inv-warning-line);
  background:#fffcf3;
}
.inventory-detail-location.state-low{
  border-color:#eccaa7;
  background:#fff9f3;
}
.inventory-detail-location.state-empty{
  border-color:#ebc2c2;
  background:#fff8f8;
}
.inventory-detail-location-head strong{
  color:#22302a;
  font-size:13px;
  font-weight:760;
}
.inventory-detail-location-head strong>span{
  background:var(--inv-accent-soft);
  color:#176448;
}
.inventory-detail-location-head small{color:#84908a}
.inventory-detail-control .quantity-button{
  border-color:var(--inv-line-strong);
  background:#f7f9f8;
  color:#55625c;
}
.inventory-detail-control .quantity-button:hover{
  border-color:#b7c8c0;
  background:#f0f5f2;
  color:#22302a;
}
.inventory-detail-control .quantity-button.plus{
  border-color:#b2d8c6;
  background:#edf8f3;
  color:#147a59;
}
.inventory-detail-control .quantity-input,
.inventory-detail-control .minimum-input{
  border-color:var(--inv-line-strong);
  background:#fff;
  color:#1f2d27;
}
.inventory-detail-control .quantity-input:focus,
.inventory-detail-control .minimum-input:focus{
  border-color:#91c3ad;
  outline:none;
  box-shadow:0 0 0 3px rgba(20,122,89,.1);
}
.inventory-detail-control .quantity-readonly,
.inventory-detail-control>label strong{color:#24322c}
.inventory-detail-control>label{color:#79857f}
.inventory-detail-sheet>footer{
  border-top-color:var(--inv-line);
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(12px);
}
.inventory-detail-sheet>footer>.primary-button{
  border-color:var(--inv-accent);
  background:var(--inv-accent);
  color:#fff;
  box-shadow:0 7px 18px rgba(20,122,89,.15);
}
.inventory-detail-sheet>footer>.primary-button:hover{
  border-color:var(--inv-accent-strong);
  background:var(--inv-accent-strong);
}

/* Keep tablet/mobile card behavior, but use the same light visual language. */
@media(max-width:1100px){
  .inventory-product-table{
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .inventory-product-table .inventory-product-row{
    margin-bottom:10px;
    padding:14px;
    border:1px solid var(--inv-line);
    border-radius:15px;
    background:#fff;
    box-shadow:0 7px 22px rgba(24,40,33,.045);
  }
  .inventory-product-table .inventory-product-row:last-of-type{border-bottom:1px solid var(--inv-line)}
  .inventory-product-table .inventory-product-total>.mobile-field-label{color:#87938d}
}
@media(max-width:680px){
  .page-content:has(.branch-ops-tabs),
  .page-content:has(.inventory-table),
  .page-content:has(.inventory-operations-host),
  .page-content:has(.central-kitchen-shell){
    border-radius:16px;
  }
  .inventory-product-table .inventory-product-row{
    padding:13px;
    border-color:var(--inv-line);
    background:#fff;
  }
  .inventory-product-table .inventory-product-identity strong{font-size:12px}
  .inventory-detail-backdrop{background:#f7f9f8}
  .inventory-detail-sheet{
    background:#fff;
    border-left:0;
    box-shadow:none;
  }
  .inventory-detail-sheet>header{background:#fff}
  .inventory-detail-locations{background:#f7f9f8}
  .inventory-detail-sheet .inventory-more-menu>summary{
    border-color:var(--inv-line-strong);
    background:#f8faf9;
    color:#58655f;
  }
}


/* Visual parity responsive correction — keep the approved tablet card structure
 * after the final desktop visual overrides above. Presentation only.
 */
@media(max-width:1100px){
  .inventory-product-table .inventory-product-head{display:none}
  .inventory-product-table .inventory-product-row{
    min-width:0;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto;
    gap:9px 12px;
    min-height:0;
  }
  .inventory-product-table .inventory-product-identity{
    grid-column:1;
    grid-row:1;
  }
  .inventory-product-table .inventory-product-status{
    grid-column:2;
    grid-row:1;
    align-self:start;
    justify-content:flex-end;
  }
  .inventory-product-table .inventory-product-unit{display:none}
  .inventory-product-table .inventory-product-total{
    grid-column:1;
    grid-row:2;
    padding-left:19px;
  }
  .inventory-product-table .inventory-location-chips{
    grid-column:1 / -1;
    grid-row:3;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .inventory-product-table .inventory-location-chips::-webkit-scrollbar{display:none}
  .inventory-product-table .inventory-location-chip,
  .inventory-product-table .inventory-location-more{
    flex:0 0 126px;
    min-height:64px;
  }
}


/* Inventory search repair + UX polish — 2026-10-07.
 * Search filtering remains client-side over the currently rendered DB-backed
 * inventory rows. data-search-hidden is authoritative for presentation so
 * display:grid/flex rules cannot accidentally unhide filtered rows.
 */
.inventory-table .inventory-row[hidden],
.inventory-table .inventory-group[hidden],
.inventory-table [data-search-hidden]{
  display:none!important;
}

.filters-row{
  grid-template-columns:minmax(0,1fr) minmax(320px,520px);
  gap:14px;
  padding:12px 14px;
  border-color:var(--inv-line,#e3e9e6);
  border-radius:15px;
  background:var(--inv-surface-soft,#f8faf9);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.filters-row .inventory-view-description{
  color:var(--inv-muted,#7b8782);
  font-size:11px;
  line-height:1.55;
}
.inventory-search-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:
    "input input"
    "meta clear";
  min-width:0;
  gap:6px 10px;
}
.filters-row .inventory-search-box{
  grid-area:input;
  display:flex;
  width:100%;
  min-width:0;
  min-height:44px;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border:1px solid var(--inv-line-strong,#d5ded9);
  border-radius:12px;
  background:#fff;
  color:#7b8782;
  box-shadow:0 2px 8px rgba(24,40,33,.035);
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.filters-row .inventory-search-box:hover{
  border-color:#c5d2cc;
  background:#fff;
}
.filters-row .inventory-search-box:focus-within{
  border-color:#8fc5ad;
  background:#fff;
  box-shadow:0 0 0 3px rgba(20,122,89,.10),0 4px 12px rgba(24,40,33,.045);
}
.filters-row .inventory-search-box svg{
  width:17px;
  height:17px;
  flex:0 0 auto;
  color:#73817a;
}
.filters-row .inventory-search-box input{
  width:100%;
  min-width:0;
  height:42px;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--inv-ink,#17211d);
  font:inherit;
  font-size:12px;
  font-weight:620;
  line-height:42px;
}
.filters-row .inventory-search-box input::placeholder{
  color:#9aa59f;
  font-weight:500;
  opacity:1;
}
.filters-row .inventory-search-box input::-webkit-search-cancel-button{
  display:none;
}
.inventory-search-status{
  display:contents;
}
.inventory-search-status [data-inventory-search-meta]{
  grid-area:meta;
  align-self:center;
  min-height:18px;
  color:#7c8983;
  font-size:10px;
  font-weight:650;
  line-height:18px;
}
.inventory-search-clear{
  grid-area:clear;
  display:inline-flex;
  min-height:28px;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:3px 8px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#607069;
  font:inherit;
  font-size:10px;
  font-weight:720;
  cursor:pointer;
}
.inventory-search-clear:hover{
  background:#eaf3ef;
  color:#126044;
}
.inventory-search-clear svg{
  width:13px;
  height:13px;
}
.inventory-search-clear[hidden],
[data-inventory-search-empty][hidden]{
  display:none!important;
}

@media(max-width:760px){
  .filters-row{
    grid-template-columns:1fr;
    gap:10px;
    padding:10px;
  }
  .inventory-search-control{
    grid-row:1;
  }
  .filters-row .inventory-view-description{
    grid-row:2;
  }
  .filters-row .inventory-search-box{
    min-height:46px;
  }
  .filters-row .inventory-search-box input{
    height:44px;
    font-size:13px;
    line-height:44px;
  }
}
@media(max-width:390px){
  .inventory-search-clear span{display:none}
  .inventory-search-clear{
    min-width:30px;
    padding:3px 6px;
  }
}


/* Inventory operations search + alignment contract — 2026-10-07.
 * One layout contract now owns Receive / Pick / Transfer / Ship presentation.
 * Search-hidden state is explicit so card display rules cannot revive filtered rows.
 */
.inventory-operations-host [data-op-item][hidden],
.inventory-operations-host [data-op-search-hidden],
.inventory-operations-host [data-op-search-empty][hidden],
.inventory-operations-host [data-op-search-clear][hidden]{
  display:none!important;
}

.inventory-operations-host .inventory-ops-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
}
.inventory-operations-host .op-search-wrap{
  position:relative;
  min-width:0;
}
.inventory-operations-host .op-search{
  display:block;
  width:100%;
  min-width:0;
}
.inventory-operations-host .op-search input{
  width:100%;
  min-width:0;
  min-height:44px;
  padding:0 42px 0 13px;
  font-size:12px;
  font-weight:620;
}
.inventory-operations-host .op-search-clear{
  position:absolute;
  top:50%;
  right:8px;
  width:28px;
  height:28px;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:8px;
  background:#eef4f1;
  color:#607069;
  font:inherit;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}
.inventory-operations-host .op-search-clear:hover{
  background:#e2f0e9;
  color:#126044;
}
.inventory-operations-host .op-count{
  min-width:64px;
  justify-content:center;
  white-space:nowrap;
}

/* Use a single full-width card rail for every inventory operation.
 * Internal columns, not card width, carry the information density.
 */
.inventory-operations-host .inventory-ops-list{
  display:grid;
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px;
}
.inventory-operations-host .inventory-op-card{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(190px,.8fr) minmax(360px,1.7fr) minmax(220px,auto)!important;
  grid-template-rows:auto auto;
  align-items:end!important;
  gap:12px 16px;
  padding:14px 16px;
}
.inventory-operations-host .inventory-op-card>.op-item-head{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0;
  align-self:stretch;
  align-items:center;
  padding:0 14px 0 0;
  border-bottom:0;
  border-right:1px solid var(--inv-line,#e3e9e6);
}
.inventory-operations-host .inventory-op-card>.op-select-grid{
  grid-column:2!important;
  grid-row:1!important;
  display:grid;
  min-width:0;
  align-items:end;
  gap:10px;
}
.inventory-operations-host .inventory-op-card[data-op-mode="in"]>.op-select-grid{
  grid-template-columns:minmax(220px,1fr)!important;
}
.inventory-operations-host .inventory-op-card[data-op-mode="pick"]>.op-select-grid,
.inventory-operations-host .inventory-op-card[data-op-mode="transfer"]>.op-select-grid{
  grid-template-columns:repeat(2,minmax(170px,1fr))!important;
}
.inventory-operations-host .inventory-op-card[data-op-mode="ship"]>.op-select-grid{
  grid-template-columns:repeat(3,minmax(150px,1fr))!important;
}
.inventory-operations-host .op-select-grid>label{
  display:grid;
  min-width:0;
  gap:5px;
  align-content:end;
}
.inventory-operations-host .op-select-grid>label>span:first-child,
.inventory-operations-host .pick-return-row label>span:first-child{
  min-height:16px;
  display:flex;
  align-items:flex-end;
  font-size:10px;
  line-height:1.25;
}
.inventory-operations-host .op-select-grid select,
.inventory-operations-host .inventory-readonly-field{
  width:100%;
  min-width:0;
  min-height:42px;
}
.inventory-operations-host .ship-fixed-hint{
  grid-column:1 / -1!important;
  min-width:0;
  margin:0;
}
.inventory-operations-host .inventory-op-card>.op-action-row{
  grid-column:3!important;
  grid-row:1!important;
  display:grid;
  grid-template-columns:auto minmax(102px,auto);
  min-width:0;
  align-items:end;
  justify-content:end;
  gap:8px;
  flex-wrap:nowrap;
}
.inventory-operations-host .op-action-row .op-quantity{
  display:grid;
  grid-template-columns:38px 64px 38px;
  width:140px;
  min-width:140px;
  max-width:140px;
}
.inventory-operations-host .op-action-row .op-quantity :is(button,input){
  height:42px;
  min-height:42px;
}
.inventory-operations-host .op-action-row :is(.op-primary,.op-secondary){
  min-width:102px;
  min-height:42px;
  align-self:end;
  white-space:nowrap;
}
.inventory-operations-host .inventory-op-card>.op-transfer-balance,
.inventory-operations-host .inventory-op-card>.pick-followup{
  grid-column:1 / -1!important;
  grid-row:2!important;
  width:100%;
  min-width:0;
  margin:0;
}
.inventory-operations-host .op-transfer-balance{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center;
  gap:10px;
}
.inventory-operations-host .op-transfer-balance span:last-child{
  text-align:right;
}

/* Pick follow-up follows the same three-zone rhythm as the main card row. */
@media(min-width:1200px){
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-followup{
    display:grid!important;
    grid-template-columns:minmax(190px,.8fr) auto minmax(380px,1.7fr)!important;
    align-items:end;
    gap:10px 14px;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-status{
    grid-column:1;
    min-width:0;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-use-row{
    grid-column:2;
    min-width:0;
  }
  .inventory-operations-host .inventory-op-card:has(.pick-followup) .pick-return-row{
    grid-column:3;
    min-width:0;
    display:grid!important;
    grid-template-columns:minmax(210px,1fr) auto auto!important;
    align-items:end;
    gap:8px;
  }
}

/* Mid-size desktop/tablet: product identity gets its own row and controls stay aligned. */
@media(min-width:761px) and (max-width:1199px){
  .inventory-operations-host .inventory-op-card{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto auto;
    gap:10px 12px;
  }
  .inventory-operations-host .inventory-op-card>.op-item-head{
    grid-column:1 / -1!important;
    grid-row:1!important;
    padding:0 0 10px;
    border-right:0;
    border-bottom:1px solid var(--inv-line,#e3e9e6);
  }
  .inventory-operations-host .inventory-op-card>.op-select-grid{
    grid-column:1!important;
    grid-row:2!important;
  }
  .inventory-operations-host .inventory-op-card>.op-action-row{
    grid-column:2!important;
    grid-row:2!important;
  }
  .inventory-operations-host .inventory-op-card>.op-transfer-balance,
  .inventory-operations-host .inventory-op-card>.pick-followup{
    grid-column:1 / -1!important;
    grid-row:3!important;
  }
  .inventory-operations-host .inventory-op-card[data-op-mode="ship"]>.op-select-grid{
    grid-template-columns:repeat(2,minmax(170px,1fr))!important;
  }
  .inventory-operations-host .inventory-op-card[data-op-mode="ship"] .op-target-location{
    grid-column:1 / -1;
  }
}

/* Mobile: one vertical flow, equal full-width controls, no horizontal drift. */
@media(max-width:760px){
  .inventory-operations-host .inventory-ops-toolbar{
    grid-template-columns:minmax(0,1fr) auto;
    padding:9px;
  }
  .inventory-operations-host .op-search input{
    min-height:46px;
    font-size:13px;
  }
  .inventory-operations-host .inventory-op-card{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto!important;
    gap:10px;
    padding:12px;
  }
  .inventory-operations-host .inventory-op-card>.op-item-head,
  .inventory-operations-host .inventory-op-card>.op-select-grid,
  .inventory-operations-host .inventory-op-card>.op-action-row,
  .inventory-operations-host .inventory-op-card>.op-transfer-balance,
  .inventory-operations-host .inventory-op-card>.pick-followup{
    grid-column:1!important;
    grid-row:auto!important;
  }
  .inventory-operations-host .inventory-op-card>.op-item-head{
    padding:0 0 10px;
    border-right:0;
    border-bottom:1px solid var(--inv-line,#e3e9e6);
  }
  .inventory-operations-host .inventory-op-card[data-op-mode]>.op-select-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .inventory-operations-host .inventory-op-card>.op-action-row{
    width:100%;
    grid-template-columns:minmax(0,1fr) minmax(108px,.8fr);
    justify-content:stretch;
  }
  .inventory-operations-host .op-action-row .op-quantity{
    width:100%;
    min-width:0;
    max-width:none;
    grid-template-columns:42px minmax(54px,1fr) 42px;
  }
  .inventory-operations-host .op-action-row :is(.op-primary,.op-secondary){
    width:100%;
  }
  .inventory-operations-host .op-transfer-balance{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  }
  .inventory-operations-host .pick-followup,
  .inventory-operations-host .pick-use-row,
  .inventory-operations-host .pick-return-row{
    width:100%;
  }
  .inventory-operations-host .pick-use-row,
  .inventory-operations-host .pick-return-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px;
    align-items:end;
  }
  .inventory-operations-host .pick-return-row label{
    grid-column:1 / -1;
    width:100%;
  }
}


/* Inventory search v2 — authoritative filtered visibility for Central surfaces.
 * Central rows also use explicit grid presentation, so search state must win.
 */
.central-row[data-central-search-hidden],
.central-manage-row[data-central-search-hidden],
.inventory-group[data-central-search-hidden]{
  display:none!important;
}

.inventory-operations-host .op-search-wrap::before{
  content:"";
  position:absolute;
  left:13px;
  top:50%;
  width:14px;
  height:14px;
  transform:translateY(-50%);
  border:1.7px solid #82908a;
  border-radius:50%;
  pointer-events:none;
  box-sizing:border-box;
}
.inventory-operations-host .op-search-wrap::after{
  content:"";
  position:absolute;
  left:25px;
  top:27px;
  width:6px;
  height:1.7px;
  background:#82908a;
  transform:rotate(45deg);
  transform-origin:left center;
  border-radius:999px;
  pointer-events:none;
}
.inventory-operations-host .op-search input{
  padding-left:38px;
}
