:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#263b52;background:#f7f9fc;font-size:15px}
*{box-sizing:border-box}body{margin:0}header{display:flex;gap:20px;align-items:center;padding:22px 5%;border-bottom:1px solid #e1e7ef;background:white}header strong{letter-spacing:.12em}header button{margin-left:auto}
main{max-width:1100px;margin:30px auto;padding:0 20px 40px}section{background:white;border:1px solid #e1e7ef;padding:28px;border-radius:12px}h1{color:#172c46;font-size:24px;margin:0 0 18px}p{line-height:1.6;color:#677b90}.heading{display:flex;justify-content:space-between;gap:16px;align-items:start}
label{display:block;font-weight:600;font-size:13px;margin:18px 0}input,textarea,select{display:block;width:100%;font:inherit;border:1px solid #dce3ec;padding:12px;border-radius:8px;margin-top:7px}textarea{min-height:90px}button{font:inherit;font-weight:600;cursor:pointer;background:#4658d1;color:white;border:1px solid #4658d1;padding:12px 18px;border-radius:8px}button.secondary{background:white;color:#2b3f58;border-color:#dce3ec}button:disabled{opacity:.55;cursor:default}input:focus-visible,button:focus-visible{outline:2px solid #9aa5f0;outline-offset:3px}
table{width:100%;border-collapse:separate;border-spacing:0;text-align:left}th{background:#f4f7fb;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#61738a;padding:14px}td{padding:14px;border-bottom:1px solid #edf1f6}td input{min-width:90px;margin:0}.panel{background:#f8fafc;border:1px solid #e7edf4;border-radius:10px;padding:16px;margin:18px 0;line-height:1.7;white-space:pre-line}.scroll{overflow:auto}#login,#changePassword{max-width:560px;margin:auto}#message{white-space:pre-line;color:#a52c32;font-weight:600}article{border:1px solid #e1e7ef;padding:18px;border-radius:10px;margin:15px 0}[hidden]{display:none!important}
@media(max-width:600px){section{padding:18px}main{padding:0 12px}header{gap:10px;font-size:12px}.heading{flex-wrap:wrap}th,td{padding:10px}}

.sku-requirement{font-size:12px;font-weight:500;line-height:1.6;color:#61738a;margin-top:8px}#outletField{max-width:600px}#profile,#delivery{overflow-wrap:anywhere}

.product-scroll{max-height:520px;max-height:min(58vh,520px);overflow:auto;overscroll-behavior:contain;border:1px solid #e1e7ef;border-radius:10px;scrollbar-gutter:stable}.product-scroll thead th{position:sticky;top:0;z-index:2;background:#f4f7fb}.product-scroll table{min-width:520px}.product-scroll:focus-visible{outline:2px solid #9aa5f0;outline-offset:3px}

.portal-actions,.product-pagination{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.product-pagination{margin:14px 0;color:#677b90;font-size:13px}.product-pagination span{margin-right:auto}.product-pagination button{padding:8px 12px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}.detail-card{background:#f8fafc;border:1px solid #dfe6f0;border-radius:12px;padding:20px;margin:14px 0;overflow-wrap:anywhere}.detail-grid .detail-card{margin:0}.detail-card h3{font-size:16px;margin:0 0 16px;color:#1d3049}.detail-field{margin:12px 0}.field-label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:#788ba4;margin-bottom:5px}.field-value{white-space:pre-line;line-height:1.6}.order-detail{border:0;padding:0;margin:18px 0}.order-detail h2{font-size:20px;margin:0}.order-reference{font-size:12px;overflow-wrap:anywhere;margin-top:8px}.status-badge{display:inline-block;white-space:nowrap;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700;background:#eef2f7;color:#5e7088}.status-PENDING_REVIEW{background:#fff5dc;color:#946200}.status-APPROVED{background:#e8f5ee;color:#24724e}.status-REJECTED{background:#fff0ef;color:#b42318}.order-items-scroll{overflow:auto;border:1px solid #dfe6f0;border-radius:12px;margin:18px 0}.order-items-scroll table{min-width:620px}.order-items-scroll td:nth-child(2){font-weight:650}.order-items-scroll td:last-child{font-weight:750}.order-list-entry{border:1px solid #dfe6f0;border-radius:12px;margin:14px 0;background:#fff}.order-list-entry summary{cursor:pointer;display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:18px;background:#f8fafc;border-radius:12px}.order-list-entry summary strong{margin-right:auto}.order-list-entry summary>span:not(.status-badge){font-size:12px;color:#677b90}.order-list-entry article{padding:20px;margin:0}.danger-text{color:#b42318!important}.order-error{white-space:pre-line;line-height:1.7;padding:16px;background:#fff1f0;border:1px solid #f1b4ae;border-radius:10px;color:#b42318;margin:16px 0}.requirement-unmet{color:#b42318}input[aria-invalid="true"]{border-color:#b42318}#moq{white-space:normal}#moq h3{font-size:15px;margin-top:0}#moq p{margin:8px 0}#profile .detail-card,#delivery .detail-card{margin:16px 0}button[aria-busy="true"]{opacity:.7}@media(max-width:650px){.detail-grid{grid-template-columns:1fr}.detail-card{padding:16px}.order-list-entry article{padding:14px}.order-detail .heading{gap:8px}}

/* Responsive account and delivery layout shared by order entry and details. */
.partner-details-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start;margin:18px 0}.partner-details-grid>*,.detail-grid>*,.delivery-column,.detail-card,.detail-fields,.detail-field{min-width:0}.partner-details-grid #profile .detail-card,.partner-details-grid #delivery .detail-card{margin:0}.delivery-column{display:flex;flex-direction:column;gap:14px}.delivery-column #outletField{margin:0;max-width:none}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.detail-field{margin:0}.full-field{grid-column:1/-1}.field-value{overflow-wrap:anywhere}.detail-field.full-field:first-child .field-value{font-weight:650}.detail-card h3{margin-bottom:16px}.order-list-entry summary>*{min-width:0;overflow-wrap:anywhere}.order-list-entry summary strong{overflow-wrap:anywhere}.heading>div{min-width:0}.product-scroll,.order-items-scroll{max-width:100%;min-width:0}section,main{min-width:0}.order-reference{word-break:break-word}button,input,select,textarea{max-width:100%}
@media(max-width:767px){.partner-details-grid{grid-template-columns:1fr;gap:14px}.detail-grid{grid-template-columns:1fr}.partner-details-grid .detail-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-actions{width:100%}.portal-actions button{flex:1}header{flex-wrap:wrap;gap:10px;padding:16px}header button{padding:10px 12px}main{margin-top:16px}.product-pagination{gap:8px}.product-pagination span{flex-basis:100%}.order-list-entry summary{padding:14px;gap:10px}.detail-card{padding:16px}.product-scroll{max-height:52vh}button{min-height:44px}.order-detail .heading{flex-wrap:wrap}.order-list-entry summary>span:not(.status-badge){flex-basis:100%;order:3}}
@media(max-width:379px){.detail-fields,.partner-details-grid .detail-fields{grid-template-columns:1fr}header span{max-width:140px}.heading h1{font-size:22px}}

/* Equal-height card pairs; the location selector sits above the pair. */
.delivery-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.delivery-selector #outletField{grid-column:2;max-width:none;margin:0}.delivery-selector:has(#outletField[hidden]){display:none}.partner-details-grid{align-items:stretch}.partner-details-grid>#profile,.delivery-column>#delivery{display:flex;flex:1}.partner-details-grid #profile>.detail-card,.partner-details-grid #delivery>.detail-card{flex:1;width:100%;margin:0}.delivery-column{align-self:stretch}.detail-grid{align-items:stretch}.detail-grid>.detail-card{height:100%}.cart-panel{margin:24px 0;padding:18px;background:#fbfcfe;border-color:#e0e6ef}.cart-panel h2{font-size:19px;margin:0 0 8px}.cart-scroll{max-height:400px;overflow:auto}.cart-scroll table{min-width:610px}.cart-scroll thead th{position:sticky;top:0;z-index:1}.cart-scroll input{width:110px;min-width:90px}.product-scroll table{min-width:640px}.product-scroll td:last-child{width:145px}.product-scroll td:last-child button{white-space:nowrap;padding:10px 14px}.product-scroll td:nth-child(3) input{width:100px;min-width:80px}.item-error{color:#b42318;font-size:12px;line-height:1.5;margin:7px 0 0;white-space:normal}.item-error:empty{display:none}.cart-scroll td:last-child button{white-space:nowrap}#catalogFeedback{font-weight:600;line-height:1.6}
@media(max-width:767px){.delivery-selector{grid-template-columns:1fr}.delivery-selector #outletField{grid-column:1}.detail-grid>.detail-card{height:auto}.cart-panel{padding:14px}.cart-scroll{max-height:50vh}}

@media(max-width:600px){
 #orderForm .product-scroll table,#orderForm .cart-scroll table{min-width:0;display:block;width:100%}
 #orderForm .product-scroll thead,#orderForm .cart-scroll thead{display:none}
 #products,#cartProducts{display:block;width:100%}
 #products tr,#cartProducts tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 12px;padding:14px;border-bottom:1px solid #e1e7ef}
 #products td,#cartProducts td{padding:0;border:0;min-width:0;width:auto!important;overflow-wrap:anywhere}
 #products td:first-child,#cartProducts td:first-child{grid-column:1/-1;font-size:12px;color:#677b90;font-weight:700}
 #products td:nth-child(2),#cartProducts td:nth-child(2){grid-column:1/-1}
 #products td:nth-child(3),#cartProducts td:nth-child(3){grid-column:1}
 #products td:nth-child(3)::before,#cartProducts td:nth-child(3)::before{content:'Quantity';display:block;font-size:11px;color:#677b90;font-weight:650;margin-bottom:6px}
 #products td:last-child,#cartProducts td:last-child{grid-column:2;align-self:end}
 #products td:nth-child(3) input,#cartProducts td:nth-child(3) input{width:100%;min-width:0;margin:0}
 #products td:last-child button,#cartProducts td:last-child button{width:100%;padding:10px 8px}
 #products td[colspan],#cartProducts td[colspan]{grid-column:1/-1}
 .cart-scroll{max-height:55vh}
}

/* Account spans the full height of the location selector and delivery card. */
.partner-details-grid{align-items:stretch}.delivery-column{display:flex;flex-direction:column;gap:14px}.delivery-column #outletField{margin:0;max-width:none}.delivery-column #delivery{flex:1;display:flex}.partner-details-grid #profile{display:flex}.partner-details-grid #profile>.detail-card,.delivery-column #delivery>.detail-card{flex:1;width:100%;margin:0}@media(max-width:767px){.partner-details-grid{align-items:start}.partner-details-grid #profile>.detail-card,.delivery-column #delivery>.detail-card{height:auto}}

.portal-actions{gap:12px}.portal-footer-actions{margin-top:22px;align-items:center}.portal-footer-actions button{margin:0}.order-detail>.secondary{margin-top:16px}@media(max-width:600px){.portal-footer-actions{flex-direction:column;align-items:stretch}.portal-footer-actions button{width:100%;flex:auto}}

/* Match Inventory action colors and feedback without moving controls. */
button{background:#5268E8;border-color:#5268E8;border-radius:9px;min-height:44px;line-height:1.4;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease}
button.secondary{background:#fff;border-color:#e2e7f0;color:#17233d}
button:focus-visible{outline:none;border-color:#2f55d4;box-shadow:0 0 0 3px rgba(47,85,212,.14)}
@media(hover:hover) and (pointer:fine){
 button:not(.secondary):not(:disabled):hover{background:#8191F4;border-color:#8191F4;color:#fff;box-shadow:0 3px 8px rgba(47,85,212,.13)}
 button.secondary:not(:disabled):hover{background:#f8faff;border-color:#A8C9DF;box-shadow:none}
}
button:not(.secondary):not(:disabled):active{background:#5268E8;border-color:#5268E8;box-shadow:none}
button.secondary:not(:disabled):active{background:#eef3fa;border-color:#A8C9DF;box-shadow:none}
button:disabled{opacity:.55;cursor:default;box-shadow:none}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Accessible local password visibility controls. */
.password-field{display:block;position:relative;margin-top:7px}
.password-field input{margin-top:0;padding-right:52px}
button.password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border-color:transparent;background:transparent;color:#6c778b;border-radius:7px}
.password-toggle svg{pointer-events:none;flex:none}
button.password-toggle.secondary:not(:disabled):hover,button.password-toggle.secondary:not(:disabled):active{background:transparent;border-color:transparent;box-shadow:none;color:#17233d}
button.password-toggle.secondary:focus-visible{background:transparent;border-color:transparent;box-shadow:none;outline:2px solid #2f55d4;outline-offset:-7px}

/* Reuse the Inventory brand asset without duplicating it. */
.portal-brand-logo{display:block;width:190px;max-width:40vw;height:auto;object-fit:contain;flex-shrink:0}
@media(max-width:600px){.portal-brand-logo{width:150px;max-width:40vw}}
