.shipment-wizard fieldset,#modal form:has([name=company]) fieldset{border:0;padding:0;margin:0;min-width:0}
.shipment-steps{display:flex;gap:8px;margin-bottom:24px}.shipment-steps button{flex:1 1 0;min-width:0;border:1px solid #d8e1db;border-radius:10px;padding:12px;color:#42564a;background:#f5f8f5;cursor:pointer;overflow-wrap:normal;word-break:normal;hyphens:auto}.shipment-steps [aria-current=step]{background:#174b3c;color:white}.shipment-wizard [hidden]{display:none!important}
.shipment-line.inv-line-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(90px,1fr) minmax(90px,1fr) auto;align-items:end;gap:12px}.shipment-line>*{min-width:0}.shipment-line strong,.shipment-line small{display:block}.shipment-line [data-shortage]{color:#9f471e}.shipment-date{display:flex;align-items:center;flex-wrap:wrap;gap:15px}.shipment-autocomplete{position:relative;min-width:0}.shipment-autocomplete [role=listbox]{position:absolute;top:100%;left:0;right:0;max-height:240px;overflow:auto;background:white;border:1px solid #cbd8d0;box-shadow:0 6px 18px #0002;z-index:10;padding:8px;border-radius:8px}.shipment-autocomplete [role=option]{display:block;width:100%;border:0;background:white;padding:12px;text-align:left;overflow-wrap:anywhere;color:#203d31}.shipment-autocomplete [role=option]:hover,.shipment-autocomplete [aria-selected=true]{background:#e4f0e8}.shipment-wizard .form-actions{flex-wrap:wrap}.shipment-wizard select{width:100%}.shipment-wizard [data-review]{overflow-wrap:anywhere}.shipment-wizard [aria-busy=true]{cursor:progress}
@media(max-width:600px){.shipment-line.inv-line-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.shipment-line>label:first-child{grid-column:1/-1}.shipment-steps{gap:4px}.shipment-steps button{padding:8px 4px;font-size:12px}.shipment-wizard .form-grid{grid-template-columns:1fr}.shipment-wizard .form-actions button{flex:1 1 auto}}
/* Stable compact wizard shell: scroll the body while keeping actions reachable. */
#modal:has(.shipment-wizard){width:min(820px,calc(100vw - 40px));max-width:820px;height:min(780px,90dvh);max-height:90dvh;overflow:hidden;display:flex;flex-direction:column}#modal:not([open]):has(.shipment-wizard){display:none}.shipment-wizard{flex:1;min-height:0;display:flex;flex-direction:column}.shipment-wizard>fieldset{display:flex;flex-direction:column;flex:1;min-height:0}.shipment-wizard [data-step]{overflow:auto;min-height:0;flex:1;padding:4px 4px 16px}.shipment-wizard .ship-form-footer{position:static;margin:0;padding:16px 0 0;border-top:1px solid #e1e7de;flex-shrink:0;gap:10px}.shipment-wizard .ship-form-footer>button:first-child{margin-right:auto}.shipment-wizard .ship-form-footer .secondary{background:white;color:#415949}
.shipment-steps{align-items:start;gap:0;margin:4px 0 24px;flex-shrink:0}.shipment-steps button{position:relative;border:0;background:transparent!important;color:#637668!important;border-radius:0;padding:0 8px;font-size:13px;line-height:1.4}.shipment-steps button b{display:flex;position:relative;margin:0 auto 8px;align-items:center;justify-content:center;border:1px solid #cdd9ce;background:white;border-radius:50%;width:30px;height:30px;z-index:1}.shipment-steps button:not(:last-child):after{content:'';position:absolute;height:1px;background:#cfdbd0;top:15px;left:calc(50% + 15px);width:calc(100% - 30px)}.shipment-steps [aria-current=step]{font-weight:750;color:#174b3c!important}.shipment-steps [aria-current=step] b,.shipment-steps [data-complete=true] b{background:#174b3c;color:white;border-color:#174b3c}
.shipment-line-head,.shipment-line.inv-line-row{display:grid;grid-template-columns:minmax(0,1fr) 115px 105px 55px;gap:12px;align-items:center}.shipment-line-head{font-size:12px;color:#667869;padding:0 10px 8px}.shipment-line.inv-line-row{padding:12px 10px;margin:0;border-bottom:1px solid #e3e9df;background:transparent}.shipment-line label{margin:0;display:block}.shipment-line .shipment-row-label{display:none}.shipment-line input,.shipment-line select{height:44px;margin:0}.shipment-line input{width:100%;text-align:center;padding:8px}.shipment-line>.btn{padding:8px 4px;font-size:12px;min-height:44px}.shipment-product-control{display:block;position:relative;min-width:0}.shipment-product-control select{color:transparent;width:100%;cursor:pointer}.shipment-product-control option{color:#243d2c}.shipment-product-control [data-product-label]{position:absolute;left:12px;right:30px;top:50%;transform:translateY(-50%);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#243d2c}.shipment-product-control:after{content:'▾';position:absolute;right:10px;top:12px;pointer-events:none}.shipment-available{text-align:center}.shipment-line [data-shortage],.shipment-line [data-quantity-error]{font-size:11px;color:#9c4c23}.shipment-line-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}.shipment-line-tools p{font-size:13px;text-align:right;margin:0}.shipment-line-tools .btn{background:white;flex-shrink:0}.shipment-wizard [data-stock-retry]{min-height:32px}.shipment-wizard .muted{font-size:12px;line-height:1.6}
@media(max-width:650px){#modal:has(.shipment-wizard){border:0;max-width:none;height:var(--input-height,100dvh);max-height:var(--input-height,100dvh)}.shipment-line-head{display:none}.shipment-line.inv-line-row{grid-template-columns:minmax(0,1fr) 100px 50px;gap:12px;padding:14px 10px;border:1px solid #dce5d9;border-radius:10px;margin-bottom:12px}.shipment-line>label:first-child{grid-column:1/-1}.shipment-line .shipment-row-label{display:block;font-size:12px;margin-bottom:6px;color:#607362}.shipment-line-tools{flex-wrap:wrap}.shipment-line-tools p{flex:1}.shipment-wizard .ship-form-footer{padding-top:12px;gap:6px}.shipment-wizard .ship-form-footer button{flex:0 1 auto;min-height:44px;padding:10px 12px;font-size:13px}.shipment-steps button{padding:0 4px;font-size:11px}.shipment-wizard [data-step]{padding:0 0 12px}.shipment-wizard .form-grid{grid-template-columns:1fr}.shipment-wizard .shipment-date input{max-width:100%}}
/* Searchable products open downward in the scrollable form body, never as native select popups. */
.shipment-product{min-width:0}.shipment-product-entry{display:flex;position:relative}.shipment-product-entry input{min-width:0;width:100%;text-align:left;padding-right:42px}.shipment-product-entry [data-product-clear]{position:absolute;right:0;top:0;min-width:44px;min-height:44px;font-size:20px}.shipment-product-options{max-height:min(260px,35dvh);overflow:auto;border:1px solid #cbd8d0;border-radius:8px;margin-top:6px;background:#fff;overscroll-behavior:contain}.shipment-product-options [role=option]{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:10px;text-align:left;background:white;color:#203d31;overflow-wrap:anywhere}.shipment-product-options [role=option] span{min-width:0}.shipment-product-options [role=option] small{flex-shrink:0}.shipment-product-options [aria-selected=true],.shipment-product-options [role=option]:hover{background:#e4f0e8}.shipment-product-options [aria-disabled=true]{opacity:.55}.shipment-product-type{display:block;padding:10px;background:#f2f6f1;font-size:12px}.shipment-product-options p{padding:12px}.shipment-autocomplete .shipment-contact-add{min-height:44px;color:#174b3c;font-weight:700;border-top:1px solid #dce5d9}.shipment-product-entry input:focus{outline:2px solid #56866c;outline-offset:1px}
#shipment-contact-dialog{width:min(600px,calc(100vw - 32px));max-height:90dvh;border:1px solid #dce5d9;border-radius:12px;padding:24px;overflow:auto}#shipment-contact-dialog fieldset{border:0;padding:0;margin:0;min-width:0}#shipment-contact-dialog .modal-head{margin:0 0 16px;padding:0 0 12px}#shipment-contact-dialog input{min-width:0;width:100%}#shipment-contact-dialog .form-actions{position:sticky;bottom:0;background:#fff;padding:12px 0;z-index:1}
@media(max-width:650px){.shipment-line>.shipment-product{grid-column:1/-1}#shipment-contact-dialog{position:fixed;inset:var(--input-top,0px) 0 auto;margin:0;width:100%;max-width:none;height:var(--input-height,100dvh);max-height:var(--input-height,100dvh);border:0;border-radius:0;padding:16px 16px calc(16px + env(safe-area-inset-bottom))}#shipment-contact-dialog .form-grid{grid-template-columns:1fr}#shipment-contact-dialog input,.shipment-product-entry input{font-size:16px}.shipment-product-options{max-height:min(220px,30dvh)}}

.contact-phone-error{grid-column:1/-1;color:#bc2939;font-size:13px;display:block;margin:6px 0 0}.contact-phone-error[hidden]{display:none}#shipment-contact-dialog input[aria-invalid=true],#modal input[aria-invalid=true]{border-color:#bc2939}

.form-grid.shipment-contact-fields{grid-template-columns:minmax(0,1fr)}
