:root{font-family:Inter,"Segoe UI",sans-serif;color:#193237;background:#f3f6f5;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #d8e1df;background:white;border-radius:8px;padding:10px 14px;color:#294846;font-weight:600}button:hover{background:#edf6f2}button:disabled{opacity:.45;cursor:default}input,select{border:1px solid #d5dedb;border-radius:8px;background:white;padding:11px 12px;max-width:100%;color:#193237}input[type=checkbox]{accent-color:#13775f}button.primary{background:#126e58;border-color:#126e58;color:white}button.primary:hover{background:#0d5b49}h1{font-size:32px;letter-spacing:-1px;margin:4px 0}h2{font-size:18px;margin:0 0 8px}h3{font-size:16px}p{line-height:1.55;color:#657976}small{color:#71837f}label{display:grid;gap:8px;font-size:13px;font-weight:600}form{display:grid;gap:20px}form button{justify-self:start}.mark{display:inline-grid;place-items:center;background:#b9e6d4;color:#114e40;width:38px;height:38px;border-radius:11px;font-size:23px;font-weight:800}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#64817a;margin:0 0 10px}.login{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at 20% 30%,#d9ebe2,transparent 55%)}.login-card{width:min(440px,95vw);padding:40px;background:white;border:1px solid #dce6e0;border-radius:18px;box-shadow:0 12px 50px #13382e0a}.login-card .eyebrow{margin-top:22px}.login-card form{margin:26px 0}.login-card button{width:100%}#login-error{color:#a83b33}aside{position:fixed;inset:0 auto 0 0;width:228px;background:#153c34;color:#e2f1ea;padding:32px 18px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:0 12px;letter-spacing:1px;font-weight:750}.brand small{display:block;letter-spacing:2px;font-size:9px;color:#9ebfb3;margin-top:5px}.nav-label{font-size:9px;letter-spacing:1.5px;color:#8cafa2;margin:48px 13px 16px}nav{display:grid;gap:5px}nav button{background:transparent;border:0;color:#bdd2c9;text-align:left;padding:13px 14px;font-size:13px}nav button.active,nav button:hover{background:#2c5548;color:white}nav button span{float:right}.aside-bottom{margin-top:auto;font-size:12px;padding:12px;color:#c1d5cc}.aside-bottom p{font-size:11px;color:#97b5a8;word-break:break-word}.aside-bottom button{background:transparent;color:#c1d5cc;border-color:#466556;font-size:11px}.dot{display:inline-block;background:#b2dc95;width:7px;height:7px;border-radius:50%;margin-right:6px}main{margin-left:228px;padding:38px 36px;max-width:1850px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px}.version{font-size:9px;letter-spacing:1px;padding:8px 12px;border:1px solid #cad8d1;border-radius:20px;color:#5d776d}.notice{display:flex;align-items:center;gap:18px;font-size:10px;font-weight:800;letter-spacing:.6px;border:1px solid #e7d7ac;background:#fcf7e9;padding:13px 18px;border-radius:9px;color:#866a2d;margin-bottom:26px}.notice span{font-size:12px;font-weight:400;letter-spacing:0;color:#786b4b}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:26px}.metrics article{padding:21px 23px;border:1px solid #e1e8e4;background:white;border-radius:11px}.metrics span{font-size:12px;color:#61766e}.metrics strong{font-size:33px;display:block;margin:10px 0;font-weight:600}.metrics small{font-size:10px}.panel{background:white;border:1px solid #e0e7e3;border-radius:12px;overflow:hidden}.padded{padding:28px}.toolbar{display:flex;justify-content:space-between;align-items:center;padding:22px 24px}.toolbar p{font-size:12px;margin:0}.filters{display:flex;gap:10px;padding:0 24px 18px}.filters input{flex:1;min-width:100px}.filters select,.filters button,.filters input{font-size:12px}.batch{border-top:1px solid #edf1ee;border-bottom:1px solid #edf1ee;padding:10px 24px;display:flex;align-items:center;gap:10px}.batch span{font-size:11px;color:#657976;margin-right:auto}.batch button{font-size:11px;padding:7px 10px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;background:#f9fbfa;color:#74877f;font-weight:600;font-size:10px;padding:14px 16px;white-space:nowrap}td{border-top:1px solid #edf1ee;padding:16px;vertical-align:top}td small{display:block;margin-top:6px;font-size:10px;max-width:240px;line-height:1.4}td a{color:#147058;text-decoration:none;font-weight:650}.badge{display:inline-block;white-space:nowrap;border-radius:5px;padding:5px 7px;font-size:10px;background:#eef2f0;color:#5e746c}.badge.warn{background:#fff2da;color:#946519}.badge.green{background:#e2f3ea;color:#227050}.pagination{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;border-top:1px solid #edf1ee;font-size:11px;color:#7b8c84}.pagination button{font-size:11px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;margin:12px 0}.hint-box{padding:18px 25px;margin-top:22px;border-left:3px solid #8cb8a7}.hint-box p{font-size:13px}.padded>p{font-size:13px}.padded table{margin-top:24px}pre{white-space:pre-wrap;font-size:12px;line-height:1.6}#flash{padding:14px 18px;border-radius:8px;background:#e2f2e9;color:#285e48;margin-bottom:20px;font-size:13px}#flash.error{background:#fdeae7;color:#953f35}[hidden]{display:none!important}:focus-visible{outline:3px solid #8fd2bb;outline-offset:2px}@media(max-width:1100px){aside{width:190px}main{margin-left:190px;padding:24px 18px}.metrics{gap:8px}.metrics article{padding:15px}.filters{flex-wrap:wrap}.notice{display:block}.notice span{display:block;margin-top:7px}}@media(max-width:760px){aside{position:static;width:100%;padding:15px}nav{display:flex;overflow:auto;margin-top:14px}nav button{white-space:nowrap}.nav-label,.aside-bottom{display:none}main{margin:0;padding:18px}.metrics{grid-template-columns:repeat(2,1fr)}.version{display:none}.form-grid{grid-template-columns:1fr}.toolbar{gap:12px}.batch{flex-wrap:wrap}h1{font-size:26px}}

nav{max-height:calc(100vh - 290px);overflow-y:auto}nav .nav-label{display:block;margin:16px 12px 6px}dialog{border:1px solid #ccd8d8;border-radius:16px;padding:28px;width:min(1050px,90vw);max-height:85vh;overflow:auto}dialog::backdrop{background:#1238}.link-button{border:0;padding:0;background:transparent;color:#164c50;font-weight:700}pre{white-space:pre-wrap;overflow-wrap:anywhere}

.metrics article[role=button]{cursor:pointer}.metrics article[role=button]:focus{outline:3px solid #126e58}.filters{flex-wrap:wrap;align-items:end}.filters select[multiple]{min-width:140px;height:95px}.filters>input{min-width:220px}.filters label{min-width:130px}.sort-button{font-size:inherit;border:0;background:transparent;padding:0;text-align:left}.pdf-link{font-weight:700;white-space:nowrap}#routing-rows input{min-width:95px;max-width:180px}#routing-form .table-wrap{overflow:auto}

.compact-filter{position:relative;min-width:155px;font-weight:400}.compact-filter summary{cursor:pointer;list-style:none;border:1px solid #cfddda;border-radius:8px;padding:12px 16px;background:white;font-size:14px;white-space:nowrap}.compact-filter summary:after{content:' ▾';float:right;margin-left:10px}.filter-options{position:absolute;z-index:30;top:100%;left:0;width:270px;background:white;border:1px solid #cfddda;padding:12px;box-shadow:0 8px 25px #1234;border-radius:8px}.filter-options>div{max-height:250px;overflow:auto}.filter-options label{display:flex;align-items:center;gap:10px;padding:9px;font-size:14px}.filter-options label[hidden]{display:none}.filter-options input[type=checkbox]{width:auto;min-width:16px}.filters select[hidden]{display:none!important}.filters{gap:10px!important;align-items:end!important}.filters>label{font-size:12px}.filters input{min-height:42px}.filters .compact-filter{height:44px}#routing-rows input{min-width:70px;width:100%}#routing-rows select{min-width:165px}

#erplain-progress{margin-bottom:24px}#erplain-progress .metrics{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}#erplain-progress progress{width:100%;height:14px;accent-color:#14745c}#erplain-progress strong{font-size:26px}#erplain-progress small{line-height:1.7}

/* Readable, collapsible navigation and denser workspace. */
aside{background:#142c3b;color:#f3f7fb}nav{max-height:calc(100vh - 230px);scrollbar-width:thin}nav button{color:#e0e9f0;font-size:14px;padding:10px 14px;line-height:1.35}nav button.active{background:#23546d;color:#fff;border-left:4px solid #72dfc2}nav button:hover{background:#1d4358;color:#fff}.nav-group{margin-bottom:10px;border-bottom:1px solid #39505f;padding-bottom:8px}.nav-group summary{font-size:15px;font-weight:700;padding:12px 10px;cursor:pointer;color:#fff}.nav-group>div{padding-left:8px}.nav-group summary:focus-visible{outline:3px solid #72dfc2}.aside-bottom{color:#d3e0e8}.table-wrap th{background:#edf2f6;color:#1b3546;font-size:12px}td{font-size:13px}td small{color:#52646b}.badge{color:#344d57}.batch{flex-wrap:wrap;gap:8px}#test-capacity{padding:12px 20px;background:#edf6f0;color:#244737;font-size:14px;font-weight:600}#test-capacity.capacity-warning{background:#fff0d2;color:#784800}.table-wrap tr:hover td{background:#f2f8fb}nav .nav-label{display:none}
.nav-group>div{display:flex;flex-direction:column;gap:4px}.nav-group>div>button{width:100%}
/* All operational columns fit on desktop; long values wrap and remain accessible. */
@media(min-width:1150px){main{padding:24px 18px;max-width:none}#view-orders table{table-layout:fixed;min-width:0}#view-orders th,#view-orders td{padding:10px 5px;font-size:12px;white-space:normal;overflow-wrap:anywhere}#view-orders td small{font-size:10px}#view-orders .link-button,#view-orders .sort-button{font-size:inherit}#view-orders .pdf-link,#view-orders .badge{white-space:normal}#view-orders th:nth-child(1){width:3%}#view-orders th:nth-child(2){width:12%}#view-orders th:nth-child(3){width:8%}#view-orders th:nth-child(4){width:7%}#view-orders th:nth-child(5){width:9%}#view-orders th:nth-child(6){width:14%}#view-orders th:nth-child(7){width:5%}#view-orders th:nth-child(8){width:13%}#view-orders th:nth-child(9){width:9%}#view-orders th:nth-child(10){width:12%}#view-orders th:nth-child(11){width:8%}}
.delivery-row td{background:#eef6fa}.delivery-row td:nth-child(2){border-left:3px solid #37728b;padding-left:9px!important}.has-deliveries td{background:#f8fafb}.unified-temu{margin-top:20px}.unified-temu>summary{cursor:pointer;font-weight:700}.unified-temu>.panel{margin-top:18px;border:0}.unified-temu .table-wrap{overflow:auto}
.delivery-row td:nth-child(10)>a{display:block;margin-top:4px}#view-orders th .sort-button{font-size:11px}
.filters .filter-options input[type=checkbox]{flex:0 0 18px;width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;max-height:18px;padding:0;margin:0;cursor:pointer}.filter-options label{justify-content:flex-start;gap:10px;padding:7px 2px;font-size:13px;font-weight:500;min-height:32px}.filters .filter-options input[type=search]{display:block;width:100%;min-width:0;max-width:100%;margin-bottom:8px}.filter-options>div{max-height:240px}
/* Quantity is already shown beside each SKU. Preserve DOM indexes used by sorting and delivery rows. */ #view-orders table .total-quantity-column{display:none}@media(min-width:1000px){#view-orders table th:nth-child(8){width:18%}}
.filter-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.filter-actions button{padding:7px 8px;font-size:12px}
/* Only the current page has an active navigation background. */
nav button:not([aria-current="page"]){background:transparent;border-left:4px solid transparent;color:#e0e9f0}
nav button[aria-current="page"]{background:#23546d;border-left:4px solid #72dfc2;color:white}
nav button:not([aria-current="page"]):hover{background:#1d4358}

.gofo-zone-refusal{color:#97520a!important;font-weight:600;cursor:help}

@media(min-width:1000px){#view-orders table th:nth-child(1){width:3%}#view-orders table th:nth-child(2){width:11%}#view-orders table th:nth-child(3){width:10%}#view-orders table th:nth-child(4){width:7%}#view-orders table th:nth-child(5){width:7%}#view-orders table th:nth-child(6){width:8%}#view-orders table th:nth-child(7){width:13%}#view-orders table th:nth-child(8){width:0%}#view-orders table th:nth-child(9){width:13%}#view-orders table th:nth-child(10){width:8%}#view-orders table th:nth-child(11){width:10%}#view-orders table th:nth-child(12){width:10%}}

#search{font:inherit;resize:vertical;min-height:44px;width:100%;padding:10px 12px;border:1px solid #d5dedb;border-radius:8px;color:#193237;background:white}

/* Stable widths follow column identity, regardless of inserted columns. */
@media(min-width:1000px){#view-orders table th{width:auto!important}#view-orders table th[data-column="select"]{width:3%!important}#view-orders table th[data-column="reference"]{width:10%!important}#view-orders table th[data-column="manager"]{width:9%!important}#view-orders table th[data-column="date"]{width:7%!important}#view-orders table th[data-column="bc"]{width:7%!important}#view-orders table th[data-column="bl"]{width:10%!important}#view-orders table th[data-column="recipient"]{width:13%!important}#view-orders table th[data-column="quantity"]{width:0%!important}#view-orders table th[data-column="sku"]{width:16%!important}#view-orders table th[data-column="carrier"]{width:8%!important}#view-orders table th[data-column="label"]{width:9%!important}#view-orders table th[data-column="tracking"]{width:8%!important}#view-orders table th[data-column="sku"]{white-space:normal;overflow-wrap:normal;word-break:normal}}

/* Commentaires Aziz 20h05 */
nav button.active{background:#24546b!important;color:white!important;border-left:5px solid #75d4c2!important}nav button:not(.active){background:transparent!important;border-left:5px solid transparent!important}
#transport-statistics{min-width:220px}#transport-statistics p{font-size:17px;line-height:1.5;margin:10px 0}.pdf-link{display:inline-flex;gap:5px;border:1px solid #bedcd4;border-radius:7px;background:#edf7f3;padding:5px 7px;margin:2px 0;white-space:normal}.erp-status{display:inline-block;padding:3px 7px;border-radius:12px;background:#777;color:#fff;font-size:11px}.erp-status[data-status=active],.erp-status[data-status=delivered],.erp-status[data-status=completed]{background:#13a58c}.erp-status[data-status=cancelled]{background:#d14e4e}.erp-status[data-status=unpublished]{background:#b69a56}#clear-filters{background:#156c61;color:white;border-color:#156c61}#order-detail section{border-top:1px solid #d5e2e0;margin-top:20px;padding-top:15px}#order-detail section button{margin:4px}.filter-options footer{position:sticky;bottom:0;background:white}

.metrics>article[hidden]{display:none!important}.metrics>#transport-statistics{margin:0;padding:18px;min-width:0}.metrics>#transport-statistics strong{font-size:14px}.metrics>#transport-statistics small{font-size:11px}

.compact-problem{display:block;width:100%;max-width:190px;min-width:0;text-align:left;margin:3px 0;padding:6px!important;line-height:1.3}.compact-problem span{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.compact-problem span:first-child{font-weight:600}

/* Commentaires Aziz 22h28 */
.erp-reference{display:block;white-space:nowrap;font-size:11px;letter-spacing:-.15px}.erp-status{display:table!important;margin-top:5px;font-size:10px!important;white-space:nowrap}.order-country{display:flex!important;align-items:center;gap:5px;margin-top:4px!important}.order-country img{flex:none;object-fit:contain}.link-button[data-detail],button[data-edit-current-tracking]{background:#d4e9e3;border:1px solid #accfc4;border-radius:6px;padding:4px 6px}.compact-problem{background:#ffe4ab!important;color:#704100!important;border:1px solid #d8ae64!important}.compact-problem:hover,.link-button[data-detail]:hover{filter:brightness(.94)}
.erp-reference{overflow:hidden;text-overflow:ellipsis}

.resolution-dialog{width:min(760px,94vw);max-height:90vh;overflow:auto;border:1px solid #b7cbc4;border-radius:12px;padding:24px}.resolution-dialog header{gap:16px;margin-bottom:8px}.resolution-dialog h2{font-size:20px;overflow-wrap:anywhere}.resolution-dialog form{gap:14px}.resolution-dialog label{display:flex;flex-direction:column;gap:6px}.resolution-dialog input,.resolution-dialog select{width:100%;min-width:0}.resolution-dialog button{white-space:normal}.resolution-dialog [data-fields]>button,.resolution-dialog [data-result]>button{margin:8px 8px 0 0}.resolution-quantities{display:grid;grid-template-columns:1fr 1fr;gap:16px}.resolution-choices{display:grid;gap:10px}.resolution-progress{position:sticky;bottom:-24px;background:#f1f8f5;padding:10px;margin:16px -24px -24px;border-top:1px solid #dbe7e1}.resolution-progress p{margin:0}.resolution-reference{font-size:13px}.resolution-diagnostic{overflow-wrap:anywhere;max-height:140px;overflow:auto}.resolution-dialog table{font-size:12px}.resolution-dialog th,.resolution-dialog td{padding:8px}.resolution-dialog::backdrop{background:#142b3577}@media(max-width:600px){.resolution-quantities{grid-template-columns:1fr}}

.resolution-dialog header{position:sticky;top:-24px;background:white;z-index:2;padding:12px 0;border-bottom:1px solid #dbe7e1}.resolution-dialog form{margin:12px 0;gap:10px}.resolution-dialog p{margin:10px 0}.resolution-dialog .resolution-progress p{margin:0}.resolution-mapping{grid-template-columns:1fr 1fr;column-gap:16px!important}.resolution-mapping>label:first-child,.resolution-mapping>label:last-of-type,.resolution-mapping>button,.resolution-mapping>[data-product-result],.resolution-mapping>.resolution-quantities,.resolution-mapping>p{grid-column:1/-1}.resolution-mapping datalist{display:none}.resolution-dialog header h2{margin:0}.resolution-dialog [data-product-result] p{font-size:13px}.resolution-dialog [data-product-result] select{font-size:13px}@media(max-width:600px){.resolution-mapping{grid-template-columns:1fr}}
.resolution-completion{margin:14px 0;padding:16px;border:2px solid #147b63;border-radius:10px;background:#eaf7f1;color:#163f35}.resolution-completion.is-warning{border-color:#b87812;background:#fff5df;color:#694307}.resolution-completion h3{margin:0 0 8px;font-size:20px}.resolution-completion button{margin-top:8px;font-weight:700}.resolution-completion:focus{outline:3px solid #86bfb0;outline-offset:3px}
/* Commentaires Aziz 04 October 10h30 */
body{font-size:13px}main input,main select,main button,dialog input,dialog select,dialog button{font-size:13px}#view-orders td,#view-orders th,#view-orders .link-button,#view-orders .sort-button{font-size:12px!important}#view-orders td small{font-size:11px!important}#view-orders .erp-reference{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:normal}#view-orders th,#view-orders td{word-break:normal;overflow-wrap:break-word}#view-orders .link-button[data-detail]{user-select:text;-webkit-user-select:text}#view-orders .compact-filter{height:auto!important;min-width:0}.compact-filter summary{font-size:13px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4}#view-orders .ordered-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;align-items:start!important}#view-orders .order-search{grid-column:1/-1;width:100%}#view-orders .ordered-filters>label{min-width:0}#view-orders .ordered-filters input{min-width:0;width:100%}.order-filter-actions{display:flex;gap:8px;flex-wrap:wrap;padding:0 24px 18px}.order-filter-actions button{white-space:normal;font-size:12px}.navigation-hidden aside{display:none}.navigation-hidden main{margin-left:0!important}#toggle-navigation{font-size:12px;white-space:nowrap}main header{gap:12px}#orders-page-size{width:auto;display:inline-block;margin-left:8px}#mapping-feedback{padding:10px;background:#edf6f2;white-space:normal}#mapping-feedback:empty{display:none}.mapping-download{display:inline-flex;align-items:center;padding:10px 14px;margin:8px 8px 8px 0;border:1px solid #bed4cc;border-radius:7px;background:#edf6f2;color:#155c4e;text-decoration:none;font-size:13px;font-weight:600}.mapping-download:hover{background:#dcefe7}@media(max-width:650px){#view-orders .ordered-filters{grid-template-columns:1fr}.order-filter-actions{padding:0 12px 12px}}
#view-orders table{min-width:1100px!important}#view-orders td:nth-child(4){white-space:nowrap!important}#view-orders .erp-status{white-space:nowrap!important;overflow:visible;max-width:none}
/* Barre de navigation compacte, toujours accessible */
#app{padding-top:40px}.workspace-titlebar{position:fixed;inset:0 0 auto 0;height:40px;display:flex;align-items:center;padding:0 12px;background:#f4f6f6;border-bottom:1px solid #e0e7e3;z-index:50}#toggle-navigation{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:4px;border:0;border-radius:6px;background:transparent;color:#53646b;cursor:pointer}#toggle-navigation:hover{background:#dfe7e5;color:#173b45}#toggle-navigation svg{display:block;flex:none}#workspace-navigation{top:40px;height:calc(100vh - 40px)}@media(max-width:760px){#workspace-navigation{height:auto;top:auto}}
/* Fit every order column within the available width, including with the sidebar open. */
#view-orders table{width:100%;min-width:0!important;table-layout:fixed}#view-orders .table-wrap{max-width:100%}#view-orders th,#view-orders td{min-width:0;padding:10px 4px!important;overflow-wrap:anywhere;white-space:normal!important}#view-orders td:nth-child(4),#view-orders .erp-status{white-space:normal!important}#view-orders td button,#view-orders td a,#view-orders td small,#view-orders .erp-reference{max-width:100%;min-width:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}#view-orders td button{padding:4px!important}#view-orders table th{width:auto!important}#view-orders table th[data-column="select"]{width:3%!important}#view-orders table th[data-column="reference"]{width:10%!important}#view-orders table th[data-column="manager"]{width:9%!important}#view-orders table th[data-column="date"]{width:7%!important}#view-orders table th[data-column="bc"]{width:7%!important}#view-orders table th[data-column="bl"]{width:10%!important}#view-orders table th[data-column="recipient"]{width:13%!important}#view-orders table th[data-column="quantity"]{width:0!important}#view-orders table th[data-column="sku"]{width:16%!important}#view-orders table th[data-column="carrier"]{width:8%!important}#view-orders table th[data-column="label"]{width:9%!important}#view-orders table th[data-column="tracking"]{width:8%!important}

/* Marges commandes : styles externes compatibles CSP */
.margin-negative{color:#a62318;background:#fff0ed;border:1px solid #f2c6be}.margin-positive{color:#116544;background:#eaf7ef;border:1px solid #b5deca}.margin-zero{color:#405562;background:#edf2f4}.margin-warning{color:#855600;background:#fff8e7}#view-orders button.margin-chip{display:block;margin-top:4px;padding:4px 6px;font-size:10px!important;font-weight:400!important;line-height:1.35;white-space:pre;text-align:left;min-height:0;width:max-content;max-width:none;overflow-wrap:normal;word-break:normal}#view-orders button.margin-positive{color:#116544;background:#eaf7ef}#view-orders button.margin-negative{color:#a62318;background:#fff0ed}.margin-card{padding:16px;border:1px solid #d6e0e3;border-radius:8px;margin:12px 0}.margin-card summary{cursor:pointer}.margin-card td,.margin-card th{padding:8px}.margin-card table{min-width:650px;width:100%}

/* Même présentation pour le suivi et le compteur d’étiquettes. */
#view-orders .parcel-inline-control{display:flex;align-items:center;gap:4px;width:100%;min-height:30px;font-family:inherit;font-size:11px!important;font-weight:400;line-height:1.3;color:#53646b;box-sizing:border-box}
#view-orders .parcel-inline-value{flex:1;min-width:0;font:inherit;overflow-wrap:anywhere}
#view-orders td .parcel-inline-pencil{flex:0 0 26px;width:26px;height:26px;min-height:26px;max-width:26px;padding:3px!important;margin:0;border:1px solid #d6e0e3;border-radius:7px;background:#fff;color:#173b45;font-family:inherit;font-size:11px!important;font-weight:400;line-height:1;display:inline-flex;align-items:center;justify-content:center}
#view-orders .parcel-inline-pencil:hover{background:#edf6f2}#view-orders .parcel-inline-pencil:disabled{opacity:.5;cursor:wait}
#view-orders .parcel-count-container{margin-top:6px}#view-orders .parcel-inline-control[data-inline-editing]{display:block}

/* Keep purchase filter checkbox attached to its label (external stylesheet for CSP). */
#purchase-import-panel .actions .purchase-errors-toggle{display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;width:auto;max-width:100%;flex:0 1 auto;margin:8px 0;cursor:pointer}
#purchase-import-panel .actions .purchase-errors-toggle input[type=checkbox]{display:inline-block;position:static;flex:0 0 16px;width:16px;min-width:16px;max-width:16px;height:16px;margin:0;padding:0}
#purchase-import-panel .actions .purchase-errors-toggle span{display:block;flex:0 1 auto;line-height:1.4}

/* Orders table: consistent controls, full text, responsive available width. */
#view-orders table.orders-with-margins{width:100%;min-width:0!important;table-layout:fixed}
#view-orders .orders-with-margins th,#view-orders .orders-with-margins td{padding:10px 5px!important;line-height:1.45;white-space:normal!important;word-break:normal;overflow-wrap:break-word;font-size:11px!important;vertical-align:top}
#view-orders .orders-with-margins th{background:#eaf1f3;color:#24444e;vertical-align:middle}
#view-orders .orders-with-margins .sort-button{display:block;width:100%;font-size:11px!important;font-weight:600;line-height:1.4;white-space:normal;padding:0!important}
#view-orders .orders-with-margins td small{font-size:10px!important;line-height:1.5;margin-top:6px;max-width:none}
#view-orders .orders-with-margins td :is(.link-button[data-detail],.pdf-link,.badge,.erp-status,.compact-problem,.margin-chip,button[data-resume-order]){display:flex!important;align-items:center;justify-content:center;width:100%!important;max-width:100%!important;min-width:0;min-height:34px;height:auto;margin:5px 0 0!important;padding:6px 5px!important;border-radius:6px;font-size:11px!important;font-family:inherit;line-height:1.45!important;text-align:center;white-space:normal!important;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;word-break:normal;box-sizing:border-box}
#view-orders .orders-with-margins td .link-button[data-detail]{margin-top:0!important;font-weight:650;background:#e4f1ed;border:1px solid #bcd8cf;color:#164f46}
#view-orders .orders-with-margins td .erp-status{font-size:10px!important;font-weight:500}
#view-orders .orders-with-margins td .erp-reference{display:block;font-size:10px;line-height:1.5;overflow-wrap:anywhere;white-space:normal!important}
#view-orders .orders-with-margins td .pdf-link{background:#edf6f2;border:1px solid #bfd9cf;color:#175e4d;font-weight:600}
#view-orders .orders-with-margins td .margin-chip{min-height:62px;font-size:10px!important;font-weight:400!important;white-space:pre-wrap!important;text-align:left;justify-content:flex-start;overflow-wrap:normal}
#view-orders .orders-with-margins [data-country-margin] .order-country{display:flex!important;align-items:center;gap:5px;margin:0 0 6px!important;min-height:24px;overflow-wrap:break-word}
#view-orders .orders-with-margins .order-country img{width:18px;height:13px;flex-shrink:0}
#view-orders .orders-with-margins tbody tr:nth-child(even)>td{background:#f8fbfa}
#view-orders .orders-with-margins tbody tr:hover>td{background:#edf5f3}
#view-orders .orders-with-margins td a{overflow-wrap:anywhere}
#view-orders .orders-with-margins input[type=checkbox]{width:15px;height:15px;margin:4px 0;padding:0}
#view-orders .ordered-filters :is(input,select,summary),#view-orders .order-filter-actions button,#view-orders .batch button{min-height:36px;border-radius:7px;line-height:1.4}
#view-orders .batch{gap:8px}
@media(max-width:1200px){#view-orders .orders-with-margins th,#view-orders .orders-with-margins td{padding:8px 3px!important}#view-orders .orders-with-margins td :is(.pdf-link,.badge,.compact-problem,.link-button),#view-orders .orders-with-margins .sort-button{font-size:10px!important}}
#view-orders table.orders-with-margins th[data-column="select"]{width:2%!important}
#view-orders table.orders-with-margins th[data-column="reference"]{width:11%!important}
#view-orders table.orders-with-margins th[data-column="manager"]{width:8%!important}
#view-orders table.orders-with-margins th[data-column="date"]{width:6%!important}
#view-orders table.orders-with-margins th[data-column="bc"]{width:7%!important}
#view-orders table.orders-with-margins th[data-column="bl"]{width:8%!important}
#view-orders table.orders-with-margins th[data-column="recipient"]{width:11%!important}
#view-orders table.orders-with-margins th[data-column="sku"]{width:12%!important}
#view-orders table.orders-with-margins th[data-column="carrier"]{width:7%!important}
#view-orders table.orders-with-margins th[data-column="label"]{width:9%!important}
#view-orders table.orders-with-margins th[data-column="tracking"]{width:8%!important}
#view-orders table.orders-with-margins th[data-column="country-margin"]{width:11%!important}
#view-orders table.orders-with-margins td button.margin-chip{display:block!important;white-space:pre-wrap!important;text-align:left!important;font-size:10px!important;font-weight:400!important;min-height:62px;line-height:1.5!important;overflow-wrap:normal;word-break:normal}
/* Hiérarchie des gestionnaires et de leurs catégories. */
.filters .filter-options label.manager-filter-parent{font-weight:700;background:#edf6f2;border-radius:5px;padding:8px 6px;margin-top:4px}.filters .filter-options label.manager-filter-child{padding-left:28px;border-left:2px solid #c5ded5;margin-left:14px;font-weight:400}


/* Cartes de synthèse compactes : répartition sans paragraphes surdimensionnés. */
#view-orders .metrics>article,#view-orders .metrics>#transport-statistics{padding:16px 18px;min-width:0;min-height:140px}
#view-orders .metrics>article strong{font-size:30px;margin:8px 0;line-height:1.15}
#view-orders .metrics>#transport-statistics strong{font-size:13px;line-height:1.3;margin:0 0 8px}
#transport-statistics .transport-stat-list{display:grid;gap:4px;margin:0 0 8px}
#transport-statistics .transport-stat-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;column-gap:12px;align-items:baseline}
#transport-statistics .transport-stat-row span{font-size:12px;line-height:1.3;color:#536c68}
#transport-statistics .transport-stat-row span:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
#view-orders .metrics>#transport-statistics small{display:block;font-size:10px;line-height:1.3}

/* Filtre actif : bleu foncé, même au survol et au focus. */
#all-problems.problems-filter-active,#all-problems[aria-pressed="true"],#all-problems[aria-pressed="true"]:hover,#all-problems[aria-pressed="true"]:focus{background:#173b65!important;border-color:#102c4e!important;color:#fff!important;box-shadow:0 0 0 2px #b4cce6!important;font-weight:700}
/* Les diagnostics restent empilés, sans partage horizontal SKU / motif. */
#view-orders #order-rows td button.compact-problem,#view-orders table.orders-with-margins #order-rows td button.compact-problem{display:block!important;text-align:left!important;font-size:10px!important;line-height:1.35!important;padding:6px!important;height:auto!important;max-height:none!important;white-space:normal!important;overflow:visible!important}
#view-orders #order-rows td button.compact-problem>span{display:block!important;width:100%!important;max-width:none!important;min-width:0;float:none!important;font-size:inherit!important;line-height:inherit!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important;overflow:visible!important;text-overflow:clip!important}
#view-orders #order-rows td button.compact-problem>span+span{margin-top:3px;font-weight:400}


/* Référence copiable par sélection, avec accès clavier au détail. */
#view-orders #order-rows .selectable-reference{display:block;user-select:text!important;-webkit-user-select:text!important;cursor:text;font-weight:650;background:#e5f2ee;border:1px solid #accfc4;border-radius:6px;padding:6px;text-align:center;overflow-wrap:anywhere}

/* Shared geometry for BC, BL, label and tracking status: no dependence on text length. */
#view-orders table.orders-with-margins th:is([data-column="bc"],[data-column="bl"],[data-column="label"],[data-column="tracking"]){width:8%!important}
#view-orders #order-rows td.aligned-status-cell{padding-left:5px!important;padding-right:5px!important}
#view-orders #order-rows .status-with-reference>.erp-reference{display:block;min-height:var(--status-reference-height,20px);margin:0 0 5px!important;font-size:10px!important;line-height:1.35!important}
#view-orders #order-rows .status-with-spacer::before{content:"";display:block;height:var(--status-reference-height,20px);margin-bottom:5px}
#view-orders #order-rows td.aligned-status-cell>.aligned-primary-status{display:flex!important;align-items:center;justify-content:center;width:100%!important;min-height:var(--status-control-height,44px)!important;height:auto!important;margin:0!important;padding:6px!important;border:1px solid #d2dedb;border-radius:6px;font-size:10px!important;font-weight:500!important;line-height:1.35!important;text-align:center;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;box-sizing:border-box}
#view-orders #order-rows td.aligned-status-cell>.erp-status{background:#edf2f0;color:#405c56;border-color:#d2dedb}
#view-orders #order-rows td.aligned-status-cell>.erp-status[data-status="active"],#view-orders #order-rows td.aligned-status-cell>.erp-status[data-status="delivered"],#view-orders #order-rows td.aligned-status-cell>.erp-status[data-status="completed"]{background:#e2f3ea;color:#226249;border-color:#bddbca}

#import-select-new.import-selection-active{background:#176e5d;color:white;border-color:#176e5d;font-weight:700;box-shadow:0 0 0 3px #bce3d8}#import-select-all{background:white;color:#173e46}.import-warning-dialog{max-width:620px;width:90vw}.import-warning-dialog label{display:block;margin:14px 0}.import-warning-dialog input{display:block;width:100%;margin-top:6px}

/* Per-order queue information: uniform preview, full details on request. */
#view-orders #order-rows .order-processing{margin-top:7px;padding:6px;border-left:2px solid #7b9ab6;color:#26445a;text-align:left;font-size:10px;line-height:1.4;overflow-wrap:break-word}
#view-orders #order-rows .processing-stage{font-weight:600}
#view-orders #order-rows .processing-elapsed{color:#627680;font-variant-numeric:tabular-nums}
#view-orders #order-rows .processing-priority{display:block;width:100%;min-height:28px;margin-top:5px;padding:4px;border:1px solid #b8cad8;border-radius:5px;background:#fff;color:#173b65;font:inherit;text-align:center;white-space:normal;cursor:pointer}
#view-orders #order-rows .processing-priority[aria-pressed=true]{background:#173b65;border-color:#173b65;color:#fff}
#view-orders #order-rows .processing-priority[hidden]{display:none}

/* TEMU: same margin badge as the orders list, including the purchase review. */
#view-temu button.margin-chip,#temu-purchase-dialog button.margin-chip{display:block;min-width:145px;white-space:pre-wrap;text-align:left;font-size:11px;font-weight:400;line-height:1.5;padding:6px 8px}#view-temu th,#temu-purchase-dialog th{white-space:normal}#temu-purchase-selection{font-size:13px}

/* Every framed control in a cancelled order carries the same red status. */
#view-orders #order-rows tr.order-cancelled :is(button,.badge,.link-button,.erp-status,.pdf-link,.margin-chip,.processing-priority){background:#fee2e2!important;border-color:#dc2626!important;color:#991b1b!important;opacity:1!important}
#view-orders #order-rows tr.order-cancelled input[type=checkbox]{accent-color:#dc2626;outline:1px solid #dc2626;outline-offset:-1px}

.resolution-dialog>header{cursor:grab;touch-action:none;user-select:none}.resolution-dialog>header.dragging{cursor:grabbing}.resolution-dialog>header button{cursor:pointer}.resolution-dialog::backdrop{background:rgba(12,35,44,.12)}

#view-orders #order-rows td button.refresh-circle.refresh-circle{display:flex!important;align-items:center!important;justify-content:center!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;margin:8px auto 0!important;border:0!important;border-radius:50%!important;background:#18765f!important;color:#fff!important;cursor:pointer}#view-orders #order-rows td button.refresh-circle.refresh-circle:hover{background:#105b49!important}#view-orders #order-rows td button.refresh-circle.refresh-circle:focus-visible{outline:3px solid #8ad2be;outline-offset:3px}

.resolution-dialog,.resolution-dialog p,.resolution-dialog small,.resolution-dialog h2,.resolution-dialog [data-body]{user-select:text!important;-webkit-user-select:text!important}.resolution-dialog>header h2{cursor:text;touch-action:auto}

/* Align equivalence scope choices with their radio controls. */
.resolution-dialog fieldset label:has(>input[type=radio][name=scope]){display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;min-height:28px}
.resolution-dialog fieldset label>input[type=radio][name=scope]{display:inline-block!important;position:static!important;order:-1!important;flex:0 0 18px!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important;align-self:center!important;accent-color:#13775f}

/* Supplier readings remain visible without clipping their parcel observations. */
.resolution-provider-result{overflow-wrap:anywhere;border-top:1px solid #dbe7e1;margin-top:16px;padding-top:12px}
.resolution-provider-result ul{padding-left:20px}.resolution-provider-result li{margin:8px 0;line-height:1.5}
/* Keep navigation in its own horizontal scroll area on narrow workspaces. */
@media(max-width:760px){
 #workspace-navigation{padding:12px 14px;height:auto;min-height:0}
 #workspace-navigation .brand{padding:0 8px}
 #workspace-navigation nav{display:flex;align-items:flex-start;gap:14px;max-height:none;margin-top:8px;overflow-x:auto;overflow-y:hidden}
 #workspace-navigation .nav-group{flex:0 0 auto;margin:0;border-bottom:0;padding-bottom:4px}
 #workspace-navigation .nav-group summary{padding:8px;font-size:13px}
 #workspace-navigation .nav-group>div{flex-direction:row;gap:4px;padding-left:0}
 #workspace-navigation .nav-group>div>button{width:auto;flex:0 0 auto;white-space:nowrap;padding:8px 10px;font-size:12px}
 main{min-width:0}main>header{flex-wrap:wrap}main>header>div{min-width:0}main h1{overflow-wrap:anywhere}
}
@media(max-width:480px){
 .resolution-dialog{padding:16px;width:94vw}
 .resolution-dialog header{top:-16px;gap:8px}.resolution-dialog h2{font-size:18px}
 .resolution-progress{bottom:-16px;margin:16px -16px -16px}
}
.resolution-dialog{scroll-padding-top:120px;scroll-padding-bottom:160px}


/* Keep every order column inside the available width, with either navigation state. */
#view-orders .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
#view-orders table,#view-orders table.orders-with-margins{width:100%;min-width:0!important;table-layout:fixed}
#view-orders .order-processing{min-width:0;max-width:100%;overflow-wrap:anywhere}
#view-orders .orders-with-margins td small{max-width:100%;overflow-wrap:anywhere}
#view-orders .orders-with-margins td .margin-chip{overflow-wrap:anywhere}
html{scrollbar-gutter:stable}

/* A cancelled BL stays red even when its order remains active. */
#view-orders #order-rows td.aligned-status-cell>.erp-status[data-status="cancelled"]{background:#fee2e2!important;color:#991b1b!important;border-color:#dc2626!important}

/* Keep document refresh actions visible beneath both per-order status cells. */
#view-orders #order-rows button[data-erplain-document-refresh]{display:block!important;visibility:visible!important;opacity:1!important;margin-top:8px!important;white-space:normal!important;line-height:1.35!important;}

/* Keep partial shipment quantities horizontally scrollable within their table. */
.partial-quantity-dialog #partial-content{min-width:0;max-width:100%}
.partial-quantity-dialog .partial-table-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}

#view-orders #order-rows .processing-content{height:8.4em;overflow:hidden;position:relative}
#view-orders #order-rows .order-processing:not(.processing-expanded) .processing-content::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1.4em;background:linear-gradient(transparent,#fff);pointer-events:none}
#view-orders #order-rows .processing-expanded .processing-content{height:auto;overflow:visible}
#view-orders #order-rows .processing-details-toggle{display:block;width:100%;min-height:32px;margin-top:5px;padding:4px 6px;border:1px solid #b8cad8;border-radius:5px;background:#fff;color:#173b65;font:inherit;text-align:left;white-space:normal;cursor:pointer}
#view-orders #order-rows .processing-details-toggle:focus-visible{outline:2px solid #173b65;outline-offset:2px}

/* The Shopify import screen only shows its own import information. */
main:has(#view-import-shopify:not([hidden])) #movement-watch-panel,
#view-import-shopify #import-format-help{display:none!important}
:where(aside nav) .receipt-navigation{display:block;padding:12px 14px;color:inherit;font-size:14px;text-decoration:none;border-radius:8px}
:where(aside nav) .receipt-navigation:hover{background:#edf5f5}

/* Compact fixed-size controls must also fit the narrowest column. */
#view-orders #order-rows td button.refresh-circle.refresh-circle{width:min(32px,100%)!important;min-width:0!important;max-width:100%!important}
#view-orders .orders-with-margins input[type=checkbox]{width:min(15px,100%);max-width:100%}

#view-orders .orders-with-margins [data-country-margin] .order-country{flex-wrap:wrap;overflow-wrap:anywhere}

#view-orders table.orders-with-margins th[data-column="select"]{width:28px!important}

/* Narrow screens show every field as a labelled block, without horizontal scrolling. */
@media(max-width:900px){
 #view-orders table.orders-with-margins,#view-orders .orders-with-margins tbody,#view-orders .orders-with-margins tr{display:block;width:100%}
 #view-orders .orders-with-margins thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #view-orders .orders-with-margins td:not(.total-quantity-column){display:block;width:100%!important;padding:10px 12px!important;overflow-wrap:anywhere}
 #view-orders .orders-with-margins td[data-order-column]::before{content:attr(data-order-column);display:block;font-weight:700;color:#24444e;margin-bottom:6px}
 #view-orders .orders-with-margins td:first-child::before{content:"Sélection"}
 #view-orders .orders-with-margins tbody tr{border-bottom:3px solid #cadbd5}
 #view-orders .orders-with-margins [data-country-margin] .order-country{flex-wrap:wrap}
}

#view-orders #order-rows [data-order-date] :is(span,small){white-space:normal!important;overflow-wrap:anywhere}

/* Missing orders verification */

 #view-missing-orders .missing-toolbar{display:grid;grid-template-columns:minmax(160px,240px) repeat(2,minmax(220px,280px)) max-content;align-items:end;gap:16px;margin:24px 0 8px;padding:20px;background:#f5f8f7;border:1px solid #dce6e0;border-radius:10px}
 #view-missing-orders .missing-toolbar label{display:grid;gap:8px;margin:0;min-width:0}
 #view-missing-orders .missing-toolbar :is(input,select,button){box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:0;font-size:13px}
 #view-missing-orders .missing-toolbar button{padding:10px 20px;white-space:nowrap}
 #view-missing-orders .missing-help{margin:8px 0 20px;font-size:12px}
 #view-missing-orders .missing-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px;margin:20px 0 16px}
 #view-missing-orders .missing-filters label{display:grid;gap:8px;flex:0 1 300px;min-width:0;margin:0}
 #view-missing-orders .missing-filters select{box-sizing:border-box;width:100%;height:44px;margin:0;font-size:13px}
 #view-missing-orders .missing-filters select:disabled{background:#f5f8f7;color:#657976;cursor:not-allowed}
 #view-missing-orders .missing-filter-count{margin:0;padding:12px 0;color:#657976;font-size:13px}
 #view-missing-orders .missing-filter-count:empty{display:none}
 #view-missing-orders .table-wrap{margin-top:0;border:1px solid #dce6e0;border-radius:8px;overflow-x:auto}
 #view-missing-orders table{margin:0}
 #view-missing-orders :is(#missing-state,#missing-errors):empty{display:none}
 #view-missing-orders #missing-state{padding:12px 16px;border-radius:8px;background:#edf6f2;color:#294846;overflow-wrap:anywhere}
 #view-missing-orders #missing-errors{color:#a83b33;overflow-wrap:anywhere}
 #view-missing-orders table{width:100%;min-width:780px}
 #view-missing-orders .missing-empty{text-align:center;padding:32px 16px;color:#657976;font-weight:400;background:white}
 @media(max-width:900px){#view-missing-orders .missing-toolbar{grid-template-columns:1fr 1fr}#view-missing-orders .missing-toolbar button{grid-column:1/-1}}
 @media(max-width:540px){#view-missing-orders .missing-toolbar{grid-template-columns:1fr;padding:16px}#view-missing-orders .missing-filters{align-items:stretch;flex-direction:column}#view-missing-orders .missing-filters label{flex:auto;width:100%}#view-missing-orders .missing-filter-count{padding:0}}

/* Stable order previews: content never controls the grid tracks or row height. */
#view-orders table.orders-fixed-layout{display:block;width:100%;max-width:100%;min-width:0!important}
#view-orders .orders-fixed-layout>thead,#view-orders .orders-fixed-layout>tbody{display:block;width:100%}
#view-orders .orders-fixed-layout tr{display:grid;grid-template-columns:var(--order-fixed-columns);width:100%;height:176px;min-height:176px;max-height:176px;overflow:hidden}
#view-orders .orders-fixed-layout thead tr{height:64px;min-height:64px;max-height:64px}
#view-orders table.orders-fixed-layout.orders-with-margins tr>:is(th,td):not(.total-quantity-column){display:block;width:auto!important;min-width:0!important;max-width:none;height:176px;max-height:176px;box-sizing:border-box;overflow:hidden;padding:10px 6px!important;position:relative;white-space:normal!important;overflow-wrap:anywhere}
#view-orders table.orders-fixed-layout.orders-with-margins thead tr>th:not(.total-quantity-column){height:64px;max-height:64px}
#view-orders .orders-fixed-layout td[data-fixed-column="reference"]{padding-bottom:46px!important}
#view-orders .orders-fixed-layout .order-more-information{position:absolute;bottom:7px;left:4px;right:4px;max-width:calc(100% - 8px);min-height:32px;background:#eef6f5;border:1px solid #84aaa3;color:#154a43;font-size:11px;line-height:1.2;padding:5px!important;z-index:1}
#view-orders .orders-fixed-layout .order-more-information:hover{background:#dceee9}
#view-orders .orders-fixed-layout .aligned-primary-status{min-height:0!important;max-height:48px!important;overflow:hidden}
.order-information-dialog{width:min(1050px,94vw);max-width:94vw;max-height:90vh;overflow:auto;border:1px solid #bed0cc;border-radius:12px;padding:0 24px 24px;color:#193237}
.order-information-dialog::backdrop{background:#153c3466}
.order-information-dialog>header{position:sticky;top:0;z-index:2;background:white;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0;padding:18px 0;border-bottom:1px solid #dce6e0}
.order-information-dialog h2{margin:0;font-size:20px;overflow-wrap:anywhere}
.order-information-dialog [data-information-feedback]:empty{display:none}
.order-information-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}
.order-information-fields>section{min-width:0;overflow-wrap:anywhere;border:1px solid #dce6e0;border-radius:8px;padding:16px}
.order-information-fields h3{font-size:13px;margin:0 0 12px;color:#526d67}
.order-information-fields small{display:block;margin:6px 0;line-height:1.5}
.order-information-fields :is(button,a){margin:4px 4px 4px 0;max-width:100%;overflow-wrap:anywhere}
.order-information-fields .order-processing{border-left:2px solid #7b9ab6;padding-left:12px;margin-top:12px}
.order-information-fields .processing-content{height:auto;overflow:visible}
.order-information-fields .erp-reference{display:block}
@media(max-width:900px){
 #view-orders .orders-fixed-layout tr{display:block;height:320px;min-height:320px;max-height:320px;margin-bottom:14px}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr>td:not(.total-quantity-column){display:none;height:80px;max-height:80px;padding:8px 12px!important}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr>td:is([data-fixed-column="select"],[data-fixed-column="reference"],[data-fixed-column="sku"],[data-fixed-column="label"]){display:block}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr>td[data-fixed-column="select"]{height:32px;max-height:32px;padding:6px 12px!important}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr>td[data-fixed-column="reference"]{height:128px;max-height:128px;padding-bottom:44px!important}
 #view-orders .orders-fixed-layout td[data-fixed-column="reference"] .order-more-information{left:10px;right:10px;max-width:calc(100% - 20px)}
 #view-orders .orders-fixed-layout td[data-fixed-column="select"]::before{display:none}
 .order-information-fields{grid-template-columns:1fr}
 .order-information-dialog{padding:0 16px 16px}
}

#view-orders .orders-fixed-layout tr:not(.order-row-expanded) td[data-fixed-column="reference"]>:not([data-detail]):not([data-delivery-detail]):not([data-order-more-info]):not(.order-deferral-preview){display:none!important}
#view-orders .orders-fixed-layout .processing-details-toggle{display:none!important}

/* A deliberate arrow expands original controls in place; collapsed geometry stays fixed. */
#view-orders .orders-fixed-layout .order-more-information{left:6px;right:auto;width:36px;max-width:calc(100% - 12px);font-size:21px;line-height:1;padding:3px!important}
#view-orders .orders-fixed-layout tr.order-row-expanded{height:auto;max-height:none}
#view-orders table.orders-fixed-layout.orders-with-margins tbody tr.order-row-expanded>td:not(.total-quantity-column){height:auto;max-height:none;overflow:visible}
#view-orders .orders-fixed-layout tr.order-row-expanded td[data-fixed-column="reference"]{padding-bottom:10px!important}
#view-orders .orders-fixed-layout tr.order-row-expanded .order-more-information{position:sticky;top:56px;bottom:auto;left:auto;right:auto;display:block;margin:8px 0;width:36px}
#view-orders #order-rows tr.order-row-expanded .processing-content{height:auto;overflow:visible}
#view-orders #order-rows tr.order-row-expanded .processing-content::after{display:none}
@media(max-width:900px){
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr.order-row-expanded>td:not(.total-quantity-column){display:block;height:auto;min-height:0;max-height:none}
 #view-orders .orders-fixed-layout tr.order-row-expanded{min-height:320px}
}

@media(max-width:900px){#view-orders .orders-fixed-layout>thead{width:1px;max-width:1px;height:1px}}

/* Keep long provider statuses inside the preview; shared alignment must not force overlap. */
#view-orders #order-rows tr:not(.order-row-expanded) td.aligned-status-cell>.aligned-primary-status{min-height:0!important;height:auto!important;max-height:48px!important;overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2}
/* Expanded status controls retain their complete text. */
#view-orders .orders-fixed-layout tbody tr.order-row-expanded>td[data-fixed-column="select"]::before{display:none}
#view-orders #order-rows tr.order-row-expanded td.aligned-status-cell>.aligned-primary-status{min-height:0!important;max-height:none!important;height:auto!important;overflow:visible!important;margin-bottom:8px!important}
#view-orders #order-rows tr.order-row-expanded .status-with-spacer::before{display:none}
#view-orders #order-rows tr.order-row-expanded .status-with-reference>.erp-reference{min-height:0}
#view-orders #order-rows tr.order-row-expanded :is(button,.badge,.erp-status,.pdf-link,.compact-problem){max-width:100%!important;overflow-wrap:anywhere!important;word-break:normal!important}
#view-orders .orders-fixed-layout tr.order-row-expanded .order-more-information{position:static}

/* Incoming quantities remain a concise, visible part of the SKU preview. */
#view-orders #order-rows [data-stock-preview]{display:block;margin:0 0 6px;padding:4px 6px;border-radius:5px;background:#e8f4ee;color:#185343;font-size:11px!important;font-weight:600;line-height:1.35}
#view-orders #order-rows tr:not(.order-row-expanded) td[data-fixed-column="label"]>[data-stock-information]{display:none!important}
#view-orders #order-rows tr.order-row-expanded td .link-button{font-size:12px!important;line-height:1.4!important;padding:6px 8px!important;margin:4px 0!important;text-align:left;min-height:32px}
#view-orders #order-rows tr.order-row-expanded td :is(.badge,.erp-status,.compact-problem){font-size:12px!important;line-height:1.45!important;text-align:left!important;justify-content:flex-start!important}

#view-orders .orders-fixed-layout tbody tr.order-row-expanded{position:relative}
#view-orders #order-rows tr:not(.order-row-expanded) td .link-button{font-size:11px!important;line-height:1.3!important;margin:4px 0!important;padding:3px 2px!important}

#view-orders #order-rows tr:not(.order-row-expanded) td button[data-compact-label]{font-size:0!important;border:1px solid #b9d3cb;border-radius:5px;background:#f1f7f5;min-height:28px;padding:4px!important}
#view-orders #order-rows tr:not(.order-row-expanded) td button[data-compact-label]::after{content:attr(data-compact-label);font-size:11px;line-height:1.3}

#view-orders table.orders-fixed-layout.orders-with-margins tbody tr.order-row-expanded>td:not(.total-quantity-column){font-size:14px!important;line-height:1.5}
#view-orders #order-rows tr.order-row-expanded td small{font-size:12px!important;line-height:1.5}
#view-orders #order-rows tr.order-row-expanded td .link-button{font-size:13px!important}
#view-orders .orders-fixed-layout tr.order-row-expanded td[data-order-column]::before{font-size:12px;letter-spacing:.015em}

/* Explicit action icons keep full accessible names and native hover/focus descriptions. */
#view-orders #order-rows td :is(button,a).order-icon-action{display:inline-flex!important;vertical-align:middle;align-items:center;justify-content:center;position:relative;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;padding:6px!important;margin:4px 3px 4px 0!important;border:1px solid #b9d3cb;border-radius:6px;background:#eef6f3;color:#155349;font-size:12px!important;line-height:1!important;cursor:pointer}
#view-orders #order-rows td .order-icon-action svg{display:block;flex:none;width:21px;height:21px;pointer-events:none}
#view-orders #order-rows .order-action-name{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important;border:0!important}
#view-orders #order-rows .order-icon-action:hover{background:#dceee7}
#view-orders #order-rows .order-icon-action:focus-visible{outline:3px solid #27917d;outline-offset:2px}

#order-action-tooltip{position:fixed;z-index:10000;max-width:min(320px,calc(100vw - 16px));padding:8px 10px;border-radius:6px;background:#153c38;color:#fff;font-size:13px;line-height:1.4;box-shadow:0 3px 12px #16332d33;pointer-events:none;overflow-wrap:anywhere}
#order-action-tooltip[hidden]{display:none}

#view-orders #order-rows td .order-icon-action[data-erplain-document-kind]::after{content:attr(data-erplain-document-kind);text-transform:uppercase;position:absolute;bottom:1px;right:1px;font-size:7px;line-height:1;background:#eef6f3;padding:1px;border-radius:2px}
/* Unfold only overflow: retain the table tracks and original controls. */
#view-orders .orders-fixed-layout tbody tr.order-row-expanded{grid-template-columns:var(--order-fixed-columns);gap:0;padding:0;align-items:stretch;background:inherit}
#view-orders table.orders-fixed-layout.orders-with-margins tbody tr.order-row-expanded>td:not(.total-quantity-column){padding:10px 6px!important;border-radius:0;background:inherit;min-width:0}
#view-orders .orders-fixed-layout tbody tr.order-row-expanded>td::before{display:none}
#view-orders #order-rows .carrier-tracking-preview{display:block;font-size:12px!important;line-height:1.35;color:#155349;margin:4px 0 6px;font-weight:600;overflow-wrap:anywhere;word-break:normal}
#view-orders #order-rows .carrier-tracking-preview span{display:block;user-select:text}
#view-orders #order-rows tr:not(.order-row-expanded) .carrier-tracking-preview{max-height:82px;overflow:auto}
@media(max-width:900px){
 #view-orders .orders-fixed-layout tbody tr.order-row-expanded{display:block}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr:not(.order-row-expanded)>td[data-fixed-column="reference"]{height:100px;max-height:100px}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr:not(.order-row-expanded)>td[data-fixed-column="sku"]{height:56px;max-height:56px}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr:not(.order-row-expanded)>td[data-fixed-column="label"]{height:56px;max-height:56px}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr:not(.order-row-expanded)>td[data-fixed-column="carrier"]{display:block;height:76px;max-height:76px}
 #view-orders #order-rows tr:not(.order-row-expanded) td[data-fixed-column="carrier"]>:not(.carrier-tracking-preview){display:none!important}
 #view-orders #order-rows tr:not(.order-row-expanded) .carrier-tracking-preview{max-height:56px;margin:0}
}

/* Annulations Temu / Shopify : styles externes compatibles CSP. */
#view-platform-cancellations .cancellation-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;padding:12px 0 0}
 #view-platform-cancellations .cancellation-controls label{flex:1 1 230px;min-width:0;max-width:320px}
 #view-platform-cancellations :is(.cancellation-controls,.cancellation-filters) label{display:flex;flex-direction:column;gap:6px;margin:0}
 #view-platform-cancellations :is(.cancellation-controls,.cancellation-filters) :is(select,input){width:100%;min-width:0;box-sizing:border-box;margin:0;height:44px}
 #view-platform-cancellations .cancellation-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 #view-platform-cancellations .cancellation-actions button{min-height:44px;margin:0;white-space:normal}
 #view-platform-cancellations .cancellation-help{margin:10px 0 16px;font-size:13px;line-height:1.5}
 #view-platform-cancellations .cancellation-filters{display:grid;grid-template-columns:minmax(0,420px) minmax(0,260px);gap:12px;align-items:end;padding:0 0 18px}
 #view-platform-cancellations .cancellation-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 24px}
 #view-platform-cancellations .cancellation-metric{padding:16px;border:1px solid #dce6e1;border-radius:10px;background:#f8fbfa}
 #view-platform-cancellations .cancellation-metric strong{display:block;font-size:26px;margin-top:8px;color:#193237}
 #view-platform-cancellations .cancellation-metric span{font-size:12px;color:#657976}
 #view-platform-cancellations .cancellation-metric.is-review{background:#fff8eb;border-color:#ecd8ad}
 #view-platform-cancellations .cancellation-table{border:1px solid #dce6e1;border-radius:10px;max-height:560px;overflow:auto}
 #view-platform-cancellations table{margin:0;min-width:650px}
 #view-platform-cancellations thead th{position:sticky;top:0;z-index:1;font-size:12px;background:#f3f7f5}
 #view-platform-cancellations td{overflow-wrap:anywhere;line-height:1.5}
 #view-platform-cancellations td:nth-child(2){font-weight:600}
 #view-platform-cancellations .cancellation-empty{text-align:center;padding:40px 20px;color:#657976}
 #view-platform-cancellations .cancellation-notice{padding:12px 16px;border-radius:8px;background:#fff4dd;color:#805b19}
 #view-platform-cancellations .cancellation-summary{margin:0;padding-top:16px;border-top:1px solid #e0e7e3}
 @media(max-width:700px){#view-platform-cancellations .padded{padding:18px}#view-platform-cancellations .cancellation-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#view-platform-cancellations .cancellation-controls label{flex-basis:100%;max-width:none}#view-platform-cancellations .cancellation-filters{grid-template-columns:minmax(0,1fr)}#view-platform-cancellations .cancellation-actions{width:100%}#view-platform-cancellations .cancellation-actions button{flex:1 1 180px}}

#view-orders #order-rows tr.order-cancelled>td{background:#fff1f2;color:#991b1b}

/* Negative stock workspace */
.negative-stock-export{display:flex;justify-content:flex-end;margin:0 0 12px}

 #view-negative-stocks{min-width:0}
 #view-negative-stocks h2{margin:0 0 10px}
 #view-negative-stocks .negative-stock-toolbar{display:grid;grid-template-columns:minmax(220px,460px) minmax(240px,420px) max-content;align-items:start;justify-content:start;gap:20px;margin:24px 0 18px;padding-bottom:20px;border-bottom:1px solid #e0e9e8}
 #view-negative-stocks .negative-stock-action{display:flex;flex-direction:column;gap:6px;order:3}
 #view-negative-stocks .negative-stock-action>span,#view-negative-stocks .negative-stock-toolbar label{font-weight:600;font-size:13px;line-height:18px}
 #view-negative-stocks .negative-stock-toolbar button{height:44px;min-height:44px;width:auto;align-self:flex-start;padding:10px 18px;margin:0;white-space:nowrap;background:#127565;color:white;border-color:#127565}
 #view-negative-stocks #negative-stock-reports{display:block;width:100%!important;min-width:0;max-width:100%;height:44px!important;margin:0;padding:10px 14px;border:1px solid #ccdbd9;border-radius:8px;background-color:white}
 #view-negative-stocks .negative-stock-toolbar section{min-width:0;order:2}
 #view-negative-stocks [role=status]:empty{display:none}
 #view-negative-stocks .negative-stock-toolbar p{font-size:12px;margin:8px 0 0}
 #view-negative-stocks>p[role=status]{padding:12px 14px;background:#f0f6f5;border-radius:8px;margin:0 0 18px;line-height:1.5}
 #view-negative-stocks table{width:100%;min-width:1000px;border-collapse:collapse}
 #view-negative-stocks th,#view-negative-stocks td{padding:14px 16px}
 #view-negative-stocks th:nth-child(7),#view-negative-stocks th:nth-child(8),#view-negative-stocks th:nth-child(9),#view-negative-stocks td:nth-child(7),#view-negative-stocks td:nth-child(8),#view-negative-stocks td:nth-child(9){text-align:right;font-variant-numeric:tabular-nums}
 #view-negative-stocks td[colspan]{text-align:center;padding:32px 16px;color:#627b81;background:#fafcfc}
 #view-negative-stocks .negative-stock-search{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0;order:1}
 #view-negative-stocks .negative-stock-search label{font-weight:600;font-size:13px;line-height:18px;margin:0}
 #view-negative-stocks .negative-stock-search input{width:100%;min-width:0;height:44px;min-height:44px;margin:0}
 #view-negative-stocks .negative-stock-search small{color:#627b81}
 @media(max-width:1150px){#view-negative-stocks .negative-stock-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}#view-negative-stocks .negative-stock-action{grid-column:1/-1}}
 @media(max-width:700px){#view-negative-stocks .negative-stock-toolbar{grid-template-columns:minmax(0,1fr);gap:16px}#view-negative-stocks .negative-stock-toolbar button{width:100%;align-self:stretch}}

#view-negative-stocks #negative-stock-sort-date{display:inline-flex;align-items:center;background:transparent;border:0;padding:0;color:inherit;font:inherit;font-weight:600;white-space:nowrap;cursor:pointer}
#view-negative-stocks #negative-stock-sort-date:focus-visible{outline:2px solid #127565;outline-offset:4px}

/* Operator view: hide the technical timing panel, preserve diagnostics and actions. */
#view-orders #order-rows .order-processing{display:none!important}
#view-orders #order-rows .order-deferral-preview{display:block!important;margin:4px 0 0;padding:4px 5px;background:#fff5db;border-left:3px solid #b57a17;border-radius:3px;font-size:11px;line-height:1.3;color:#624713;text-align:left}
#view-orders #order-rows .order-deferral-note{white-space:pre-wrap;overflow-wrap:anywhere;max-height:43px;overflow:auto;scrollbar-width:thin}
#view-orders #order-rows .order-deferral-note:focus-visible{outline:2px solid #127565;outline-offset:2px}
#view-orders #order-rows .order-deferral-preview :is(time,small){display:block;font-size:10px!important;line-height:1.2;margin:3px 0 0;color:#6f6043}
#view-orders #order-rows tr:not(.order-row-expanded) td[data-fixed-column="reference"]:has(.order-deferral-preview)>[data-detail]{font-size:11px!important;line-height:1.2!important;max-height:60px;overflow:auto;padding:4px!important}
#view-orders #order-rows tr.order-row-expanded .order-deferral-note{max-height:none;overflow:visible}
@media(max-width:900px){
 #view-orders .orders-fixed-layout tr:has(.order-deferral-preview):not(.order-row-expanded){height:400px;min-height:400px;max-height:400px}
 #view-orders table.orders-fixed-layout.orders-with-margins tbody tr:not(.order-row-expanded)>td[data-fixed-column="reference"]:has(.order-deferral-preview){height:180px;max-height:180px}
 #view-orders #order-rows .order-deferral-note{max-height:60px}
}

#view-orders #order-rows tr:not(.order-row-expanded) .order-deferral-preview{position:absolute;top:76px;bottom:44px;left:6px;right:6px;display:flex!important;flex-direction:column;min-height:0;box-sizing:border-box;margin:0}
#view-orders #order-rows tr:not(.order-row-expanded) .order-deferral-note{flex:1;min-height:0;max-height:none}
#view-orders #order-rows .order-deferral-preview :is(time,small){flex:none;overflow-wrap:anywhere}
@media(max-width:900px){#view-orders #order-rows tr:not(.order-row-expanded) .order-deferral-preview{top:72px}}
#amazon-delivery-settings{min-inline-size:0;min-width:0;max-width:100%;box-sizing:border-box}
#amazon-delivery-settings .table-wrap{min-width:0;max-width:100%;overflow-x:auto}
#amazon-delivery-settings textarea{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:720px){#amazon-delivery-settings{width:calc(100vw - 64px);max-width:calc(100vw - 64px)}}

#amazon-delivery-settings .amazon-department-picker{margin:12px 0;padding:10px;border:1px solid var(--border,#52616b);border-radius:8px}
#amazon-delivery-settings .amazon-department-picker summary{cursor:pointer;display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
#amazon-gofo-summary{font-size:.85em;overflow-wrap:anywhere}
#amazon-delivery-settings .amazon-department-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:6px;margin-top:12px}
#amazon-delivery-settings .amazon-department-grid label{display:flex;align-items:center;gap:6px;margin:0;padding:6px;border-radius:5px;background:rgba(127,127,127,.1);cursor:pointer}
#amazon-delivery-settings .amazon-department-grid input{width:auto;margin:0;flex:none}
