.ml-workspace{max-width:1280px;margin:0 auto;padding:clamp(12px,2vw,28px);display:grid;gap:18px;color:var(--color-text,#20324b)}
.ml-workspace h1,.ml-workspace h2,.ml-workspace p{margin:0 0 10px}.ml-workspace h1{font-size:28px}.ml-workspace h2{font-size:19px}.ml-header,.ml-connection,.ml-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.ml-header{justify-content:space-between}.ml-panel{background:white;border:1px solid #dce3ec;border-radius:12px;padding:20px;min-width:0}.ml-muted,.ml-field small{color:#52647b;font-size:14px}.ml-field{display:flex;flex-direction:column;gap:6px;font-size:14px;min-width:0}.ml-field input,.ml-field select,.ml-field textarea{width:100%;min-height:42px;border:1px solid #aab8ca;border-radius:6px;padding:9px;font:inherit;box-sizing:border-box;color:inherit;background:white}.ml-field textarea{resize:vertical}.ml-actions .ml-field{flex:1;min-width:180px}.ml-button{border:1px solid #b8c6d8;background:white;color:#17446e;border-radius:7px;padding:10px 15px;min-height:42px;font:inherit;cursor:pointer;text-align:left}.ml-button--primary{background:var(--color-primary,#06346b);color:white;border-color:transparent}.ml-button:disabled{opacity:.55;cursor:not-allowed}.ml-workspace :focus-visible{outline:3px solid #3688cc;outline-offset:3px}.ml-form{display:grid;gap:18px;margin-top:16px}.ml-form-grid,.ml-attributes{border:0;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.ml-attributes{border-top:1px solid #e4eaf1;padding-top:12px}.ml-attributes legend{font-weight:600;padding:8px 0}.ml-product-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.ml-records{list-style:none;padding:0;margin:12px 0}.ml-records li{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #edf0f5}.ml-records .ml-button{border:0;padding-left:0;overflow-wrap:anywhere}.ml-badge{background:#edf2f8;border-radius:20px;padding:6px 10px;font-size:13px;white-space:normal}.ml-error,.ml-warning,.ml-success{padding:14px 16px;border-radius:8px;overflow-wrap:anywhere}.ml-error{background:#fff0f0;color:#8b2222}.ml-warning{background:#fff7dc;color:#674e09}.ml-success{background:#eaf7ef;color:#20613c}.ml-category-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.ml-category-tools .ml-field{flex:1;min-width:200px}.ml-confirm{border:1px solid #b8c6d8;border-radius:14px;padding:24px;width:min(560px,calc(100vw - 40px));max-height:85vh;overflow:auto;color:#20324b;box-sizing:border-box}.ml-confirm::backdrop{background:#12243899}.ml-ack{display:flex;gap:10px;align-items:start;margin:20px 0}.ml-ack input{width:20px;height:20px;flex-shrink:0}.ml-empty{padding:20px;border:1px dashed #b8c6d8;border-radius:8px}
@media(max-width:640px){.ml-panel{padding:14px}.ml-form-grid,.ml-attributes,.ml-product-list{grid-template-columns:1fr}.ml-records li{align-items:start;flex-direction:column;gap:0}.ml-actions .ml-field{flex-basis:100%}.ml-confirm .ml-actions .ml-button{width:100%}}

.ml-operations { margin-top:2rem; border-top:1px solid #d5dce6; padding-top:1.5rem; }
.ml-operations nav .ml-button[aria-current="true"] { background:#073568;color:white; }
.ml-operations .ml-panel { margin-block:12px; }
.ml-operations dialog { max-height:90vh; overflow-y:auto; }
.ml-operations .ml-field { margin-block:10px; }
.ml-operations .ml-field input[type="checkbox"] { width:auto; }

.ml-gallery-preview{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.ml-gallery-preview img{width:110px;height:110px;object-fit:contain;background:#fff;border:1px solid #d8e0ea;border-radius:8px}
.ml-product-list .ml-button { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.ml-product-stock { font-size: .85rem; color: #42526b; }
.ml-stock { padding: .75rem; background: #eef5fc; border-radius: .5rem; }

.ml-category-picker,.ml-pricing{grid-column:1/-1;min-width:0;border:1px solid #d5dfed;border-radius:10px;padding:16px}
.ml-category-results{display:flex;flex-direction:column;gap:6px;max-height:280px;overflow:auto;margin:10px 0}
.ml-category-results button{text-align:left;white-space:normal;overflow-wrap:anywhere;padding:10px;background:#f4f8ff;border:1px solid #c8d8ed;border-radius:6px;cursor:pointer}
.ml-profit-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:6px 16px;padding:12px;background:#f3f8ff;border-radius:8px;margin-top:12px}
.ml-profit-summary p{margin:4px 0;overflow-wrap:anywhere}
.ml-pricing legend{font-weight:700}

.ml-profit-summary .ml-take-home { grid-column: 1 / -1; font-size: 1.15rem; font-weight: 700; padding: 12px; background: #e8f4ed; border-radius: 8px; }
.ml-product-card{display:flex;align-items:stretch;gap:10px;padding:10px;border:1px solid #b8c6d8;border-radius:8px;min-width:0;background:#fff}
.ml-product-details{display:flex;flex:1;flex-direction:column;gap:8px;min-width:0}.ml-product-details>.ml-button:first-child{border:0;padding:0;flex:1;overflow-wrap:anywhere}.ml-product-details>.ml-button:last-child{font-size:13px;align-self:flex-start}
.ml-product-list .ml-product-photo{width:104px;min-width:104px;padding:4px;justify-content:center;align-items:center;cursor:zoom-in;text-align:center;font-size:13px;background:#f7f9fc}
.ml-product-photo img{width:94px;height:110px;object-fit:contain}.ml-gallery-preview .product-photo-thumbnail{font-size:0;display:block;padding:4px}.ml-gallery-preview .product-photo-thumbnail img{border:0}
@media(max-width:640px){.ml-workspace{padding:12px;max-width:100%;box-sizing:border-box}.ml-product-list .ml-product-photo{width:80px;min-width:80px}.ml-product-photo img{width:70px;height:90px}.ml-product-card{gap:8px;padding:8px}.ml-category-tools .ml-field{min-width:0;flex-basis:100%}}

/* Separate workspace views; never render the draft editor behind operations. */
.ml-workspace[hidden]{display:none!important}
.ml-operations{margin-top:0;border-top:0;padding-top:0}
.ml-operations>nav{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0;border-bottom:1px solid #d5dce6;margin-bottom:16px}
.ml-operations>nav .ml-button{flex:0 0 auto;min-height:42px}
.ml-operations>form.ml-actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap;background:#fff;padding:12px;border-radius:8px}
.ml-operations>form.ml-actions .ml-field{flex:1 1 260px;margin:0}
.ml-operations>form.ml-actions select{width:auto;max-width:100%;min-height:40px}
.ml-listing-count{color:#536579;font-size:.9rem}
.ml-listing-scroll{overflow-x:auto;max-width:100%;border:1px solid #dae0e8;border-radius:8px;background:white;margin-block:16px}
.ml-listing-table{border-collapse:collapse;width:100%;min-width:850px;text-align:left;font-size:.9rem}
.ml-listing-table th{background:#e9edf1;padding:14px 12px;font-weight:600;white-space:nowrap}
.ml-listing-table td{padding:18px 12px;border-top:1px solid #e2e7ee;vertical-align:top}
.ml-listing-table td:first-child{width:38%}.ml-listing-table p{margin:5px 0}
.ml-listing-identity{display:flex;gap:12px;align-items:flex-start;min-width:240px}
.ml-listing-identity input[type=checkbox]{width:17px;flex:0 0 17px;margin-top:8px}
.ml-listing-identity img,.ml-listing-no-photo{width:70px;height:82px;object-fit:contain;flex:0 0 70px;background:#f7f8fa;border:1px solid #e0e5eb;border-radius:6px}
.ml-listing-no-photo{display:grid;place-items:center;font-size:.75rem;color:#67788a}
.ml-listing-identity h3{font-size:.95rem;line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere}
.ml-listing-status{display:inline-block;padding:5px 8px;border-radius:5px;background:#edf3fa;white-space:nowrap}
.ml-listing-actions{display:flex;flex-direction:column;gap:8px;min-width:150px}.ml-listing-actions .ml-button{font-size:.8rem;padding:7px 10px}.ml-listing-actions a{font-size:.8rem}
@media(max-width:640px){.ml-operations>nav{flex-wrap:nowrap;overflow-x:auto}.ml-operations>nav .ml-button{font-size:.85rem}.ml-listing-table{min-width:780px}}

.ml-operations{gap:12px}.ml-operations>nav .ml-button{font-size:.9rem;padding:9px 12px}.ml-operations .ml-actions>[data-ml-notice]{margin:0}.ml-listing-scroll{min-width:0;margin-block:4px}

.ml-summary{display:grid;gap:18px;min-width:0}.ml-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ml-summary h3{margin:0 0 8px;font-size:1.15rem}.ml-summary-policy{border-left:4px solid #24649b;background:#edf5fc;border-radius:6px;padding:14px 16px;line-height:1.5}.ml-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.ml-summary-metric{display:flex;flex-direction:column;gap:8px;padding:18px;border-top:3px solid #24649b}.ml-summary-metric h4{font-size:.95rem;font-weight:600;line-height:1.4;margin:0;color:#405774}.ml-summary-metric .ml-summary-value{font-size:clamp(1.2rem,2.1vw,1.8rem);font-weight:700;line-height:1.25;overflow-wrap:anywhere;color:#103b65;margin:4px 0}.ml-summary-metric .ml-button{margin-top:auto;font-size:.85rem}.ml-summary-unavailable{font-size:.85rem;color:#8b3e16;overflow-wrap:anywhere}.ml-summary .ml-records li{flex-wrap:wrap}.ml-summary .ml-badge{background:#e5f0e9;color:#245539}
@media(max-width:1000px){.ml-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.ml-summary-grid{grid-template-columns:1fr}.ml-summary-heading .ml-badge{max-width:100%}.ml-summary .ml-records li{align-items:flex-start;flex-direction:column}}

.ml-invalid-section { border: 2px solid #b42318; padding: 12px; border-radius: 6px; }
.ml-invalid-section legend { color: #b42318; }
.ml-invalid-section [aria-invalid="true"] { border: 2px solid #b42318; }
.ml-invalid-section [data-sale-terms-error] { grid-column: 1 / -1; }

.ml-order-products { display:grid; gap:12px; margin:12px 0; }
.ml-order-product { display:flex; gap:14px; align-items:center; min-width:0; }
.ml-order-product img,.ml-order-no-photo { width:88px; height:88px; flex:0 0 88px; object-fit:contain; border:1px solid #dce3ed; border-radius:8px; background:white; }
.ml-order-no-photo { display:grid; place-items:center; text-align:center; font-size:.8rem; color:#526579; padding:4px; box-sizing:border-box; }
.ml-order-product>div { min-width:0; overflow-wrap:anywhere; }
.ml-order-product p { margin:6px 0; }

.ml-proceeds { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.ml-proceeds dd { margin: 0; text-align: right; }
.ml-proceeds dt:last-of-type, .ml-proceeds dd:last-child { font-weight: 700; }
