
/* Scalable operations: compact orders + pick waves */
.order-entry-grid{align-items:start}
.order-create-card{min-width:0}
.bag-item-search{display:grid;gap:10px;padding:14px;border:1px solid #ded1c5;border-radius:12px;background:#fffaf6}
.bag-item-search .field{margin:0}
.bag-item-search #orderInventoryMatchHint{margin:0}
.order-filter{min-width:180px;margin:0}
.order-row{border:1px solid #eaded5;border-radius:18px;margin:10px 0;background:#fff;overflow:hidden}
.order-row>summary{display:grid;grid-template-columns:minmax(160px,1.2fr) minmax(210px,1.6fr) minmax(105px,.8fr) minmax(60px,.5fr) minmax(80px,.6fr) minmax(115px,.8fr) minmax(150px,1fr);gap:12px;align-items:center;padding:16px 18px;cursor:pointer;list-style:none}
.order-row>summary::-webkit-details-marker{display:none}
.order-row[open]>summary{border-bottom:1px solid #eaded5}
.order-summary-main{display:flex;flex-direction:column;gap:2px}.order-summary-field{display:flex;flex-direction:column;gap:3px;min-width:0}.order-summary-field small{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#8d7a72}.order-summary-field>strong,.order-summary-field>span{overflow-wrap:anywhere}
.order-expanded{padding:16px 18px}
.order-warning{font-weight:700}
.order-good{font-weight:700}
.order-inline-editor{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.order-inline-editor .row{gap:8px}
.actions.compact{gap:5px;margin:0}
.sale-channel-field{min-width:0;max-width:100%}
.sale-channel-field select,.sale-channel-field input{box-sizing:border-box;width:100%;min-width:0}
#fulfillmentReviewTools{margin:12px 0;border:1px solid #eaded5;border-radius:14px;padding:14px}
#fulfillmentReviewTools>summary{cursor:pointer}
.fulfillment-review-tools{min-width:0;padding-top:12px}

.pick-bin-grid{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:10px;margin:14px 0 18px}
.pick-bin{border:2px solid #ddd0c5;border-radius:14px;padding:12px;text-align:center;display:flex;flex-direction:column;gap:3px;min-height:88px;justify-content:center}
.pick-bin strong{font-size:1.55rem}
.pick-bin.active{background:#fff4e8;border-color:#c89766}
.pick-bin.complete{background:#dff3df;border-color:#6ea66e}
.pick-bin.empty{opacity:.7}
.pick-bin small{font-size:.72rem;word-break:break-all}
.pick-scan-grid{align-items:stretch}
.wave-table .resolved{opacity:.55}
.wave-table th:first-child,.wave-table td:first-child{min-width:150px}
.pack-order{border:1px solid #eaded5;border-radius:16px;margin:10px 0;background:#fff}
.pack-order>summary{display:grid;grid-template-columns:minmax(220px,1.5fr) auto auto;gap:12px;padding:14px 16px;cursor:pointer}
.pack-items{display:grid;gap:8px;margin:12px 0}
.pack-items .row{border-bottom:1px solid #eee;padding:8px 0}
.pack-items .packed{background:#f0f7f0}
.pack-items .shortage{background:#fff3e5}
.operations-secondary>summary{cursor:pointer;display:flex;justify-content:space-between;gap:16px;align-items:center}

@media (max-width:900px){
  .order-row>summary{grid-template-columns:1fr 1fr;gap:10px}
  .order-summary-main{grid-column:1/-1}
  .order-summary-field{grid-column:auto}
  .pick-bin-grid{grid-template-columns:repeat(3,minmax(90px,1fr))}
  .pack-order>summary{grid-template-columns:1fr}
}
@media (max-width:560px){
  .order-expanded .scroll{overflow:visible}
  .order-expanded > .scroll > table,.order-expanded > .scroll > table > tbody,.order-expanded > .scroll > table > tbody > tr,.order-expanded > .scroll > table > tbody > tr > td{display:block;width:100%;box-sizing:border-box}
  .order-expanded > .scroll > table > thead{display:none}
  .order-expanded > .scroll > table > tbody > tr{border:1px solid #e7ded7;border-radius:14px;padding:12px;margin:12px 0}
  .order-expanded > .scroll > table > tbody > tr > td{padding:6px 0;overflow-wrap:anywhere}
  .order-expanded > .scroll > table > tbody > tr > td:last-child .actions.compact{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
  .order-expanded > .scroll > table > tbody > tr > td:last-child .actions.compact>*{max-width:100%;min-width:0}
  .order-expanded > .scroll > table > tbody > tr > td:last-child button{width:100%}
  .pick-bin-grid{grid-template-columns:repeat(2,minmax(90px,1fr))}
  .order-entry-grid{display:block}
  .order-entry-grid>.card{margin-bottom:16px}
}

/* Create wave should look like planning, not sorting */
.create-wave-card{padding:20px!important}
.create-wave-card>.row{align-items:flex-start}
.wave-summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:18px 0}
.wave-summary-strip>div{padding:14px;border:1px solid #eadfd5;border-radius:14px;background:#fbf7f3;display:flex;flex-direction:column;gap:3px}
.wave-summary-strip strong{font-size:1.35rem}
.create-wave-table{min-width:760px}
.create-wave-card .pick-bin-grid{display:none!important}
@media(max-width:700px){
  .wave-summary-strip{grid-template-columns:1fr 1fr}
  .create-wave-card{padding:16px!important}
}

.pick-wave-compact-head{display:flex;gap:16px;align-items:stretch;justify-content:space-between;margin-bottom:10px}
.pick-wave-compact-head h2{margin-bottom:2px}
.pick-next-location{min-width:210px;padding:10px 14px;border:1px solid #d9c6b4;border-radius:12px;background:#fff8ef;display:flex;flex-direction:column;justify-content:center}
.pick-next-location strong{font-size:1.45rem;line-height:1.1}
.pick-next-location small{margin-top:3px;color:#766b61}
.pick-current-items{margin:6px 0 10px}
.pick-current-items table{margin:0}
.pick-scan-first{margin:8px 0 0}
.pick-instructions{margin-top:8px}
.pick-instructions summary{cursor:pointer;font-weight:700}
@media(max-width:720px){
  .pick-wave-compact-head{flex-direction:column;gap:8px}
  .pick-next-location{min-width:0}
  .final-picking-card{padding-top:12px}
}

.dashboard-work-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}
.dashboard-work-summary>div{border:1px solid #eadfd5;border-radius:14px;padding:12px 14px;background:#fffaf5;display:flex;flex-direction:column;gap:2px}
.dashboard-work-summary strong{font-size:1.7rem;line-height:1}
.fulfillment-pick-compact .final-fulfillment-tabs{margin:0 0 8px;gap:6px}
.fulfillment-pick-compact .final-fulfillment-tabs button{padding:7px 12px;min-height:0;font-size:.92rem}
.fulfillment-pick-compact .final-picking-card{padding:12px 14px}
.fulfillment-pick-compact .pick-wave-compact-head{margin-bottom:6px;gap:10px}
.fulfillment-pick-compact .pick-wave-compact-head h2{font-size:1.3rem;margin:0}
.fulfillment-pick-compact .pick-wave-compact-head p{margin:2px 0 0}
.fulfillment-pick-compact .pick-next-location{padding:7px 10px;min-width:185px}
.fulfillment-pick-compact .pick-next-location strong{font-size:1.15rem}
.fulfillment-pick-compact .pick-location-confirm{margin:4px 0 6px}
.fulfillment-pick-compact .pick-location-confirm .field{margin:0}
.fulfillment-pick-compact .pick-location-confirm input{min-height:40px;padding:8px 10px}
.fulfillment-pick-compact .pick-current-items{margin:2px 0 6px}
.fulfillment-pick-compact .pick-current-items th,
.fulfillment-pick-compact .pick-current-items td{padding:6px 8px}
.fulfillment-pick-compact .pick-scan-first{margin-top:4px}
.fulfillment-pick-compact .pick-scan-first input{min-height:40px;padding:8px 10px}
@media(max-width:720px){
  .dashboard-work-summary{grid-template-columns:1fr 1fr}
  .fulfillment-pick-compact .pick-next-location{min-width:0}
}

.dashboard-work-summary>.dashboard-summary-button{
  appearance:none;border:1px solid #eadfd5;border-radius:14px;padding:12px 14px;background:#fffaf5;
  display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;color:inherit;cursor:pointer
}
.dashboard-work-summary>.dashboard-summary-button:hover{border-color:#cdb8a8}
.dashboard-work-summary>.dashboard-summary-button:focus-visible{outline:3px solid rgba(139,92,58,.22);outline-offset:2px}
.dashboard-work-summary>.dashboard-summary-button strong{font-size:1.7rem;line-height:1}
.dashboard-work-summary>.dashboard-summary-button small{font-weight:700;margin-top:4px}
#staffTaskQueue [hidden]{display:none!important}
#staffTaskQueue .dashboard-work-summary{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.dashboard-operations-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.dashboard-operations-heading h2,.dashboard-operations-subhead h3{margin:0}
.dashboard-operations-subhead{border-top:1px solid #eadfd5;padding-top:16px;margin-top:16px}
.dashboard-drilldown{border-top:1px solid #eadfd5;border-bottom:1px solid #eadfd5;padding:14px 0;margin:0 0 18px}
.dashboard-drill-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid #eee}
.dashboard-drill-row:last-child{border-bottom:0}
.dashboard-drill-row>div{min-width:0}
@media(max-width:700px){
  .dashboard-drill-row{align-items:flex-start;flex-direction:column}
}

/* Bag entry stays first; occasional tools remain available below the bags. */
.order-entry-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:16px 0}
#customerBagBuilder{max-width:900px}
#customerBagBuilder [data-claim-entry]{border:0;padding:0;margin:16px 0 0}
#customerBagBuilder [data-claim-entry] legend{font-weight:700;margin-bottom:8px}
#customerBagBuilder [hidden]{display:none!important}
#customerBagBuilder details{margin:10px 0}
#customerBagBuilder summary,.order-new-bag>summary,#orderReviewTools>summary{cursor:pointer;font-weight:700;padding:8px 0}
#activeCustomerBagNotice{margin:12px 0;font-size:1.05rem}
#orderReviewTools{margin-top:20px}
.order-new-bag>.card{box-shadow:none;border:0;padding:12px 0}

/* Inline search results are visible without opening a native mobile select. */
.bag-customer-matches{margin:0 0 12px;padding:10px;border:1px solid #d9c8b8;border-radius:12px;background:#fffaf6}
.bag-customer-matches p{margin:0 0 8px;font-size:.9rem}
.bag-customer-matches [data-customer-match-list]{display:grid;gap:6px;max-height:min(260px,35vh);overflow:auto;overscroll-behavior:contain}
.bag-customer-matches button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;min-height:48px;text-align:left;white-space:normal;overflow-wrap:anywhere}
.bag-customer-matches button:focus-visible{outline:3px solid #805a3b;outline-offset:1px}
.bag-customer-matches small{font-weight:400}

.bag-shipping-status{padding:12px 14px;border:1px solid #d7c5b5;border-radius:10px;background:#fffaf6;font-weight:600;overflow-wrap:anywhere}
.order-inline-editor .row select{min-width:0;flex:1 1 200px}
.order-inline-editor p{line-height:1.45}

.invoice-preview-total{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:8px 0;border-bottom:1px solid #e4d8cd}
.invoice-preview-total strong{white-space:nowrap;text-align:right}

/* Bags and invoices share the selected customer and draft, with separate controls. */
[data-orders-section="bags"] .invoice-only,[data-orders-section="invoices"] .bag-only{display:none!important}
.orders-tabs{margin:12px 0 20px}

.invoice-create-panel h3{margin:0 0 8px}.invoice-create-panel .invoice-unpaid-summary{font-weight:650;margin:0 0 8px}.invoice-create-panel>[data-preview-group],.invoice-create-panel>[data-send-group]{width:100%;margin:8px 0;min-height:48px}.invoice-recovery-tools,.invoice-bag-tools{margin-top:18px;border-top:1px solid #e4d8cd;padding-top:12px}.invoice-recovery-tools summary,.invoice-bag-tools summary{cursor:pointer;font-size:.9rem;color:#62564e;padding:8px 0}.invoice-recovery-tools button{margin-top:10px}

.invoice-fulfillment-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #e4d8cd}.invoice-item-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 0;border-bottom:1px solid #e4d8cd}.invoice-item-row>div{flex:1 1 180px;min-width:0}.invoice-item-row p{margin:5px 0;font-size:.85rem}.invoice-adjustments{margin:24px 0}.invoice-dialog{width:min(560px,calc(100% - 32px));max-height:85dvh;overflow:auto;box-sizing:border-box;border:1px solid #b69d89;border-radius:18px;padding:22px;background:#fffdfb;color:#302b27}.invoice-dialog::backdrop{background:rgb(40 30 20 / .45)}.invoice-dialog>button{margin:8px 8px 0 0}.invoice-dialog .card{border:0;box-shadow:none;padding:0}.invoice-workspace .bag-shipping-status{display:none}

/* Invoice preparation: compact, padded sections and a clear reading order. */
#dedicatedOrderDetail .invoice-workspace{border:0;background:transparent;border-radius:0;padding:0;margin-top:20px;overflow:visible}
.invoice-workspace .invoice-fulfillment-header{background:#f8f3ef;border:1px solid #e4d8cd;border-radius:12px;padding:12px 16px;margin-bottom:20px}
.invoice-workspace h2{font-family:inherit;font-size:1.15rem;line-height:1.3;margin:0 0 16px;font-weight:700}
.invoice-workspace h3{font-family:inherit;font-size:1rem;line-height:1.35;margin:0 0 8px}
.invoice-workspace .invoice-unpaid-items,.invoice-workspace .invoice-adjustments{padding:18px;border:1px solid #e4d8cd;border-radius:14px;background:#fff;margin:0 0 18px}
.invoice-workspace .invoice-item-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;padding:14px 0;border-bottom:1px solid #eee5df;align-items:start}
.invoice-workspace .invoice-item-row:last-child{border-bottom:0;padding-bottom:0}
.invoice-workspace .invoice-item-row>div{min-width:0;overflow-wrap:anywhere}
.invoice-workspace .invoice-item-row>strong{white-space:nowrap}
.invoice-workspace .invoice-item-row>button{grid-column:1 / -1;justify-self:start;margin-top:4px}
.invoice-workspace .invoice-item-row p{line-height:1.45;margin:6px 0 0}
.invoice-workspace .founding-member-card{padding:0 0 16px;border:0;border-bottom:1px solid #eee5df;border-radius:0;background:transparent;margin:0 0 16px;box-shadow:none}
.invoice-workspace .founding-member-card p{margin:6px 0;line-height:1.45;font-size:.9rem}
.invoice-workspace .invoice-adjustments>p{font-size:.9rem;line-height:1.5;margin:8px 0 0}
.invoice-workspace .invoice-create-panel{margin:0;padding:18px;background:#fffaf5;border:1px solid #d8c8ba;box-shadow:none;border-radius:14px}
.invoice-workspace .invoice-create-panel>p{font-size:.9rem;line-height:1.5;margin:8px 0 12px}
.invoice-workspace .invoice-create-panel .invoice-unpaid-summary{font-size:1rem}
.invoice-workspace .invoice-bag-tools{margin:20px 0 0}
@media(max-width:640px){#dedicatedOrderDetail>h1{font-size:1.8rem;line-height:1.15;overflow-wrap:anywhere}.invoice-workspace .invoice-unpaid-items,.invoice-workspace .invoice-adjustments,.invoice-workspace .invoice-create-panel{padding:16px}.invoice-workspace .invoice-item-row{font-size:.95rem}}

.bag-header-fulfillment>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.bag-header-fulfillment button{margin:0;padding:6px 12px;min-height:36px}#dedicatedOrderDetail details.order-row>summary{background:#faf7f4;border-bottom:1px solid #e7ded7;gap:16px;padding:18px}#dedicatedOrderDetail .order-summary-main strong{font-size:1.1rem}#dedicatedOrderDetail .order-expanded>[data-collapse-bag]{margin-bottom:16px}#dedicatedOrderDetail .order-expanded>.scroll{margin-top:0}.invoice-dialog .order-inline-editor{margin:0}.invoice-dialog .order-inline-editor .row{display:grid;gap:12px}.invoice-dialog .order-inline-editor select{width:100%;min-width:0}.invoice-dialog .order-inline-editor p:empty{display:none}

.bag-invoice-action{margin:20px 0 16px}.bag-invoice-action button{width:100%;min-height:48px}

/* Keep the source location prominent in desktop, compact, and handheld picking. */
.final-picking-card .pick-next-location{min-width:0;flex:1;padding:16px 20px;overflow-wrap:anywhere}
.final-picking-card .pick-next-location>strong,
body.tslw-handheld .final-picking-card .pick-next-location>strong{font-size:clamp(2rem,3.5vw,3rem);line-height:1.15;margin:6px 0}
.final-picking-card .pick-next-location>.pick-location-barcode{display:block;font-size:1.1rem;letter-spacing:normal;text-transform:none;margin:4px 0}
.final-picking-card .pick-location-barcode code{font-size:1.35rem;font-weight:700;letter-spacing:.06em;white-space:normal}

.order-summary-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* Invoice actions share button styling, including external PayPal links. */
.invoice-history .invoice-card .actions{display:flex;align-items:stretch;flex-wrap:wrap;gap:12px;margin:16px 0 12px}
.invoice-history .invoice-card .actions>:is(a.button,button){
 display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
 min-height:44px;max-width:100%;margin:0;padding:10px 16px;
 border:1px solid #d8c6b7;border-radius:10px;background:#eadfd3;color:#302b27;
 font:inherit;font-size:.95rem;font-weight:650;line-height:1.3;text-align:center;
 text-decoration:none;white-space:normal;overflow-wrap:anywhere;cursor:pointer;
}
.invoice-history .invoice-card .actions>:is(a.button,button):hover{background:#e2d2c2;border-color:#b69d89}
.invoice-history .invoice-card .actions>:is(a.button,button):focus-visible{outline:3px solid #805a3b;outline-offset:3px}
.invoice-history .invoice-card .actions>button:disabled{opacity:.55;cursor:wait}
@media(max-width:600px){.invoice-history .invoice-card .actions>:is(a.button,button){width:100%}}

.staff-credit-preview{border:1px solid #ddd0c4;background:#faf7f2;border-radius:12px;padding:16px;margin:16px 0}.staff-credit-preview label,.staff-credit-dialog label:not(.check){display:grid;gap:8px;margin:12px 0}.staff-credit-preview input{width:100%;box-sizing:border-box}.staff-credit-preview button,.staff-credit-dialog button{min-height:44px;margin:8px 8px 0 0}

.invoice-review-actions{position:sticky;bottom:-22px;background:#fffdfb;border-top:1px solid #e4d8cd;padding:12px 0 4px;display:flex;flex-wrap:wrap;gap:8px}.invoice-review-actions>[data-send-group]{width:100%;margin:0}.invoice-review-actions>button{margin:0}.invoice-dialog .staff-credit-preview{margin:20px 0}.invoice-dialog .staff-credit-preview input{width:100%;box-sizing:border-box}.invoice-dialog [role="status"]{overflow-wrap:anywhere}

.singles-destination-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;border:1px solid #b9cfc4;border-radius:12px;background:#f3f8f5;padding:10px 12px;margin:10px 0}.singles-destination-controls small{display:block;margin-top:3px;max-width:55ch}.singles-destination-controls p{flex-basis:100%;margin:0}.singles-destination-controls p:empty{display:none}.singles-destination-controls button{margin:0;min-height:44px}

.bag-reminder-panel{margin:18px 0}.bag-reminder-panel .bag-reminder-card{background:#fff8ed;border:1px solid #d7bd92}.bag-reminder-panel .actions{display:flex;flex-wrap:wrap;gap:10px}.bag-reminder-panel .muted{overflow-wrap:anywhere}.bag-reminder-panel button{min-height:44px}
@media(max-width:600px){.bag-reminder-panel .actions>button{width:100%}}

.bag-stage-tabs{gap:8px;margin-bottom:12px}.bag-stage-tabs button[aria-pressed=true]{background:#76543c;color:white}.bag-stage-tabs button{min-height:44px;white-space:normal}
