.cm{font-family:var(--font);color:var(--text)}.cm-header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:20px}.cm h2{margin:0;font-size:25px}.cm-header p{color:var(--text2);margin:6px 0}.cm-actions,.cm-toolbar,.cm-selection{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cm-toolbar{margin-bottom:12px}.cm-toolbar>input{flex:1;min-width:240px}.cm input,.cm select,.cm-dialog input,.cm-dialog select,.cm-dialog textarea{font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--border2);border-radius:7px;padding:9px 11px;min-width:0;box-sizing:border-box}.cm input:focus-visible,.cm select:focus-visible,.cm-dialog :focus-visible{outline:2px solid var(--blue);outline-offset:2px}.cm input[type=checkbox],.cm-dialog input[type=checkbox]{width:17px;height:17px;accent-color:var(--blue)}.cm-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:14px;padding:18px;background:var(--bg2);border:1px solid var(--border);border-radius:10px;margin-bottom:16px}.cm-filters label,.cm-dialog label:not(.cm-check){display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--text2)}.cm-range{display:flex;gap:6px}.cm-range input{width:50%}.cm-selection{font-size:13px}.cm-selection #cm-count{margin-right:auto}.cm #cm-status{font-size:13px;color:var(--text2);min-height:20px}.cm #cm-status[data-error=true],.cm-warning,.cm-dialog-error{color:var(--red,#d65d56)}.cm-table-wrap{overflow-x:auto}.cm-table{border-collapse:collapse;width:100%;font-size:13px}.cm-table th{padding:12px 9px;text-align:left;border-bottom:2px solid var(--border);color:var(--text2);font-size:12px;font-weight:600}.cm-table td{padding:13px 9px;border-bottom:1px solid var(--border);vertical-align:middle;font-size:13px}.cm-table tr:hover{background:var(--bg2)}.cm-col-name{min-width:220px;max-width:420px}.cm small,.cm-dialog small{display:block;font-size:11px;line-height:1.5;margin-top:4px;color:var(--text2)}.cm small.cm-warning{color:var(--red,#d65d56)}.cm-col-account,.cm-col-recommended,.cm-col-client_price,.cm-col-cost{min-width:115px}.cm-photo{display:block;position:relative;border:1px solid var(--border);background:#fff;border-radius:8px;width:64px;height:64px;cursor:pointer}.cm-photo img{width:100%;height:100%;object-fit:contain}.cm-photo small{position:absolute;bottom:0;right:3px;color:#30475c}.cm .cm-text,.cm .cm-price{font:inherit;border:0;padding:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.cm td .cm-text{color:var(--blue);line-height:1.5}.cm-price{white-space:nowrap;font-weight:600!important}.cm-price:not(:disabled){border-bottom:1px dashed var(--blue)!important}.cm-price:disabled{cursor:default}.cm #cm-more{display:block;margin:20px auto}.cm-dialog{font:14px/1.5 var(--font);color:var(--text);background:var(--bg);border:1px solid var(--border2);border-radius:14px;padding:0;width:min(950px,95vw);max-height:90dvh}.cm-dialog::backdrop{background:rgba(0,0,0,.55)}.cm-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--bg);z-index:1}.cm-dialog h3{margin:0;font-size:20px}.cm-dialog-body{padding:22px}.cm-dialog label{margin-bottom:14px}.cm-check{display:flex;align-items:center;gap:8px}.cm-dialog .btn{font:inherit}.cm-dialog details{border-bottom:1px solid var(--border);padding:12px 0}.cm-dialog summary{cursor:pointer;font-weight:500}.cm-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.cm-dialog textarea{min-height:100px}.cm-column-list>div{display:flex;gap:8px;align-items:center;padding:5px 0}.cm-column-list label{flex:1;flex-direction:row!important;margin:0}.cm-category-row,.cm-rule{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cm-category-row>input,.cm-rule>strong{flex:1}.cm-category-row label{margin:0;white-space:nowrap}.cm-preview-table{max-height:45dvh;overflow:auto;margin:14px 0}.cm-preview-table table{border-collapse:collapse;width:100%}.cm-preview-table td,.cm-preview-table th{padding:9px;text-align:left;border-bottom:1px solid var(--border);font-size:13px}.cm-gallery{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:center;gap:12px}.cm-gallery img{width:100%;height:55vh;object-fit:contain;background:#fff;border-radius:8px}.cm [hidden],.cm-dialog [hidden]{display:none!important}.cm-muted{color:var(--text2);font-size:11px}@media(max-width:700px){.cm-header{align-items:flex-start;flex-direction:column}.cm-toolbar>input{min-width:100%;width:100%}.cm-dialog-body{padding:14px}.cm-category-row,.cm-rule{flex-wrap:wrap}.cm-rule>strong{min-width:100%}.cm-rule input{width:100px}}

