/* Distributor uses the live staff mobile.css. Only customer-only adapters below. */
body.distributor>header,body.distributor>main,body.distributor>footer,body.distributor>.mini-header,body.distributor>#mini-panel,body.distributor>.brand-strip{display:none!important}
body.distributor{background:var(--bg);color:var(--text);font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
#app.distributor-app{width:100%;min-width:0;max-width:100%;margin:0;padding:0;color:var(--text)}
#app.distributor-app .dp-nav{display:flex;align-items:center}#app.distributor-app .dp-content{min-height:60vh}#app.distributor-app .cat-price{display:block!important;white-space:nowrap;color:var(--text);font-size:13px}#app.distributor-app .cat-name{min-width:0}#app.distributor-app .dp-availability{display:block;font-size:10px;color:var(--muted)}
#app.distributor-app .cat-add .icon{width:34px;min-height:36px;padding:0}#app.distributor-app .stock-badge:empty{display:none}
#app.distributor-app .dp-form{display:block}#app.distributor-app .dp-form .new-submit{width:100%}#app.distributor-app .dp-form input[type=hidden]{display:none!important}
#app.distributor-app .cart-tools .line-price-control{cursor:default}#app.distributor-app .cart-unit{font:inherit;font-size:11px}

#app.distributor-app #dp-recipient-results,#app.distributor-app #dp-product-results{display:grid;gap:3px;max-height:230px;overflow:auto}#app.distributor-app #dp-recipient-results button,#app.distributor-app #dp-product-results button{text-align:left;background:var(--surface);color:var(--text);font-size:13px}
#app.distributor-app .dp-consent{display:flex;align-items:center;gap:8px;font-size:11px}#app.distributor-app .dp-consent input{width:18px;min-height:18px;flex:0 0 18px;margin:0}#app.distributor-app .error{color:#d65050;font-size:12px}#app.distributor-app .error:empty{display:none}
#app.distributor-app .dp-recipient-detail summary{text-align:right;color:var(--muted);font-size:12px;cursor:pointer}#app.distributor-app .dp-recipient-detail p{white-space:pre-wrap}#app.distributor-app .customer-title{font-size:16px;margin:0}
body.distributor #modal{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 40px);margin:auto;padding:18px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:18px;font:inherit}
body.distributor #modal-content{min-width:0}body.distributor #modal h2{font-size:18px;margin-bottom:12px}body.distributor #modal .dp-form{display:grid;gap:8px}body.distributor #modal .dp-danger{color:#d44;background:transparent}body.distributor #modal .dp-actions{display:grid;gap:6px}body.distributor #modal .dp-image{max-width:100%;max-height:75vh;object-fit:contain}
body.distributor #modal .dp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body.distributor #modal .inline-actions{display:flex;gap:8px;margin-top:12px}body.distributor #modal .inline-actions>*{flex:1;min-width:0}body.distributor #modal .dp-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}body.distributor #modal .dp-days button{padding:0;min-height:36px}body.distributor #modal .dp-days .selected{background:var(--accent);color:white}
body.distributor #modal .dp-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}body.distributor #modal .dp-filter label{margin:0}body.distributor #modal .dp-filter select{font-size:12px;padding:6px;min-height:36px}body.distributor #modal .dp-filter input{min-width:0}
#app.distributor-app [hidden],body.distributor #modal [hidden]{display:none!important}#app.distributor-app input[type=number]{appearance:textfield}#app.distributor-app input::-webkit-inner-spin-button{appearance:none}
#app.distributor-app #dp-selected{flex:1;min-width:0}#app.distributor-app #dp-selected .selected-customer-heading{display:flex;align-items:center;gap:8px}#app.distributor-app #dp-selected .change-customer{margin-left:auto}#app.distributor-app #dp-selected small{display:block}#app.distributor-app .identity-row{display:flex;align-items:center;gap:8px}#app.distributor-app .identity-row>input{flex:1;min-width:0}#app.distributor-app .shipment-calendar{margin-left:auto}#app.distributor-app .line-price-control.secondary{display:flex;align-items:center;background:var(--soft);color:var(--accent);border-radius:8px;font-weight:600}#app.distributor-app .cat-item{gap:8px}#app.distributor-app .cat-price{margin-left:auto}#app.distributor-app .cat-add{flex-shrink:0}#app.distributor-app .detail-body .pair{padding-block:6px}

.dp-profile{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;font-size:14px}.dp-profile dd{margin:0;overflow-wrap:anywhere}.dp-profile dt{color:var(--muted)}

/* Staff primitives are the visual authority; no storefront typography. */
body.distributor #app.distributor-app{font:inherit}
body.distributor #modal{border:0;border-radius:20px;padding:18px;background:var(--surface);color:var(--text)}
#app.distributor-app .staff-tabs{overflow-x:auto;flex-wrap:nowrap}
#app.distributor-app .staff-tabs button{flex-shrink:0}
#app.distributor-app .cat-price{font-size:inherit;font-weight:600}
#app.distributor-app .cart-unit{font-family:inherit;font-weight:inherit}

/* Distributor constraints only: readonly prices and tenant recipients. Staff CSS owns layout. */
#app.distributor-app .delivery-cost-line .cart-tools{grid-column:2;display:flex;justify-content:flex-end}
#app.distributor-app .delivery-cost-line input{width:72px;min-width:0;text-align:center;font:inherit}
#app.distributor-app .delivery-cost-line .line-subtotal{min-width:74px;text-align:right}
#app.distributor-app .line-price-control{justify-content:center}
#app.distributor-app .client-row-name{font-weight:inherit}
#app.distributor-app .new-submit{width:100%}
#app.distributor-app .danger{color:var(--red,#ef4444)}
body.distributor #sheet,body.distributor #receiving-calendar{font:inherit;color:var(--text);box-sizing:border-box}
body.distributor #sheet [hidden]{display:none!important}
body.distributor #sheet .dp-image{max-width:100%;max-height:70dvh;object-fit:contain}

body.distributor #sheet .pay-file-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.distributor #sheet .pay-file-actions button{width:100%;min-width:0}
body.distributor #sheet .dp-pdf{width:100%;height:65dvh;border:0}
body.distributor #sheet .inline-actions{display:flex;gap:8px}
body.distributor #sheet .inline-actions>*{flex:1;min-width:0;text-align:center}
body.distributor #sheet .order-menu{display:grid;gap:8px}
body.distributor #sheet .danger{color:var(--red,#ef4444)}
#app.distributor-app .detail-top .headline h1{flex:1;min-width:0}

body.distributor #sheet #simple-pay .pay-file-actions{grid-template-columns:repeat(2,minmax(0,1fr))}

/* A delivery is one editable amount, without a quantity/unit/removal column. */
#app.distributor-app #order-form .delivery-cost-line{grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:8px}
#app.distributor-app #order-form .delivery-cost-line .cart-tools{grid-column:2;grid-row:1;display:block;min-width:0}
#app.distributor-app #order-form .delivery-cost-line .line-subtotal{display:none}
#app.distributor-app #order-form .delivery-cost-line input{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:40px;padding:7px 9px;text-align:right;font:inherit;font-size:16px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:7px}

/* Distributor dialog content; shared mobile.css owns dialog positioning. */
body.distributor #sheet :is(form,fieldset,label,.sheet-head,.order-menu,.pay-file-actions,.inline-actions){min-width:0;max-width:100%;box-sizing:border-box}
body.distributor #sheet .sheet-head h2{min-width:0;overflow-wrap:anywhere}
body.distributor #sheet .sheet-head>.icon{flex:0 0 auto}
body.distributor #sheet input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),body.distributor #sheet select,body.distributor #sheet textarea{max-width:100%;min-width:0;box-sizing:border-box}
body.distributor #sheet .inline-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:stretch;gap:8px;width:100%;margin-top:8px}
body.distributor #sheet .inline-actions>*,body.distributor #sheet .pay-file-actions>button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:44px;height:auto;margin:0;padding:10px 12px;box-sizing:border-box;text-align:center;white-space:normal;overflow-wrap:anywhere;line-height:1.25;font-family:inherit;font-size:14px;text-decoration:none}
body.distributor #sheet .order-menu>button{width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:center}
body.distributor #sheet>button[data-delete]{width:100%;min-height:44px;margin:8px 0 0;text-align:center;box-sizing:border-box}
body.distributor #sheet .dp-image{display:block;margin-inline:auto;max-width:100%;height:auto}
body.distributor #sheet .dp-pdf{display:block;max-width:100%;box-sizing:border-box}
body.distributor #sheet .attachment-feedback,body.distributor #sheet .pay-upload-list{max-width:100%;overflow-wrap:anywhere}
body.distributor #sheet .filter-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch}
body.distributor #sheet .filter-footer>button{width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box}

/* Compact distributor navigation and contextual menus. */
body.distributor>.skip-link{display:none!important}
#app.distributor-app .dp-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) 44px 44px;gap:4px;align-items:stretch}
.distributor-app .dp-nav button{min-width:0;min-height:44px;padding:6px 4px;font-size:13px;position:relative}
.distributor-app .dp-nav svg{width:23px;height:23px;vertical-align:middle}
.dp-cart-count{position:absolute;top:0;right:0;min-width:16px;border-radius:9px;background:var(--accent);color:white;font-size:10px}
.dp-order-muted .order-heading,.dp-order-muted .order-info{opacity:.45;text-decoration:line-through}
.dp-notifications label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0}
.dp-notifications input[type=checkbox]{width:20px;height:20px;flex:none}
body.distributor #compact-order-popover .cf-icon-row{grid-template-columns:repeat(5,minmax(0,1fr))}
body.distributor #compact-order-popover .cf-mini-row{display:grid;grid-template-columns:1fr 1fr 44px;gap:6px}
body.distributor #compact-order-popover button,body.distributor #compact-order-popover select{min-width:0;min-height:40px}
body.distributor #sheet.dp-filter-sheet{position:fixed;bottom:auto;margin:0 auto;left:8px;right:8px;width:min(440px,calc(100% - 16px));max-height:65dvh;border-radius:16px;padding:12px}
body.distributor .filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.distributor .filter-grid select{width:100%;min-width:0}
body.distributor .filter-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.distributor .order-menu{display:grid;grid-template-columns:1fr;gap:6px}

