:root{--bg:#f5f7fb;--card:#fff;--muted:#6a6a6a;--text:#2a2a2a;--brand:#e53935;--brand-light:#ffebee;--ok:#43a047;--warn:#fbc02d;--danger:#e53935;--border:#e0e0e0;--shadow:0 4px 16px rgba(0,0,0,.08)}*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);letter-spacing:.2px}a{color:inherit;text-decoration:none}.container{max-width:1200px;margin:0 auto;padding:24px}.card{background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:18px}.topbar{position:sticky;top:0;z-index:10;border-bottom:1px solid var(--border);background:rgba(255,255,255,.92);backdrop-filter:blur(12px)}.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px}.brand{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--brand)}.brand__logo{height:32px;width:auto}.brand__text{display:none}.menu{display:flex;gap:6px;flex-wrap:wrap}.menu__item{padding:10px 14px;border-radius:8px;color:var(--muted);font-weight:500}.menu__item:hover{background:var(--brand-light);color:var(--brand)}.menu__item--active{background:var(--brand);color:#fff}.userbox{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px}.avatar{width:32px;height:32px;border-radius:50%;background:var(--brand);overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.page{padding:24px}.grid{display:grid;gap:16px}.grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}@media (max-width:960px){.grid.cols-3{grid-template-columns:1fr}.grid.cols-2{grid-template-columns:1fr}}.section__title{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px 0;font-size:16px;color:var(--muted)}.section__title b{color:var(--text)}.badge{padding:4px 8px;border-radius:999px;font-size:12px;color:#fff}.badge.ok{background:#43a047}.badge.warn{background:#fbc02d;color:#2a2a2a}.badge.danger{background:#e53935}.footer{margin-top:40px;padding:24px;border-top:1px solid var(--border);color:var(--muted);font-size:13px;background:#fff}.footer a{color:var(--muted)}.button{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:8px;background:var(--brand);border:1px solid var(--brand);color:#fff;font-weight:600;cursor:pointer;transition:background .2s}.button:hover{background:#c62828}.button.secondary{background:#f5f5f5;border-color:var(--border);color:var(--text)}.button.secondary:hover{background:#e0e0e0}.input,.select{width:100%;padding:12px 14px;border-radius:8px;border:1px solid var(--border);background:#fff;color:var(--text);outline:none}.input::placeholder{color:#aaa}.form-row{display:grid;grid-template-columns:1fr;gap:12px}.form-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end}.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;background:#fafafa}.auth-card{max-width:440px;width:100%}.auth-title{margin:0 0 16px 0;font-size:24px;color:var(--brand)}.auth-sub{margin:-6px 0 18px 0;color:var(--muted)}.alert{padding:12px 14px;border-radius:8px;background:#ffebee;border:1px solid #e57373;color:#b71c1c}.helper{font-size:12px;color:var(--muted)}.pill{padding:6px 10px;border-radius:999px;background:#f5f5f5;color:#555;border:1px solid var(--border)}.list{display:flex;flex-direction:column}.list__item{display:flex;align-items:center;gap:16px;padding:10px 0;border-top:1px dashed #e3e3e3}.list__item:first-child{border-top:0}.label{min-width:240px;color:#444}.value{font-weight:700}.icon-title{display:flex;align-items:center;gap:10px}.icon{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--brand-light);color:var(--brand)}.icon i{font-size:16px}.card.inset{background:#fff;border:1px dashed var(--border)}/* key-value с иконкой слева */
.kv{display:flex; flex-direction:column; gap:6px; margin-top:8px}
.kv__row{display:flex; align-items:center; gap:10px; padding:4px 0; border-top:1px dashed #eee}
.kv__row:first-child{border-top:0}
.kv__icon{width:26px;height:26px;border-radius:6px;display:grid;place-items:center;
  background:var(--brand-light); color:var(--brand); font-size:12px; flex:0 0 26px}
.kv__value{font-weight:700; color:var(--text)}
.sub-list{margin-top:8px}

/* === Catalog Layout === */
.catalog__layout{display:grid;grid-template-columns:280px 1fr;gap:16px}
.catalog__aside{position:sticky;top:88px;height:calc(100vh - 120px)}
.cat-tree{max-height:calc(100vh - 160px);overflow:auto;padding:8px}
.cat-tree ul{list-style:none;margin:0;padding-left:12px}
.cat-tree .node{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;cursor:pointer}
.cat-tree .node:hover{background:var(--bg-strong,#eef1f7)}
.cat-tree .node.active{background:var(--primary,#2563eb);color:#fff}
.cat-tree .caret{width:16px;text-align:center;opacity:.7}

.catalog__toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.catalog__toolbar .searchbox{display:flex;gap:6px;align-items:center}
.catalog__toolbar .input{min-width:180px}

.filters{border-top:1px dashed var(--border,#e6e8ee);margin-top:8px;padding-top:8px}
.filters__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.filters__body{display:grid;grid-template-columns:repeat(3,minmax(200px,1fr));gap:12px;max-height:320px;overflow:auto;padding-right:4px}
.filter-group{border:1px solid var(--border,#e6e8ee);border-radius:12px;padding:10px}
.filter-group__title{font-weight:600;margin-bottom:8px}
.filter-item{display:flex;align-items:center;gap:8px;margin:6px 0}
.filter-item input{transform:translateY(1px)}

.products-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:12px}
.product-card{background:#fff;border:1px solid var(--border,#e6e8ee);border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.product-card__img{aspect-ratio:1/1;background:#f4f7fb;display:flex;align-items:center;justify-content:center}
.product-card__img img{max-width:100%;max-height:100%;object-fit:contain}
.product-card__body{padding:10px;display:flex;flex-direction:column;gap:6px}
.product-card__name{font-weight:600;min-height:44px}
.product-card__sku{font-size:12px;color:var(--muted);font-family:monospace}
.product-card__price{display:flex;gap:8px;align-items:baseline}
.product-card__price .cur{font-weight:700}
.product-card__price .old{text-decoration:line-through;opacity:.6}
.product-card__actions{margin-top:auto;display:flex;gap:8px}

.pager{display:flex;justify-content:center;gap:6px;margin:12px 0 4px}
.pager .page{padding:6px 10px;border:1px solid var(--border,#e6e8ee);background:#fff;border-radius:10px;cursor:pointer}
.pager .page.active{background:var(--primary,#2563eb);color:#fff;border-color:transparent}
.pager .page[disabled]{opacity:.5;pointer-events:none}

/* Modal (product) */
.modal{position:fixed;inset:0;display:block}
.modal[hidden]{display:none}
.modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.35);backdrop-filter:saturate(110%) blur(1.5px)}
.modal__dialog{position:relative;max-width:1000px;margin:40px auto;background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.18);overflow:hidden}
.modal__close{position:absolute;right:10px;top:10px;border:none;background:transparent;font-size:18px;cursor:pointer}
.modal__content{display:grid;grid-template-columns:minmax(340px,40%) 1fr;gap:16px;padding:16px}
.pm__image{background:#f5f7fb;border:1px solid var(--border,#e6e8ee);border-radius:12px;height:320px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pm__image img{max-width:100%;max-height:100%;object-fit:contain}
.pm__thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.pm__thumbs img{width:64px;height:64px;object-fit:contain;background:#f4f7fb;border:1px solid var(--border,#e6e8ee);border-radius:8px;cursor:pointer;padding:4px}
.pm__title{font-size:20px;margin:0 0 6px}
.pm__price{font-size:18px;font-weight:700;margin-bottom:8px}
.scrollable{max-height:300px;overflow:auto}
.scrollable::-webkit-scrollbar{width:10px;height:10px}
.scrollable::-webkit-scrollbar-thumb{background:#cfd6e6;border-radius:8px}
.scrollable::-webkit-scrollbar-track{background:#f2f4fa;border-radius:8px}

/* small screens */
@media (max-width:1024px){
  .catalog__layout{grid-template-columns:1fr}
  .catalog__aside{position:static;height:auto}
  .filters__body{grid-template-columns:repeat(2,minmax(200px,1fr))}
  .modal__content{grid-template-columns:1fr}
}


/* === v3 polish === */
.product-card{transition:transform .12s ease, box-shadow .12s ease}
.product-card:hover{transform:translateY(-2px); box-shadow:0 6px 24px rgba(0,0,0,.08)}
.product-card__price{gap:10px}
.product-card__price .cur{font-weight:800;font-size:16px;padding:2px 8px;border-radius:10px;background:linear-gradient(180deg,#ffe4e8,#ffd6db);}
.product-card__price .old{font-size:12px;}

.modal__dialog{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);max-width:1100px;width:min(96vw,1100px);max-height:90vh;overflow:hidden}
.modal__content{height:calc(90vh - 60px);overflow:auto;padding:20px}
.modal-open{overflow:hidden}
.pm__title{font-size:22px}
.pm__price{font-size:20px}
.pm__props{margin-top:12px;border-top:1px dashed var(--border,#e6e8ee);padding-top:12px}

/* === v4 UI === */
.cat-tree .node{gap:10px;padding:8px 10px}
.cat-tree .node .node-icon{width:18px;color:#e11d48}
.cat-tree .node .node-text{font-weight:600}
.cat-tree .sub-list{border-left:3px solid #eef2f7;margin-left:12px;padding-left:12px}
.cat-tree .node.active{background:linear-gradient(180deg,#ffe8ea,#ffdfe4);color:#000}
.products-grid .product-card__img{height:240px}
.product-card__img{background:linear-gradient(180deg,#f7f9ff,#f2f5fb)}
.product-card__body{min-height:150px}
.button.small.w100{width:100%}

.filters .filter-group{background:#fff;border:1px solid #edf1f5;border-radius:16px;padding:12px}
.filters .filter-group__title{display:flex;align-items:center;gap:8px}
.filter-item{border:1px solid #eef1f6;border-radius:12px;padding:8px 10px;background:#fbfcff}
.filter-item input{accent-color:#ef4444}

.pm__desc{background:#fafbff;border:1px solid #eef2f6;border-radius:12px;padding:12px}

/* === Cart Badge === */
.menu__item--cart{position:relative;display:flex;align-items:center;gap:4px}
.cart-badge{position:absolute;top:-4px;right:-8px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#e53935;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}

/* === Cart Toast === */
.cart-toast{position:fixed;bottom:24px;right:24px;padding:14px 20px;background:#43a047;color:#fff;border-radius:12px;font-weight:600;box-shadow:0 6px 24px rgba(0,0,0,.18);transform:translateY(100px);opacity:0;transition:all .3s ease;z-index:9999;display:flex;align-items:center;gap:10px}
.cart-toast.show{transform:translateY(0);opacity:1}
.cart-toast i{font-size:18px}

/* === Product Card Cart Button === */
.product-card__actions{display:flex;gap:8px;align-items:stretch}
.product-card__actions .btn-cart{padding:8px 12px;background:#43a047;border-color:#43a047}
.product-card__actions .btn-cart:hover{background:#388e3c}

/* === Modal Cart Section === */
.pm__cart-section{margin-top:16px;padding-top:16px;border-top:1px dashed var(--border,#e6e8ee)}
.pm__cart-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.pm__qty{display:flex;align-items:center;border:1px solid var(--border,#e6e8ee);border-radius:10px;overflow:hidden}
.qty-btn{width:36px;height:36px;border:none;background:#f5f7fb;cursor:pointer;font-size:18px;font-weight:600;color:#555}
.qty-btn:hover{background:#e8ecf3}
.qty-input{width:50px;height:36px;border:none;text-align:center;font-size:15px;font-weight:600;-moz-appearance:textfield}
.qty-input::-webkit-outer-spin-button,.qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pm__add-cart{flex:1;min-width:160px;padding:10px 20px;font-size:15px}
.pm__add-cart i{margin-right:6px}

/* === Cart Page === */
.cart-page .card{padding:24px}
.cart-empty{text-align:center;padding:60px 20px;color:var(--muted)}
.cart-empty i{font-size:64px;opacity:.3;margin-bottom:16px}
.cart-empty p{font-size:18px;margin:0 0 20px}

.cart-table{width:100%;border-collapse:collapse;margin-top:20px}
.cart-table th{text-align:left;padding:12px 8px;border-bottom:2px solid var(--border);color:var(--muted);font-weight:600;font-size:13px}
.cart-table td{padding:12px 8px;border-bottom:1px solid #f0f2f8;vertical-align:middle}
.cart-img{width:70px}
.cart-img img{width:60px;height:60px;object-fit:contain;border-radius:8px;background:#f5f7fb}
.cart-img i{font-size:28px;opacity:.3}
.cart-name{font-weight:600}
.cart-price{white-space:nowrap}
.cart-price .old{text-decoration:line-through;opacity:.5;font-size:12px;display:block}
.cart-price .cur{font-weight:700;color:var(--brand)}
.cart-sum{font-weight:700;white-space:nowrap}
.cart-remove .btn-remove{border:none;background:transparent;color:#aaa;cursor:pointer;padding:8px;border-radius:8px}
.cart-remove .btn-remove:hover{background:#ffebee;color:var(--danger)}

.cart-summary{margin-top:24px;padding:16px;background:#f9fafb;border-radius:12px;max-width:320px;margin-left:auto}
.cart-summary__row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #e6e8ee}
.cart-summary__row:last-child{border-bottom:none}
.cart-summary__total{font-size:18px;font-weight:700}
.cart-summary__total span:last-child{color:var(--brand)}

.cart-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:20px;flex-wrap:wrap}

/* === Checkout Modal === */
.checkout-info{background:#f9fafb;border-radius:12px;padding:16px}
.checkout-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #e6e8ee}
.checkout-row:last-child{border-bottom:none}
.checkout-label{color:var(--muted)}
.checkout-value{font-weight:600}

.checkout-summary{margin-top:20px;padding:16px;background:#fff3e0;border-radius:12px}
.checkout-total{font-size:18px;font-weight:700}
.checkout-total span:last-child{color:var(--brand)}

.checkout-actions{margin-top:20px}

.checkout-success{text-align:center;padding:20px;background:#e8f5e9;border-radius:12px}
.checkout-success i{font-size:48px;color:#43a047;margin-bottom:8px}
.checkout-success p{margin:8px 0}

.form-group label{display:block;margin-bottom:6px;font-weight:600;color:var(--muted)}
.form-group textarea{resize:vertical}

@media (max-width:768px){
  .cart-table th:nth-child(1),.cart-table td:nth-child(1){display:none}
  .cart-table th:nth-child(3),.cart-table td:nth-child(3){display:none}
  .cart-summary{max-width:100%}
}

/* === Catalog Filters Bar === */
.catalog__filters-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--border)}
.filters-bar__left{display:flex;align-items:center;gap:8px}
.filters-bar__left .section__title{margin:0}
.filters-bar__right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.filter-inline{display:flex;align-items:center;gap:6px}
.filter-inline .input{width:140px;padding:8px 12px}
.filter-inline--price .input{width:90px}
.filter-inline--price span{color:var(--muted)}
.filter-inline--sort{width:120px;padding:8px 10px}

.btn-icon{padding:8px 12px;background:var(--brand);color:#fff;border:none;border-radius:8px;cursor:pointer}
.btn-icon:hover{background:#c62828}
#btnExport{background:var(--brand);color:#fff}
#btnExport:hover{background:#c62828}

.filters-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:6px;background:var(--brand);color:#fff;font-size:11px;font-weight:700;border-radius:999px}

/* === Filters Modal === */
.filters-modal{max-width:900px;width:90vw;max-height:85vh;display:flex;flex-direction:column}
.filters-modal__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}
.filters-modal__header h3{margin:0;display:flex;align-items:center;gap:10px}
.filters-modal__header h3 i{color:var(--brand)}
.filters-modal__body{flex:1;overflow-y:auto;padding:20px}
.filters-modal__footer{display:flex;justify-content:flex-end;gap:12px;padding:16px 20px;border-top:1px solid var(--border);background:#fafbfc}

.filters-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.filter-group{background:#fff;border:1px solid #eef1f6;border-radius:12px;padding:14px}
.filter-group__title{font-weight:600;font-size:13px;color:var(--muted);margin-bottom:10px;text-transform:uppercase;letter-spacing:.5px}
.filter-group__items{display:flex;flex-direction:column;gap:6px;max-height:200px;overflow-y:auto}
.filter-group__items::-webkit-scrollbar{width:5px}
.filter-group__items::-webkit-scrollbar-thumb{background:#dde2eb;border-radius:5px}

.filter-checkbox{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #eef1f6;border-radius:8px;background:#fbfcff;cursor:pointer;transition:all .15s}
.filter-checkbox:hover{background:#f0f4ff;border-color:#dde4f0}
.filter-checkbox input{display:none}
.filter-checkbox__mark{width:18px;height:18px;flex-shrink:0;border:2px solid #ccd3e0;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .15s}
.filter-checkbox input:checked + .filter-checkbox__mark{background:var(--brand);border-color:var(--brand)}
.filter-checkbox input:checked + .filter-checkbox__mark::after{content:'\f00c';font-family:'Font Awesome 6 Free';font-weight:900;font-size:10px;color:#fff}
.filter-checkbox__text{flex:1;font-size:13px}

/* Active Tags */
.active-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;padding:10px 12px;background:#fafbff;border-radius:10px}
.tag{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;background:#fff;border:1px solid var(--border);border-radius:999px;font-size:12px}
.tag__remove{background:none;border:none;color:#aaa;cursor:pointer;padding:2px;line-height:1}
.tag__remove:hover{color:var(--brand)}
.tag--clear{background:transparent;border:1px dashed var(--border);color:var(--muted);cursor:pointer}
.tag--clear:hover{background:#ffebee;border-color:var(--brand);color:var(--brand)}

/* Products Count */
.products-count{font-size:14px;color:var(--muted)}

/* Categories scroll */
.catalog__aside .cat-tree{max-height:calc(100vh - 200px);overflow-y:auto}

.w100{width:100%}

@media (max-width:900px){
  .filters-bar__right{width:100%}
  .filter-inline .input{flex:1;width:auto}
  .filter-inline--sort{flex:1;width:auto}
  .filters-grid{grid-template-columns:1fr}
}

@media (max-width:600px){
  .catalog__filters-bar{flex-direction:column;align-items:stretch}
  .filters-bar__left{margin-bottom:8px}
  .filter-inline--price{display:none}
}

/* === Dashboard v2 === */
.dashboard{display:flex;flex-direction:column;gap:20px}

/* Welcome Block */
.dash-welcome{background:linear-gradient(135deg,#e53935 0%,#c62828 100%);color:#fff;border-radius:20px;padding:32px;display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap;box-shadow:0 8px 32px rgba(229,57,53,.25)}
.dash-welcome__content{flex:1;min-width:280px}
.dash-welcome__title{margin:0 0 8px 0;font-size:28px;font-weight:800;letter-spacing:-.5px}
.dash-welcome__subtitle{margin:0;opacity:.85;font-size:16px}
.dash-welcome__phone{margin-top:12px;display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:rgba(255,255,255,.15);border-radius:999px;font-weight:600;backdrop-filter:blur(4px)}

.dash-welcome__actions{display:flex;gap:12px;flex-wrap:wrap}
.dash-action-btn{display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 24px;background:rgba(255,255,255,.15);border-radius:16px;color:#fff;font-weight:600;font-size:13px;transition:all .2s;backdrop-filter:blur(4px)}
.dash-action-btn i{font-size:24px}
.dash-action-btn:hover{background:rgba(255,255,255,.25);transform:translateY(-2px)}

/* Grid Layout */
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.dash-col{display:flex;flex-direction:column;gap:16px}

/* Cards */
.dash-card{background:#fff;border-radius:16px;box-shadow:0 2px 12px rgba(0,0,0,.06);overflow:hidden}
.dash-card__header{display:flex;align-items:center;gap:12px;padding:16px 20px;background:linear-gradient(180deg,#fafbfc,#f5f7fa);border-bottom:1px solid #eef1f5}
.dash-card__header i{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--brand-light);color:var(--brand);border-radius:10px;font-size:16px}
.dash-card__header h3{margin:0;font-size:16px;font-weight:700}
.dash-card__body{padding:16px 20px}
.dash-card__more{display:flex;align-items:center;gap:6px;padding:12px 20px;background:#fafbfc;color:var(--brand);font-weight:600;font-size:13px;border-top:1px solid #eef1f5;transition:background .2s}
.dash-card__more:hover{background:#fff0f0}
.dash-card__more i{font-size:11px;transition:transform .2s}
.dash-card__more:hover i{transform:translateX(4px)}

/* Manager Card */
.dash-manager__content{display:flex;gap:20px;padding:20px;align-items:flex-start}
.dash-manager__photo{width:100px;height:100px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 4px 16px rgba(0,0,0,.1)}
.dash-manager__photo--placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f0f2f5,#e8ecf0);color:#aaa;font-size:32px}
.dash-manager__info{flex:1}
.dash-manager__name{font-size:18px;font-weight:700;margin-bottom:12px;color:var(--text)}
.dash-manager__contacts{display:flex;flex-direction:column;gap:8px}
.dash-manager__link{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#f5f7fa;border-radius:10px;color:var(--text);font-size:14px;transition:background .2s}
.dash-manager__link i{width:20px;text-align:center;color:var(--brand)}
.dash-manager__link:hover{background:#eef1f5}
.dash-manager__whatsapp{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:10px 16px;background:#25d366;color:#fff;border-radius:10px;font-weight:600;font-size:14px;transition:all .2s}
.dash-manager__whatsapp:hover{background:#1fb855;transform:translateY(-1px)}
.dash-manager__whatsapp i{font-size:18px}

/* Info Rows */
.dash-info-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px dashed #eef1f5}
.dash-info-row:last-child{border-bottom:none}
.dash-info-label{color:var(--muted);font-size:14px}
.dash-info-value{font-weight:600;font-size:14px}

/* Statuses */
.dash-statuses{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.dash-status{padding:14px;background:linear-gradient(135deg,#fafbfc,#f5f7fa);border-radius:12px;border:1px solid #eef1f5}
.dash-status__label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px}
.dash-status__value{font-weight:700;font-size:15px;color:var(--text)}

/* Events */
.dash-events__list{display:flex;flex-direction:column;gap:12px}
.dash-event{display:flex;gap:16px;align-items:flex-start;padding:12px;background:#fafbfc;border-radius:12px;transition:all .2s}
.dash-event:hover{background:#f0f4ff}
.dash-event__date{display:flex;flex-direction:column;align-items:center;justify-content:center;width:56px;height:56px;background:linear-gradient(135deg,#fff,#f8f9fa);border:1px solid #eef1f5;border-radius:12px;flex-shrink:0}
.dash-event__day{font-size:22px;font-weight:800;line-height:1;color:var(--text)}
.dash-event__month{font-size:11px;text-transform:uppercase;color:var(--muted);font-weight:600}
.dash-event__info{flex:1}
.dash-event__title{font-weight:600;font-size:14px;margin-bottom:4px;color:var(--text)}
.dash-event__type{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600}
.dash-event__type i{font-size:10px}

/* News */
.dash-news__list{display:flex;flex-direction:column;gap:16px}
.dash-news-item{padding-bottom:16px;border-bottom:1px solid #eef1f5}
.dash-news-item:last-child{border-bottom:none;padding-bottom:0}
.dash-news-item__date{font-size:12px;color:var(--muted);margin-bottom:4px}
.dash-news-item__title{font-weight:700;font-size:15px;margin-bottom:6px;color:var(--text)}
.dash-news-item__excerpt{font-size:13px;color:#666;line-height:1.5}

/* Responsive */
@media (max-width:1024px){
  .dash-grid{grid-template-columns:1fr}
  .dash-welcome{padding:24px}
  .dash-welcome__title{font-size:24px}
}
@media (max-width:768px){
  .dash-welcome__actions{width:100%;justify-content:center}
  .dash-action-btn{flex:1;min-width:100px;padding:12px}
  .dash-statuses{grid-template-columns:1fr}
  .dash-manager__content{flex-direction:column;align-items:center;text-align:center}
  .dash-manager__contacts{align-items:center}
}
@media (max-width:480px){
  .dash-welcome{padding:20px}
  .dash-welcome__title{font-size:20px}
  .dash-action-btn span{display:none}
  .dash-action-btn{padding:14px}
}

/* === Auth Page v2 === */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:linear-gradient(135deg,#f5f7fb 0%,#e8ecf3 100%)}
.auth-card{max-width:420px;width:100%;padding:32px;text-align:center}
.auth-logo{margin-bottom:20px}
.auth-logo img{height:48px;width:auto}
.auth-title{margin:0 0 8px 0;font-size:28px;font-weight:800;color:var(--brand)}
.auth-sub{margin:0 0 24px 0;color:var(--muted);font-size:15px}
.auth-form{text-align:left}
.auth-form .form-group{margin-bottom:16px}
.auth-form .form-group label{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-weight:600;color:var(--text)}
.auth-form .form-group label i{color:var(--brand);width:16px}
.auth-form .input{padding:14px 16px;font-size:15px}
.auth-divider{display:flex;align-items:center;gap:16px;margin:20px 0;color:var(--muted);font-size:13px}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.btn-test-login{background:#fff3e0;border-color:#ffb74d;color:#e65100}
.btn-test-login:hover{background:#ffe0b2}
.auth-info{margin-top:24px;padding:16px;background:#f0f4ff;border-radius:12px;text-align:left;position:relative}
.auth-info>i{position:absolute;top:16px;left:16px;color:#3b82f6;font-size:18px}
.auth-info p{margin:0 0 12px 32px;font-size:14px;color:#555;line-height:1.5}
.auth-contacts{display:flex;flex-direction:column;gap:8px;margin-left:32px}
.auth-contacts a{display:flex;align-items:center;gap:8px;color:var(--brand);font-size:14px;font-weight:600}
.auth-contacts a i{width:16px}
.auth-contacts a:hover{text-decoration:underline}

/* === Mobile Menu Toggle === */
.menu-toggle{display:none;padding:10px 12px;background:transparent;border:1px solid var(--border);border-radius:8px;cursor:pointer;font-size:18px;color:var(--text)}
.menu-toggle:hover{background:var(--brand-light);color:var(--brand)}

/* === Userbox improvements === */
.userbox__info{text-align:left}
.userbox__name{font-weight:700;font-size:14px}
.userbox__company{font-size:12px;color:var(--muted)}
.btn-logout{padding:8px 12px;gap:6px}
.btn-logout i{font-size:14px}

/* === FULL MOBILE ADAPTATION === */
@media (max-width:900px){
  .topbar__inner{flex-wrap:wrap}
  .menu{gap:4px}
  .menu__item{padding:8px 10px;font-size:13px}
  .menu__item span{display:none}
  .menu__item i{font-size:16px}
  .userbox__info{display:none}
}

@media (max-width:768px){
  .container{padding:16px}
  .page{padding:16px}

  /* Header */
  .topbar__inner{padding:10px 16px}
  .brand__text{display:none}
  .menu-toggle{display:block}

  .menu{position:fixed;top:60px;left:0;right:0;background:#fff;flex-direction:column;padding:16px;gap:8px;box-shadow:0 8px 32px rgba(0,0,0,.15);transform:translateY(-120%);opacity:0;transition:all .3s ease;z-index:100}
  .menu.open{transform:translateY(0);opacity:1}
  .menu__item{padding:14px 16px;border-radius:10px;background:#f5f7fb;justify-content:flex-start;gap:12px;color:var(--text)}
  .menu__item span{display:inline}
  .menu__item i{font-size:18px;width:24px;color:var(--brand)}
  .menu__item--active{background:var(--brand);color:#fff}
  .menu__item--active i{color:#fff}
  .menu__item--cart{justify-content:center}

  .userbox{gap:8px}
  .btn-logout__text{display:none}
  .btn-logout{padding:10px}

  /* Cards */
  .card{padding:16px;border-radius:12px}

  /* Catalog */
  .catalog__layout{grid-template-columns:1fr}
  .catalog__aside{position:static;height:auto;margin-bottom:16px}
  .filter-panel{display:none!important}
  .filter-panel.open{display:block!important}
  .catalog__filters-bar{flex-direction:column;align-items:stretch;gap:12px;display:none}
  .catalog__filters-bar.open{display:flex}
  .btn-mobile-filters{display:flex!important;align-items:center;gap:8px;width:100%;padding:12px 16px;background:#f5f7fb;border:1px solid var(--border,#e6e8ee);border-radius:10px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer;margin-bottom:12px}
  .btn-mobile-filters:active{background:#eef1f6}
  .filters-bar__left{justify-content:space-between}
  .filters-bar__right{flex-wrap:wrap;gap:8px}
  .filter-inline .input{flex:1;min-width:0}
  .filter-inline--sort{flex:1}
  .products-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .product-card__img{height:140px}
  .product-card__body{padding:8px;min-height:auto}
  .product-card__name{font-size:13px;min-height:36px}
  .product-card__price .cur{font-size:14px;padding:2px 6px}

  /* Modal */
  .modal__dialog{margin:0;max-width:100%;width:100%;height:100%;max-height:100%;border-radius:0}
  .modal__content{grid-template-columns:1fr;height:100%;padding:16px}
  .pm__image{height:200px}

  /* Cart */
  .cart-table{font-size:13px}
  .cart-img{width:50px}
  .cart-img img{width:45px;height:45px}
  .cart-summary{max-width:100%}

  /* Filters Modal */
  .filters-modal{max-width:100%;width:100%;height:100%;max-height:100%;border-radius:0}
  .filters-grid{grid-template-columns:1fr}
}

@media (max-width:480px){
  .container{padding:12px}
  .page{padding:12px}

  /* Header */
  .topbar__inner{padding:8px 12px}
  .brand__logo{width:32px;height:32px}

  /* Products grid single column */
  .products-grid{grid-template-columns:1fr}
  .product-card{flex-direction:row;gap:12px}
  .product-card__img{width:100px;height:100px;flex-shrink:0}
  .product-card__body{padding:12px;justify-content:center}
  .product-card__name{min-height:auto;font-size:14px}
  .product-card__actions{flex-direction:row}

  /* Auth */
  .auth-card{padding:24px 20px}
  .auth-title{font-size:24px}
  .auth-info{padding:14px}
  .auth-info p{margin-left:28px;font-size:13px}
  .auth-contacts{margin-left:28px}

  /* Dashboard */
  .dash-welcome{padding:16px}
  .dash-welcome__title{font-size:18px}
  .dash-welcome__subtitle{font-size:14px}
  .dash-card__header{padding:12px 16px}
  .dash-card__body{padding:12px 16px}
  .dash-manager__content{padding:16px}
  .dash-manager__photo{width:80px;height:80px}
  .dash-manager__name{font-size:16px}
  .dash-event{padding:10px;gap:12px}
  .dash-event__date{width:48px;height:48px}
  .dash-event__day{font-size:18px}

  /* Cart table mobile */

  .cart-table thead{display:none}
  .cart-table tbody tr{display:flex;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #eef1f5;align-items:center;gap:8px}
  .cart-table td{padding:4px;border:none}
  .cart-table .cart-img{width:60px}
  .cart-table .cart-name{flex:1;min-width:calc(100% - 80px)}
  .cart-table .cart-qty{width:100%}
  .cart-table .cart-price,.cart-table .cart-sum{width:auto}
  .cart-table .cart-remove{margin-left:auto}
}

/* === View Toggle === */
.view-toggle{display:flex;gap:4px;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.view-btn{width:34px;height:34px;border:none;background:#fff;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:all .15s}
.view-btn:hover{background:var(--brand-light);color:var(--brand)}
.view-btn.active{background:var(--brand);color:#fff}

/* === Quick Filters & Subcategory Chips === */
.subcat-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px;padding:10px 12px;background:#f8f9ff;border-radius:10px;border:1px solid #eef1f6}
.subcat-label{font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap}
.subcat-chip{padding:5px 12px;border:1px solid #dde4f0;border-radius:999px;background:#fff;color:var(--text);font-size:13px;cursor:pointer;transition:all .15s;white-space:nowrap}
.subcat-chip:hover{background:var(--brand-light);border-color:var(--brand);color:var(--brand)}
.quick-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border:1px solid #dde4f0;border-radius:999px;background:#fff;color:var(--text);font-size:13px;font-weight:600;cursor:pointer;transition:all .15s;white-space:nowrap}
.quick-chip:hover{background:var(--brand-light);border-color:var(--brand);color:var(--brand)}
.quick-chip.active{background:var(--ok);border-color:var(--ok);color:#fff}
.quick-chip.active:hover{background:#388e3c;border-color:#388e3c;color:#fff}
.quick-chip-sep{width:1px;height:20px;background:var(--border);flex-shrink:0;margin:0 4px}

/* === Manufacturer Chips === */
.manufacturer-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:10px;padding:8px 12px;background:#fff;border-radius:10px;border:1px solid var(--border)}
.mfr-label{font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap;margin-right:2px}
.mfr-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border:1px solid #dde4f0;border-radius:999px;background:#f5f7fb;color:var(--text);font-size:12px;cursor:pointer;transition:all .15s;white-space:nowrap}
.mfr-chip:hover{background:var(--brand-light);border-color:var(--brand);color:var(--brand)}
.mfr-chip.active{background:var(--brand);border-color:var(--brand);color:#fff}
.mfr-chip.active:hover{background:#c62828}
.mfr-count{font-size:11px;opacity:.7;background:rgba(0,0,0,.08);border-radius:999px;padding:0 5px}
.mfr-chip.active .mfr-count{background:rgba(255,255,255,.25);opacity:1}

/* === List View === */
.products-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.product-row{display:flex;align-items:center;gap:14px;padding:12px;background:#fff;border:1px solid var(--border);border-radius:12px;transition:box-shadow .12s}
.product-row:hover{box-shadow:0 4px 16px rgba(0,0,0,.07)}
.product-row__img{width:70px;height:70px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:#f5f7fb;border-radius:10px;overflow:hidden}
.product-row__img img{width:100%;height:100%;object-fit:contain}
.product-row__img i{font-size:24px;opacity:.3}
.product-row__info{flex:1;min-width:0}
.product-row__name{font-weight:600;font-size:14px;margin-bottom:6px;line-height:1.4}
.product-row__meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.product-row__brand i{margin-right:3px}
.product-row__model{background:#f0f2f8;border-radius:4px;padding:2px 6px}
.product-row__price{display:flex;flex-direction:column;align-items:flex-end;gap:4px;white-space:nowrap;min-width:120px}
.product-row__price .cur{font-weight:800;font-size:16px;padding:2px 8px;border-radius:10px;background:linear-gradient(180deg,#ffe4e8,#ffd6db)}
.product-row__price .old{font-size:12px;text-decoration:line-through;opacity:.6}
.product-row__price .discount-badge{font-size:11px}
.product-row__actions{display:flex;gap:6px;flex-shrink:0}

/* === Filter Panel (sidebar) === */
.catalog__aside{overflow-y:auto}
.catalog__aside .cat-tree{max-height:none}
.filter-panel{margin-top:12px;padding:14px 16px}
.filter-panel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.filter-panel__head .section__title{margin:0;font-size:14px}
.btn-clear-filters{background:none;border:none;color:var(--brand);font-size:12px;font-weight:600;cursor:pointer;padding:0}
.btn-clear-filters:hover{text-decoration:underline}
.filter-panel .filter-group{background:transparent;border:none;border-radius:0;padding:0;margin-bottom:2px}
.filter-panel .filter-group:last-child{margin-bottom:0}
.filter-panel .filter-group__title{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;padding:7px 4px;margin:0;cursor:pointer;display:flex;align-items:center;gap:4px;user-select:none;border-radius:6px}
.filter-panel .filter-group__title:hover{color:var(--brand);background:#f5f7fb}
.filter-group__arrow{margin-left:auto;font-size:10px;transition:transform .2s;opacity:.5}
.filter-group.is-open .filter-group__arrow{transform:rotate(180deg)}
.filter-active-dot{width:6px;height:6px;border-radius:50%;background:var(--brand);display:inline-block;flex-shrink:0}
.filter-group__opts{display:none;flex-direction:column;gap:1px;max-height:180px;overflow-y:auto;padding-bottom:6px}
.filter-group.is-open .filter-group__opts{display:flex}
.filter-group__opts::-webkit-scrollbar{width:4px}
.filter-group__opts::-webkit-scrollbar-thumb{background:#dde2eb;border-radius:4px}
/* card qty controls */
.card-qty{display:flex;align-items:center;gap:2px}
.card-qty__btn{width:26px;height:26px;border:1px solid #dde2eb;border-radius:6px;background:#f5f7fb;cursor:pointer;font-size:14px;line-height:1;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.card-qty__btn:hover{background:#e8eaf0}
.card-qty__input{width:36px;height:26px;border:1px solid #dde2eb;border-radius:6px;text-align:center;font-size:13px;font-weight:600;-moz-appearance:textfield}
.card-qty__input::-webkit-inner-spin-button,.card-qty__input::-webkit-outer-spin-button{-webkit-appearance:none}
.filter-opt{display:flex;align-items:center;gap:6px;cursor:pointer;font-size:13px;padding:4px 6px;border-radius:6px;transition:background .1s}
.filter-opt:hover{background:#f5f7fb}
.filter-opt input[type="checkbox"]{cursor:pointer;accent-color:var(--brand);flex-shrink:0;width:14px;height:14px}
.filter-opt > span:first-of-type{flex:1;line-height:1.3}
.filter-cnt{font-size:11px;color:var(--muted);background:#eef0f7;border-radius:999px;padding:1px 6px;min-width:20px;text-align:center;flex-shrink:0}
.filter-opt input:checked ~ .filter-cnt{background:var(--brand-light);color:var(--brand)}
.filter-opt--empty{opacity:.4;pointer-events:none}

/* === Product Modal — Info & Specs === */
.pm__props{margin-top:12px}
.pm__desc:empty{display:none}
.pm__info-rows{display:flex;flex-direction:column;gap:2px;margin-bottom:12px;background:#f9fafb;border:1px solid #eef1f6;border-radius:12px;overflow:hidden;padding:4px 0}
.pm__info-row{display:flex;align-items:center;gap:0;padding:7px 14px}
.pm__info-row:not(:last-child){border-bottom:1px dashed #eef1f6}
.pm__info-label{display:flex;align-items:center;gap:7px;width:160px;flex-shrink:0;font-size:13px;color:#6b7280;font-weight:500}
.pm__info-label i{width:14px;text-align:center;color:var(--brand);opacity:.75}
.pm__info-value{font-size:13px;font-weight:600;color:var(--text)}
.pm__info-value.mono{font-family:monospace;letter-spacing:.4px;background:#f0f2f8;padding:2px 7px;border-radius:5px;font-size:12px}

.pm__left{overflow-y:auto;max-height:calc(90vh - 80px)}
.pm__left::-webkit-scrollbar{width:5px}
.pm__left::-webkit-scrollbar-thumb{background:#dde2eb;border-radius:5px}
.pm__specs{margin-top:14px}
.pm__specs:empty{display:none}
.pm__specs-title{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;margin-bottom:8px;padding:0 2px}
.pm__specs-title i{color:var(--brand);opacity:.8}
.pm__specs-grid{border:1px solid #eef1f6;border-radius:12px;overflow:hidden}
.pm__spec-row{display:grid;grid-template-columns:1fr 1.3fr;gap:12px;padding:8px 14px;font-size:13px}
.pm__spec-row--alt{background:#f9fafb}
.pm__spec-row:not(:last-child){border-bottom:1px solid #f0f2f8}
.pm__spec-name{color:#6b7280;font-weight:500;line-height:1.4}
.pm__spec-val{font-weight:600;color:var(--text);line-height:1.4;word-break:break-word}

/* Stock */
.stock{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;border-radius:20px;padding:2px 8px}
.stock.in-stock{color:#2e7d32;background:#e8f5e9}
.stock.out-stock{color:#c62828;background:#ffebee}
.stock i{font-size:10px}
.stock.has-tip{cursor:pointer}
.stock-tooltip{display:none;position:fixed;background:#fff;border:1px solid #e0e0e0;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.12);padding:8px 0;min-width:200px;z-index:9999;font-weight:400;color:#333;font-size:12px}
.stock-tip__row{display:flex;justify-content:space-between;gap:12px;padding:3px 12px;white-space:nowrap}
.stock-tip__row:hover{background:#f5f5f5}
.stock-tip__row span:last-child{font-weight:600;color:#2e7d32}
.stock-reserve{color:#e65100;font-weight:500;margin-left:2px}
.stock-tip__reserve{color:#e65100;font-weight:500;font-size:11px}
/* Модалка — строка наличия в таблице */
.pm__props table tr:first-child td .stock{font-size:12px;padding:3px 10px}

/* Registration form */
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.req{color:var(--brand)}
.alert--success{background:#e8f5e9;border:1px solid #a5d6a7;color:#2e7d32;border-radius:8px;padding:10px 14px;margin-bottom:12px}
@media(max-width:480px){.form-row{grid-template-columns:1fr}}

/* Partner banner */
.partner-banner{background:#fff8e1;border:1px solid #ffe082;border-radius:10px;padding:10px 16px;margin-bottom:16px;font-size:13px;color:#6d4c00;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.partner-banner i{color:#f9a825;font-size:15px;flex-shrink:0}
.partner-banner a{color:#1565c0;font-weight:600;white-space:nowrap}

/* Admin */
.admin-wrap{max-width:1200px;margin:0 auto}
.admin-tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.admin-tab{padding:8px 16px;border-radius:8px;background:#f1f5f9;color:#334155;text-decoration:none;font-size:13px;font-weight:500;transition:background .15s}
.admin-tab:hover,.admin-tab.active{background:#ef4444;color:#fff}
.admin-table{width:100%;border-collapse:collapse;font-size:13px}
.admin-table th{text-align:left;padding:10px 12px;background:#f8fafc;border-bottom:2px solid #e2e8f0;font-weight:600;color:#475569;white-space:nowrap}
.admin-table td{padding:9px 12px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.admin-table tr:hover td{background:#fafafa}
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px}
.badge--green{background:#dcfce7;color:#166534}
.badge--gray{background:#f1f5f9;color:#64748b}
.btn-icon{background:none;border:none;cursor:pointer;padding:4px 8px;border-radius:6px;transition:background .15s}
.btn-icon:hover{background:#fee2e2}
.admin-log{background:#0f172a;border-radius:8px;padding:16px;max-height:600px;overflow-y:auto;font-family:monospace;font-size:11px;line-height:1.6}
.admin-log__line{color:#94a3b8;word-break:break-all;padding:1px 0;border-bottom:1px solid #1e293b}
.admin-log__line--error{color:#f87171}
