/* The Factory Business — direction Superdesign approuvée. CRM uniquement. */
@media screen {
html[data-ws-theme=light]:has(body.tfb-crm.tfb-crm),html[data-ws-theme=light]:has(body.tfb-invoices){--ws-bg:#F6F7FB;--ws-soft:#F6F7FB;--ws-panel:#fff;--ws-panel2:#F1F2F7;--ws-text:#18212F;--ws-muted:#667085;--ws-line:#E5E7EF;--ws-accent:#6D3CE8;--ws-primary:#6D3CE8;--ws-rail:232px;--ws-shadow:0 8px 28px #18212f0c;color-scheme:light}
html[data-ws-theme=dark]:has(body.tfb-crm.tfb-crm),html[data-ws-theme=medium]:has(body.tfb-crm.tfb-crm),html[data-ws-theme=dark]:has(body.tfb-invoices),html[data-ws-theme=medium]:has(body.tfb-invoices){--ws-bg:#10131B;--ws-soft:#151A25;--ws-panel:#191E2B;--ws-panel2:#232A3A;--ws-text:#F4F6FC;--ws-muted:#A9B3C7;--ws-line:#313B50;--ws-accent:#A98BFF;color-scheme:dark}
body.tfb-crm.tfb-crm,body.tfb-invoices{font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif!important;background:var(--ws-bg)!important;color:var(--ws-text);font-size:13px;line-height:1.55;min-width:0}
body.tfb-crm.tfb-crm{padding:24px 30px 50px calc(var(--ws-rail) + 30px)!important;margin:0!important}
.tfb-crm.tfb-crm .container{width:100%!important;max-width:1600px!important;margin:0 auto!important;padding:0!important;min-width:0}
.tfb-crm.tfb-crm .ws-sidebar{background:var(--ws-panel);padding:24px 16px;gap:12px;box-shadow:none}
.tfb-crm.tfb-crm .ws-sidebar-head{flex-wrap:wrap;gap:8px}.tfb-crm.tfb-crm .ws-brand{width:100%;gap:10px}.tfb-crm.tfb-crm .ws-brand img{width:52px;height:45px;object-fit:contain;background:white;border-radius:8px;padding:4px}.tfb-crm.tfb-crm .ws-brand-copy{font-size:13px;line-height:1.3}.tfb-crm.tfb-crm .ws-brand-copy small{font-size:10px}
.tfb-crm.tfb-crm .ws-collapse{display:none!important}.tfb-crm.tfb-crm .ws-nav-label{display:none}.tfb-crm.tfb-crm .tfb-nav-group{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:var(--ws-muted);margin:18px 8px 6px;font-weight:700}
.tfb-crm.tfb-crm .ws-sidebar .nav-tabs{gap:4px}.tfb-crm.tfb-crm .ws-sidebar a.nav-tab{min-height:42px!important;font-size:12px!important;font-weight:500!important;padding:10px!important;color:var(--ws-muted)!important;border:0!important;background:transparent!important;box-shadow:none!important;line-height:1.4}
.tfb-crm.tfb-crm .ws-sidebar .nav-tab .ws-nav-copy{font-size:12px}.tfb-crm.tfb-crm .ws-sidebar .ws-nav-icon{width:18px;height:18px;margin-right:10px}.tfb-crm.tfb-crm .ws-sidebar a.nav-tab.active{color:var(--ws-accent)!important;background:color-mix(in srgb,var(--ws-accent) 10%,var(--ws-panel))!important;font-weight:650!important;box-shadow:none!important}.tfb-crm.tfb-crm .ws-sidebar a.nav-tab:hover{background:var(--ws-panel2)!important}
.tfb-crm.tfb-crm .header.ws-header{border:0!important;border-bottom:1px solid var(--ws-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;padding:0 0 18px!important;margin-bottom:26px!important;min-height:56px;gap:16px;display:flex;flex-wrap:wrap;position:relative}
.tfb-crm.tfb-crm .header-actions{margin-left:auto;gap:10px!important;min-width:0;flex-shrink:0}.tfb-crm.tfb-crm #glassModeToggle,.tfb-crm.tfb-crm #darkModeToggle{display:none!important}.tfb-crm.tfb-crm .sync-timer{font-size:10px;color:var(--ws-muted);background:transparent;padding:0}.tfb-crm.tfb-crm .sync-timer-icon{display:none}.tfb-crm.tfb-crm .tfb-top-title{font-size:12px;color:var(--ws-muted);margin-right:auto}.tfb-crm.tfb-crm .tfb-top-search{position:relative;flex:1;max-width:360px;min-width:150px}.tfb-crm.tfb-crm .tfb-top-search input{width:100%;background:var(--ws-panel)!important;font-size:12px;min-height:38px!important}.tfb-crm.tfb-crm .ws-theme-button{font-size:0;min-width:38px;padding:7px;min-height:38px!important}.tfb-crm.tfb-crm .ws-theme-button::after{content:'◐';font-size:20px}.tfb-crm.tfb-crm .user-badge{background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important;border-radius:10px!important;padding:6px 10px!important;font-size:12px}.tfb-role-label{display:block;font-size:10px;color:var(--ws-muted);font-weight:400}
.tfb-crm.tfb-crm .ws-page-heading{margin:0 0 24px!important;gap:14px;flex-wrap:wrap}.tfb-crm.tfb-crm .ws-page-heading h1{font-size:clamp(24px,3vw,30px)!important;letter-spacing:-.035em;font-weight:750;margin:0}.tfb-page-description{color:var(--ws-muted);font-size:12px;margin:-14px 0 24px;max-width:800px}
.tfb-crm.tfb-crm .card,.tfb-invoices .card{border:1px solid var(--ws-line)!important;border-radius:16px!important;background:var(--ws-panel)!important;box-shadow:0 3px 16px #18212f03!important;padding:22px;min-width:0;backdrop-filter:none!important}.tfb-crm.tfb-crm .card h3{font-size:14px!important;font-weight:650;letter-spacing:-.015em}
.tfb-crm.tfb-crm :is(button,.btn-primary,.btn-secondary,.btn-small),.tfb-invoices button{border-radius:10px!important;font-size:12px;font-weight:550;line-height:1.4;transition:background .15s,border-color .15s;min-height:38px!important;padding:9px 13px;white-space:normal}.tfb-crm.tfb-crm button:not(.btn-primary):not(.btn-danger):not(.danger){background:var(--ws-panel)!important;color:var(--ws-text)!important;border:1px solid var(--ws-line)!important}.tfb-crm.tfb-crm .btn-primary,.tfb-invoices .primary{background:var(--ws-primary)!important;color:#fff!important;border:1px solid var(--ws-primary)!important}.tfb-crm.tfb-crm button:hover:not(:disabled){border-color:var(--ws-accent)!important}.tfb-crm.tfb-crm button:disabled{opacity:.45;cursor:not-allowed}.tfb-crm.tfb-crm :is(input,select,textarea){font-size:12px;border-radius:10px!important;box-shadow:none!important}.tfb-crm.tfb-crm :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--ws-accent)!important;outline-offset:3px}
.tfb-crm.tfb-crm :is(.dropdown-menu,.notif-dropdown){background:var(--ws-panel)!important;border:1px solid var(--ws-line)!important;border-radius:14px!important;padding:6px;box-shadow:0 12px 40px #10131b18!important;max-width:calc(100vw - 30px);z-index:1200}.tfb-crm.tfb-crm .dropdown-item{border-radius:8px;padding:10px 12px;font-size:12px}.tfb-crm.tfb-crm .dropdown-item:hover{background:var(--ws-panel2)}
.tfb-crm.tfb-crm .dash-header{margin-bottom:16px}.tfb-crm.tfb-crm .dash-header h1{font-size:30px;letter-spacing:-.035em}.tfb-crm.tfb-crm .dash-eyebrow{font-size:9px;letter-spacing:.12em}.tfb-crm.tfb-crm .dash-header p{font-size:12px}.tfb-crm.tfb-crm .dash-grid{gap:16px}.tfb-crm.tfb-crm .dash-widget{border-radius:16px!important;box-shadow:none!important}.tfb-crm.tfb-crm .dash-widget[data-width=small]{border-top:3px solid color-mix(in srgb,var(--ws-accent) 40%,var(--ws-panel))!important;padding:18px!important;min-height:130px}.tfb-crm.tfb-crm .dash-widget[data-width=small] [id^=stat]{font-variant-numeric:tabular-nums}.tfb-crm.tfb-crm .dash-list-row{font-size:12px;padding:14px 0}.tfb-crm.tfb-crm .dash-tag{font-size:10px;border-radius:6px}.tfb-crm.tfb-crm .dash-status:empty{display:none}.tfb-crm.tfb-crm .dash-tools{gap:6px}.tfb-crm.tfb-crm .dash-tools button{font-size:11px!important}
.tfb-crm.tfb-crm table{font-size:12px!important;max-width:100%}.tfb-crm.tfb-crm table th{background:var(--ws-soft)!important;color:var(--ws-muted)!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.035em;font-weight:650;padding:12px!important}.tfb-crm.tfb-crm table td{padding:14px 12px!important;border-color:var(--ws-line)!important;vertical-align:middle!important}.tfb-crm.tfb-crm table tbody tr:hover>td{background:color-mix(in srgb,var(--ws-accent) 3%,var(--ws-panel))}.tfb-crm.tfb-crm #shopifyTable td:nth-child(2),.tfb-crm.tfb-crm #shopifyTable th:nth-child(2){position:static!important;left:auto!important;box-shadow:none!important}.tfb-crm.tfb-crm #shopifyTable td:first-child{color:var(--ws-accent);font-weight:650}.tfb-crm.tfb-crm .scroll,.tfb-crm.tfb-crm .table-scroll,.tfb-crm.tfb-crm .purchase-scroll{border:1px solid var(--ws-line);border-radius:12px;max-width:100%}
.tfb-crm.tfb-crm :is(.modal-content,.modal,dialog){border-radius:16px!important;border:1px solid var(--ws-line)!important;background:var(--ws-panel)!important;box-shadow:0 24px 70px #10131b30!important}.tfb-crm.tfb-crm .modal-header{background:var(--ws-panel)!important;border-bottom:1px solid var(--ws-line);padding:18px 22px!important}.tfb-crm.tfb-crm .modal-body{min-height:0}.tfb-crm.tfb-crm #orderDetailModal .modal{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 32px)!important;overflow:hidden!important}.tfb-crm.tfb-crm #orderModalScroll{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain}.tfb-crm.tfb-crm #orderModalOverlay>div{max-height:calc(100dvh - 32px)!important;overflow:auto!important;overscroll-behavior:contain}.tfb-crm.tfb-crm .client-card{border-radius:14px!important}.tfb-crm.tfb-crm .purchase-group{margin:16px 0}.tfb-crm.tfb-crm .purchase-threshold{border-radius:12px;background:var(--ws-soft)}
.tfb-crm.tfb-crm #crmLoginIcon img{width:100px;height:80px;object-fit:contain;background:white;border-radius:12px;padding:10px}.tfb-crm.tfb-crm #crmLoginScreen{background:var(--ws-bg)}.tfb-crm.tfb-crm #crmLoginScreen h1{color:var(--ws-text);font-size:24px}.tfb-crm.tfb-crm #crmLoginScreen .login-sub{font-size:12px}
@media(min-width:761px){html.ws-collapsed body.tfb-crm.tfb-crm{padding-left:calc(232px + 30px)!important}html.ws-collapsed .tfb-crm.tfb-crm .ws-sidebar{width:232px!important}html.ws-collapsed .tfb-crm.tfb-crm .ws-brand-copy,html.ws-collapsed .tfb-crm.tfb-crm .ws-nav-copy{display:flex!important}}
@media(max-width:1150px){body.tfb-crm.tfb-crm{padding:20px 20px 40px calc(var(--ws-rail) + 20px)!important}.tfb-crm.tfb-crm .tfb-top-title{display:none}.tfb-crm.tfb-crm .dash-widget[data-width=small]{grid-column:span 6}.tfb-crm.tfb-crm .sync-timer{display:none}}
@media(max-width:760px){body.tfb-crm.tfb-crm{padding:14px 12px 40px!important}.tfb-crm.tfb-crm .header.ws-header{gap:8px;margin-bottom:22px!important}.tfb-crm.tfb-crm .header-actions{gap:6px!important}.tfb-crm.tfb-crm .header-actions .user-badge>span:last-child{display:none}.tfb-crm.tfb-crm .tfb-top-search{min-width:100px;max-width:none}.tfb-crm.tfb-crm .tfb-top-search input{font-size:11px;padding:9px!important}.tfb-crm.tfb-crm .ws-menu{min-width:38px;padding:8px!important}.tfb-crm.tfb-crm .dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.tfb-crm.tfb-crm .dash-widget,.tfb-crm.tfb-crm .dash-widget[data-width=wide]{grid-column:span 2!important}.tfb-crm.tfb-crm .dash-widget[data-width=small]{grid-column:span 1!important;padding:14px!important;min-height:128px}.tfb-crm.tfb-crm .dash-widget[data-width=small] div{font-size:11px}.tfb-crm.tfb-crm .dash-header h1{font-size:25px}.tfb-crm.tfb-crm .dash-tools{width:100%;display:grid;grid-template-columns:1fr 1fr}.tfb-crm.tfb-crm .card{padding:16px}.tfb-crm.tfb-crm .dash-month-metrics{grid-template-columns:1fr 1fr;gap:10px}.tfb-crm.tfb-crm .ws-page-heading h1{font-size:25px!important}.tfb-crm.tfb-crm .tfb-page-description{margin-top:-12px;font-size:11px}.tfb-crm.tfb-crm #orderModalStats{grid-template-columns:1fr!important}.tfb-crm.tfb-crm #orderDetailModal .modal{max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}.tfb-crm.tfb-crm #orderDetailModal{padding:8px!important}.tfb-crm.tfb-crm #shopifyTable{min-width:0!important;display:block}.tfb-crm.tfb-crm #shopifyTable thead{display:none}.tfb-crm.tfb-crm #shopifyTable tbody{display:block}.tfb-crm.tfb-crm #shopifyTable tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:12px 8px;border-bottom:1px solid var(--ws-line);gap:4px}.tfb-crm.tfb-crm #shopifyTable tbody>tr>td{display:block!important;position:static!important;min-width:0!important;max-width:100%!important;border:0!important;padding:6px 8px!important;white-space:normal!important;overflow-wrap:anywhere!important;background:transparent!important;box-shadow:none!important}.tfb-crm.tfb-crm #shopifyTable tbody>tr>td:first-child{grid-column:1/-1;font-size:15px!important}.tfb-crm.tfb-crm #shopifyTable td[data-tfb-label]::before{content:attr(data-tfb-label);display:block;font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--ws-muted);margin-bottom:5px}.tfb-crm.tfb-crm #shopifyTable .col-marge{display:none!important}.tfb-crm.tfb-crm:not(.hide-marge) #shopifyTable .col-marge{display:block!important}.tfb-crm.tfb-crm .ws-sidebar{width:232px!important;max-width:86vw}.tfb-crm.tfb-crm #calendarDays{min-width:560px}.tfb-crm.tfb-crm .finance-kpi{min-width:0}.tfb-crm.tfb-crm #shopifyKpis{grid-template-columns:1fr 1fr!important}.tfb-crm.tfb-crm .finance-amount{flex-wrap:wrap}.tfb-crm.tfb-crm .finance-amount strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.tfb-crm.tfb-crm *{animation:none!important;transition:none!important}}
}

@media screen{body.tfb-crm.tfb-crm [hidden]{display:none!important}body.tfb-crm.tfb-crm #tab-dashboard>.ws-page-heading{display:none!important}}
@media screen{body.tfb-crm.tfb-crm .filter-group{flex-wrap:wrap;max-width:100%;min-width:0}body.tfb-crm.tfb-crm .filters-bar{align-items:center;gap:12px}body.tfb-invoices main>section{border:1px solid var(--ws-line);border-radius:16px;background:var(--ws-panel);padding:22px;margin-bottom:18px}body.tfb-invoices{--bg-1:var(--ws-bg);--bg-2:var(--ws-panel);--border:var(--ws-line);--text-1:var(--ws-text);--text-2:var(--ws-muted);--primary:var(--ws-primary)}body.tfb-invoices button{border:1px solid var(--ws-line);background:var(--ws-panel2);color:var(--ws-text);border-radius:10px}body.tfb-invoices main{min-width:0;max-width:1500px}body.tfb-invoices input,body.tfb-invoices select{border-radius:10px;background:var(--ws-soft);color:var(--ws-text);border-color:var(--ws-line)}}

@media screen{.tfb-invoices-frame{display:block;width:100%;height:calc(100dvh - 125px);min-height:550px;border:0;border-radius:16px;background:var(--ws-panel)}body.tfb-invoices.tfb-invoices-embedded{padding:0!important}body.tfb-invoices.tfb-invoices-embedded>header{display:none!important}body.tfb-invoices.tfb-invoices-embedded main{padding:0!important;width:100%;max-width:none}.tfb-invoices-embedded .ws-sidebar,.tfb-invoices-embedded .ws-shade{display:none!important}}
@media screen{body.tfb-crm.tfb-crm .ws-theme-button{font-size:0!important;box-shadow:none!important}body.tfb-crm.tfb-crm .ws-theme-button::after{font-size:20px}body.tfb-crm.tfb-crm #tab-stats>.orders-page-heading{display:none!important}}
@media screen and (max-width:760px){body.tfb-crm.tfb-crm .header.ws-header{flex-wrap:nowrap!important;gap:6px!important}body.tfb-crm.tfb-crm .header-actions{display:contents!important}body.tfb-crm.tfb-crm .header-actions .user-badge{padding:3px!important}body.tfb-crm.tfb-crm .header-actions .user-badge>span:not(.user-avatar),body.tfb-crm.tfb-crm .header-actions .tfb-role-label{display:none!important}body.tfb-crm.tfb-crm .tfb-top-search{min-width:80px;flex:1}body.tfb-crm.tfb-crm .header .notif-badge button{width:36px;padding:5px!important}body.tfb-crm.tfb-crm .header .ws-theme-button{min-width:32px;padding:5px!important}body.tfb-crm.tfb-crm .header .ws-menu{min-width:34px;padding:6px!important}}

@media screen and (max-width:760px){body.tfb-crm.tfb-crm #tab-stats>.card{margin-left:0!important;margin-right:0!important}}
@media screen{
body.tfb-crm.tfb-crm .tfb-refresh{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px!important;background:var(--ws-primary)!important;color:white!important;border:1px solid var(--ws-primary)!important;box-shadow:none!important;font-weight:600} .tfb-refresh svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.client-siret-insight{display:flex;align-items:center;justify-content:space-between;gap:24px}.client-siret-insight>div:first-child{flex:1;min-width:0}.client-siret-insight p{font-size:12px;color:var(--ws-muted);max-width:540px}.client-siret-chart{width:160px;height:160px;flex:0 0 160px;border-radius:50%;display:grid;place-items:center}.client-siret-chart>span{display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--ws-panel);border-radius:50%;width:112px;height:112px}.client-siret-chart strong{font-size:28px;font-variant-numeric:tabular-nums}.client-siret-chart small{font-size:11px;color:var(--ws-muted)}#client-siret-summary{max-width:420px;display:grid;gap:6px}body.tfb-crm.tfb-crm .client-siret-legend{display:flex;align-items:center;gap:10px;border:0!important;background:transparent!important;text-align:left;padding:6px 0;min-height:32px!important}.client-siret-legend>span:first-child{width:9px;height:9px;border-radius:50%;flex:none}.client-siret-legend strong{margin-left:auto}.client-apporteur-filter{display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--ws-muted);min-width:170px}.client-apporteur-filter select{width:100%}
.purchase-stage-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start;margin-top:18px}.purchase-stage{min-width:0;border:1px solid var(--ws-line);border-radius:16px;padding:14px;background:var(--ws-soft)}.purchase-stage>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 0 14px;border-bottom:1px solid var(--ws-line);margin-bottom:14px}.purchase-stage>header h3{font-size:13px!important;margin:0}.purchase-stage>header>span{border-radius:16px;padding:3px 9px;background:var(--ws-panel);font-weight:700;font-size:11px}.purchase-stage[data-purchase-stage=draft]{border-top:3px solid #E5A328}.purchase-stage[data-purchase-stage=ordered]{border-top:3px solid #6D3CE8}.purchase-stage[data-purchase-stage=received]{border-top:3px solid #137A53}.purchase-stage-list{display:grid;gap:12px}.purchase-stage-list>.purchase-order-card{padding:16px;min-width:0;background:var(--ws-panel);border-radius:12px}.purchase-stage-list>.purchase-order-card button{width:100%;margin-top:8px}.purchase-order-client-refs{font-size:11px;color:var(--ws-accent);overflow-wrap:anywhere}.purchase-shopify-lookup{border:1px solid var(--ws-line);background:var(--ws-soft);border-radius:12px;padding:16px;margin:16px 0}.purchase-shopify-lookup label{display:block}.purchase-shopify-lookup input{display:block;width:100%;margin:8px 0}.purchase-shopify-lookup [role=status]{font-size:12px;color:var(--ws-muted);line-height:1.6}.purchase-stage-list>p{font-size:12px;color:var(--ws-muted)}
@media screen and (max-width:1100px){.purchase-stage-board{grid-template-columns:1fr}.purchase-stage-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media screen and (max-width:600px){.purchase-stage-list{grid-template-columns:1fr}.client-siret-insight{flex-wrap:wrap}.client-siret-chart{margin:auto;width:140px;height:140px;flex-basis:140px}.client-siret-chart>span{width:96px;height:96px}.client-apporteur-filter{width:100%}}

/* Clients : recherche prioritaire et répartition du portefeuille */
.client-insights-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.client-insights-grid .client-siret-insight{margin:0;min-width:0}.client-search-main{position:relative;width:100%;margin:0 0 16px}.client-search-main .search-box{width:100%;max-width:none;min-height:46px}.client-apporteur-controls{flex-basis:100%;display:flex;align-items:flex-start;gap:12px;min-width:0}.client-apporteur-controls>strong{padding-top:8px}#client-apporteur-buttons{display:flex;flex-wrap:wrap;gap:7px}#client-apporteur-buttons .filter-btn{border-radius:999px;padding:8px 13px}#client-apporteur-buttons .filter-btn[aria-pressed=true]{background:var(--primary);color:white}#client-apporteur-summary{max-height:228px;overflow:auto}.client-insights-grid .client-siret-legend{width:100%;text-align:left}.client-insights-grid .client-siret-legend span:nth-child(2){overflow-wrap:anywhere}
@media(max-width:1050px){.client-insights-grid{grid-template-columns:1fr}}@media(max-width:480px){.client-apporteur-controls{flex-direction:column;gap:6px}.client-insights-grid .client-siret-insight{gap:12px}.client-insights-grid .client-siret-chart{width:110px;height:110px;flex:0 0 110px}}

/* MAJ 37 : commandes à sélectionner et références du résumé. */
.purchase-order-dialog .purchase-command-picker{max-height:52dvh;border:0;border-radius:0;display:grid;gap:12px;padding:2px 4px 8px 1px}.purchase-command-card{min-width:0;border:1px solid var(--ws-line);border-radius:14px;background:var(--ws-panel);overflow:hidden}.purchase-command-card.is-selected{border-color:var(--ws-accent)}.purchase-command-card>header{display:flex;align-items:center;gap:12px;padding:14px;background:var(--ws-soft);flex-wrap:wrap}.purchase-command-card>header>input{width:20px;height:20px;flex-shrink:0;accent-color:var(--ws-accent)}.purchase-command-card>header>label{flex:1;min-width:120px}.purchase-command-card>header strong{display:block;font-size:16px;color:var(--ws-accent)}.purchase-command-card>header small{display:block;font-size:12px;color:var(--ws-muted);overflow-wrap:anywhere}.purchase-command-count{font-size:11px;color:var(--ws-muted)}.purchase-command-card>header button{font-size:12px}.purchase-command-products .purchase-catalogue-row{grid-template-columns:22px minmax(0,1fr) 90px 160px;padding:14px;gap:14px}.purchase-command-products .purchase-catalogue-row.without-prices{grid-template-columns:22px minmax(0,1fr) 90px}.purchase-command-products .purchase-catalogue-row:last-child{border-bottom:0}.purchase-command-products .purchase-catalogue-row.is-selected{background:color-mix(in srgb,var(--ws-accent) 8%,var(--ws-panel))}.purchase-command-products .purchase-catalogue-row>input{width:18px;height:18px;accent-color:var(--ws-accent)}.purchase-command-products label{min-width:0;font-size:11px;color:var(--ws-muted)}.purchase-command-products label[for]{cursor:pointer;overflow-wrap:anywhere}.purchase-command-products label strong{color:var(--ws-text);font-size:13px}.purchase-command-products input[type=number]{display:block;margin-top:6px;min-height:40px;font-size:14px;font-weight:600}.purchase-line-total{font-size:10px!important}.purchase-shopify-lookup>small{display:block;color:var(--ws-muted);font-size:12px;margin-top:10px;line-height:1.6}.purchase-summary-row>div{min-width:0}.purchase-summary-row>div:first-child{flex:1}.purchase-summary-row>div:first-child>small{display:block;margin-top:4px}.purchase-summary-refs{flex:1;max-width:55%;text-align:right}.purchase-reference-chips{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-top:6px}.purchase-reference-chips span{background:var(--ws-soft);border:1px solid var(--ws-line);border-radius:7px;padding:4px 8px;font-size:11px;color:var(--ws-text);overflow-wrap:anywhere}
@media(max-width:600px){.purchase-command-card>header{gap:10px}.purchase-command-count{width:100%;padding-left:30px}.purchase-command-card>header button{margin-left:30px}.purchase-command-products .purchase-catalogue-row,.purchase-command-products .purchase-catalogue-row.without-prices{grid-template-columns:20px minmax(0,1fr)}.purchase-command-products .purchase-catalogue-row>label:nth-of-type(n+2){grid-column:2}.purchase-summary-refs{max-width:100%;text-align:left}.purchase-reference-chips{justify-content:flex-start}}

.purchase-picker-settings{border:1px solid var(--ws-line);border-radius:12px;margin:16px 0;padding:14px}.purchase-picker-settings>summary{cursor:pointer;font-weight:700;color:var(--ws-text)}.purchase-picker-settings .purchase-order-fields{margin-top:16px}.purchase-order-dialog .purchase-command-picker:focus-within{scroll-margin-bottom:110px}

.purchase-command-card>header>label{cursor:pointer;padding:4px 0}@media(max-width:600px){.purchase-order-dialog .purchase-command-picker{max-height:none;overflow:visible}}

/* Suivi produit indépendant de l’étape de l’achat. */
.purchase-product-tracking{display:grid;gap:8px;margin-top:12px;max-width:420px}.purchase-product-tracking label{font-size:11px;color:var(--ws-muted)}.purchase-product-tracking select,.purchase-product-tracking input{display:block;width:100%;box-sizing:border-box;min-height:42px;margin-top:5px;padding:9px;font:inherit;color:var(--ws-text);background:var(--ws-panel);border:1px solid var(--ws-line);border-radius:8px}.purchase-product-tracking[data-state=blocked]{border-left:3px solid #B45309;padding-left:12px}.purchase-product-tracking[data-state=ordered]{border-left:3px solid var(--ws-accent);padding-left:12px}.purchase-product-tracking[data-state=shipped],.purchase-product-tracking[data-state=received]{border-left:3px solid #137A53;padding-left:12px}.purchase-order-dialog .purchase-summary-row>div:first-child{flex:2}

.purchase-split-preview{padding:14px;border:1px solid var(--ws-line);border-radius:12px;background:var(--ws-soft);color:var(--ws-text);font-size:12px;line-height:1.6}.purchase-order-dialog .purchase-tools{flex-wrap:wrap}
