/* =============================================================
   Admin SPA — вкладка «Меню» (PLAN пункт 12).
   Дополняет admin.css (токены --cr2-* оттуда). Mobile-first,
   tap-зоны кнопок >= 44px.
   ============================================================= */

.adm-m-hint{
  color:var(--cr2-muted); font-size:13px;
  padding:2px 6px 10px;
}

/* ---------- поиск по всему меню (мобильная раскладка) ---------- */

.adm-m-search{ padding:8px 10px; margin-bottom:8px; }
.adm-m-search-input{
  width:100%; min-height:44px; padding:0 14px;
  border:1px solid var(--cr2-line); border-radius:12px;
  background:#fff; font:inherit; font-size:15px;
}
/* строка-подпись «в какой категории найдено» перед карточкой позиции */
.adm-m-hit-cat{
  margin:10px 2px 2px;
  font-size:12px; font-weight:700; color:var(--cr2-muted);
  text-transform:uppercase; letter-spacing:.4px;
}

/* ---------- карточка категории ---------- */

.adm-m-cat{ padding:12px 14px; }
.adm-m-cat--hidden{ opacity:.6; }

.adm-m-cat-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; min-height:44px; cursor:pointer;
}
.adm-m-cat-namebox{ min-width:0; flex:1 1 auto; }
.adm-m-cat-name{ font-weight:700; font-size:15px; overflow-wrap:anywhere; }
.adm-m-cat-name--sub{ font-weight:600; color:var(--cr2-ink-soft); }
.adm-m-cat-meta{ font-size:12px; color:var(--cr2-muted); margin-top:2px; }

.adm-m-chev{
  color:var(--cr2-muted); font-size:14px;
  width:24px; text-align:center; flex:0 0 auto;
}

/* ---------- общий блок кнопок-иконок ---------- */

