.catalog-mobile-cards{display:none}
.mobile-category-toggle{display:none}
.catalog-sort-control{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:5px 10px;border:1px solid #e4ebe6;border-radius:6px;background:#fff;color:#63766b;font-size:11px;white-space:nowrap}
.catalog-sort-control select{max-width:145px;border:0;background:transparent;color:#3e5d4c;font:inherit;outline:0}
.product-advanced-fields{margin:2px 0 16px;border:1px solid #e2eae4;border-radius:7px;background:#f8faf8}
.product-advanced-fields>summary{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 12px;color:#33725a;font-size:13px;font-weight:650;cursor:pointer;list-style:none}
.product-advanced-fields>summary::-webkit-details-marker{display:none}
.product-advanced-fields>summary:after{content:'+';margin-left:auto;color:#087f68;font-size:19px;font-weight:400}
.product-advanced-fields[open]>summary:after{content:'−'}
.product-advanced-fields>summary small{color:#85948b;font-size:10px;font-weight:400}
.product-advanced-grid{padding:5px 12px 12px}
.reference-photo-actions{position:absolute;inset:2px 2px auto;display:flex;align-items:center;justify-content:space-between;pointer-events:none}
.reference-photo-actions button{position:static!important;display:grid;place-items:center;width:25px;height:25px;min-width:25px;padding:0;border:0;border-radius:50%;background:#176c52;color:#fff;font-size:15px;line-height:1;pointer-events:auto;box-shadow:0 1px 4px #14251a55}
.reference-photo-actions button[data-action="remove-product-photo"]{background:#9b493d;font-size:18px}
.reference-photo-actions button:disabled{opacity:.35;box-shadow:none}

@media(max-width:760px){
 .catalog-desktop-table{display:none!important}
 .modal-backdrop.product-editor-backdrop{align-items:stretch;justify-content:stretch;padding:0}
 .product-editor-modal{display:flex;flex-direction:column;width:100%;max-width:none!important;height:100dvh;max-height:100dvh!important;margin:0;padding:0!important;overflow:hidden;border:0;border-radius:0!important;box-shadow:none}
 .product-editor-modal>.modal-head{position:relative;z-index:2;flex:0 0 auto;min-height:56px;margin:0;padding:9px 13px;background:#fff;border-bottom:1px solid #e6eee8}
 .product-editor-modal #product-form{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 15px calc(20px + env(safe-area-inset-bottom))}
 .product-editor-modal #product-form .form-grid{grid-template-columns:minmax(0,1fr);gap:0}
 .product-editor-modal #product-form .field{margin-bottom:13px}
 .product-editor-modal #product-form .form-footer{position:sticky;bottom:0;z-index:2;margin:16px -15px 0;padding:12px 15px max(12px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4ece6;box-shadow:0 -5px 16px #173c2910}
 .product-editor-modal #product-form .form-footer .btn{min-height:42px}
 .product-editor-modal #product-form .product-image-editor{margin:0 0 13px;padding:10px;border-radius:7px}
 .product-editor-modal #product-form .product-image-editor>.field{margin:0 0 5px}
 .product-editor-modal #product-form .product-image-preview{gap:7px;min-height:62px;margin:5px 0 8px}
 .product-editor-modal #product-form .product-image-preview img{width:68px;height:62px}
 .product-editor-modal #product-form .reference-photo{padding:2px}
 .product-editor-modal #product-form .reference-photo-actions button{width:22px;height:22px;min-width:22px;font-size:13px}
 .product-editor-modal #product-form .add-reference-photo{width:68px;height:62px;flex-basis:68px;gap:0;border-width:1px}
 .product-editor-modal #product-form .add-reference-photo-icon{font-size:22px;line-height:23px}
 .product-editor-modal #product-form .add-reference-photo strong{font-size:10px}
 .product-editor-modal #product-form .add-reference-photo small{display:none}
 .product-editor-modal #product-form .product-image-editor>small{font-size:9px;line-height:1.45}
 .product-advanced-fields{margin:2px 0 15px}
 .product-advanced-fields>summary{min-height:40px}
 .catalog-sort-control{min-height:36px;padding:4px 8px}
 .catalog-sort-control select{max-width:142px}
 .catalog-layout-full>.category-sidebar{margin:0 12px 8px;padding:8px 11px}
 .category-sidebar-head{margin-bottom:0!important}
 .mobile-category-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;padding:6px 8px;border:1px solid #dce7df;border-radius:6px;background:#fff;color:#087f68;font-size:12px;white-space:nowrap}
 .category-sidebar:not(.mobile-category-open) .category-search,.category-sidebar:not(.mobile-category-open) .category-tree-content{display:none!important}
 .category-sidebar.mobile-category-open .category-sidebar-head{margin-bottom:10px!important}
 .category-sidebar.mobile-category-open .category-search{display:flex!important}
 .category-sidebar.mobile-category-open .category-tree-content{display:block!important}
 .catalog-mobile-cards{display:block;padding:12px}
 .catalog-mobile-select-all{display:flex;align-items:center;gap:9px;min-height:42px;margin:0 0 8px;padding:0 3px;color:#566b60;font-size:12px}
 .catalog-mobile-select-all input,.catalog-mobile-checkbox{width:19px;height:19px;flex:0 0 19px;accent-color:var(--green)}
 .catalog-mobile-card{min-width:0;margin:0 0 10px;padding:12px;border:1px solid #e3ebe5;border-radius:8px;background:#fff}
 .catalog-mobile-card.product-row-selected{border-color:#7eb895;background:#f3faf5}
 .catalog-mobile-card-head{display:grid;grid-template-columns:20px 42px minmax(0,1fr);align-items:center;gap:9px;min-width:0}
 .catalog-mobile-card-head>.product-art{width:42px;height:42px;border-radius:7px}
 .catalog-mobile-name{display:flex;flex-wrap:wrap;align-items:center;gap:3px 7px;min-width:0;line-height:1.45}
 .catalog-mobile-name>strong{min-width:0;overflow-wrap:anywhere;font-size:14px;color:#2d4037}
 .catalog-mobile-name>small{flex:0 0 100%;min-width:0;margin:0;color:#718178;font-size:11px;overflow-wrap:anywhere}
 .catalog-mobile-name .soft-badge{padding:2px 6px;font-size:10px}
 .catalog-mobile-prices{display:grid;grid-template-columns:minmax(0,1.25fr) repeat(2,minmax(0,1fr));gap:7px;margin-top:11px;padding:9px 8px;border-radius:6px;background:#f5f8f6}
 .catalog-mobile-prices>div{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0}
 .catalog-mobile-prices span{color:#75847b;font-size:10px;white-space:nowrap}
 .catalog-mobile-prices strong{min-width:0;overflow-wrap:anywhere;color:#52645a;font-size:12px;font-variant-numeric:tabular-nums}
 .catalog-mobile-prices .catalog-mobile-retail strong{color:#087f68;font-size:17px;font-weight:750}
 .catalog-mobile-meta{display:flex;flex-wrap:wrap;gap:5px 12px;margin-top:9px;color:#718078;font-size:10px;line-height:1.5}
 .catalog-mobile-meta span{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .catalog-mobile-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1ee}
 .catalog-mobile-actions .btn{min-height:38px;padding:7px 10px;font-size:11px}
 .catalog-mobile-actions .danger{color:#a75c43!important}
 .catalog-layout-full>.catalog-products{overflow:hidden}
}

@media(max-width:380px){
 .catalog-mobile-cards{padding:9px}
 .catalog-mobile-card{padding:10px}
 .catalog-mobile-prices{gap:5px;padding:8px 6px}
 .catalog-mobile-prices .catalog-mobile-retail strong{font-size:16px}
 .catalog-mobile-actions{gap:4px}
 .catalog-mobile-actions .btn{padding:6px 8px}
}

html[data-theme="dark"] .catalog-mobile-select-all{color:#c2d2c8}
html[data-theme="dark"] .catalog-mobile-card{border-color:#3a4b42;background:#1d2924}
html[data-theme="dark"] .catalog-mobile-card.product-row-selected{border-color:#67a880;background:#21372b}
html[data-theme="dark"] .catalog-mobile-name>strong{color:#e1ece5}
html[data-theme="dark"] .catalog-mobile-name>small,html[data-theme="dark"] .catalog-mobile-meta{color:#b4c5ba}
html[data-theme="dark"] .catalog-mobile-prices{background:#26352f}
html[data-theme="dark"] .catalog-mobile-prices span{color:#b6c7bb}
html[data-theme="dark"] .catalog-mobile-prices strong{color:#d4e1d8}
html[data-theme="dark"] .catalog-mobile-prices .catalog-mobile-retail strong{color:#8ee0bd}
html[data-theme="dark"] .catalog-mobile-actions{border-color:#3b4c43}
html[data-theme="dark"] .mobile-category-toggle{background:#24322d;color:#8ee0bd;border-color:#3b5047}
@media(max-width:760px){html[data-theme="dark"] .product-editor-modal>.modal-head,html[data-theme="dark"] .product-editor-modal #product-form .form-footer{background:#202a27;border-color:#34443e}}
html[data-theme="dark"] .catalog-sort-control,html[data-theme="dark"] .product-advanced-fields{background:#1d2924;border-color:#3a4b42;color:#c5d5ca}
html[data-theme="dark"] .catalog-sort-control select{color:#dce8e2}
html[data-theme="dark"] .product-advanced-fields>summary{color:#8ee0bd}

/* Mobile-first cards for the day-to-day inventory, document, and partner lists. */
.mobile-record-cards,.mobile-inventory-cards,.mobile-partner-cards{display:none}
.partners-results{overflow-x:auto}
.desktop-partners-table{min-width:0;overflow-x:auto}
@media(max-width:760px){
 .desktop-record-table,.desktop-inventory-table,.desktop-partners-table{display:none!important}
 .mobile-record-cards,.mobile-inventory-cards,.mobile-partner-cards{display:flex;flex-direction:column;gap:10px;padding:10px}
 .partners-results{overflow:visible}
 .mobile-record-card,.mobile-inventory-card,.mobile-partner-card{min-width:0;padding:13px;border:1px solid #e3ebe5;border-radius:10px;background:var(--panel,#fff);box-shadow:0 2px 8px #173b2b08}
 .mobile-record-head,.mobile-inventory-head,.mobile-partner-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;min-width:0}
 .mobile-record-head>div,.mobile-inventory-head>.product-cell,.mobile-partner-head>div{min-width:0}
 .mobile-record-head .doc-link{display:block;max-width:100%;padding:0;border:0;background:none;color:var(--green,#087f68);font-size:14px;font-weight:700;text-align:left;overflow-wrap:anywhere}
 .mobile-record-head small{display:block;margin-top:4px;color:#7b8c81;font-size:10px}
 .mobile-record-head>.soft-badge,.mobile-inventory-head>.soft-badge{flex:0 0 auto;max-width:45%;white-space:normal;text-align:center;line-height:1.35}
 .mobile-record-kind{display:flex;align-items:center;gap:6px;margin-top:10px;color:#60766a;font-size:11px}
 .mobile-record-party{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 10px;margin-top:10px;padding:9px 10px;border-radius:7px;background:#f6f9f7;font-size:11px}
 .mobile-record-party span{color:#839187}.mobile-record-party strong{min-width:0;color:#4e6357;font-weight:550;overflow-wrap:anywhere}
 .mobile-record-total{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1ee;color:#718078;font-size:11px}
 .mobile-record-total strong{color:#087f68;font-size:18px;font-variant-numeric:tabular-nums}
 .mobile-record-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
 .mobile-record-actions .text-button,.mobile-record-actions .icon-btn{min-height:40px;padding:8px 10px;border-radius:6px;background:#f7faf8}
 .mobile-record-actions .star-button{width:40px;height:40px;padding:0;border:1px solid #e4ece6;border-radius:7px;font-size:21px}
 .mobile-inventory-head{align-items:center}
 .mobile-inventory-head .product-cell{display:flex;align-items:center;gap:9px;min-width:0}
 .mobile-inventory-head .product-art{width:42px;height:42px;border-radius:7px}
 .mobile-inventory-head .product-cell>div:last-child{min-width:0}
 .mobile-inventory-head .product-cell strong,.mobile-inventory-head .product-cell small{display:block;overflow-wrap:anywhere}
 .mobile-inventory-head .product-cell strong{color:#344c3e;font-size:13px;line-height:1.45}
 .mobile-inventory-head .product-cell small{margin-top:3px;color:#78877e;font-size:10px}
 .mobile-inventory-stocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:11px}
 .mobile-inventory-stock{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:9px;border-radius:7px;background:#f6f9f7}
 .mobile-inventory-stock>span{color:#7a8b80;font-size:10px}
 .mobile-inventory-stock>strong{margin-top:3px;color:#275e45;font-size:17px;font-variant-numeric:tabular-nums}
 .mobile-inventory-stock>strong small{margin-left:4px;color:#819087;font-size:10px;font-weight:500}
 .mobile-inventory-stock>small{margin-top:4px;color:#78877e;font-size:10px;overflow-wrap:anywhere}
 .mobile-inventory-stock .text-button{min-height:36px;margin-top:3px;padding:6px 0;font-size:11px}
 .mobile-inventory-foot{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1ee;color:#7a8980;font-size:10px}
 .mobile-inventory-foot strong{color:#50695a;font-weight:650}
 .mobile-partner-head{align-items:center}
 .mobile-partner-head .partner-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:#eaf4ed;color:#34734f;font-weight:700}
 .mobile-partner-head>div{flex:1}
 .mobile-partner-head>div strong,.mobile-partner-head>div small{display:block;overflow-wrap:anywhere}
 .mobile-partner-head>div strong{color:#344c3e;font-size:14px}
 .mobile-partner-head>div small{margin-top:4px;color:#7a8b80;font-size:10px}
 .mobile-partner-head>.soft-badge{flex:0 0 auto;max-width:34%;white-space:normal;text-align:center}
 .mobile-partner-contact{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;padding:9px 10px;border-radius:7px;background:#f6f9f7;font-size:11px}
 .mobile-partner-contact strong{min-width:0;color:#64756b;font-weight:550;overflow-wrap:anywhere}
 .mobile-partner-contact a{color:#087f68;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}
 .mobile-partner-contact>span{color:#9aa59d;font-size:10px}
 .mobile-partner-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:9px}
 .mobile-partner-stats>div{display:flex;flex-direction:column;min-width:0;padding:8px 7px;border:1px solid #edf1ee;border-radius:7px}
 .mobile-partner-stats span,.mobile-partner-stats small{color:#849188;font-size:9px;line-height:1.5}
 .mobile-partner-stats strong{margin-top:4px;color:#415d4c;font-size:12px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .mobile-partner-stats strong.orange{color:#bb773d}
 .mobile-partner-extra{display:flex;flex-direction:column;gap:5px;margin-top:9px;color:#708078;font-size:10px;line-height:1.6;overflow-wrap:anywhere}
 .mobile-partner-extra>small{color:#8b978f}
 .partner-extra-info{margin-top:4px}
 .partner-extra-info summary{min-height:32px;padding:6px 0;color:#317457;font-size:10px;cursor:pointer}
 .mobile-partner-extra .partner-extra-info>div{display:grid;grid-template-columns:1fr;gap:3px;padding:6px 9px;border-radius:6px;background:#f6f9f7}
 .mobile-partner-actions{display:flex;gap:10px;margin-top:9px;padding-top:8px;border-top:1px solid #edf1ee}
 .mobile-partner-actions .text-button{min-height:40px;padding:8px 10px}
 .mobile-partner-card.muted-row{opacity:.76}
 .mobile-record-cards,.mobile-inventory-cards,.mobile-partner-cards{padding:10px}
 .mobile-record-card,.mobile-inventory-card,.mobile-partner-card{border-radius:9px}
}
@media(max-width:380px){
 .mobile-record-cards,.mobile-inventory-cards,.mobile-partner-cards{padding:8px;gap:8px}
 .mobile-record-card,.mobile-inventory-card,.mobile-partner-card{padding:10px}
 .mobile-inventory-head .product-art{width:36px;height:36px}
 .mobile-inventory-stocks{gap:5px}
 .mobile-inventory-stock{padding:7px}
 .mobile-partner-stats{gap:4px}
 .mobile-partner-stats>div{padding:7px 5px}
}
html[data-theme="dark"] .mobile-record-card,html[data-theme="dark"] .mobile-inventory-card,html[data-theme="dark"] .mobile-partner-card{border-color:#3a4b42;background:#1d2924;box-shadow:none}
html[data-theme="dark"] .mobile-record-head small,html[data-theme="dark"] .mobile-record-kind,html[data-theme="dark"] .mobile-record-total,html[data-theme="dark"] .mobile-inventory-foot,html[data-theme="dark"] .mobile-partner-head>div small,html[data-theme="dark"] .mobile-partner-extra{color:#b4c5ba}
html[data-theme="dark"] .mobile-record-party,html[data-theme="dark"] .mobile-inventory-stock,html[data-theme="dark"] .mobile-partner-contact,html[data-theme="dark"] .mobile-partner-extra .partner-extra-info>div{background:#26352f}
html[data-theme="dark"] .mobile-record-party span,html[data-theme="dark"] .mobile-inventory-stock>span,html[data-theme="dark"] .mobile-inventory-stock>small,html[data-theme="dark"] .mobile-partner-stats span,html[data-theme="dark"] .mobile-partner-stats small{color:#b6c7bb}
html[data-theme="dark"] .mobile-record-party strong,html[data-theme="dark"] .mobile-inventory-head .product-cell strong,html[data-theme="dark"] .mobile-inventory-foot strong,html[data-theme="dark"] .mobile-partner-head>div strong,html[data-theme="dark"] .mobile-partner-stats strong{color:#d4e1d8}
html[data-theme="dark"] .mobile-record-total strong,html[data-theme="dark"] .mobile-inventory-stock>strong,html[data-theme="dark"] .mobile-partner-contact a{color:#8ee0bd}
html[data-theme="dark"] .mobile-record-actions .text-button,html[data-theme="dark"] .mobile-record-actions .icon-btn,html[data-theme="dark"] .mobile-record-actions .star-button,html[data-theme="dark"] .mobile-partner-stats>div{background:#26352f;border-color:#3a4b42}
html[data-theme="dark"] .mobile-partner-head .partner-avatar{background:#263b32;color:#8ee0bd}