/* The dashboard uses fixed-layout document tables; catalog columns size to content. */
.cm .btn,.cm-dialog .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font:500 13px/1.3 var(--font);color:var(--text);background:var(--bg2);border:1px solid var(--border2);border-radius:8px;padding:9px 13px;min-height:36px;cursor:pointer;white-space:normal}.cm .btn:hover,.cm-dialog .btn:hover{border-color:var(--blue);color:var(--blue)}.cm .btn:disabled,.cm-dialog .btn:disabled{opacity:.5;cursor:default}.cm-dialog{margin:auto}.cm .cm-table{table-layout:auto}.cm .cm-table th,.cm .cm-table td{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.cm .cm-table th{min-width:75px;line-height:1.4;text-transform:none;letter-spacing:normal}.cm .cm-table th:first-child{min-width:30px}.cm .cm-col-published{min-width:150px}.cm .cm-col-name{min-width:230px}.cm .cm-col-category{min-width:130px}.cm-dialog .cm-preview-table table{table-layout:auto}.cm-dialog .cm-preview-table td{white-space:normal;text-overflow:clip;overflow:visible}.cm-dialog .cm-preview-table th{text-transform:none;letter-spacing:normal;white-space:normal}.cm-dialog .cm-dialog-error{white-space:pre-wrap}.cm-dialog .cm-check{color:var(--text)}
.cm .cm-col-recommended,.cm .cm-col-client_price,.cm .cm-col-cost{min-width:140px}.cm .cm-col-recommended button,.cm .cm-col-client_price button,.cm .cm-col-cost button{overflow-wrap:normal}

.cm-category-order{display:flex;gap:4px}.cm-category-order .btn{min-width:34px;padding:8px}.cm-category-row>input{min-width:100px}

.cm-dialog-error[data-success=true]{color:var(--green,#397b56)}

.cm-add-photo{max-width:100px;white-space:normal}
.cm-gallery-editor{width:min(1100px,96vw)}.cg-product{font-weight:600;overflow-wrap:anywhere;margin:0 0 18px}.cg-product small{font-weight:400}.cg-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.cg-toolbar>span{font-size:18px;font-weight:600}.cg-help{color:var(--text2);line-height:1.5;max-width:70ch}.cg-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-top:22px}.cg-tile{min-width:0;border:1px solid var(--border2);border-radius:9px;padding:9px}.cg-preview{width:100%;aspect-ratio:1;border:0;border-radius:5px;padding:6px;background:#fff;cursor:zoom-in}.cg-preview img{width:100%;height:100%;object-fit:contain}.cg-tile-title{min-height:26px;padding-top:8px;font-size:13px}.cg-tile-title strong{color:var(--blue)}.cg-order,.cg-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}.cm-gallery-editor .cg-tile .btn{padding:6px 8px;font-size:12px}.cg-main{width:100%}.cg-order{min-height:65px;align-content:start}.cg-actions .btn{flex:1}.cg-empty{grid-column:1/-1;padding:44px 18px;border:1px dashed var(--border2);border-radius:8px;text-align:center;color:var(--text2);line-height:1.7}.cg-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:16px 22px;border-top:1px solid var(--border);background:var(--bg)}.cm-gallery-editor .cg-save{background:var(--blue);color:#fff}.cg-lightbox{padding:15px;width:min(960px,95vw)}.cg-lightbox>button{display:block;margin:0 0 10px auto}.cg-lightbox>img{display:block;width:100%;height:70vh;object-fit:contain;background:#fff}.cm-gallery-editor [hidden]{display:none!important}
@media(max-width:900px){.cg-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:550px){.cg-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cg-footer{padding:12px 14px;flex-wrap:wrap}.cg-footer .btn{flex:1}.cg-actions{flex-direction:column}}

.cm .cm-suggested{display:inline-block;color:var(--blue);font-weight:600;background:var(--blue-dim,rgba(59,130,246,.12));border:1px solid var(--blue);border-radius:7px;padding:6px 9px;text-align:left;white-space:normal}.cm-suggestion-note{padding:14px;border:1px solid var(--blue);border-radius:9px;background:var(--blue-dim,rgba(59,130,246,.08));margin:12px 0}.cm-suggestion-note p{margin:8px 0;overflow-wrap:anywhere}.cm-suggestion-note a{color:var(--blue)}

/* Catalogue sorting is visible even when filters or the chosen column are hidden. */
.cm-sortbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px 14px;margin:0 0 16px}.cm-sortbar>label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--text2)}.cm-sortbar select{width:250px;max-width:100%;font-size:13px}.cm-sortbar>span{align-self:center;font-size:12px;color:var(--text2)}.cm-sortbar .btn{min-height:38px}.cm .cm-sort-header{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:34px;font:inherit;text-align:left;color:inherit;background:transparent;border:0;padding:3px 0;cursor:pointer}.cm-sort-icon{flex-shrink:0;color:var(--text2);font-size:16px}.cm .cm-table th[aria-sort=ascending],.cm .cm-table th[aria-sort=descending]{color:var(--blue);border-bottom-color:var(--blue)}.cm .cm-table th:not([aria-sort=none]) .cm-sort-icon{color:var(--blue)}.cm-sort-header:hover{color:var(--blue)}.cm-sort-header:focus-visible,.cm-sortbar .btn:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:4px}@media(max-width:550px){.cm-sortbar{align-items:stretch}.cm-sortbar>label{flex:1 1 180px}.cm-sortbar select{width:100%}.cm-sortbar>.btn{align-self:flex-end}.cm-sortbar>span{flex-basis:100%}}
.cm-sort-header>span:first-child{overflow-wrap:normal;word-break:normal}.cm .cm-col-photo{min-width:110px}.cm .cm-add-photo{min-width:90px;overflow-wrap:normal}