body.distributor .profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}body.distributor .profile-actions button{width:100%;min-width:0;margin:0}
body.distributor .profile-payment{padding:10px 0;border-bottom:1px solid var(--line)}body.distributor .profile-payment-orders{display:flex;flex-wrap:wrap;gap:6px}body.distributor .profile-payment-orders button{font-size:12px;min-height:32px}
body.distributor .profile-toggle{display:flex;justify-content:space-between;align-items:center;gap:8px}body.distributor .profile-toggle input{width:20px;height:20px}
body.distributor #sheet input,body.distributor #sheet select,body.distributor #sheet textarea{box-sizing:border-box;max-width:100%;min-width:0}body.distributor .block>details>summary{cursor:pointer;padding:8px 0}body.distributor .pair>span{min-width:0;overflow-wrap:anywhere}

/* Equal navigation tabs, no empty icon columns when the basket is hidden. */
#app.distributor-app .dp-nav{display:flex;gap:4px;align-items:stretch}#app.distributor-app .dp-nav>[data-tab],#app.distributor-app .dp-nav>[data-profile]{flex:1 1 0;min-width:0;text-align:center}#app.distributor-app .dp-nav>[data-basket]{flex:0 0 44px;width:44px}#app.distributor-app .dp-nav>[hidden]{display:none!important}

