.receiving-dialog{width:min(920px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;overflow:hidden;color:#233d56}
.receiving-dialog[open]{display:flex;flex-direction:column}
.parts-order-workflow{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #ccd8e6}
.parts-order-workflow>article{padding:16px;border:1px solid #cbd8e7;border-radius:12px;margin-top:12px;overflow-wrap:anywhere}
.parts-order-workflow p{line-height:1.5}
.parts-order-workflow>[data-order-confirmation]{margin:16px 0 12px}
.parts-order-workflow [data-mark-ordered]:disabled{opacity:.55;cursor:not-allowed}
.part-order-record{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #dce5ef}
.part-order-record>span{min-width:0;flex:1}.part-order-record small{display:block;margin-top:5px}
.part-order-history{margin:12px 0}.part-order-history>summary{padding:12px 0;min-height:44px;box-sizing:border-box;cursor:pointer;color:#315a83;font-weight:600}
.part-order-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:12px 0}
.part-order-actions label{display:grid;gap:6px;min-width:0}
.part-order-actions :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid #9bb1cb;border-radius:10px;background:#fff;color:#233d56;font:inherit}
.parts-order-workflow .button{min-height:44px;max-width:100%;white-space:normal;padding:10px 14px;line-height:1.4}
.parts-stage.parts_needed{background:#fff3d6;color:#765118;border-color:#e8ce8f}
.parts-stage.approval_pending{background:#eef1ff;color:#3d4782;border-color:#c9d0f3}
.parts-stage.parts_ordered{background:#e6f1ff;color:#1c5387;border-color:#accaec}
.parts-stage.parts_received{background:#e3f5ee;color:#246c51;border-color:#a1d8c2}
.parts-stage.parts_installed{background:#dceff9;color:#175575;border-color:#9bc9e1}
.parts-stage.parts_partially_installed{background:#fff3d6;color:#765118;border-color:#e8ce8f}
.quick-status-heading{padding:18px 0 10px;font-weight:700}
.parts-status-choices button small{white-space:normal;line-height:1.4}
.receiving-dialog>header{display:flex;justify-content:space-between;align-items:center}
.receiving-dialog>header button{flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center}
.receiving-dialog svg,.parts-stage svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;flex-shrink:0}
.receiving-dialog::backdrop{background:#132b4a88}
.receiving-tabs{display:flex;gap:8px;padding:12px 20px;border-bottom:1px solid #d2dce8;flex-shrink:0;overflow-x:auto}
.receiving-tabs button{white-space:nowrap;min-height:44px;flex-shrink:0}
.receiving-body{padding:20px;overflow:auto;overscroll-behavior:contain;min-height:0;-webkit-overflow-scrolling:touch}
.receiving-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px}
.receiving-grid>section{min-width:0}
.receiving-dialog [hidden]{display:none!important}
.receiving-dialog label:not(.receiving-check){min-width:0;grid-template-columns:minmax(0,1fr)}
.receiving-dialog label:has(>select){overflow:clip}
.receiving-dialog h3{font-size:17px;margin:0 0 12px;color:#17375a}
.receiving-dialog p{font-size:14px;line-height:1.5;margin:8px 0 14px}
.receiving-dialog label:not(.receiving-check){display:grid;gap:6px;font-size:14px;font-weight:600;margin:12px 0}
.receiving-dialog :is(input:not([type=checkbox]),select,textarea){box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid #acbbcb;border-radius:10px;background:#fff;color:#17375a;padding:10px 12px;font:inherit;font-size:16px;box-shadow:none}
.receiving-camera{position:relative;text-align:center;overflow:hidden;min-height:48px;align-items:center}
.receiving-camera input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}
.receiving-photos{display:flex;gap:8px;overflow:auto;margin:12px 0}
.receiving-photos img{width:92px;height:92px;object-fit:contain;border:1px solid #d2dce8;border-radius:10px;background:#f4f7fc}
.receiving-candidates{display:flex;gap:8px;flex-wrap:wrap}
.receiving-feedback{margin:16px 0;padding:14px;border:1px solid #a8c8ee;border-radius:12px;background:#edf5ff;color:#17375a;overflow-wrap:anywhere}
.receiving-feedback-heading{display:flex;align-items:center;gap:10px;line-height:1.4;font-size:16px}
.receiving-feedback p{margin:8px 0 0}
.receiving-feedback-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.receiving-feedback-actions .button{max-width:100%;white-space:normal;line-height:1.4}
.receiving-feedback[data-state=matched]{background:#e9f7ee;border-color:#91c9a4;color:#185438}
.receiving-feedback[data-state=review]{background:#fff7e6;border-color:#ddc48b;color:#664a13}
.receiving-feedback[data-state=error]{background:#fff0f0;border-color:#dca7a7;color:#862d32}
.receiving-spinner{flex:0 0 20px;width:20px;height:20px;box-sizing:border-box;border:2px solid #b0cbea;border-top-color:#2365cc;border-radius:50%;animation:receiving-spin 1s linear infinite}
.receiving-feedback[hidden],.receiving-feedback [hidden]{display:none!important}
@keyframes receiving-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.receiving-spinner{animation:none}}
.receiving-job-info{background:#eaf2fc;padding:12px;border-radius:10px;line-height:1.5;overflow-wrap:anywhere}
.receiving-number-help{margin-top:16px;border:1px solid #a8c8ee;border-radius:12px;background:#f3f8ff;overflow:hidden}
.receiving-number-help>summary{padding:14px;color:#174d7c;background:#e3effc;cursor:pointer;font-weight:700;min-height:48px;line-height:1.4}
.receiving-number-help>p,.receiving-number-help>label:not(.receiving-check){margin:14px}
.receiving-number-help>.button{margin:0 14px 14px;max-width:calc(100% - 28px);white-space:normal;line-height:1.4}
.receiving-mismatch{margin:14px 0;padding:14px;background:#fff7e6;border:1px solid #ddc48b;border-radius:12px;color:#664a13;overflow-wrap:anywhere}
.receiving-mismatch>p{margin:8px 0}
.receiving-mismatch>.receiving-check{font-size:14px;margin:0;padding:8px 0 0}
.receiving-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.receiving-cost{margin:12px 0 18px;padding:14px;border:1px solid #b5cae3;border-radius:12px;background:#edf4fd}
.receiving-cost label:not(.receiving-check){margin:0 0 8px}
.receiving-required{display:inline-block;margin-left:5px;font-size:11px;font-weight:600;color:#436587}
.receiving-money-input{position:relative}
.receiving-money-input>span{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-weight:700;color:#47688a}
.receiving-money-input input[data-unit-cost]{padding-left:30px;background:#fff}
.receiving-cost>small{display:block;font-size:12px;line-height:1.5;color:#466481}
.receiving-cost p{margin:9px 0 0;font-weight:700;font-variant-numeric:tabular-nums}
.receiving-cost p:empty{display:none}
.receiving-confirm{border-top:1px solid #d2dce8;margin-top:20px;padding-top:20px}
.receiving-check{display:flex;align-items:flex-start;gap:10px;padding:12px 0;line-height:1.5;cursor:pointer}
.receiving-check input{width:22px;height:22px;flex:0 0 22px;margin:2px 0;accent-color:#2764c8}
.receiving-check small{display:block;color:#52677e}
.receiving-dialog>footer{padding:0 20px;background:#fff;border-top:1px solid #d2dce8;flex-shrink:0}
.receiving-dialog>footer p:empty{display:none}
.receiving-register{display:grid;gap:14px}
.receiving-register article{border:1px solid #d2dce8;border-radius:12px;padding:16px;overflow-wrap:anywhere}
.receiving-register article>div:first-child{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.receiving-dialog .button{min-height:44px;padding:10px 16px;width:auto;color:#24486c}
.receiving-dialog .button.primary{color:#fff;background:#2365cc}
.receiving-dialog button:disabled{opacity:.6;cursor:wait}
.parts-stage-group{display:flex;gap:5px;flex-wrap:wrap;min-width:0;margin:5px 0}
.parts-stage{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:5px 8px;border-radius:7px;background:#edf3fa;color:#264a74;font-size:12px;font-weight:650;line-height:1.4;white-space:normal;text-align:left}
.parts-stage svg{width:16px;height:16px}
.parts-stage.waiting_for_parts{background:#fff3d9;color:#754d07}
.parts-stage.parts-ready{background:#e2f5ee;color:#15533a}
.parts-stage.warranty{background:#eee8fa;color:#56368a}
.parts-stage.shortage{background:#ffe7e7;color:#922126}
.parts-stage-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px}
.parts-stage-filter select{max-width:100%;min-height:44px;background:#fff;color:#17375a;border:1px solid #bdcbd9;border-radius:9px;padding:8px 12px;font-size:16px}
#jobFulfillment{margin:12px 0}
@media(max-width:600px){.receiving-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.receiving-grid{grid-template-columns:1fr;gap:20px}.receiving-body{padding:16px}.receiving-tabs{padding:10px 16px}.receiving-dialog>footer{padding:0 16px}.receiving-confirm>.button{width:100%}.receiving-tabs button{font-size:14px}.parts-stage{font-size:12px}}

.receiving-photos>div{display:flex;flex-direction:column;gap:4px;flex:0 0 92px}
.receiving-photos>div>.button{padding:6px;font-size:13px}
.receiving-dialog [data-photo][hidden]{display:none!important}
.receiving-dialog [data-open-camera]{width:100%;margin:12px 0}
.receiving-photos>.receiving-photo-card{flex:0 0 136px}
.receiving-photo-preview{display:flex;flex-direction:column;justify-content:center;min-height:174px;border:1px solid #c3d2e2;border-radius:12px;overflow:hidden;background:#f4f7fc;color:#294866;text-decoration:none;text-align:center}
.receiving-photo-preview img{width:100%;height:128px;object-fit:contain;border:0;border-radius:0;background:#fff}
.receiving-photo-preview img[hidden],.receiving-photo-card button[hidden]{display:none!important}
.receiving-photo-state{display:block;padding:8px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.receiving-photo-card[data-image-state=error] .receiving-photo-preview{border-color:#d0a59b;background:#fff5ef;color:#773c2b}
.receiving-photo-card [data-photo-load-retry]{font-size:12px;white-space:normal;min-height:44px}
.receiving-photo-card button.receiving-photo-preview{width:100%;padding:0;font:inherit;cursor:zoom-in;appearance:none}
.receiving-photo-dialog{--ui-window-width:920px!important;height:min(760px,calc(var(--overlay-height,100dvh) - 16px));padding:0;overflow:hidden;color:#233d56;font-family:inherit}
.receiving-photo-dialog[open]{display:flex;flex-direction:column}
.receiving-photo-dialog>header{display:flex;justify-content:space-between;align-items:center;flex:0 0 auto;gap:12px}
.receiving-photo-dialog h2{font-family:inherit}
.receiving-photo-dialog svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.receiving-photo-dialog::backdrop{background:#071423bf}
.receiving-photo-body{display:flex;flex-direction:column;gap:12px;padding:12px;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
.receiving-photo-body>p{margin:0;line-height:1.4;font-size:14px;flex-shrink:0}
.receiving-full-photo{flex:1;min-height:80px;position:relative;background:#edf2f8;border-radius:10px;overflow:hidden}
.receiving-full-photo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.receiving-photo-dialog [hidden]{display:none!important}
.receiving-photo-dialog>footer{padding:12px 16px;background:#fff;border-top:1px solid #cbd7e5;flex:0 0 auto}
.receiving-photo-dialog .button{width:100%;min-height:44px;padding:10px 14px;line-height:1.4;white-space:normal;color:#24486c;flex-shrink:0}
.receiving-camera-dialog{--ui-window-width:680px!important;width:min(680px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:0;overflow:hidden;color:#233d56}
.receiving-camera-dialog[open]{display:flex;flex-direction:column}
.receiving-camera-dialog,.receiving-camera-dialog h2{font-family:inherit}
.receiving-camera-dialog>header{display:flex;justify-content:space-between;align-items:center;flex-shrink:0}
.receiving-camera-dialog svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.receiving-camera-dialog::backdrop{background:#071423bf}
.receiving-camera-body{padding:16px;min-height:0;overflow:auto;overscroll-behavior:contain}
.receiving-camera-body>p{font-size:14px;line-height:1.5;margin:0 0 12px}
.receiving-camera-stage{position:relative;height:clamp(160px,44dvh,380px);overflow:hidden;border-radius:14px;background:#0c1726;isolation:isolate}
.receiving-camera-stage video,.receiving-camera-stage img{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.receiving-camera-stage img{object-fit:contain}
.receiving-camera-frame{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);width:84%;max-height:84%;aspect-ratio:2/1;border:2px solid #fff;border-radius:10px;box-shadow:0 0 0 100vmax #05101dbb;pointer-events:none;box-sizing:border-box}
.receiving-camera-dialog [hidden]{display:none!important}
.receiving-camera-dialog>footer{display:flex;flex-wrap:wrap;gap:10px;padding:14px 16px;border-top:1px solid #cbd7e5;background:#fff;flex-shrink:0}
.receiving-camera-dialog>footer .button{flex:1 1 150px;min-height:48px;white-space:normal;line-height:1.4;text-align:center;padding:10px 14px}
.receiving-job-choices{display:grid;gap:10px;margin:12px 0}
.receiving-job-choices>p{margin:0;font-weight:600;line-height:1.5}
.receiving-job-choices>button{display:grid;gap:5px;min-height:72px;width:100%;padding:14px;text-align:left;border:1px solid #b4c7dc;border-radius:12px;background:#fff;color:#203f60;font:inherit;white-space:normal;overflow-wrap:anywhere}
.receiving-job-choices>button[aria-pressed="true"]{border:2px solid #246be0;padding:13px;background:#eaf3ff}
.receiving-job-choices>button:focus-visible{outline:3px solid #246be0;outline-offset:2px}
.receiving-job-choices>button small{font-size:14px}

/* Receiving validation stays local to this form; shared mobile layout is unchanged. */
.receiving-dialog [data-receipt-invalid]{border-color:#b42335!important;outline:2px solid #b4233533;outline-offset:2px}
.receiving-dialog [data-receipt-error]{display:block;color:#a51d30;font-size:14px;font-weight:600;line-height:1.5;margin:4px 0 12px;overflow-wrap:anywhere}
.receiving-dialog #receiving-location-help{font-size:13px;font-weight:400;line-height:1.5;color:#536679}


/* A server-confirmed subscription/holding remains visible until scheduling. */
.scheduling-attention{display:flex;flex-wrap:wrap;align-items:center;gap:7px;width:100%;padding:9px;margin-top:9px;border:1px solid #d99c36;border-radius:12px;background:var(--surface,#fff);color:inherit;text-align:left;cursor:pointer}
.scheduling-attention:disabled{cursor:default;opacity:1;border-color:var(--line,#dce4ec)}
.unscheduled-ring{border:2px solid #cb8616;border-radius:999px;padding:4px 9px;font-weight:700;color:#956012}
.attention-technician{font-size:12px;font-weight:600}
.received-parts-attention{flex-basis:100%;font-size:12px;font-weight:700;color:#956012}
.needs-attention .unscheduled-ring,.needs-attention .received-parts-attention{animation:schedule-attention-pulse 1.8s ease-in-out infinite}
@keyframes schedule-attention-pulse{0%,100%{opacity:1}50%{opacity:.5}}
@media(prefers-reduced-motion:reduce){.needs-attention .unscheduled-ring,.needs-attention .received-parts-attention{animation:none}}
[data-theme="dark"] .unscheduled-ring,[data-theme="dark"] .received-parts-attention{color:#f4cb83}