.adm-m-controls{
  display:flex; align-items:center; gap:4px; flex:0 0 auto;
}
.adm-mi-btn{
  width:44px; height:44px; min-height:44px;
  display:flex; align-items:center; justify-content:center;
  border-radius:14px; font-size:17px; font-weight:600;
  color:var(--cr2-ink-soft); background:var(--cr2-surface-2);
  transition:background .15s, color .15s, opacity .15s;
}
.adm-mi-btn:disabled{ opacity:.3; }
.adm-mi-btn--on{ background:var(--cr2-accent); color:#fff; }
.adm-mi-btn--warn{ background:#FBE9E9; }

/* ---------- позиции ---------- */

.adm-m-items{ margin-top:8px; }
.adm-m-empty{ color:var(--cr2-muted); font-size:13px; padding:10px 4px; }

.adm-m-item{
  border-top:1px solid var(--cr2-line);
  padding:12px 0 14px;
}
.adm-m-item--hidden{ opacity:.55; }

.adm-m-item-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; min-height:44px;
}
.adm-m-item-namebox{ min-width:0; flex:1 1 auto; }
.adm-m-item-name{ font-weight:600; font-size:14px; overflow-wrap:anywhere; }
.adm-m-item-flags{ font-size:12px; color:var(--cr2-danger); margin-top:2px; }

/* ---------- чипы-лейблы ---------- */

.adm-m-chips{
  display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 4px;
}
.adm-m-chip{
  min-height:36px; padding:7px 14px;
  border-radius:999px; font-size:13px; font-weight:600;
  color:var(--cr2-ink-soft); background:var(--cr2-surface-2);
  transition:background .15s, color .15s;
}
.adm-m-chip--on{ background:var(--cr2-deep); color:#fff; }
.adm-m-chip--add{ border:1.5px dashed var(--cr2-muted-2); background:transparent; }

/* ---------- своё описание ---------- */

.adm-m-desc{ display:block; margin:10px 0 4px; }
.adm-m-desc-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin:0 0 6px 4px;
}
.adm-m-desc-head > span{
  font-size:12px; font-weight:600; color:var(--cr2-ink-soft);
}
.adm-m-desc textarea{
  min-height:64px; resize:vertical;
  background:var(--cr2-surface-2); font-size:14px;
}
.adm-ai-btn{
  min-height:34px; padding:7px 12px; border-radius:999px;
  background:#edf0ff; color:#4053d9;
  font-size:12px; font-weight:700; cursor:pointer;
}
.adm-ai-btn:disabled{ opacity:.5; cursor:default; }
.adm-ai-btn--on{ background:#4053d9; color:#fff; }
.adm-ai-text-options{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px; margin-top:8px;
}
.adm-ai-text-option{
  min-height:90px; padding:10px; text-align:left;
  border:1px solid #dce2ff; border-radius:14px;
  background:#f7f8ff; color:var(--cr2-ink); cursor:pointer;
}
.adm-ai-text-option:hover{ border-color:#4053d9; }
.adm-ai-text-option strong{
  display:block; margin-bottom:5px; color:#4053d9; font-size:12px;
}
.adm-ai-text-option span{
  display:block; color:var(--cr2-ink-soft); font-size:13px;
  font-weight:400; line-height:1.35;
}
.adm-ai-error{
  margin-top:8px; color:var(--cr2-danger); font-size:12px; font-weight:600;
}

@media (max-width:760px){
  .adm-ai-text-options{ grid-template-columns:1fr; }
  .adm-m-desc-head{ align-items:flex-start; flex-direction:column; }
}

/* ---------- медиа ---------- */

.adm-m-media{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  margin-top:10px;
}
.adm-m-media-previews{ display:flex; gap:10px; }
.adm-m-media-pv{ position:relative; }
.adm-m-media-pv img,
.adm-m-media-pv video{
  width:72px; height:72px; object-fit:cover; display:block;
  border-radius:14px; background:var(--cr2-surface-2);
}
.adm-m-media-pv--hero img{ height:128px; }
.adm-m-media-pv .adm-mi-btn{
  position:absolute; top:-8px; right:-8px;
  width:28px; height:28px; min-height:28px;
  border-radius:999px; font-size:12px;
  box-shadow:0 2px 8px rgba(32,48,60,.18);
  background:#fff;
}
.adm-m-media-none{ color:var(--cr2-muted); font-size:13px; }

.adm-m-upload{ display:inline-block; }
.adm-m-upload input[type=file]{
  position:absolute; width:1px; height:1px;
  opacity:0; overflow:hidden; clip:rect(0 0 0 0);
}
.adm-m-upload-btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:10px 18px;
  border-radius:999px; font-size:14px; font-weight:600;
  color:var(--cr2-accent); background:var(--cr2-surface-2);
  cursor:pointer;
}
.adm-m-uploading{
  color:var(--cr2-accent); font-size:14px; font-weight:600;
  min-height:44px; display:flex; align-items:center;
}

.adm-ai-media{
  flex-basis:100%; min-width:0;
  margin-top:2px; padding:12px;
  border:1px solid #dce2ff; border-radius:16px;
  background:linear-gradient(135deg,#fafbff,#f4f6ff);
}
.adm-ai-media-title{
  margin-bottom:8px; color:var(--cr2-ink);
  font-size:13px; font-weight:700;
}
.adm-ai-note{
  margin-top:8px; color:var(--cr2-muted); font-size:12px;
}
.adm-ai-prompt{
  width:100%; min-height:40px; padding:0 12px;
  border:1px solid #dce2ff; border-radius:12px;
  background:#fff; font-size:13px;
}
.adm-ai-actions{
  display:flex; flex-wrap:wrap; gap:7px; margin-top:9px;
}
.adm-ai-preview{
  display:flex; align-items:flex-end; gap:12px; margin-top:12px;
}
.adm-ai-preview img{
  width:144px; height:256px; object-fit:cover;
  border-radius:16px; background:var(--cr2-surface-2);
  box-shadow:0 5px 18px rgba(32,48,60,.15);
}
.adm-ai-preview-actions{
  display:flex; flex-direction:column; gap:8px;
}
.adm-ai-apply,
.adm-ai-discard{
  min-height:42px; padding:9px 18px;
  border-radius:999px; font-size:13px; font-weight:700;
  cursor:pointer;
}
.adm-ai-apply{ background:#4053d9; color:#fff; }
.adm-ai-discard{
  background:#fff; color:var(--cr2-ink-soft);
  border:1px solid var(--cr2-line);
}
.adm-ai-apply:disabled,
.adm-ai-discard:disabled{ opacity:.5; cursor:default; }

@media (max-width:520px){
  .adm-ai-preview{ align-items:stretch; flex-direction:column; }
  .adm-ai-preview-actions{ flex-direction:row; }
}

.adm-m-retry{ margin-top:14px; }

/* ---------- hero главного экрана (миграция 019) ---------- */
/* Панель в карточке категории: превью 9:16, загрузка/перекадровка,
   подпись поверх фото и «тап открывает товар». Переиспользуется и на
   вкладке «Точка» (бренд-hero). */

.adm-m-hero{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  margin-top:8px; padding:10px 0 4px;
  border-top:1px dashed var(--cr2-line);
}
.adm-m-hero .adm-m-media-pv img,
.adm-m-hero .adm-m-media-pv video{
  width:72px; height:128px;
}
.adm-m-hero-del{ color:var(--cr2-danger); }

.adm-m-hero-cap{
  flex-basis:100%;
  display:flex; flex-wrap:wrap; gap:8px;
}
.adm-m-hero-cap input,
.adm-m-hero-cap select{
  flex:1 1 200px; min-width:160px; min-height:40px;
  background:var(--cr2-surface-2); border-radius:var(--cr2-r-field);
  font-size:14px; padding:0 10px;
}

/* ---------- КБЖУ и состав ---------- */

/* бейдж-кнопка: клик раскрывает секцию «КБЖУ и состав» ниже */
.adm-m-nutri-badge{
  display:inline-block; margin-top:4px; padding:3px 10px;
  border:1px solid var(--cr2-danger); border-radius:999px;
  background:none; cursor:pointer;
  font:inherit; font-size:12px; font-weight:600; color:var(--cr2-danger);
}
.adm-m-nutri-badge:active{ opacity:.7; }

.adm-m-nutri{ margin-top:10px; border-top:1px solid var(--cr2-line); padding-top:8px; }

.adm-m-nutri-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; min-height:40px; cursor:pointer;
}
.adm-m-nutri-title{ font-weight:600; font-size:13px; color:var(--cr2-ink-soft); }

.adm-m-nutri-form{
  display:flex; flex-wrap:wrap; gap:10px 12px; margin-top:8px;
}
.adm-m-nutri-row{
  display:flex; flex-direction:column; gap:4px;
  flex:1 1 140px; min-width:120px;
}
.adm-m-nutri-row--full{ flex-basis:100%; }
.adm-m-nutri-row span{
  font-size:12px; font-weight:600; color:var(--cr2-ink-soft);
}
.adm-m-nutri-row input,
.adm-m-nutri-row select,
.adm-m-nutri-row textarea{
  background:var(--cr2-surface-2); border-radius:var(--cr2-r-field);
  font-size:14px; min-height:40px; padding:0 10px;
}
.adm-m-nutri-row textarea{ min-height:56px; padding:8px 10px; resize:vertical; }

.adm-m-nutri-sizes{
  flex-basis:100%; margin-top:4px;
  background:var(--cr2-surface-2); border-radius:var(--cr2-r-field);
  padding:10px 12px;
}
.adm-m-nutri-sizes-title{
  font-size:12px; font-weight:600; color:var(--cr2-ink-soft); margin-bottom:8px;
}
.adm-m-nutri-size-row{
  display:flex; align-items:center; gap:8px;
  margin-bottom:6px;
}
.adm-m-nutri-size-row:last-child{ margin-bottom:0; }
.adm-m-nutri-size-name{
  flex:1 1 auto; min-width:0; font-size:13px; overflow-wrap:anywhere;
}
.adm-m-nutri-size-row input{
  width:84px; min-height:36px; padding:0 8px;
  background:#fff; border-radius:var(--cr2-r-field); font-size:14px;
}
.adm-m-nutri-size-row select{
  min-height:36px; padding:0 8px;
  background:#fff; border-radius:var(--cr2-r-field); font-size:14px;
}

.adm-m-nutri-hint{
  color:var(--cr2-muted); font-size:12px; margin-top:10px;
}

.adm-m-nutri-save{ margin-top:10px; }

/* ---------- desktop: категории → товары → редактор ---------- */
@media (min-width:1180px){
  body[data-admin-tab=menu] .adm-content{
    max-width:none;
    padding:24px;
  }
  .adm-desk-menu{
    min-width:0;
    color:#1e2936;
  }
  .adm-desk-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    margin-bottom:18px;
  }
  .adm-desk-top h1{
    margin:0;
    font-size:28px;
    line-height:1.15;
    letter-spacing:-.035em;
  }
  .adm-desk-top p{
    margin:5px 0 0;
    color:#82909d;
    font-size:13px;
  }
  .adm-desk-tools{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    min-width:0;
  }
  .adm-desk-search,
  .adm-desk-filter{
    min-height:44px;
    height:44px;
    padding:0 14px;
    border:1px solid #dfe5ea;
    border-radius:11px;
    background:#fff;
    font-size:14px;
  }
  .adm-desk-search{
    width:clamp(220px,24vw,380px);
    padding-left:39px;
    background:#fff
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b99a6' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
      no-repeat 13px center;
  }
  .adm-desk-filter{ width:160px; }
  .adm-desk-refresh{
    min-height:44px;
    padding:0 17px;
    border-radius:11px;
    background:var(--cr2-accent);
    color:#fff;
    font-weight:700;
    white-space:nowrap;
  }
  .adm-desk-workspace{
    display:grid;
    grid-template-columns:165px minmax(280px,.72fr) minmax(390px,1.28fr);
    gap:14px;
    min-width:0;
    height:calc(100vh - 108px);
    min-height:680px;
  }
  .adm-desk-pane{
    min-width:0;
    min-height:0;
    overflow:hidden;
    border:1px solid #dfe5ea;
    border-radius:14px;
    background:#fff;
    box-shadow:0 3px 14px rgba(31,49,67,.035);
  }
  .adm-desk-pane-head{
    height:55px;
    padding:0 14px;
    display:flex;
    align-items:center;
    gap:8px;
    border-bottom:1px solid #e8edf0;
    font-size:13px;
  }
  .adm-desk-count{
    display:inline-flex;
    min-width:23px;
    height:23px;
    padding:0 6px;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#f1f4f6;
    color:#7d8b97;
    font-size:11px;
  }
  .adm-desk-categories{
    display:flex;
    flex-direction:column;
  }
  .adm-desk-cat-list{
    flex:1 1 auto;
    overflow-y:auto;
    padding:8px;
  }
  .adm-desk-cat{
    width:100%;
    min-height:42px;
    padding:8px 9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
    border-radius:9px;
    color:#42515e;
    text-align:left;
    font-size:12px;
  }
  .adm-desk-cat span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .adm-desk-cat b{
    color:#99a5af;
    font-size:11px;
  }
  .adm-desk-cat:hover{ background:#f5f7f9; }
  .adm-desk-cat--active{
    background:#edf1ff;
    color:#334ae0;
    font-weight:700;
  }
  .adm-desk-cat--active b{ color:#334ae0; }
  .adm-desk-cat--personal{
    background:#faf9ff;
    color:#515f9c;
  }
  .adm-desk-cat--personal span::before{
    content:"✨";
    margin-right:5px;
    font-size:10px;
  }
  /* Ряд категории: кнопка выбора + всплывающие кнопки управления.
     Кнопки лежат оверлеем справа и появляются на наведении/у активной —
     в колонке 200px пять кнопок в потоке не помещаются рядом с именем. */
  .adm-desk-cat-row{
    position:relative;
    display:flex;
    align-items:center;
  }
  .adm-desk-cat-row .adm-desk-cat{
    flex:1 1 auto;
    width:auto;
    min-width:0;
  }
  .adm-desk-cat-ctl{
    display:none;
    position:absolute;
    right:3px;
    top:50%;
    transform:translateY(-50%);
    gap:1px;
    padding:2px;
    border-radius:8px;
    background:#fff;
    box-shadow:0 1px 6px rgba(35,50,65,.18);
  }
  .adm-desk-cat-row:hover .adm-desk-cat-ctl,
  .adm-desk-cat-row--active .adm-desk-cat-ctl{ display:flex; }
  .adm-desk-cat-btn{
    width:24px;
    height:24px;
    min-height:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:6px;
    background:transparent;
    color:#5a6672;
    font-size:12px;
    line-height:1;
  }
  .adm-desk-cat-btn:hover{ background:#eef1f4; }
  .adm-desk-cat-btn:disabled{ opacity:.25; }
  .adm-desk-cat-btn--on{ background:#edf1ff; color:#334ae0; }
  .adm-desk-cat-btn--warn{ background:#fff0f0; color:#cf5252; }
  /* счётчик совпадений при активном поиске — заметнее обычного числа позиций */
  .adm-desk-cat b.adm-desk-cat-hits{ color:#334ae0; font-weight:700; }
  /* подпись категории под названием товара в выдаче поиска */
  .adm-desk-product-meta .adm-desk-hit-cat{
    background:#eef1f4;
    color:#56636f;
  }
  .adm-desk-cat-actions{
    flex:0 0 auto;
    padding:9px;
    border-top:1px solid #edf0f2;
  }
  .adm-desk-cat-settings{
    width:100%;
    margin:0;
    min-height:42px;
    border:1px solid #e0e6eb;
    border-radius:10px;
    color:#687783;
    font-size:11px;
    font-weight:600;
  }
  .adm-desk-cat-hero--active{
    border-color:#bcc7ff;
    background:#edf1ff;
    color:#334ae0;
  }
  .adm-desk-products{
    display:flex;
    flex-direction:column;
  }
  .adm-desk-product-list{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
  }
  .adm-desk-product{
    min-height:82px;
    padding:10px 11px;
    display:grid;
    grid-template-columns:54px minmax(0,1fr) auto 35px;
    align-items:center;
    gap:10px;
    border-bottom:1px solid #edf0f2;
    cursor:pointer;
    outline:none;
    transition:background .15s, box-shadow .15s;
  }
  .adm-desk-product:hover{ background:#fafbfc; }
  .adm-desk-product:focus-visible{ box-shadow:inset 0 0 0 2px #5b6bf0; }
  .adm-desk-product--active{
    position:relative;
    z-index:1;
    background:#f2f5ff;
    box-shadow:inset 0 0 0 1px #bdc7ff;
  }
  .adm-desk-product--hidden{ opacity:.58; }
  .adm-desk-thumb{
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border-radius:10px;
    background:#f0f3f5;
    color:#98a7b3;
    font-size:22px;
  }
  .adm-desk-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
  }
  .adm-desk-product-info{ min-width:0; }
  .adm-desk-product-info > strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
  }
  .adm-desk-product-meta{
    min-height:19px;
    margin-top:6px;
    display:flex;
    flex-wrap:wrap;
    gap:4px;
  }
  .adm-desk-product-meta span{
    padding:2px 6px;
    border-radius:6px;
    background:#f1f3ff;
    color:#6070d9;
    font-size:9px;
    line-height:1.4;
  }
  .adm-desk-product-meta .adm-desk-warning{
    background:#fff0f0;
    color:#cf5252;
  }
  .adm-desk-price{
    color:#34424e;
    font-size:12px;
    white-space:nowrap;
  }
  .adm-desk-visibility{
    width:32px;
    height:20px;
    padding:2px;
    border-radius:999px;
    background:#dce3e8;
    transition:background .15s;
  }
  .adm-desk-visibility span{
    display:block;
    width:16px;
    height:16px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 3px rgba(24,39,51,.25);
    transition:transform .15s;
  }
  .adm-desk-visibility--on{ background:#4054e8; }
  .adm-desk-visibility--on span{ transform:translateX(12px); }
  .adm-desk-list-foot{
    flex:0 0 auto;
    padding:11px 14px;
    border-top:1px solid #e8edf0;
    color:#94a0aa;
    font-size:11px;
  }
  .adm-desk-empty,
  .adm-desk-editor-empty{
    padding:42px 18px;
    color:#96a3ad;
    text-align:center;
    font-size:13px;
  }
  .adm-desk-editor{
    display:flex;
    flex-direction:column;
  }
  .adm-desk-editor-head{
    flex:0 0 auto;
    min-height:65px;
    padding:10px 16px 8px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
  }
  .adm-desk-editor-title{
    min-width:0;
    display:flex;
    align-items:center;
    gap:10px;
  }
  .adm-desk-editor-title h2{
    margin:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:21px;
    letter-spacing:-.025em;
  }
  .adm-desk-status{
    padding:4px 9px;
    border-radius:999px;
    background:#eaf8f0;
    color:#28925a;
    font-size:10px;
    font-weight:700;
  }
  .adm-desk-status::before{ content:"●"; margin-right:5px; }
  .adm-desk-status--off{
    background:#f1f3f5;
    color:#87949e;
  }
  .adm-desk-editor .adm-mi-btn{
    width:36px;
    height:36px;
    min-height:36px;
    border-radius:10px;
    font-size:14px;
  }
  .adm-desk-editor-tabs{
    flex:0 0 auto;
    height:45px;
    padding:0 19px;
    display:flex;
    align-items:flex-end;
    gap:28px;
    border-bottom:1px solid #e6ebef;
  }
  .adm-desk-editor-tab{
    height:45px;
    padding:0 2px;
    color:#667580;
    font-size:12px;
    font-weight:600;
  }
  .adm-desk-editor-tab--active{
    color:#354ce0;
    border-bottom:2px solid #354ce0;
  }
  .adm-desk-editor-body{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    padding:16px 20px 30px;
    scroll-behavior:smooth;
  }
  .adm-desk-editor-body > .adm-m-item{
    padding:0;
    border:0;
  }
  .adm-desk-editor-body > .adm-m-item > .adm-m-item-head{ display:none; }
  .adm-desk-editor .adm-m-chips{ margin:0 0 18px; }
  .adm-desk-editor .adm-m-chip{
    min-height:32px;
    padding:6px 12px;
    font-size:11px;
  }
  .adm-desk-editor .adm-m-desc{
    margin:0 0 20px;
    padding-bottom:20px;
    border-bottom:1px solid #edf0f2;
  }
  .adm-desk-editor .adm-m-desc textarea{
    min-height:88px;
    border:1px solid #e0e6eb;
    background:#fff;
  }
  .adm-desk-editor .adm-m-nutri{
    margin:0 0 20px;
    padding:0 0 20px;
    border-top:0;
    border-bottom:1px solid #edf0f2;
    scroll-margin-top:10px;
  }
  .adm-desk-editor .adm-m-media{
    margin:0;
    padding:0;
    align-items:flex-start;
    scroll-margin-top:10px;
  }
  .adm-desk-editor .adm-m-media-previews{ min-height:86px; }
  .adm-desk-editor .adm-m-media-pv img,
  .adm-desk-editor .adm-m-media-pv video{
    width:86px;
    height:86px;
  }
  .adm-desk-editor .adm-m-media-pv--hero img{ height:153px; }
  .adm-desk-editor .adm-ai-media{
    padding:14px;
    border-radius:13px;
    background:#f7f7ff;
  }
  .adm-desk-editor .adm-ai-actions{ flex-wrap:nowrap; }
  .adm-desk-editor .adm-ai-btn{
    min-height:36px;
    padding:7px 10px;
    font-size:10px;
  }
  .adm-desk-editor-footer{
    flex:0 0 auto;
    min-height:67px;
    padding:10px 18px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:18px;
    border-top:1px solid #e3e8ec;
    background:#fff;
  }
  .adm-desk-editor-footer span{
    color:#8d9aa4;
    font-size:10px;
  }
  .adm-desk-save{
    min-height:42px;
    padding:0 19px;
    border-radius:10px;
    background:#3d50e3;
    color:#fff;
    font-size:12px;
    font-weight:700;
  }
  .adm-desk-hero-close{
    width:36px;
    height:36px;
    border-radius:10px;
    background:#f2f5f7;
    color:#647581;
    font-size:22px;
    line-height:1;
  }
  .adm-desk-hero-intro{
    flex:0 0 auto;
    margin:0 20px;
    padding:12px 14px;
    display:flex;
    flex-direction:column;
    gap:3px;
    border:1px solid #dfe4ff;
    border-radius:12px;
    background:#f8f8ff;
  }
  .adm-desk-hero-intro strong{
    color:#384bc9;
    font-size:12px;
  }
  .adm-desk-hero-intro span{
    color:#7d8994;
    font-size:10px;
  }
  .adm-desk-hero-body{ padding-top:14px; }
  .adm-desk-hero-editor .adm-m-hero{
    margin:0;
    padding:0;
    display:grid;
    grid-template-columns:190px minmax(0,1fr);
    align-items:start;
    gap:14px 18px;
    border:0;
  }
  .adm-desk-hero-editor .adm-m-media-previews{
    grid-row:1 / span 4;
    width:190px;
    min-height:338px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border:1px solid #e0e6ea;
    border-radius:15px;
    background:#f2f5f7;
  }
  .adm-desk-hero-editor .adm-m-media-pv,
  .adm-desk-hero-editor .adm-m-media-pv--hero{ width:100%; }
  .adm-desk-hero-editor .adm-m-media-pv img,
  .adm-desk-hero-editor .adm-m-media-pv video,
  .adm-desk-hero-editor .adm-m-media-pv--hero img,
  .adm-desk-hero-editor .adm-m-media-pv--hero video{
    width:190px;
    height:338px;
    border-radius:14px;
    object-fit:cover;
  }
  .adm-desk-hero-editor .adm-m-media-none{
    max-width:150px;
    text-align:center;
    line-height:1.5;
  }
  .adm-desk-hero-editor .adm-m-upload,
  .adm-desk-hero-editor .adm-m-uploading,
  .adm-desk-hero-editor .adm-m-recrop{
    width:100%;
    margin:0;
  }
  .adm-desk-hero-editor .adm-m-upload-btn{
    width:100%;
    min-height:42px;
    padding:9px 12px;
    border:1px solid #dfe5ea;
    border-radius:10px;
    background:#f7f9fa;
    font-size:11px;
  }
  .adm-desk-hero-editor .adm-m-hero-del{
    color:var(--cr2-danger);
    background:#fff4f4;
  }
  .adm-desk-hero-editor .adm-m-hero-cap{
    grid-column:2;
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
  }
  .adm-desk-hero-editor .adm-m-hero-cap input,
  .adm-desk-hero-editor .adm-m-hero-cap select{
    width:100%;
    min-height:44px;
    padding:0 12px;
    border:1px solid #e0e6ea;
    border-radius:10px;
    background:#fff;
    font-size:12px;
  }
}

@media (min-width:1440px){
  .adm-desk-workspace{
    grid-template-columns:200px minmax(350px,.8fr) minmax(520px,1.2fr);
  }
  .adm-desk-product{ grid-template-columns:58px minmax(0,1fr) 58px 36px; }
  .adm-desk-thumb{ width:58px; height:58px; }
}