/* Customer shop and distributor lists. Search stays mounted as results change. */
#app.distributor-app .shop-header{display:block;position:sticky;top:0;z-index:4;padding:calc(4px + env(safe-area-inset-top)) 12px 6px;background:var(--bg)}
#app.distributor-app .shop-heading,#app.distributor-app .shop-header .compact-order-tools{max-width:690px;margin:0 auto;width:100%}
#app.distributor-app .shop-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px}
#app.distributor-app .shop-heading h1{font:650 21px/1.15 inherit;font-family:inherit;font-size:21px;line-height:1.15;margin:0;min-width:0}
#app.distributor-app .shop-tools{display:flex;align-items:center;gap:2px}
#app.distributor-app .shop-tools>button{position:relative;display:grid;place-items:center;border:0;background:transparent;color:var(--accent);width:42px;height:42px;min-height:42px;padding:9px;border-radius:11px;margin:0}
#app.distributor-app .shop-tools>button:active,#app.distributor-app .shop-tools>.filter-active{background:var(--soft)}
#app.distributor-app .shop-tools svg{width:22px;height:22px}
#app.distributor-app .shop-header .compact-order-tools{display:block;min-height:0;height:auto;padding:0}
#app.distributor-app .shop-header .toolbar-search{display:block;min-height:40px;height:40px;width:100%;margin:0;padding:0 12px;border:1px solid var(--line);background:var(--surface);border-radius:10px;font:inherit;font-size:16px}
#app.distributor-app .shop-nav{position:fixed;inset:auto 0 0;z-index:5;display:flex;width:min(100%,714px);margin:0 auto;padding:3px 6px max(3px,env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);height:auto;gap:2px}
#app.distributor-app .shop-nav button[data-tab]{display:grid;place-items:center;align-content:center;gap:2px;flex:1 1 0;margin:0;border:0;border-radius:9px;min-width:0;height:47px;padding:4px 0;line-height:1.1;font-size:11px;box-shadow:none;background:transparent;color:var(--muted)}
#app.distributor-app .shop-nav button.active{color:var(--accent);background:var(--soft)}
#app.distributor-app .shop-nav svg{width:20px;height:20px}
#app.distributor-app .dp-content{max-width:714px;margin:0 auto;padding:5px 12px calc(70px + env(safe-area-inset-bottom));min-height:45vh}
#app.distributor-app .catalog-folder{margin:0 0 7px;padding:0 8px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
#app.distributor-app .catalog-folder h3{padding:6px 2px 3px;margin:0;font-size:13px;color:var(--muted)}
#app.distributor-app .catalog-folder .cat-item{display:grid;grid-template-columns:minmax(0,1fr) auto 38px;gap:6px;min-height:38px;padding:0 2px;align-items:center}
#app.distributor-app .catalog-folder .cat-name{display:block;text-align:left;font-size:13px;line-height:1.15;min-height:38px;margin:0;padding:2px 0}
#app.distributor-app .catalog-folder .cat-name small{font-size:10px;line-height:1.1}
#app.distributor-app .catalog-folder .cat-add button{width:38px;height:38px;min-height:38px;margin:0;padding:0;display:grid;place-items:center}
#app.distributor-app .dp-content>.order-card{min-height:0;padding:5px 9px;margin:0 0 3px;border-radius:9px}
#app.distributor-app .order-card :is(.order-info,.order-heading){margin:0;min-height:0;line-height:1.2}
#app.distributor-app .order-card .order-info{padding:2px 0 0;gap:5px}
#app.distributor-app .order-card .order-info :is(.order-name,.amount){font-size:13px}
#app.distributor-app .dp-content>.client-row{margin:0 0 2px;padding:4px 8px;min-height:38px}
#app.distributor-app .dp-content[aria-busy=true]:empty::before{content:'Загрузка…';color:var(--muted);font-size:13px}
#app.distributor-app.shop-style{--accent:#216451;--soft:#e4f1e9;--bg:#f6f8f5;--surface:white;--line:#dce6df;--text:#183229;--muted:#577064;color:var(--text);background:var(--bg);min-height:100dvh}
#app.distributor-app.shop-style .shop-heading h1{font-family:Georgia,serif;font-weight:600;font-size:25px}
#app.distributor-app .shop-pay-row{background:var(--surface);border-bottom:1px solid var(--line);padding:6px 10px}
#app.distributor-app .shop-pay-row>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:13px}
#app.distributor-app .shop-pay-row b{margin-left:auto}
#app.distributor-app .shop-pay-row button{font-size:12px;color:var(--accent);padding:2px 4px;min-height:24px}
.shop-pay-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.shop-pay-filters button{min-width:0;height:44px;padding:2px;font-size:12px}
.shop-pay-filters [aria-pressed=true]{outline:2px solid var(--accent);outline-offset:-2px}
body.distributor #sheet.jd-product-card-dialog{padding:16px;--jd-dialog-width:400px}
body.distributor #sheet.jd-product-card-dialog .sheet-head{display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;gap:8px;margin:0 0 8px}
body.distributor #sheet.jd-product-card-dialog .sheet-head h2{white-space:normal;overflow-wrap:anywhere;line-height:1.2;font-size:18px}
body.distributor #sheet.jd-product-card-dialog .product-quantity-control{width:max-content;display:grid;grid-template-columns:42px 62px 42px;gap:4px;margin:7px auto 10px;align-items:center}
body.distributor #sheet.jd-product-card-dialog .product-quantity-control>*{width:100%;height:40px;min-height:40px;padding:0;text-align:center;font-size:16px}
#app.distributor-app .dp-form .cart-line:not(.delivery-cost-line){display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:3px 6px;padding:5px 0;align-items:center}
#app.distributor-app .dp-form .cart-line .description{grid-area:1/1;min-width:0}
#app.distributor-app .dp-form .cart-line .description strong{white-space:normal;line-height:1.2}
#app.distributor-app .dp-form .cart-line .cart-tools{grid-area:2/1/3/-1;display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;flex-wrap:nowrap}
#app.distributor-app .dp-form .cart-line .remove-line{grid-area:1/2;margin:0}
#app.distributor-app .dp-form .cart-line .inline-line-price{flex:0 1 82px;width:82px;min-width:0}
#app.distributor-app .dp-form .cart-line .line-subtotal{margin-left:auto;font-size:12px}
@media(pointer:coarse){#app.distributor-app :is(input,textarea,select):not([type=checkbox]):not([type=radio]){font-size:16px!important}
 html.jd-keyboard-open #app.distributor-app .shop-nav{visibility:hidden;pointer-events:none}
}
body.distributor dialog#sheet.jd-product-card-dialog .sheet-head #sheet-close{display:grid!important;place-items:center;position:static;visibility:visible;width:38px;height:38px;padding:0;margin:0}
@media(pointer:coarse){
 html body.distributor dialog#sheet.jd-product-card-dialog[data-input-anchor]:has(input:focus){
  top:clamp(8px,var(--product-input-top),max(8px,calc(var(--visible-height,100dvh) - 240px)))!important;
  bottom:auto!important;margin-block:0!important;transition:none!important;
  max-height:calc(var(--visible-height,100dvh) - min(var(--product-input-top),max(8px,calc(var(--visible-height,100dvh) - 240px))) - 8px)!important
 }
}
#app.distributor-app .shop-price-label{min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#app.distributor-app .shop-price-label .jd-catalog-price{font:500 11px/1.1 inherit;font-size:11px;color:var(--muted)}
#sheet .shop-favourite{padding:5px 10px;border-radius:8px;margin:3px 0;background:var(--soft);color:var(--accent);font-size:13px}
#app.distributor-app .shop-credit{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;padding:8px 10px;background:var(--soft);color:var(--text);font-size:13px;border-radius:10px}
#app.distributor-app .order-card .order-info .order-origin.shop-waiting{display:inline-block!important;color:var(--accent);font-size:10px;white-space:nowrap;max-width:none;line-height:1.1}
#app.distributor-app .order-card .order-info:has(.shop-waiting){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center}
/* UI labels keep a single line as Telegram resizes. Long prose retains its reading width. */
#app.distributor-app :is(.shop-heading h1,.detail-top h1,.cat-title,.order-name,.client-row-name,.customer-title,.cart-line .description strong),
body.distributor #sheet .sheet-head h2{
 display:block;min-width:0;max-width:100%;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;
 overflow-wrap:normal;word-break:normal;font-size:var(--fit-size,clamp(12px,3.5vw,15px))!important
}
#app.distributor-app :is(.shop-heading h1,.detail-top h1),body.distributor #sheet .sheet-head h2{--fit-max:22;--fit-min:15;font-size:var(--fit-size,clamp(15px,5.2vw,22px))!important}
#app.distributor-app :is(.cat-title,.cart-line .description strong){--fit-max:14;--fit-min:12}
#app.distributor-app .catalog-folder .cat-name{min-width:0;max-width:100%;width:100%;overflow:hidden}
#app.distributor-app .category-name,#app.distributor-app .catalog-folder h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.distributor #sheet .sheet-head{min-width:0;align-items:center}
body.distributor #sheet .sheet-head h2{flex:1 1 0;overflow-x:auto;text-overflow:clip;scrollbar-width:none;touch-action:pan-x pan-y}
body.distributor #sheet .sheet-head h2::-webkit-scrollbar{display:none}
body.distributor :is(#app.distributor-app,#sheet,#compact-order-popover) :is(button,summary,select,time,.amount,.cat-price,.cart-unit,.line-subtotal,.order-no,.order-origin,.status-icon,.dp-availability){
 white-space:nowrap;overflow-wrap:normal;word-break:normal
}
#app.distributor-app .shop-nav button span,body.distributor :is(#app,#sheet) :is(.secondary,.new-submit,.pick-order,.filter-select,.profile-toggle,.shop-pay-filters button){font-size:clamp(12px,3.3vw,15px)}
#app.distributor-app .shop-nav button span{font-size:clamp(11px,2.9vw,13px)}
body.distributor :is(#app,#sheet) :is(.pair,.profile-payment>.row,.profile-payment-orders,.shop-pay-row>div,.inline-actions,.profile-actions){flex-wrap:nowrap}
#app.distributor-app .pair>:first-child,.profile-payment-orders,.shop-pay-row>div:last-child{min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:thin}
#app.distributor-app .pair>.line-name{white-space:nowrap;font-size:clamp(12px,3.3vw,15px)}
#app.distributor-app .pair>.line-price{white-space:nowrap;flex:none}
#app.distributor-app .shop-pay-row button{flex:none}
#app.distributor-app .shop-tools{flex:none}
#app.distributor-app .shop-header .shop-heading h1{flex:0 1 auto;font-size:clamp(21px,6vw,23px)!important}
#app.distributor-app .shop-price-label{font-size:clamp(10px,2.9vw,13px)}
#app.distributor-app .shop-header .toolbar-search{font-size:16px}
#app.distributor-app .dp-form #cart .cart-line{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto 30px!important;grid-template-rows:auto!important;
 align-items:center;column-gap:4px;min-height:39px;padding:2px 0
}
#app.distributor-app .dp-form #cart .cart-line .description{grid-area:1/1;min-width:0}
#app.distributor-app .dp-form #cart .cart-tools{grid-area:1/2;display:flex;flex-wrap:nowrap;align-items:center;gap:4px;width:auto;min-width:0}
#app.distributor-app .dp-form #cart .remove-line{grid-area:1/3;width:30px;height:38px;min-height:38px;padding:0;justify-self:end}
#app.distributor-app .dp-form #cart .inline-line-price{width:clamp(54px,15vw,78px);flex:0 0 auto;font-size:clamp(12px,3.2vw,15px)!important;text-align:center;pointer-events:none}
#app.distributor-app .dp-form #cart .quantity-stepper{display:inline-flex;width:auto;max-width:110px;align-items:center;flex-wrap:nowrap}
#app.distributor-app .dp-form #cart .cart-unit{flex:none;width:auto;max-width:48px;padding-inline:2px;overflow:hidden;text-overflow:ellipsis;font-size:12px}
#app.distributor-app .dp-form #cart .cart-unit button{min-width:0;min-height:34px;max-width:100%;overflow:hidden;text-overflow:ellipsis;padding:0 2px!important}
#app.distributor-app .dp-form #cart .qty{width:42px;min-width:0;flex:0 0 42px;font-size:16px!important;text-align:center;padding-inline:1px}
#app.distributor-app .dp-form #cart .line-subtotal{max-width:none}
@media(max-width:520px){#app.distributor-app .dp-form #cart .cart-line .line-subtotal{display:none!important}}
@media(max-width:360px){#app.distributor-app .shop-tools{gap:0}#app.distributor-app .shop-tools>button{width:38px}
 #app.distributor-app .shop-heading{gap:4px}body.distributor #compact-order-popover button{font-size:12px}
}

/* The device inset and Telegram's overlay are separate parts of the safe area. */
html.jd-shop-fullscreen {
 --safe-top:calc(max(env(safe-area-inset-top,0px),var(--tg-safe-area-inset-top,0px)) + var(--tg-content-safe-area-inset-top,0px));
 --safe-bottom:calc(max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px)) + var(--tg-content-safe-area-inset-bottom,0px));
 --shop-left:calc(max(env(safe-area-inset-left,0px),var(--tg-safe-area-inset-left,0px)) + var(--tg-content-safe-area-inset-left,0px));
 --shop-right:calc(max(env(safe-area-inset-right,0px),var(--tg-safe-area-inset-right,0px)) + var(--tg-content-safe-area-inset-right,0px));
}
.jd-shop-fullscreen body{padding-inline:var(--shop-left) var(--shop-right)}
.jd-shop-fullscreen #app.distributor-app .shop-header{padding-top:calc(4px + var(--safe-top))}
.jd-shop-fullscreen #app.distributor-app .detail-top{padding-top:calc(8px + var(--safe-top))}
.jd-shop-fullscreen #app.distributor-app .shop-nav{
 left:var(--shop-left);right:var(--shop-right);width:auto;max-width:714px;
 padding-bottom:max(3px,var(--safe-bottom))
}
.jd-shop-fullscreen #app.distributor-app .dp-content{padding-bottom:calc(70px + var(--safe-bottom))}
.jd-shop-fullscreen body.customer-mini .mini-header{padding:calc(4px + var(--safe-top)) calc(10px + var(--shop-right)) 7px calc(10px + var(--shop-left))!important}
html.jd-shop-fullscreen body dialog:not(#viewer):not(#jd-connection){
 --dialog-safe-top:calc(var(--visible-top,0px) + var(--safe-top) + 12px);
 top:var(--dialog-safe-top)!important;
 bottom:max(12px,calc(100dvh - var(--visible-top,0px) - var(--visible-height,100dvh) + var(--safe-bottom) + 12px))!important;
 left:calc(var(--shop-left) + 12px)!important;right:calc(var(--shop-right) + 12px)!important;
 max-height:calc(var(--visible-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 24px)!important;
 max-width:calc(100% - var(--shop-left) - var(--shop-right) - 24px)!important
}
@media(pointer:coarse){
 html.jd-shop-fullscreen.jd-keyboard-open body dialog:not(#viewer):not(#jd-connection){bottom:auto!important}
 html.jd-shop-fullscreen body.distributor dialog#sheet.jd-product-card-dialog[data-input-anchor]:has(input:focus){
  top:clamp(var(--dialog-safe-top),var(--product-input-top),max(var(--dialog-safe-top),calc(var(--visible-height,100dvh) - 240px)))!important;
  bottom:auto!important;
  max-height:calc(var(--visible-height,100dvh) - clamp(var(--dialog-safe-top),var(--product-input-top),max(var(--dialog-safe-top),calc(var(--visible-height,100dvh) - 240px))) - var(--safe-bottom) - 8px)!important
 }
}
/* JD 2026-11-25: клиентский каталог — «в наличии», список/папки, счётчик у +, анимация; карточка без прыжка при вводе количества */
body.distributor .dp-catalog-view{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 10px;flex-wrap:wrap}
body.distributor .dp-catalog-view .dp-instock{display:inline-flex;align-items:center;gap:8px;font-size:15px;min-height:36px;cursor:pointer;user-select:none}
body.distributor .dp-catalog-view .dp-instock input{width:20px;height:20px;min-height:0;margin:0;accent-color:var(--accent,#2f6b4f)}
body.distributor .dp-view-toggle{display:inline-flex;border:1px solid var(--line,#cad2da);border-radius:10px;overflow:hidden;background:var(--card,#fff)}
body.distributor .dp-view-toggle button{min-height:34px;padding:0 12px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:14px;box-shadow:none}
body.distributor .dp-view-toggle button[aria-pressed="true"]{background:var(--accent,#2f6b4f);color:var(--on-accent,#fff)}
body.distributor .catalog-folder.catalog-flat{padding-top:4px}
#app.distributor-app .catalog-folder .cat-item{grid-template-columns:minmax(0,1fr) auto auto}
body.distributor .cat-item .cat-add{display:inline-flex;align-items:center;justify-content:flex-end;gap:6px;min-width:38px}
body.distributor .cat-item .cat-qty{min-width:24px;height:24px;padding:0 7px;border-radius:12px;background:var(--accent,#2f6b4f);color:var(--on-accent,#fff);font-size:13px;font-weight:700;line-height:24px;text-align:center;font-variant-numeric:tabular-nums}
body.distributor .cat-item .cat-qty[hidden]{display:none}
.dp-fly-dot{position:fixed;z-index:9999;width:14px;height:14px;border-radius:50%;background:var(--accent,#2f6b4f);pointer-events:none;box-shadow:0 2px 6px rgba(0,0,0,.25)}
html body.distributor dialog#sheet.jd-product-card-dialog[data-input-anchor]:not(#viewer):not(#jd-connection):has(input:focus){top:clamp(8px,var(--product-input-top),max(8px,calc(var(--visible-height,100dvh) - 240px)))!important;bottom:auto!important;margin-block:0!important;transition:none!important}
html.jd-shop-fullscreen body.distributor dialog#sheet.jd-product-card-dialog[data-input-anchor]:not(#viewer):not(#jd-connection):has(input:focus){top:clamp(var(--dialog-safe-top,8px),var(--product-input-top),max(var(--dialog-safe-top,8px),calc(var(--visible-height,100dvh) - 240px)))!important}
/* JD 2026-11-25 t45: кнопки «В наличии» и «Списком/По папкам» в строке заголовка клиента */
#app.distributor-app .shop-tools .dp-shop-chips{display:flex;align-items:center;gap:6px;margin-right:4px;flex:none}
#app.distributor-app .dp-chip{display:inline-flex;align-items:center;gap:4px;height:32px;min-height:32px;padding:0 10px 0 7px;margin:0;border:1.5px solid var(--line,#cad2da);border-radius:16px;background:transparent;color:var(--muted,#5d6b66);font:600 13px/1 inherit;font-family:inherit;white-space:nowrap;box-shadow:none;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
#app.distributor-app .dp-chip svg{width:16px;height:16px;flex:none}
#app.distributor-app .dp-chip .dp-chip-on,#app.distributor-app .dp-chip .dp-chip-off{display:inline-grid;place-items:center}
#app.distributor-app .dp-chip[aria-pressed="true"] .dp-chip-off,#app.distributor-app .dp-chip[aria-pressed="false"] .dp-chip-on{display:none}
#app.distributor-app .dp-chip[aria-pressed="true"]{background:var(--accent,#2f6b4f);border-color:var(--accent,#2f6b4f);color:var(--on-accent,#fff)}
#app.distributor-app .dp-chip-seg{display:inline-flex;height:32px;padding:2px;border:1.5px solid var(--line,#cad2da);border-radius:16px;box-sizing:border-box}
#app.distributor-app .dp-chip-seg button{display:grid;place-items:center;width:30px;height:100%;min-height:0;padding:0;margin:0;border:0;border-radius:13px;background:transparent;color:var(--muted,#5d6b66);box-shadow:none;cursor:pointer}
#app.distributor-app .dp-chip-seg button svg{width:17px;height:17px}
#app.distributor-app .dp-chip-seg button[aria-pressed="true"]{background:var(--accent,#2f6b4f);color:var(--on-accent,#fff)}
#app.distributor-app .dp-chip:active,#app.distributor-app .dp-chip-seg button:active{transform:scale(.95)}
@media(max-width:400px){#app.distributor-app .shop-tools .dp-shop-chips{gap:4px;margin-right:2px}#app.distributor-app .dp-chip{padding:0 8px 0 6px;font-size:12px;gap:3px}#app.distributor-app .dp-chip-seg button{width:27px}}
/* JD 2026-11-25 t46: клиент — «Кабинет» в нижнем меню вместо «Оплат», сортировка заказов в заголовке */
#app.distributor-app .shop-nav button[data-account-tab]{display:grid;place-items:center;align-content:center;gap:2px;flex:1 1 0;margin:0;border:0;border-radius:9px;min-width:0;height:47px;padding:4px 0;line-height:1.1;font-size:11px;box-shadow:none;background:transparent;color:var(--muted,#5d6b66)}
#app.distributor-app .shop-nav button[data-account-tab].active{color:var(--accent);background:var(--soft)}
#app.distributor-app .shop-nav button[data-account-tab] span{font-size:clamp(11px,2.9vw,13px)}
#app.distributor-app.dp-account-screen>main{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
#app.distributor-app .shop-tools .dp-order-sort{display:flex;align-items:center;gap:5px;margin-right:4px;flex:none}
#app.distributor-app .dp-sort-pick{position:relative;display:inline-flex;align-items:center;height:32px;margin:0;padding:0;border:1.5px solid var(--line,#cad2da);border-radius:16px;color:var(--accent,#2f6b4f);box-sizing:border-box}
#app.distributor-app .dp-sort-pick svg{position:absolute;left:8px;width:15px;height:15px;pointer-events:none}
#app.distributor-app .dp-sort-pick select{appearance:none;-webkit-appearance:none;height:100%;min-height:0;width:auto;margin:0;padding:0 10px 0 27px;border:0;border-radius:16px;background:transparent;color:var(--text,#17251f);font:600 13px/1 inherit;font-family:inherit;box-shadow:none;cursor:pointer}
#app.distributor-app .dp-sort-dir{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;margin:0;border:0;border-radius:16px;background:var(--accent,#2f6b4f);color:var(--on-accent,#fff);box-shadow:none;cursor:pointer}
#app.distributor-app .dp-sort-dir svg{width:17px;height:17px;transition:transform .2s}
#app.distributor-app .dp-sort-dir[data-dir="asc"] svg{transform:rotate(180deg)}
#app.distributor-app .dp-sort-dir:active{transform:scale(.94)}
@media(max-width:400px){#app.distributor-app .shop-tools .dp-order-sort{gap:4px;margin-right:2px}#app.distributor-app .dp-sort-pick select{font-size:12px;padding:0 8px 0 25px}}
/* JD 2026-11-26 t49: карточка товара клиента */
body.distributor #sheet.pc-card{--pc-gap:12px;padding:0 16px!important;overflow-x:hidden}
body.distributor #sheet.pc-card .sheet-head{position:absolute;top:10px;right:10px;z-index:3;display:block;margin:0;padding:0;width:auto}
body.distributor #sheet.pc-card .sheet-head #sheet-close{width:36px!important;height:36px!important;border-radius:18px;background:var(--surface,#fff)!important;box-shadow:0 1px 4px rgba(0,0,0,.18);color:var(--text,#17251f);font-size:22px;line-height:1}
body.distributor #sheet.pc-card .pc-photo{margin:0 -16px;height:min(46vw,230px);background:var(--soft,#eef4f0);display:grid;place-items:center;overflow:hidden;border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}
body.distributor #sheet.pc-card .pc-photo img{width:100%;height:100%;object-fit:contain;display:block}
body.distributor #sheet.pc-card .pc-body{display:flex;flex-direction:column;gap:var(--pc-gap);padding:14px 0 4px}
body.distributor #sheet.pc-card.pc-no-photo .pc-body{padding-top:16px}
body.distributor #sheet.pc-card.pc-no-photo .pc-body>h2{padding-right:44px}
body.distributor #sheet.pc-card .pc-body>h2{margin:0;font-size:19px!important;line-height:1.25;font-weight:650;white-space:normal;overflow-wrap:anywhere;color:var(--text,#17251f)}
body.distributor #sheet.pc-card .pc-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:-6px;color:var(--muted,#5d6b66);font-size:13px;min-height:32px}
body.distributor #sheet.pc-card .pc-meta>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.distributor #sheet.pc-card .pc-fav{flex:none;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;margin:0;border:1.5px solid var(--line,#cad2da);border-radius:18px;background:transparent;color:var(--muted,#5d6b66);box-shadow:none}
body.distributor #sheet.pc-card .pc-fav[aria-pressed="true"]{color:var(--jd-warn,#d99a00);border-color:var(--jd-warn,#efd27a);background:var(--jd-warn-bg,#fff8e1)}
body.distributor #sheet.pc-card .pc-fav svg{width:19px;height:19px}
body.distributor #sheet.pc-card .pc-units{display:flex;gap:8px;flex-wrap:wrap}
body.distributor #sheet.pc-card .pc-units button{flex:1 1 0;min-width:84px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:48px;min-height:48px;padding:0 10px;margin:0;border:1.5px solid var(--line,#cad2da);border-radius:12px;background:transparent;color:var(--text,#17251f);font:600 14px/1.1 inherit;font-family:inherit;box-shadow:none}
body.distributor #sheet.pc-card .pc-units button small{font-size:12px;font-weight:500;color:var(--muted,#5d6b66)}
body.distributor #sheet.pc-card .pc-units button[aria-pressed="true"]{border-color:var(--accent,#2f6b4f);background:var(--soft,#eef4f0);color:var(--accent,#2f6b4f);box-shadow:inset 0 0 0 1px var(--accent,#2f6b4f)}
body.distributor #sheet.pc-card .pc-units button[aria-pressed="true"] small{color:var(--accent,#2f6b4f)}
body.distributor #sheet.pc-card .pc-price-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
body.distributor #sheet.pc-card .pc-price{font-size:24px;font-weight:700;color:var(--text,#17251f);font-variant-numeric:tabular-nums;line-height:1.1}
body.distributor #sheet.pc-card .pc-price small{font-size:15px;font-weight:500;color:var(--muted,#5d6b66)}
body.distributor #sheet.pc-card .pc-stock{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:14px;font-size:13px;font-weight:600;white-space:nowrap}
body.distributor #sheet.pc-card .pc-stock::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
body.distributor #sheet.pc-card .pc-in{background:var(--soft,#e5f3ea);color:var(--accent,#23784a)}
body.distributor #sheet.pc-card .pc-low{background:var(--jd-warn-bg,#fff3dc);color:var(--jd-warn,#a86400)}
body.distributor #sheet.pc-card .pc-out{background:var(--jd-disabled,#f1f2f3);color:var(--muted,#7a8187)}
body.distributor #sheet.pc-card .pc-qprice{margin:-6px 0 0;font-size:13px;color:var(--muted,#5d6b66)}
body.distributor #sheet.pc-card .pc-qprice b{color:var(--accent,#2f6b4f)}
body.distributor #sheet.pc-card .pc-desc{margin:0;font-size:15px;line-height:1.45;color:var(--text,#17251f)}
body.distributor #sheet.pc-card .jd-product-docs{margin:4px 0 0;padding:12px 0 4px;border-top:1px solid var(--line,#e2e7e4)}
body.distributor #sheet.pc-card .jd-product-docs summary{min-height:36px;display:flex;align-items:center;font-weight:600;font-size:15px;color:var(--accent,#2f6b4f)}
body.distributor #sheet.pc-card .pc-buy{position:sticky;bottom:0;z-index:2;display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:center;margin:8px -16px 0;padding:12px 16px max(12px,env(safe-area-inset-bottom,0px));background:var(--surface,#fff);border-top:1px solid var(--line,#e2e7e4)}
body.distributor #sheet.pc-card .pc-stepper{display:grid;grid-template-columns:44px 56px 44px;height:48px;border:1.5px solid var(--line,#cad2da);border-radius:12px;overflow:hidden;box-sizing:border-box}
body.distributor #sheet.pc-card .pc-stepper button{width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--accent,#2f6b4f);font-size:22px;font-weight:600;line-height:1;box-shadow:none}
body.distributor #sheet.pc-card .pc-stepper button:disabled{color:var(--line,#b8c2bd)}
body.distributor #sheet.pc-card .pc-stepper input{width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-left:1px solid var(--line,#e2e7e4);border-right:1px solid var(--line,#e2e7e4);border-radius:0;background:transparent;text-align:center;font-size:17px;font-weight:650;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield;box-shadow:none}
body.distributor #sheet.pc-card .pc-stepper input::-webkit-inner-spin-button,body.distributor #sheet.pc-card .pc-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
body.distributor #sheet.pc-card .pc-add{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;min-height:48px;margin:0;padding:0 14px;border:0;border-radius:12px;background:var(--accent,#2f6b4f);color:var(--on-accent,#fff);font:650 15px/1 inherit;font-family:inherit;white-space:nowrap;box-shadow:none}
body.distributor #sheet.pc-card .pc-add svg{width:19px;height:19px;flex:none}
body.distributor #sheet.pc-card .pc-add.in-cart{background:var(--soft,#eef4f0);color:var(--accent,#2f6b4f);box-shadow:inset 0 0 0 1.5px var(--accent,#2f6b4f)}
body.distributor #sheet.pc-card .pc-add:disabled{background:var(--jd-disabled,#eceeef);color:var(--muted,#8a9196);box-shadow:none}
body.distributor #sheet.pc-card .pc-stepper input:disabled{color:var(--muted,#b8c2bd)}
@media(max-width:370px){body.distributor #sheet.pc-card .pc-stepper{grid-template-columns:40px 48px 40px}body.distributor #sheet.pc-card .pc-add{padding:0 10px;font-size:14px;gap:6px}body.distributor #sheet.pc-card .pc-price{font-size:22px}}
/* JD 2026-11-26 t50: уведомления в кабинете клиента */
#app.distributor-app.dp-account-screen details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;list-style:none;cursor:pointer;font-weight:600}
#app.distributor-app.dp-account-screen details>summary::-webkit-details-marker{display:none}
#app.distributor-app.dp-account-screen details>summary::after{content:"";flex:none;width:9px;height:9px;margin-right:4px;border-right:2px solid var(--muted,#5d6b66);border-bottom:2px solid var(--muted,#5d6b66);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
#app.distributor-app.dp-account-screen details[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
#app.distributor-app.dp-account-screen details>summary>span{flex:1 1 auto}
#app.distributor-app .dp-acc-count{flex:none;min-width:24px;height:24px;padding:0 9px;border-radius:12px;background:var(--accent,#2f6b4f);color:var(--on-accent,#fff);font-size:12.5px;font-weight:700;line-height:24px;text-align:center}
#app.distributor-app .dp-acc-count.dp-acc-off{background:var(--jd-disabled,#eceeef);color:var(--muted,#7a8187)}
#app.distributor-app .dp-notify-list{display:flex;flex-direction:column;margin-top:6px}
#app.distributor-app .dp-notify-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:8px 0;border-top:1px solid var(--line,#e2e7e4);cursor:pointer}
#app.distributor-app .dp-notify-row>span{display:flex;flex-direction:column;gap:2px;min-width:0}
#app.distributor-app .dp-notify-row b{font-size:15px;font-weight:600}
#app.distributor-app .dp-notify-row small{font-size:12.5px;color:var(--muted,#5d6b66)}
#app.distributor-app .dp-notify-row input[role=switch]{appearance:none;-webkit-appearance:none;flex:none;position:relative;width:46px;height:28px;min-height:0;margin:0;padding:0;border:0;border-radius:14px;background:var(--line,#cfd6d2);cursor:pointer;transition:background .2s}
#app.distributor-app .dp-notify-row input[role=switch]::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
#app.distributor-app .dp-notify-row input[role=switch]:checked{background:var(--accent,#2f6b4f)}
#app.distributor-app .dp-notify-row input[role=switch]:checked::after{transform:translateX(18px)}
#app.distributor-app .dp-notify-row input[role=switch]:disabled{opacity:.6}
html body.distributor dialog#sheet.pc-card.jd-product-card-dialog[data-pc-kb]:not(#viewer):not(#jd-connection):not(#jd-x){top:var(--pc-kb-top)!important;max-height:var(--pc-kb-max)!important;bottom:auto!important;margin-block:0!important;transition:none!important}
body.distributor #sheet.pc-card>.pc-photo,body.distributor #sheet.pc-card>.pc-buy{width:auto!important;max-width:none!important;box-sizing:border-box}
/* JD 2026-11-26 t51: кабинет клиента — «Изменить», настройки, темы */
#app.distributor-app .detail-top .headline .dp-head-edit{margin-left:auto;display:inline-flex;align-items:center;gap:6px;height:36px;min-height:36px;padding:0 12px 0 10px;border:1.5px solid var(--line);border-radius:18px;background:var(--surface);color:var(--accent);font:600 14px/1 inherit;font-family:inherit;box-shadow:none;white-space:nowrap;flex:none}
#app.distributor-app .detail-top .headline .dp-head-edit svg{width:17px;height:17px}
#app.distributor-app .detail-top .headline{display:flex;align-items:center;gap:8px}
#app.distributor-app .dp-settings .dp-set-title{margin:0 0 8px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
#app.distributor-app .dp-set-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:56px;margin:0;padding:8px 2px;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;color:var(--text);text-align:left;box-shadow:none;font:inherit}
#app.distributor-app .dp-set-title+.dp-set-row{border-top:0}
#app.distributor-app .dp-set-row>span{display:flex;flex-direction:column;gap:2px;min-width:0}
#app.distributor-app .dp-set-row b{font-size:15px;font-weight:600}
#app.distributor-app .dp-set-row small{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app.distributor-app .dp-set-row svg{flex:none;width:18px;height:18px;color:var(--muted)}
#app.distributor-app .dp-settings [data-address-list]{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
#app.distributor-app .dp-settings .dp-set-add{width:100%}
#app.distributor-app .dp-theme-swatches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#app.distributor-app .dp-theme-swatches button{display:flex;flex-direction:column;align-items:center;gap:6px;min-height:72px;margin:0;padding:10px 4px;border:1.5px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font:500 12.5px/1.1 inherit;font-family:inherit;box-shadow:none}
#app.distributor-app .dp-theme-swatches i{display:block;width:28px;height:28px;border-radius:50%;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
#app.distributor-app .dp-theme-swatches button[aria-checked="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--soft);color:var(--accent);font-weight:650}
#app.distributor-app .dp-theme-mode{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:10px;padding:3px;border:1.5px solid var(--line);border-radius:12px;gap:3px}
#app.distributor-app .dp-theme-mode button{min-height:36px;height:36px;margin:0;padding:0 4px;border:0;border-radius:9px;background:transparent;color:var(--text);font-family:inherit;font-weight:600;font-size:13px;line-height:1.1;box-shadow:none}
#app.distributor-app .dp-theme-mode button[aria-checked="true"]{background:var(--accent);color:var(--on-accent,#fff)}
#app.distributor-app .dp-set-note{margin:8px 0 0;font-size:12.5px;color:var(--muted)}
/* t51: client email modal (store.js form inside distributor shell) */
html[data-jd-theme] body.distributor #modal{position:fixed;padding:20px 18px 18px;border:0;border-radius:20px;background:var(--surface);color:var(--text)}
html[data-jd-theme] body.distributor #modal #close-modal{position:absolute;top:12px;right:12px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;margin:0;padding:0;border:0;border-radius:50%;background:var(--soft);color:var(--text);box-shadow:none}
html[data-jd-theme] body.distributor #modal .icon-action svg,html[data-jd-theme] body.distributor #modal .password-toggle svg{display:block;width:20px;height:20px;stroke:currentColor}
html[data-jd-theme] body.distributor #modal #modal-content h2{margin:2px 44px 8px 0;font-size:20px}
html[data-jd-theme] body.distributor #modal #modal-content :is(.muted,.notice){margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.4}
html[data-jd-theme] body.distributor #modal #modal-content form{display:grid;gap:12px}
html[data-jd-theme] body.distributor #modal #modal-content form label{display:grid;gap:6px;color:var(--muted);font-size:13px}
html[data-jd-theme] body.distributor #modal .password-control{position:relative;display:block}
html[data-jd-theme] body.distributor #modal .password-control input{width:100%;padding-right:48px;box-sizing:border-box}
html[data-jd-theme] body.distributor #modal .password-toggle{position:absolute;top:50%;right:4px;display:grid;place-items:center;width:40px;height:40px;min-height:40px;margin:0;padding:0;border:0;background:transparent;color:var(--muted);box-shadow:none;transform:translateY(-50%)}
html[data-jd-theme] body.distributor #modal #modal-content .button{width:100%;min-height:46px;border:0;border-radius:12px;background:var(--accent);color:var(--on-accent,#fff);font-weight:600}
html[data-jd-theme] body.distributor #modal #email-link-back{display:none}
html[data-jd-theme] body.distributor #modal .error:empty{display:none}
html[data-jd-theme] body.distributor #modal .auth-options{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
html[data-jd-theme] body.distributor #modal .small-button:not(.icon-action){min-height:38px;padding:0 14px;border:1.5px solid var(--line);border-radius:10px;background:var(--surface);color:var(--accent);font-weight:600;box-shadow:none}

/* t59 — distributor unified sizes, cart lines, settings, price line (20261126-jd8) */
#app.distributor-app{--jd-btn-h:42px;--jd-btn-r:12px}
#app.distributor-app :is(.new-submit,form button[type=submit]:not(.icon):not(.plain)),body.distributor #sheet form button[type=submit]:not(.icon):not(.plain){min-height:var(--jd-btn-h,42px);height:auto;padding:9px 16px;border-radius:var(--jd-btn-r,12px);font-size:15px!important;font-weight:650;line-height:1.2}
body.distributor :is(#app,#sheet) :is(button.secondary,.profile-actions button,.dp-set-add,[data-pay-more],[data-auto-page]){min-height:40px;height:auto;padding:8px 14px;border-radius:12px;font-size:14px!important;font-weight:600;line-height:1.2}
body.distributor #sheet .profile-actions{margin-top:4px}
body.distributor #sheet .profile-actions:has(>button:only-child){grid-template-columns:1fr}
body.distributor #sheet form:is(#dp-personal-form,.dp-address-form){display:flex;flex-direction:column;gap:10px}
body.distributor #sheet form:is(#dp-personal-form,.dp-address-form)>label{display:flex;flex-direction:column;gap:5px;margin:0;font-size:13px;font-weight:600;color:var(--muted)}
body.distributor #sheet form:is(#dp-personal-form,.dp-address-form) :is(input,select,textarea){width:100%;box-sizing:border-box;min-height:44px;margin:0;font-size:16px;font-weight:400;color:var(--text)}
body.distributor #sheet form .error:empty,#app.distributor-app form .error:empty{display:none}
body.distributor :is(#app,#sheet) form .error{margin:2px 0;color:var(--jd-error,#c4361f);font-size:13px;line-height:1.35}
#app.distributor-app .dp-form .jd-field-note{margin:6px 0 2px}
#app.distributor-app .dp-form .dp-consent{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
#app.distributor-app .dp-form .dp-consent+.jd-field-note{margin:-2px 0 10px}
/* order lines: name on its own row, controls below — nothing is cut or overlapped */
#app.distributor-app #order-form #cart .cart-line:not(.delivery-cost-line){display:grid;grid-template-columns:minmax(0,1fr) 30px;grid-template-rows:auto auto;gap:6px 6px;padding:9px 0;align-items:center}
#app.distributor-app #order-form #cart .cart-line .description{grid-area:1/1;min-width:0}
#app.distributor-app #order-form #cart .cart-line .description strong{white-space:normal;overflow:visible;line-height:1.25;font-size:14px}
#app.distributor-app #order-form #cart .cart-line .remove-line{grid-area:1/2;align-self:start;width:30px;height:30px;min-height:30px}
#app.distributor-app #order-form #cart .cart-line .cart-tools{grid-area:2/1/3/3;display:flex;align-items:center;gap:6px;min-width:0;width:100%}
#app.distributor-app #order-form #cart .cart-line .line-subtotal{display:block!important;margin-left:auto;font-size:14px;font-weight:700;white-space:nowrap}
#app.distributor-app #order-form #cart .cart-line .inline-line-price{min-height:38px;height:38px}
#app.distributor-app #order-form #cart .cart-line .qty{height:38px;min-height:38px}
#app.distributor-app #order-form #cart .cart-line .cart-unit button{min-height:38px}
#app.distributor-app #order-form #cart .cart-line .jd-field-note{grid-column:1/-1;grid-row:3}
/* price list name: own line under the title instead of squeezing the icons */
#app.distributor-app .shop-header>.dp-price-line{display:block;flex:none;max-width:100%;margin:-2px 2px 6px;font-size:12px;line-height:1.25;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* cabinet: settings sheet */
#app.distributor-app .dp-cabinet-view{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:2px}
#app.distributor-app .dp-cabinet-switch .dp-set-title{margin:0 0 8px;font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
#app.distributor-app.dp-cabinet .dp-cabinet-switch{margin-bottom:12px}
#app.distributor-app .dp-cabinet-switch .dp-set-note{margin-bottom:0}
#app.distributor-app .dp-cabinet-switch .dp-set-row:first-of-type{border-top:0}
#app.distributor-app .dp-cabinet-view+.dp-set-note+.dp-set-row{border-top:1px solid var(--line);margin-top:6px}
#app.distributor-app .dp-theme-swatches button{min-height:60px;padding:8px 4px;gap:5px}
#app.distributor-app .dp-theme-swatches i{width:24px;height:24px}
#app.distributor-app .detail-top .headline{gap:8px}
/* product card without photo: title must not run under the close button */
body.distributor #sheet.pc-card.pc-no-photo .pc-body>h2{padding-right:44px}

.jd-addr-suggest{display:grid;gap:4px;margin:4px 0 8px;max-height:220px;overflow:auto;border:1px solid var(--line,#cad2da);border-radius:10px;background:var(--surface,#fff);padding:4px;z-index:5}
.jd-addr-suggest[hidden]{display:none}
.jd-addr-suggest .pick-order{text-align:left;width:100%;white-space:normal}

#dp-recipient.dp-contact-editor,#dp-recipient .dp-contact-group,#dp-recipient [data-contact-list],#dp-recipient .dp-contact-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
#dp-recipient.dp-contact-editor :is(input,button,section,p){box-sizing:border-box;margin:0}
#dp-recipient.dp-contact-editor input,#dp-recipient .dp-contact-actions button{width:100%;max-width:none;justify-self:stretch}
#dp-recipient .dp-contact-actions button{min-height:44px}
#dp-recipient .error:empty{display:none}

#order-form select[data-order-contact],#dp-order select[data-order-contact]{box-sizing:border-box;width:100%;min-width:0;margin:4px 0}
#order-form:has(input[name=address][hidden]) select[data-order-contact=address]{display:none!important}
