.bb-invoice-dialog{width:min(820px,calc(100vw - 24px));max-height:92dvh}.bb-invoice-dialog .bb-tools-body{overflow:auto}.bb-invoice-summary a{display:inline-block;margin:0 12px 8px 0;font-size:13px}.bb-invoice-receipts{padding:14px;border:1px solid var(--border,#d9e2e7);border-radius:12px;margin-bottom:18px}.bb-invoice-receipts>summary{cursor:pointer;font-weight:650;font-size:14px}.bb-invoice-lines{display:grid;gap:12px}.bb-invoice-lines .bb-receipt-line label{display:grid;gap:5px;font-size:12px;font-weight:600}.bb-invoice-lines select,.bb-invoice-lines input,.bb-invoice-confirmations select{padding:10px;width:100%;border:1px solid var(--border,#d9e2e7);border-radius:8px;background:var(--surface,#fff);color:inherit;font-size:13px}.bb-invoice-lines [hidden]{display:none}.bb-invoice-confirmations{display:grid;gap:18px;margin-top:20px;padding:16px;background:var(--bg,#f4f8fa);border-radius:12px}.bb-invoice-confirmations label{font-size:13px;line-height:1.5}.bb-invoice-confirmations input{margin-right:6px}.bb-invoice-confirmations select{margin-top:6px}.bb-invoice-dialog .bb-tools-footer{gap:8px}.bb-invoice-dialog .bb-tools-head{padding:18px}.bb-invoice-dialog .bb-tools-head h2{font-size:19px;margin:0}.bb-invoice-dialog .bb-tools-head p{font-size:13px;margin:6px 0}.bb-invoice-dialog .bb-tools-note.error{color:#a63d2d}.bb-invoice-dialog .bb-receipt-review pre{max-height:220px;overflow:auto;white-space:pre-wrap;font-size:12px}@media(max-width:580px){.bb-invoice-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.bb-invoice-lines .bb-tools-grid{grid-template-columns:1fr 1fr}.bb-invoice-dialog .bb-line-top{align-items:flex-start;gap:10px}.bb-invoice-dialog .bb-line-top span{font-size:12px;white-space:nowrap}}
.bb-invoice-reviews{margin:0 0 24px;scroll-margin-top:90px}.bb-invoice-reviews .bb-purchases-heading{align-items:flex-start;margin-bottom:8px}.bb-invoice-reviews h2{margin:0;font-size:18px;line-height:1.4;color:var(--text,#18384f)}.bb-invoice-reviews h2:focus-visible{outline:2px solid var(--blue,#225b7e);outline-offset:5px;border-radius:3px}.bb-invoice-reviews .bb-purchases-heading button{flex:none;min-height:40px;border:1px solid var(--border,#d9e2e7);border-radius:9px;padding:8px 12px;font-weight:650}.bb-invoice-intro,.bb-invoice-reviews [data-invoice-state]{font-size:13px;line-height:1.6;margin:6px 0 12px;color:var(--muted,#607383)}.bb-invoice-reviews [data-invoice-list]{display:grid;gap:9px;max-height:360px;overflow:auto;overscroll-behavior:contain}.bb-invoice-reviews .bb-purchase-row button{min-height:42px}.bb-invoice-reviews [data-invoice-list]:empty{display:none}@media(max-width:580px){.bb-invoice-reviews{scroll-margin-top:76px}.bb-invoice-reviews h2{font-size:16px}.bb-invoice-reviews .bb-purchases-heading{gap:10px}.bb-invoice-reviews .bb-purchases-heading button{font-size:12px;padding:8px 10px}.bb-invoice-reviews [data-invoice-list]{max-height:320px}}
.bb-invoice-confirmations label:has([data-invoice-receipts-reviewed]){display:flex;align-items:flex-start;gap:10px}.bb-invoice-confirmations input[type="checkbox"]{width:20px;height:20px;min-width:20px;min-height:20px;flex:none;padding:0;margin:1px 0 0}

.bb-material-flow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:6px 0 28px;align-items:start}
.bb-material-flow>section{min-width:0;margin:0;padding:20px;border:1px solid var(--border,#dce6ec);border-radius:18px;background:var(--surface,#fff)}
.bb-material-flow .bb-purchases-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.bb-material-flow h2{font-size:18px;line-height:1.35;margin:5px 0;color:var(--text,#18384f)}
.bb-material-flow .bb-purchases-heading>button{flex:none;min-height:42px;border:1px solid var(--border,#dce6ec);border-radius:9px;background:var(--surface,#fff);padding:8px 12px;font-size:12px;font-weight:650;color:var(--text,#18384f)}
.bb-material-step{display:block;color:var(--blue,#176493);font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.bb-material-flow [data-reservation-state]{font-size:12px;line-height:1.6;color:var(--muted,#607383);margin:6px 0 14px}
.bb-material-flow .bb-purchase-row{align-items:flex-start;flex-wrap:wrap;padding:14px;border-radius:12px;background:var(--bg,#f5f8fa);border:1px solid var(--border,#dce6ec);gap:10px}
.bb-material-flow .bb-purchase-row>div{flex:1 1 170px;min-width:0}.bb-material-flow .bb-purchase-row strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere}.bb-material-flow .bb-purchase-row small{font-size:12px;line-height:1.55;overflow-wrap:anywhere}.bb-material-flow .bb-purchase-row>button{flex:none;min-height:42px;padding:9px 12px;border:1px solid var(--border,#dce6ec);border-radius:9px;background:var(--surface,#fff);font-size:12px;font-weight:700;color:var(--blue,#176493)}
.bb-reserve-prompt{display:grid;gap:14px;padding:16px;border:1px solid #cae1ef;border-radius:13px;background:var(--surface,#f6fbff);margin-top:10px}.bb-reserve-prompt h3{font-size:15px;line-height:1.4;margin:9px 0 6px;color:var(--text,#18384f)}.bb-reserve-prompt p{font-size:12px;line-height:1.6;margin:0;color:var(--muted,#607383);overflow-wrap:anywhere}.bb-reserve-prompt-actions{display:flex;flex-wrap:wrap;gap:8px}.bb-reserve-prompt-actions .bb-tool-button{font-size:12px;min-height:42px}.bb-material-tag{display:inline-flex;align-items:center;width:fit-content;max-width:100%;font-size:11px;font-weight:800;color:#155786;background:#e6f3fb;border-radius:7px;padding:5px 8px;white-space:nowrap}.bb-reserve-deferred{margin-top:16px}.bb-reserve-deferred>summary{font-size:12px;font-weight:700;color:var(--muted,#607383);cursor:pointer;padding:8px 0}.bb-reserve-retry{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-radius:10px;background:#fff5db;font-size:12px;color:#705219}
.bb-reserved-section [data-reserved-jobs]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0 28px}.bb-reserved-job{min-width:0;border:1px solid var(--border,#dce6ec);border-radius:16px;background:var(--surface,#fff);overflow:hidden}.bb-reserved-job>header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px;background:var(--bg,#f7faff);border-bottom:1px solid var(--border,#dce6ec)}.bb-reserved-job h3{font-size:16px;line-height:1.4;margin:7px 0 0;overflow-wrap:anywhere}.bb-reserved-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#785500;background:#fff3ca;border-radius:99px;padding:6px 9px}.bb-reserved-batch{padding:16px 18px}.bb-reserved-batch+.bb-reserved-batch{border-top:1px solid var(--border,#dce6ec)}.bb-reserved-batch-head{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--muted,#607383);font-size:12px}.bb-reserved-batch-head button{font-size:12px;min-height:42px}.bb-reserved-job ul{list-style:none;padding:0;margin:10px 0 0}.bb-reserved-job li{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--border,#e6edf2)}.bb-reserved-job li:last-child{border-bottom:0}.bb-reserved-job li>div{min-width:0}.bb-reserved-job li strong{display:block;font-size:13px;line-height:1.5}.bb-reserved-job li small{display:block;color:var(--muted,#607383);font-size:11px;line-height:1.6;overflow-wrap:anywhere}.bb-reserved-job li>span{flex:none;text-align:right;font-size:19px;font-weight:750;color:var(--text,#18384f)}.bb-reserved-job li>span small{font-weight:500}.bb-reserved-warning{background:#fff3e9;color:#9a4a23;padding:10px;border-radius:8px;font-size:12px;line-height:1.6}
.bb-reservation-dialog{width:min(760px,calc(100vw - 24px));max-height:92dvh}.bb-reservation-dialog .bb-tools-head{padding:18px}.bb-reservation-dialog .bb-tools-head h2{font-size:19px;line-height:1.35;margin:0}.bb-reservation-dialog .bb-tools-head p{font-size:13px;margin:6px 0}.bb-reservation-dialog .bb-tools-footer{gap:8px}.bb-invoice-dialog .bb-tools-body,.bb-reservation-dialog .bb-tools-body{min-height:0;overflow:auto;overscroll-behavior:contain}.bb-invoice-dialog .bb-tools-head,.bb-invoice-dialog .bb-tools-footer,.bb-reservation-dialog .bb-tools-head,.bb-reservation-dialog .bb-tools-footer{flex:none}.bb-tools[open].bb-invoice-dialog,.bb-tools[open].bb-reservation-dialog{display:flex;flex-direction:column;padding:0;overflow:hidden}.bb-invoice-dialog [hidden],.bb-reservation-dialog [hidden]{display:none!important}
.bb-material-question{padding:18px;border-radius:14px;background:var(--bg,#f0f7fc);border:1px solid var(--border,#d6e5ef);margin:0 0 20px}.bb-material-question h3{font-size:19px;line-height:1.35;margin:7px 0 8px;color:var(--text,#18384f)}.bb-material-question p{font-size:13px;line-height:1.65;color:var(--muted,#526b7c);margin:0}.bb-material-choices{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}.bb-material-choices .bb-tool-button{min-height:44px;font-size:13px}.bb-material-choices .bb-tool-button.selected{background:#e2f3e9;color:#156238;border-color:#83c99e;box-shadow:inset 0 0 0 1px #83c99e}.bb-material-choices .bb-tool-button.selected:before{content:'✓';font-weight:800;margin-right:6px}
.bb-invoice-held,.bb-invoice-actual{margin:0 0 24px}.bb-invoice-held h3,.bb-invoice-section-head h3{font-size:16px;line-height:1.4;margin:0 0 12px}.bb-invoice-held-list{display:grid;gap:12px}.bb-invoice-held-row{border:1px solid #e4d7af;background:var(--surface,#fffcf4);border-radius:13px;padding:16px}.bb-invoice-held-row .bb-line-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.bb-invoice-held-row .bb-line-top strong{font-size:14px;line-height:1.5}.bb-invoice-held-row label,.bb-reservation-dialog label,.bb-invoice-lines label{display:grid;gap:6px;font-size:12px;font-weight:650;min-width:0}.bb-invoice-held-row input,.bb-reservation-dialog input,.bb-reservation-dialog select,.bb-invoice-lines input,.bb-invoice-lines select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;padding:10px;border:1px solid var(--border,#cedde5);border-radius:9px;background:var(--surface,#fff);color:var(--text,#173950);font:inherit;font-size:14px}.bb-invoice-held-row .bb-tools-grid{margin-top:12px}.bb-invoice-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:6px}.bb-invoice-section-head h3{margin:0}.bb-invoice-section-head button{font-size:12px;min-height:42px}.bb-invoice-material-grid{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:12px;margin-top:12px}.bb-invoice-line-receipt{margin:12px 0 0}.bb-invoice-line-receipt>summary{font-size:12px;color:var(--blue,#176493);cursor:pointer;padding:7px 0}.bb-invoice-line-receipt .bb-tools-grid{margin-top:8px}.bb-invoice-line-receipt .bb-tools-wide{grid-column:1/-1}.bb-invoice-remove{border:0;background:transparent;color:#9d4331;font-size:11px;font-weight:700;min-height:40px;padding:5px}.bb-invoice-lines .bb-receipt-line{padding:16px;border-radius:13px}.bb-invoice-dialog .bb-tools-note.error,.bb-reservation-dialog .bb-tools-note.error{color:#a13f2f}.bb-invoice-receipts{margin-top:22px}.bb-invoice-receipts>summary{padding:3px 0}.bb-invoice-receipts .bb-purchase-row{margin-top:10px}.bb-invoice-receipts .bb-tool-button{font-size:12px;min-height:42px}.bb-invoice-stock-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px}.bb-invoice-stock-summary>span{padding:13px 10px;border-radius:11px;background:var(--bg,#f1f6fa);font-size:11px;line-height:1.5;color:var(--muted,#587084)}.bb-invoice-stock-summary strong{display:block;color:var(--text,#18384f);font-size:23px;margin-bottom:4px}.bb-invoice-confirmations{gap:10px}.bb-invoice-confirmations .bb-tools-note{margin:0}
.bb-reservation-job{margin:0 0 16px}.bb-reservation-lines{display:grid;gap:12px;margin:16px 0}.bb-reservation-line{padding:16px;border:1px solid var(--border,#dce6ec);border-radius:13px;background:var(--surface,#fff)}.bb-reservation-line-top{display:flex;align-items:end;gap:10px}.bb-reservation-line-top label{flex:1;min-width:0}.bb-reservation-line-top button{flex:none}.bb-reservation-quantity{display:grid;grid-template-columns:140px minmax(0,1fr);gap:16px;align-items:end;margin-top:12px}.bb-reservation-quantity>p{font-size:12px;line-height:1.6;color:var(--muted,#607383);margin:0 0 9px}.bb-reservation-line>.bb-tools-note{margin:12px 0 0}.bb-reservation-dialog .bb-tools-footer .primary{white-space:normal}.ops-tabs [data-reserved-count]{font-size:10px;background:#f7d967;color:#544218;border-radius:99px;padding:2px 5px;margin-left:3px}.ops-tabs [data-reserved-count][hidden]{display:none}
@media(max-width:1000px){.bb-material-flow{grid-template-columns:1fr}.bb-material-flow>section{padding:18px}.bb-reserved-section [data-reserved-jobs]{grid-template-columns:1fr}}
@media(max-width:580px){.bb-tools[open].bb-invoice-dialog,.bb-tools[open].bb-reservation-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.bb-invoice-dialog .bb-tools-body,.bb-reservation-dialog .bb-tools-body{padding:16px}.bb-invoice-dialog .bb-tools-footer,.bb-reservation-dialog .bb-tools-footer{padding:12px 16px max(16px,env(safe-area-inset-bottom));flex-wrap:nowrap}.bb-invoice-dialog .bb-tools-footer .primary,.bb-reservation-dialog .bb-tools-footer .primary{flex:1;font-size:13px;min-height:46px}.bb-material-flow{gap:14px;margin-bottom:20px}.bb-material-flow>section{padding:16px}.bb-material-flow h2{font-size:16px}.bb-material-flow .bb-purchases-heading>button{padding:8px 9px;font-size:11px}.bb-material-question{padding:16px}.bb-material-question h3{font-size:19px}.bb-material-choices{display:grid;grid-template-columns:1fr;width:100%}.bb-material-choices .bb-tool-button{width:100%}.bb-invoice-held-row .bb-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.bb-invoice-material-grid{grid-template-columns:minmax(0,1fr) 100px;gap:9px}.bb-invoice-material-grid label{font-size:11px}.bb-invoice-material-grid input,.bb-invoice-material-grid select,.bb-invoice-held-row input,.bb-reservation-dialog input,.bb-reservation-dialog select{font-size:16px}.bb-invoice-lines .bb-receipt-line,.bb-invoice-held-row{padding:14px}.bb-invoice-section-head{align-items:flex-start}.bb-invoice-section-head h3{font-size:15px;max-width:135px}.bb-invoice-section-head button{font-size:11px;padding:9px}.bb-invoice-stock-summary{gap:7px}.bb-invoice-stock-summary>span{padding:11px 8px;font-size:10px}.bb-invoice-stock-summary strong{font-size:22px}.bb-reservation-quantity{grid-template-columns:120px minmax(0,1fr);gap:12px}.bb-reserved-batch{padding:14px}.bb-reserved-job>header{padding:16px}.bb-invoice-receipts{padding:14px}}
@media(prefers-reduced-motion:reduce){.bb-invoice-dialog,.bb-reservation-dialog{scroll-behavior:auto}}
.bb-invoice-dialog .bb-tools-body,.bb-reservation-dialog .bb-tools-body{flex:1 1 auto}.bb-material-variant{font-size:12px;line-height:1.6;font-weight:650;color:var(--text,#244c65);margin:9px 0 0;overflow-wrap:anywhere}.bb-material-variant:empty{display:none}
.bb-reserve-unmatched{border:1px solid var(--border,#dce6ec);border-radius:12px;padding:14px;margin:0 0 18px}.bb-reserve-unmatched>summary{font-size:13px;font-weight:700;cursor:pointer}.bb-reserve-unmatched .bb-reserved-batch-head{padding:10px 0;gap:12px}.bb-reserve-unmatched .bb-reserved-batch-head>span{min-width:0;overflow-wrap:anywhere}.bb-reserve-unmatched .bb-tool-button{flex:none}