.cm-col-manufacturer{min-width:140px}.cm-dialog [hidden]{display:none!important}

/* The manufacturers dialog is mounted outside .cm; use shared dialog buttons. */
.cm-dialog .cm-manufacturer-button{width:100%;justify-content:flex-start;min-height:40px;text-align:left;color:var(--blue);font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.cm-dialog .cm-manufacturer-button:hover,.cm-dialog .cm-manufacturer-button:focus-visible{background:var(--blue-dim,rgba(59,130,246,.12));border-color:var(--blue)}
.cm-dialog .cm-manufacturer-button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.cm-views{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.cm-views .btn[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:white}.cm-archive-badge{color:var(--text3)}.pc-archive{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 12px}.pc-archive p{flex-basis:100%;margin:0;font-size:13px;color:var(--text2)}.pc-archive-result{font-size:12px;color:var(--text2)}

/* An advisory marker, without automatically archiving the product. */
.cm .cm-unsold-badge{display:inline-block;margin:4px 0 0 6px;padding:3px 7px;border:1px solid color-mix(in srgb,var(--amber,#b77a20) 45%,var(--border));border-radius:6px;color:var(--text);background:color-mix(in srgb,var(--amber,#b77a20) 10%,var(--bg2));font-size:11px;line-height:1.4;white-space:normal}

.cm .cm-col-avito_price{min-width:140px}.cm .cm-col-avito_price button{overflow-wrap:normal}

/* Category constructor: editable hierarchy, scoped sibling ordering. */
.cm-dialog .cm-category-tree-row{display:grid;grid-template-columns:38px minmax(140px,1fr) minmax(140px,1fr) auto;gap:12px;margin:0;padding:16px 0 16px calc(var(--depth,0)*14px);border-bottom:1px solid var(--border);align-items:end}
.cm-category-tree-row .cm-category-order{flex-direction:column;grid-row:span 2;align-self:center}
.cm-dialog .cm-category-tree-row label{margin:0;white-space:normal}
.cm-category-tree-row label input:not([type=checkbox]),.cm-category-tree-row select{width:100%}
.cm-category-tree-row .cm-check{align-self:center}.cm-category-actions{display:flex;gap:8px;flex-wrap:wrap;grid-column:2/-1}
.cm-category-note{grid-column:2/-1}.cm-category-help{color:var(--text2);max-width:70ch;margin-top:0}
.cm-category-new{padding:18px;background:var(--bg2);border:1px solid var(--border);border-radius:10px;margin:20px 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end}
.cm-category-new h4,.cm-category-new small{grid-column:1/-1;margin:0}.cm-dialog .cm-category-new label{margin:0}
@media(max-width:650px){.cm-dialog .cm-category-tree-row{grid-template-columns:34px minmax(0,1fr);gap:10px}.cm-category-tree-row .cm-category-order{grid-row:span 4}.cm-category-tree-row label,.cm-category-tree-row .cm-check{grid-column:2}.cm-category-actions{grid-column:2;gap:6px}.cm-category-new{grid-template-columns:minmax(0,1fr)}.cm-category-new h4,.cm-category-new small{grid-column:1}.cm-category-actions .btn{padding:8px;font-size:12px}}

/* Manufacturer navigation preferences: category-scoped, never product visibility. */
.cm-brand-help{color:var(--text2);font-size:13px;line-height:1.55}.cm-brand-tools{margin:16px 0}.cm-brand-rows{border-top:1px solid var(--border)}.cm-brand-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}.cm-dialog .cm-brand-row label{margin:0;color:var(--text);font-size:14px}.cm-brand-row .cm-check{align-items:center}.cm-brand-row input{flex:none}.cm-brand-row .cm-check>span{overflow-wrap:anywhere}.cm-brand-number{font-size:12px;color:var(--text2);text-align:center}.cm-brand-row.is-hidden .cm-check>span{color:var(--text2)}.cm-brand-order{display:flex;gap:6px}.cm-brand-order .btn{min-width:40px;min-height:40px;justify-content:center;padding:6px}.cm-brand-footer{margin-top:18px}.cm-brand-footer>span{font-size:13px;color:var(--text2)}.cm-brand-row .btn:disabled{opacity:.4;cursor:default}.cm-brand-tools .btn{min-height:40px}@media(max-width:500px){.cm-brand-row{grid-template-columns:20px minmax(0,1fr) auto;gap:8px}.cm-brand-order{flex-direction:column;gap:4px}.cm-brand-tools{gap:7px}.cm-brand-tools .btn{font-size:12px;padding:8px}.cm-brand-row .cm-check{gap:8px}}

/* One settings entry, using the same typography and controls as the catalogue. */
.cm-settings-intro{margin-top:0;color:var(--text2)}.cm-settings-menu{border-top:1px solid var(--border)}
.cm-dialog .cm-settings-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:left;padding:20px 4px;background:none;color:var(--text);border:0;border-bottom:1px solid var(--border);font:inherit;cursor:pointer}
.cm-settings-item strong{display:block;font-size:16px;font-weight:600}.cm-settings-item small{display:block;margin-top:6px;color:var(--text2);line-height:1.5;font-size:13px}.cm-settings-item>span:last-child{font-size:28px;color:var(--text2)}
.cm-dialog .cm-settings-item:hover{background:var(--bg2)}.cm-settings-item:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.cm-settings-back{margin:0 0 18px}.cm-logo-toolbar{display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap;margin-bottom:16px}.cm-dialog .cm-logo-toolbar>label{flex:1;min-width:180px;margin:0}.cm-logo-toolbar input{width:100%}
.cm-logo-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0;border-bottom:1px solid var(--border);padding-bottom:12px}.cm-logo-tabs .btn{min-height:42px}.cm-logo-tabs .is-active{background:var(--blue);color:#fff;border-color:var(--blue)}.cm-logo-tabs .btn:focus-visible{outline:2px solid var(--blue);outline-offset:3px}.cm-dialog #cm-logo-category-label{display:block;margin:0 0 12px}.cm-dialog #cm-logo-category-label[hidden]{display:none}.cm-dialog #cm-logo-category{width:100%;max-width:100%;min-height:42px}.cm-logo-scope{color:var(--text2);font-size:13px;margin:-10px 0 18px;overflow-wrap:anywhere}
.cm-logo-row{display:grid;grid-template-columns:136px minmax(0,1fr) auto;align-items:center;gap:18px;padding:16px 0;border-bottom:1px solid var(--border)}
.cm-logo-preview,.cm-logo-large{background:#fff;color:#172334;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:8px;padding:14px;text-align:center;overflow-wrap:anywhere}
.cm-logo-preview{width:136px;height:82px;box-sizing:border-box}.cm-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}.cm-logo-preview.is-dark,.cm-logo-large.is-dark{background:#172334;color:#fff}
.cm-logo-info strong{display:block;font-size:15px;line-height:1.4}.cm-logo-info small{display:block;font-size:12px;color:var(--text2);margin:5px 0}.cm-dialog .cm-logo-info .cm-text{font:inherit;font-size:12px;min-height:32px;background:none;color:var(--blue);border:0;cursor:pointer;padding:4px 0;text-align:left}
.cm-logo-editor-title{margin:0 0 18px;font-size:19px}.cm-logo-edit-layout{display:grid;grid-template-columns:minmax(180px,280px) minmax(0,1fr);gap:24px;align-items:start}.cm-logo-large{min-height:180px;padding:20px}.cm-logo-large img{width:100%;max-height:240px;object-fit:contain}.cm-logo-edit-layout input[type=file]{width:100%;box-sizing:border-box;white-space:normal}.cm-logo-edit-layout small{display:block;margin-top:6px;color:var(--text2)}.cm-logo-edit-layout .cm-check{align-items:center}
#cm-logo-status,#cm-intro-status{font-size:13px;color:var(--text2);line-height:1.5}.cm-dialog .cm-logo-row>.btn{min-height:42px;white-space:normal}.cm-dialog .cm-logo-edit-layout .btn{min-height:40px}
@media(max-width:600px){.cm-logo-row{grid-template-columns:96px minmax(0,1fr);gap:12px}.cm-logo-preview{width:96px;height:68px;padding:10px}.cm-logo-row>.btn{grid-column:2;justify-self:start}.cm-logo-edit-layout{grid-template-columns:minmax(0,1fr);gap:16px}.cm-logo-large{min-height:140px}.cm-logo-large img{max-height:170px}.cm-logo-toolbar{align-items:stretch}.cm-logo-toolbar>.btn{width:100%;white-space:normal}.cm-settings-item strong{font-size:15px}}

/* Category artwork is separate from the category hierarchy and product galleries. */
.cm-category-photo-button{display:flex!important;align-items:center;gap:9px;text-align:left;min-height:48px}.cm-category-photo-button small{font-size:11px;font-weight:400}.cm-category-photo-mini{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;border:1px solid var(--border);border-radius:7px;background:#fff;color:#64748b;overflow:hidden}.cm-category-photo-mini img{width:100%;height:100%;object-fit:contain}.cm-category-actions{align-items:center}.cm-category-photo-path{margin-top:0;font-weight:600;overflow-wrap:anywhere}.cm-category-photo-layout{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:24px;align-items:start}.cm-category-photo-preview{aspect-ratio:1;display:flex;align-items:center;justify-content:center;border:1px solid var(--border2);border-radius:10px;background:#fff;color:#64748b;overflow:hidden}.cm-category-photo-preview img{width:100%;height:100%;object-fit:contain}.cm-category-photo-preview p{text-align:center;padding:20px;font-size:14px}.cm-category-photo-layout>div{min-width:0}.cm-category-photo-layout p{margin-top:0}.cm-category-photo-layout input[type=file]{max-width:100%;width:100%}.cm-category-photo-save{background:var(--blue)!important;color:white!important}.cm-category-photo-dialog #cci-status{min-height:22px;color:var(--text2)}.cm-category-photo-dialog footer{margin-top:18px}.cm-category-photo-dialog .btn:disabled{opacity:.5;cursor:default}@media(max-width:600px){.cm-category-photo-layout{grid-template-columns:minmax(0,1fr);gap:16px}.cm-category-photo-preview{width:min(220px,100%);justify-self:center}.cm-category-photo-button{width:100%}.cm-category-photo-dialog h3{font-size:18px}}

/* In-cell price editing, including keyboard save and retry states. */
.cm-inline-price{scroll-margin-block:80px 24px;scroll-margin-inline:12px;width:230px;max-width:100%;min-width:165px;text-align:left}.cm-inline-price-controls{display:flex;gap:5px;align-items:center}.cm .cm-inline-price input{width:130px;min-width:70px;flex:1;padding:8px 9px;background:var(--bg);font-size:14px;font-variant-numeric:tabular-nums;border-color:var(--blue)}.cm-inline-price-controls .btn{flex:none;min-width:30px;min-height:34px;padding:4px 6px;font-size:17px}.cm-inline-price-controls [data-price-save]{color:var(--blue)}.cm .cm-inline-price-error{color:var(--red,#d65d56);white-space:normal}.cm-inline-price-preview{white-space:normal}.cm-inline-price[aria-busy=true]{opacity:.75}.cm-inline-price input[aria-invalid=true]{border-color:var(--red,#d65d56)}.cm-inline-price .btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
