/* Branch Inventory presentation only; operational modals retain their styles. */
.content:has(>.branch-inventory-workspace){width:100%;max-width:none;margin-inline:0;padding:24px!important}
body:has(.branch-inventory-workspace) .tbc-app-topbar .tbc-app-topbar-inner{width:100%;max-width:none;margin-inline:0;padding-inline:24px!important;--header-action-size:44px}
.branch-inventory-workspace{display:grid;gap:24px;min-width:0;letter-spacing:0}
.branch-inventory-workspace [hidden]{display:none!important}
.branch-inventory-workspace :is(button,input,select,summary):focus-visible{outline:2px solid #2e735a!important;outline-offset:3px}
.branch-inventory-workspace h3,.branch-inventory-workspace h4{margin:0;font-family:inherit;letter-spacing:0;line-height:1.4;overflow-wrap:anywhere}
.branch-inventory-workspace h3{font-size:18px}
.branch-inventory-workspace h4{font-size:14px}
.branch-inventory-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(480px,100%);border-bottom:1px solid #cad8d0}
.branch-inventory-tabs button{min-width:0;min-height:44px;padding:10px 12px;border:0;border-bottom:3px solid transparent;background:transparent;color:#566c60;font-family:inherit;font-size:14px;font-weight:650;line-height:1.4;letter-spacing:0;white-space:normal}
.branch-inventory-tabs button[aria-selected=true]{border-bottom-color:#215942;background:#e9f2ec;color:#153f32}
.branch-tab-short{display:none}
.branch-inventory-workspace .btn{min-height:44px!important;border-radius:6px!important;font-size:13px!important;line-height:1.4;white-space:normal;padding:8px 12px!important;letter-spacing:0}
.branch-quick-actions h3,.branch-pending h3{font-size:12px;color:#617568;margin-bottom:8px}
.branch-quick-actions>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.branch-activity-list{display:flex;flex-wrap:wrap;gap:8px 24px}
.branch-activity,.branch-activity-empty{flex:1 1 260px;min-width:0;font-size:13px;border-bottom:1px solid #dce4de}
.branch-activity[open]{flex-basis:100%}
.branch-activity-empty{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px}
.branch-activity summary,.branch-history summary{min-height:44px;padding:12px 0;cursor:pointer;font-size:13px;font-weight:650;overflow-wrap:anywhere}
.branch-activity summary span,.branch-activity-empty span,.branch-history summary span{float:right;margin-left:12px;color:#62766a;font-weight:500;white-space:nowrap}
.branch-history{border-top:1px solid #dce4de;min-width:0}
.branch-history>section{margin-top:12px}
.branch-history h4{margin:12px 0}
.branch-stock-content{min-width:0;border-top:1px solid #d1ddd5;padding-top:24px}
.branch-stock-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.branch-stock-tools{display:flex;gap:8px;flex-wrap:wrap}
.branch-stock-summary{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:12px;color:#5e7267;margin-bottom:16px}
.branch-stock-summary strong{color:#194b39;font-weight:750}
.branch-stock-filters{display:grid;grid-template-columns:minmax(180px,1.6fr) minmax(140px,1fr) minmax(140px,1fr) auto;align-items:end;gap:12px;margin-bottom:16px}
.branch-stock-filters label{display:grid;gap:6px;min-width:0;font-size:12px;color:#5e7267}
.branch-stock-filters :is(input,select){width:100%;min-width:0;max-width:100%;height:44px;padding:8px 10px;border:1px solid #ccd9d0;border-radius:6px;background:#fff;color:#214638;font-family:inherit;font-size:14px}
.branch-stock-filters output{font-size:12px;line-height:44px;white-space:nowrap;color:#5e7267}
.branch-inventory-workspace .table-wrap{min-width:0;border:0!important;border-radius:0!important;box-shadow:none!important}
.branch-inventory-workspace .branch-readable-table{width:100%;min-width:0!important;table-layout:fixed}
.branch-inventory-workspace .product-inventory-table th:first-child{width:23%}
.branch-inventory-workspace .product-inventory-table th:nth-child(2){width:16%}
.branch-inventory-workspace .product-inventory-table th:nth-child(3){width:17%}
.branch-inventory-workspace .product-inventory-table th:nth-child(4){width:8%}
.branch-inventory-workspace .product-inventory-table th:nth-child(5){width:17%}
.branch-inventory-workspace .product-inventory-table th:nth-child(6){width:8%}
.branch-inventory-workspace .product-inventory-table th:nth-child(7){width:5%}
.branch-inventory-workspace .product-inventory-table th:nth-child(8){width:6%}
.branch-inventory-workspace .inventory-stock-table th:first-child{width:26%}
.branch-inventory-workspace .branch-readable-table :is(th,td){padding:12px 10px;white-space:normal;overflow-wrap:anywhere;font-size:12px}
.branch-inventory-workspace .branch-readable-table th{font-size:10px;letter-spacing:0}
.branch-inventory-workspace .branch-readable-table .meta{white-space:normal;overflow-wrap:anywhere;font-size:11px}
.branch-inventory-workspace :is(.status,.mini-pill){max-width:100%;white-space:normal;overflow-wrap:anywhere;letter-spacing:0}
.branch-stock-content+.branch-history{margin-top:24px}
.branch-install{border-top:1px solid #e1e7e2;padding-top:12px;display:flex;justify-content:flex-end}
.branch-install button{min-height:44px;border:0;background:transparent;color:#63756b;font-size:12px;text-decoration:underline}
body:has(.branch-inventory-workspace) .tbc-install-chip,.tbc-standalone .branch-install{display:none!important}
@media(max-width:1100px){
  .branch-stock-heading{align-items:flex-start;flex-direction:column}
  .branch-inventory-workspace .branch-readable-table,.branch-inventory-workspace .branch-readable-table tbody{display:block}
  .branch-inventory-workspace .branch-readable-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .branch-inventory-workspace .branch-readable-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;padding:16px 0;border-bottom:1px solid #dce4de}
  .branch-inventory-workspace .branch-readable-table td{display:block;min-width:0;text-align:left;padding:0;border:0;background:none}
  .branch-inventory-workspace .branch-readable-table td:first-child,.branch-inventory-workspace .branch-readable-table td[colspan]{grid-column:1/-1}
  .branch-inventory-workspace .branch-readable-table td[data-label]:before{content:attr(data-label);display:block;font-size:10px;font-weight:600;color:#63766a;margin-bottom:5px}
  .branch-inventory-workspace .branch-readable-table td:first-child:before{display:none}
  .branch-inventory-workspace .branch-readable-table td:first-child strong{font-size:14px}
}
@media(max-width:1024px){
  .branch-quick-actions>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .branch-stock-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .branch-stock-filters label:first-child{grid-column:1/-1}
  .branch-stock-filters output{grid-column:1/-1;line-height:1.4}
}
@media(max-width:760px){
  .content:has(>.branch-inventory-workspace){padding:16px 16px calc(112px + env(safe-area-inset-bottom))!important}
  body:has(.branch-inventory-workspace) .tbc-app-topbar .tbc-app-topbar-inner{padding-inline:16px!important;grid-template-columns:minmax(0,1fr) auto;column-gap:12px}
  body:has(.branch-inventory-workspace) .tbc-app-topbar-actions{grid-column:2;grid-row:1;gap:8px}
  body:has(.branch-inventory-workspace) .tbc-app-topbar-actions .tbc-help-btn{width:56px!important;min-width:56px!important;padding-inline:8px!important}
  body:has(.branch-inventory-workspace) .tbc-app-topbar-context{grid-row:2}
  body:has(.branch-inventory-workspace) .tbc-app-topbar-context .top-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  .branch-tab-full{display:none}.branch-tab-short{display:inline}
  .branch-stock-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .branch-stock-filters :is(input,select){font-size:16px}
  .branch-activity,.branch-activity-empty{flex-basis:100%}
}

.opening-reference{color:#62756b;font-variant-numeric:tabular-nums}
.opening-reference-detail{display:block;margin-top:6px;color:#62756b;font-size:11px;line-height:1.5}
.opening-match{display:inline-block;margin-top:4px;padding:4px 6px;border-radius:4px;font-size:10px;font-weight:600;line-height:1.4;background:#edf1ee;color:#52665c;overflow-wrap:anywhere}
.opening-match-matched{background:#e6f3ea;color:#245e3d}.opening-match-difference{background:#fff3d5;color:#755511}
.beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table){width:100%;min-width:0;table-layout:fixed}
.beginning-inventory-modal :is(th,td){white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) th:first-child{width:28%}
.beginning-inventory-modal :is(input[data-p],input[data-open],input[data-add],input[data-close]){width:100%;min-width:0;min-height:44px}
.beginning-entry-table small{display:block;color:#62756b;font-size:11px}
.missing-dispatches{margin:20px 0;padding:16px 0;border-top:1px solid #dce4de;border-bottom:1px solid #dce4de}
.missing-dispatches .today-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.missing-dispatches h4{margin:0;font-size:16px}.missing-dispatches ul{list-style:none;margin:12px 0 0;padding:0}
.missing-dispatches li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e4e9e5}
.missing-dispatches li:last-child{border-bottom:0}.missing-dispatches li>div{min-width:0;overflow-wrap:anywhere}
.missing-dispatches small{display:block;margin-top:4px;color:#62756b;font-size:12px;line-height:1.5}
.missing-dispatches .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex-shrink:0}
.missing-dispatches .btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;flex-shrink:0}
.branch-missing-dispatch{display:flex;flex-direction:column;gap:6px;margin:16px 0;padding:12px 16px;border-left:3px solid #bd942f;background:#fff8e8;color:#755511;overflow-wrap:anywhere}
.branch-missing-dispatch strong{font-size:12px}.branch-missing-dispatch :is(span,small){font-size:12px}
.opening-dispatch-counts{margin:12px 0;padding:12px 0;border-block:1px solid #dce4de;font-size:13px}
.opening-dispatch-counts summary{cursor:pointer}.opening-dispatch-counts dl{margin:12px 0 0}
.opening-dispatch-counts dl>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0}
.opening-dispatch-counts dt{overflow-wrap:anywhere}.opening-dispatch-counts dd{margin:0;flex-shrink:0;font-variant-numeric:tabular-nums}
.opening-dispatch-backdrop{z-index:10060!important;display:grid!important;place-items:center!important;overflow:hidden!important;padding:12px!important}
.opening-dispatch-modal{max-height:calc(100dvh - 24px)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.opening-dispatch-modal :is(.modal-head,.modal-actions){position:static!important;flex:0 0 auto!important}
.opening-dispatch-modal .modal-body{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important}
.opening-dispatch-modal .transfer-line-row :is(input,select){box-sizing:border-box;max-width:100%;width:100%;min-height:44px;border:1px solid #cbd6d1;border-radius:6px;padding:10px 12px;font:inherit;font-size:14px;color:#173f35}
.opening-dispatch-modal .transfer-line-row select{padding-right:46px}
@media(max-width:430px){.missing-dispatches li{align-items:stretch;flex-direction:column;gap:10px}.missing-dispatches .btn{align-self:flex-start}}
@media(max-width:899px){
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table),
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) tbody{display:block}
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px 0;border-bottom:1px solid #dce4de}
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) td{display:block;min-width:0;border:0;padding:0;text-align:left}
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) td:first-child{grid-column:1/-1}
  .beginning-inventory-modal :is(.beginning-entry-table,.beginning-reference-table) td[data-label]:before{content:attr(data-label);display:block;margin-bottom:6px;color:#62756b;font-size:11px}
  .beginning-inventory-modal .beginning-entry-table td:nth-child(2){grid-column:1/-1}
}
