.dm2m{width:100%;min-height:100vh;background:var(--dm2-page-bg,#000);color:var(--dm2-text,#fff);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
.dm2m *{box-sizing:border-box}
.dm2m-login{min-height:70vh;display:flex;align-items:center;justify-content:center;padding:18px}
.dm2m-card{width:min(520px,100%);border:1px solid var(--dm2-border,rgba(255,255,255,.35));border-radius:14px;background:var(--dm2-card-bg,#0b0b0b);padding:18px}
.dm2m-card h2{margin:0 0 8px}
.dm2m-pass{width:100%;padding:12px 12px;border-radius:10px;border:1px solid var(--dm2-border,rgba(255,255,255,.35));background:color-mix(in srgb, var(--dm2-page-bg,#000) 85%, var(--dm2-text,#fff) 15%);color:var(--dm2-text,#fff);outline:none}
.dm2m-btn{padding:10px 14px;border-radius:10px;border:1px solid var(--dm2-primary-btn-border,#fff);background:var(--dm2-primary-btn-bg,#fff);color:var(--dm2-primary-btn-text,#000);cursor:pointer;font-weight:700}
.dm2m-link{margin-top:10px;background:transparent;border:0;color:var(--dm2-text,#fff);cursor:pointer;text-decoration:underline}
.dm2m-msg{margin-top:10px;opacity:.9}

.dm2m-app{min-height:70vh;display:flex;flex-direction:column}
.dm2m-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--dm2-border,rgba(255,255,255,.2));position:sticky;top:0;background:var(--dm2-page-bg,#000);z-index:5}
.dm2m-actions{display:flex;gap:10px;flex-wrap:wrap}
.dm2m-body{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px 16px}
@media(max-width:900px){.dm2m-body{grid-template-columns:1fr}}

.dm2m-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.dm2m-list{display:flex;flex-direction:column;gap:10px}
.dm2m-item{border:1px solid var(--dm2-border,rgba(255,255,255,.25));border-radius:12px;background:var(--dm2-card-bg,#0b0b0b);padding:12px;display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.dm2m-item-main{flex:1 1 auto;min-width:0}
.dm2m-item-title{font-weight:800;margin:0 0 4px}
.dm2m-item-sub{color:var(--dm2-muted-text,inherit);opacity:.8;font-size:13px;word-break:break-word}
.dm2m-item-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:560px){.dm2m-item{flex-direction:column}.dm2m-item-actions{justify-content:flex-start}}

.dm2m-ghost{opacity:.5}
.dm2m-drag{touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab;border:1px dashed var(--dm2-border,rgba(255,255,255,.25));border-radius:10px;padding:6px 10px;background:transparent;color:var(--dm2-text,#fff)}

.dm2m-modal[hidden]{display:none}
.dm2m-modal{position:fixed;inset:0;z-index:50}
.dm2m-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.dm2m-modal-panel{position:relative;background:var(--dm2-card-bg,#0b0b0b);border:1px solid var(--dm2-border,rgba(255,255,255,.3));border-radius:16px;width:min(860px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;margin:12px auto;padding:14px}
.dm2m-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;background:var(--dm2-card-bg,#0b0b0b);padding:6px 0;z-index:2}
.dm2m-modal-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.dm2m-modal-save-top{padding:8px 12px;min-height:40px}
.dm2m-modal-close{background:transparent;color:var(--dm2-text,#fff);border:1px solid var(--dm2-border,rgba(255,255,255,.35));border-radius:10px;padding:8px 10px;cursor:pointer}
.dm2m-modal-body{padding:10px 0}
.dm2m-modal-foot{display:none}

.dm2m-field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.dm2m-field input,.dm2m-field textarea,.dm2m-field select{width:100%;padding:10px 10px;border-radius:10px;border:1px solid var(--dm2-border,rgba(255,255,255,.25));background:color-mix(in srgb, var(--dm2-page-bg,#000) 85%, var(--dm2-text,#fff) 15%);color:var(--dm2-text,#fff);outline:none}
.dm2m-field textarea{min-height:90px;resize:vertical}

/* make select options readable */
.dm2m select option{background:var(--dm2-page-bg,#000);color:var(--dm2-text,#fff)}

.dm2m-img-preview{width:100%;max-width:220px;height:auto;border-radius:12px;border:1px solid var(--dm2-border,rgba(255,255,255,.25))}
.dm2m-toast{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);background:var(--dm2-card-bg,#111);border:1px solid var(--dm2-border,rgba(255,255,255,.25));padding:10px 14px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s}
.dm2m-toast.dm2m-toast-show{opacity:1}

.dm2m-alchip{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dm2m-alchip-ico{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;color:#fff;opacity:.95}
.dm2m-alchip-ico svg{width:18px;height:18px;display:block}

/* Allergen chips (premium) */
.dm2m-alchips{display:flex;flex-wrap:wrap;gap:10px}
.dm2m-alchip{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:999px;border:1px solid var(--dm2-border,rgba(255,255,255,.25));background:var(--dm2-page-bg,#000);color:var(--dm2-text,#fff);cursor:pointer;line-height:1}
.dm2m-alchip[aria-pressed="true"]{background:var(--dm2-primary-btn-bg,#fff);color:var(--dm2-primary-btn-text,#000);border-color:var(--dm2-primary-btn-border,#fff)}
.dm2m-alchip[aria-pressed="true"] .dm2m-alchip-ico{color:var(--dm2-primary-btn-text,#000)}
.dm2m-alchip-code{font-weight:900;min-width:16px;text-align:center}
.dm2m-alchip-name{opacity:.9}

/* Simple switch */
.dm2m-switch{display:flex;align-items:center;gap:10px}
.dm2m-switch input{width:auto}


/* --- Fix modal header/close button (stay in place while scrolling) --- */
.dm2m-modal-panel{max-height:90vh;overflow:hidden;}
.dm2m-modal-body{max-height:calc(90vh - 120px);overflow:auto;padding-bottom:18px;}
.dm2m-modal-head{position:sticky;top:0;background:var(--dm2-card-bg,#0b0b0b);z-index:5;display:flex;align-items:center;justify-content:space-between;}
.dm2m-modal-close{white-space:nowrap;position:sticky;top:0;}

/* Category image layout: image above, buttons below, square box */
.dm2m-cat-img-stack{display:flex;flex-direction:column;gap:10px;}
.dm2m-cat-img-box{width:160px;max-width:100%;aspect-ratio:1/1;}
.dm2m-cat-img-box img{width:100%;height:100%;object-fit:cover;border-radius:12px;}
.dm2m-cat-img-actions{display:flex;flex-direction:column;gap:10px;}
.dm2m-help{opacity:.8;font-size:12px;line-height:1.2;}
.dm2m-btn-ghost{background:transparent !important;color:var(--dm2-text,#fff) !important;border-color:var(--dm2-border,rgba(255,255,255,.35)) !important;}

/* Checkbox row */
.dm2m-check{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}


/* --- DM2 Final patches (2026-02-24) --- */
@media(max-width:640px){
  .dm2m-drag{ padding:10px 12px; font-size:18px; }
}


/* --- Desktop alignment for list actions + active category highlight --- */
@media (min-width: 561px){
  .dm2m-item{
    display:grid;
    grid-template-columns:minmax(0,1fr) 286px;
    align-items:center;
  }
  .dm2m-item-main{
    min-width:0;
    padding-right:8px;
  }
  .dm2m-item-title{
    overflow-wrap:anywhere;
    word-break:break-word;
    line-height:1.25;
  }
  .dm2m-item-actions{
    width:286px;
    min-width:286px;
    display:grid;
    grid-template-columns:38px 112px 112px;
    gap:8px;
    align-items:center;
    justify-content:end;
    flex-wrap:nowrap;
  }
  .dm2m-item-actions .dm2m-btn,
  .dm2m-item-actions .dm2m-drag{
    width:100%;
  }
  .dm2m-item-actions .dm2m-btn{
    text-align:center;
    white-space:nowrap;
    min-height:50px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .dm2m-item-actions .dm2m-drag{
    min-height:58px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
}

.dm2m-item.is-active{
  border-color:#ffffff;
  background:rgba(255,255,255,.06);
  box-shadow:inset 4px 0 0 #ffffff;
}
.dm2m-item.is-active .dm2m-item-title{
  color:#ffffff;
}
.dm2m-item.is-active .dm2m-item-sub{
  color:#ffffff;
  opacity:.95;
}

/* Active/hover highlight for selected items */
.dm2m-item:hover{background:rgba(255,255,255,.06)}
.dm2m-item.is-active{background:rgba(255,255,255,.10);box-shadow:0 0 0 2px rgba(255,255,255,.25) inset}
.dm2m-item.is-active:hover{background:rgba(255,255,255,.10)}

/* active = hover highlight */
.dm2-active-hover,.is-active,[aria-pressed="true"],[aria-selected="true"]{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease}

.dm2m-btn.is-active,.dm2m-btn[aria-pressed="true"],.dm2m-item.is-active{border-color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.25) inset;background:rgba(255,255,255,.10)}


/* stronger selected/active highlight */
.is-active,[aria-pressed="true"],[aria-selected="true"],.dm2-active-hover{outline:2px solid rgba(255,255,255,.55);outline-offset:0;border-color:#fff !important;box-shadow:0 0 0 2px rgba(255,255,255,.22) inset,0 0 0 1px rgba(255,255,255,.18);}


/* DM2 1.1.00 stronger selected/unavailable states */
.dm2m-item.is-active{border-color:#fff!important;background:rgba(255,255,255,.12)!important;box-shadow:0 0 0 2px rgba(255,255,255,.28) inset, inset 4px 0 0 #fff!important;}
.dm2m-item.is-active .dm2m-item-title,.dm2m-item.is-active .dm2m-item-sub{color:#fff!important;}
.dm2w-cat.is-active{border-color:#fff!important;box-shadow:0 0 0 2px rgba(255,255,255,.30) inset, inset 4px 0 0 #fff!important;}
.dm2w-card.is-unavailable{opacity:.72;}
.dm2w-card.is-unavailable .dm2w-main h4,.dm2w-card.is-unavailable .dm2w-muted{opacity:.95;}


/* block4 manager polish */
.dm2m-topbar,.dm2m-section-head,.dm2m-item-actions{row-gap:10px}
.dm2m-btn,.dm2m-modal-close,.dm2m-drag{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.dm2m-item,.dm2m-card,.dm2m-modal-panel{box-shadow:0 1px 2px rgba(0,0,0,.08)}
.dm2m-section-head .dm2m-btn{white-space:nowrap}
.dm2m-pager{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:12px}
.dm2m-pager-info{opacity:.9;font-weight:600}
@media (max-width:560px){
  .dm2m-topbar{padding:12px 14px}
  .dm2m-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
  .dm2m-actions > *{min-width:0}
  .dm2m-actions .dm2m-btn,.dm2m-actions .dm2m-link{width:100%;justify-content:center}
}
@media (max-width:420px){
  .dm2m-actions{grid-template-columns:1fr}
}


/* mobile topbar buttons only: hide brand and keep 3 buttons on one row */
@media (max-width:560px){
  .dm2m-topbar{display:block}
  .dm2m-title{display:none!important}
  .dm2m-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;width:100%!important}
  .dm2m-actions > *{min-width:0}
  .dm2m-actions .dm2m-btn,.dm2m-actions .dm2m-link{
    width:100%!important;
    justify-content:center!important;
    text-align:center!important;
    padding:10px 8px!important;
    min-height:56px!important;
    white-space:nowrap!important;
    text-decoration:none!important;
    margin:0!important;
  }
}
@media (max-width:420px){
  .dm2m-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dm2m-actions .dm2m-btn,.dm2m-actions .dm2m-link{font-size:14px!important}
}


/* mobile: show products directly under selected category */
.dm2m-inline-prods-wrap{width:100%;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.12)}
.dm2m-inline-prods-wrap .dm2m-section-head{margin-bottom:10px}
@media (max-width:900px){
  .dm2m-inline-prods-wrap .dm2m-list{display:flex;flex-direction:column;gap:10px}
}


.dm2m-item-actions .dm2m-move-up,
.dm2m-item-actions .dm2m-move-down{
  display:none;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.35);
  background:transparent;
  color:#fff;
  cursor:pointer;
  font-weight:700;
}

.dm2m-stafftitle{font-weight:700;margin:16px 0 8px}
.dm2m-stafflogin .dm2m-user,
.dm2m-stafflogin .dm2m-staffpass,
.dm2m-stafflogin .dm2m-pass{width:100%;padding:12px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.35);background:#000;color:#fff;outline:none;margin-bottom:10px}
.dm2m-stafflogin .dm2m-btn{width:100%;margin-bottom:10px}
.dm2m-stafflogin .dm2m-sep{display:flex;align-items:center;justify-content:center;opacity:.7;font-size:12px;margin:8px 0}
.dm2m-stafflogin .dm2m-helper{font-size:12px;opacity:.85;line-height:1.45;margin:0 0 10px}

@media(max-width:900px){
  .dm2m-item-actions .dm2m-drag{display:none}
  .dm2m-item-actions .dm2m-move-up,
  .dm2m-item-actions .dm2m-move-down{display:inline-flex;align-items:center;justify-content:center}
}

/* ============================================================
   MODAL PRODOTTO — tab layout, mobile-first
   ============================================================ */

/* Tab nav sopra il modal */
.dm2w-tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid rgba(255,255,255,.12);
  margin-bottom: 16px;
  padding-bottom: 0;
}
.dm2w-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 14px;
  color: rgba(255,255,255,.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -2px;
  border-radius: 8px 8px 0 0;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.dm2w-tab-btn:hover  { color: #fff; }
.dm2w-tab-btn.active { color: #fff; border-bottom-color: #2271b1; }

/* Campi */
.dm2w-field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.dm2w-lbl   { font-size:13px; font-weight:700; color:#fff; }
.dm2w-req   { color:#ef4444; margin-left:2px; }
.dm2w-muted { font-size:12px; color:rgba(255,255,255,.4); font-weight:400; }
.dm2w-input {
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1.5px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:14px;
  outline:none;
  box-sizing:border-box;
  transition:border-color .15s;
}
.dm2w-input:focus { border-color:#2271b1; }
.dm2w-input::placeholder { color:rgba(255,255,255,.3); }
.dm2w-select {
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1.5px solid rgba(255,255,255,.2);
  background:#111;
  color:#fff;
  font-size:14px;
  outline:none;
  box-sizing:border-box;
}
.dm2w-input-sm {
  padding:7px 10px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.04);
  color:#fff;
  font-size:13px;
  outline:none;
  width:100%;
  box-sizing:border-box;
}

/* Toggle disponibilità */
.dm2w-switch { display:flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
.dm2w-switch input { display:none; }
.dm2w-switch-track {
  width:44px; height:24px; border-radius:999px;
  background:rgba(255,255,255,.15); position:relative;
  flex-shrink:0; transition:background .2s;
}
.dm2w-switch-track::after {
  content:''; position:absolute; top:3px; left:3px;
  width:18px; height:18px; border-radius:50%;
  background:#fff; transition:transform .2s;
}
.dm2w-switch input:checked ~ .dm2w-switch-track { background:#16a34a; }
.dm2w-switch input:checked ~ .dm2w-switch-track::after { transform:translateX(20px); }
.dm2w-switch-lbl { font-size:14px; color:rgba(255,255,255,.8); }

/* Prezzo */
.dm2w-price-tabs { display:flex; gap:6px; margin-bottom:12px; }
.dm2w-ptab {
  flex:1; padding:10px 8px; border-radius:10px;
  border:1.5px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.04); color:rgba(255,255,255,.6);
  font-size:13px; font-weight:600; cursor:pointer;
  text-align:center; transition:border-color .15s, color .15s, background .15s;
}
.dm2w-ptab:hover  { border-color:rgba(255,255,255,.3); color:#fff; }
.dm2w-ptab.active { border-color:#2271b1; background:rgba(34,113,177,.15); color:#fff; }
.dm2w-price-row {
  display:flex; align-items:center; gap:0;
  border:1.5px solid rgba(255,255,255,.2); border-radius:10px;
  overflow:hidden; background:rgba(255,255,255,.05);
}
.dm2w-price-row:focus-within { border-color:#2271b1; }
.dm2w-curr { padding:10px 12px; color:rgba(255,255,255,.5); font-size:16px; font-weight:700; border-right:1px solid rgba(255,255,255,.1); }
.dm2w-price-val { flex:1; padding:10px 12px; border:none; background:transparent; color:#fff; font-size:18px; font-weight:700; outline:none; min-width:0; }
.dm2w-price-val::placeholder { color:rgba(255,255,255,.2); }
.dm2w-sizes-list { display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.dm2w-size-row { display:flex; gap:8px; align-items:center; }
.dm2w-icon-btn { background:transparent; border:1px solid rgba(255,255,255,.2); border-radius:8px; color:rgba(255,255,255,.5); padding:8px 10px; cursor:pointer; font-size:13px; flex-shrink:0; }
.dm2w-icon-btn:hover { color:#ef4444; border-color:#ef4444; }
.dm2w-add-size-btn {
  width:100%; padding:9px; border-radius:9px;
  border:1.5px dashed rgba(255,255,255,.2);
  background:transparent; color:rgba(255,255,255,.5);
  font-size:13px; cursor:pointer; transition:border-color .15s, color .15s;
}
.dm2w-add-size-btn:hover { border-color:rgba(255,255,255,.4); color:#fff; }

/* Traduzioni collassabili */
.dm2w-translations { border:1px solid rgba(255,255,255,.1); border-radius:10px; overflow:hidden; }
.dm2w-translations summary {
  padding:10px 14px; cursor:pointer; font-size:13px; color:rgba(255,255,255,.5);
  list-style:none; user-select:none;
}
.dm2w-translations summary::-webkit-details-marker { display:none; }
.dm2w-translations[open] summary { border-bottom:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.8); }
.dm2w-translations-body { padding:12px 14px; display:flex; flex-direction:column; gap:10px; }
.dm2w-lang-row { display:flex; flex-direction:column; gap:4px; }
.dm2w-lang-badge { font-size:12px; color:rgba(255,255,255,.5); font-weight:600; }

/* Allergeni */
.dm2w-alchips-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px;
}
.dm2w-alchip {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 8px; border-radius:12px; text-align:center;
  border:2px solid rgba(255,255,255,.12); background:rgba(255,255,255,.04);
  color:#fff; cursor:pointer; font-size:11px; font-weight:600;
  transition:border-color .15s, background .15s, transform .1s;
}
.dm2w-alchip:hover  { border-color:rgba(255,255,255,.3); transform:scale(1.03); }
.dm2w-alchip.active { border-color:#ef4444; background:rgba(239,68,68,.15); color:#fca5a5; }
.dm2w-alchip.active .dm2w-alchip-ico { color:#fca5a5; }
.dm2w-alchip-ico    { width:24px; height:24px; display:flex; align-items:center; justify-content:center; }
.dm2w-alchip-ico svg { width:24px; height:24px; }
.dm2w-alchip-name   { line-height:1.2; word-break:break-word; }

/* Drop zone foto */
.dm2w-drop-zone {
  position:relative; border:2px dashed rgba(255,255,255,.2); border-radius:14px;
  min-height:160px; display:flex; align-items:center; justify-content:center;
  cursor:pointer; overflow:hidden; background:rgba(255,255,255,.03);
  transition:border-color .2s, background .2s;
}
.dm2w-drop-zone:hover, .dm2w-drop-zone.drag-over { border-color:#2271b1; background:rgba(34,113,177,.07); }
.dm2w-drop-zone.has-img { border-style:solid; border-color:rgba(255,255,255,.15); }
.dm2w-drop-placeholder { display:flex; flex-direction:column; align-items:center; gap:6px; padding:20px; text-align:center; color:rgba(255,255,255,.5); pointer-events:none; }
.dm2w-drop-placeholder strong { color:#fff; font-size:14px; }
.dm2w-img-big { width:100%; height:200px; object-fit:cover; display:block; pointer-events:none; }
.dm2w-ghost-btn { background:transparent; border:1px solid rgba(255,255,255,.2); border-radius:8px; color:rgba(255,255,255,.6); padding:8px 12px; cursor:pointer; font-size:13px; transition:border-color .15s, color .15s; }
.dm2w-ghost-btn:hover { border-color:rgba(255,255,255,.4); color:#fff; }

/* ============================================================
   FIX CARD PRODOTTO — bottone elimina e mobile
   ============================================================ */

/* Desktop: layout compatto per le azioni */
.dm2m-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
/* Bottone elimina: solo icona su desktop, testo su mobile */
.dm2m-del-prod, .dm2m-del-cat {
  background: transparent !important;
  color: rgba(255,255,255,.55) !important;
  border-color: rgba(255,255,255,.2) !important;
  padding: 8px 10px !important;
  min-width: 0 !important;
  font-size: 13px !important;
}
.dm2m-del-prod:hover, .dm2m-del-cat:hover {
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}
/* Bottone modifica: accento */
.dm2m-edit-prod, .dm2m-edit-cat {
  background: rgba(34,113,177,.15) !important;
  border-color: rgba(34,113,177,.5) !important;
  color: #93c5fd !important;
}
/* Frecce up/down: compatte */
.dm2m-move-up, .dm2m-move-down {
  padding: 8px !important;
  min-width: 36px !important;
  font-size: 13px !important;
}
/* Drag handle */
.dm2m-drag {
  padding: 8px !important;
  min-width: 32px !important;
  opacity: .5;
}
/* Toggle disponibilità nella lista */
.dm2m-avail-toggle {
  width: 36px; height: 22px; border-radius: 999px;
  background: rgba(255,255,255,.15); border: none; cursor: pointer;
  position: relative; transition: background .2s; flex-shrink: 0;
  display: inline-flex; align-items: center;
}
.dm2m-avail-toggle::after {
  content:''; position:absolute; left:3px;
  width:16px; height:16px; border-radius:50%;
  background:#fff; transition:transform .2s;
}
.dm2m-avail-toggle.is-on { background:#16a34a; }
.dm2m-avail-toggle.is-on::after { transform:translateX(14px); }

/* Barra ricerca */
.dm2m-search-bar {
  width:100%; padding:9px 12px; border-radius:10px;
  border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.05);
  color:#fff; font-size:13px; outline:none; margin-bottom:8px; box-sizing:border-box;
}
.dm2m-search-bar::placeholder { color:rgba(255,255,255,.3); }
.dm2m-search-bar:focus { border-color:#2271b1; }

/* Mobile: card verticale con azioni su griglia 2 colonne */
@media (max-width: 600px) {
  .dm2m-item { flex-direction:column; }
  .dm2m-item-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 36px 36px auto auto 1fr 1fr;
    gap: 6px;
    justify-content: start;
  }
  .dm2m-avail-toggle  { grid-column: 1; }
  .dm2m-drag          { grid-column: 2; }
  .dm2m-move-up       { grid-column: 3; }
  .dm2m-move-down     { grid-column: 4; }
  .dm2m-edit-prod, .dm2m-edit-cat { grid-column: 5; width:100%; }
  .dm2m-del-prod, .dm2m-del-cat   { grid-column: 6; width:100%; }
}


/* ============================================================
   Gestione menu: categorie slider + prodotti sotto
   ============================================================ */
.dm2m-body{
  display:flex !important;
  flex-direction:column !important;
  gap:18px !important;
}
.dm2m-col-cats,.dm2m-col-prods{
  width:100% !important;
}
.dm2m-cats-list{
  display:flex !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
  overflow-x:auto !important;
  padding-bottom:4px !important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.dm2m-cats-list::-webkit-scrollbar{display:none}
.dm2m-cat-chip{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#fff;
  border-radius:999px;
  padding:12px 16px;
  min-height:48px;
  cursor:pointer;
  font-weight:700;
}
.dm2m-cat-chip.is-active{
  background:#fff;
  color:#000;
  border-color:#fff;
}
.dm2m-cat-chip-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  border-radius:999px;
  padding:0 7px;
  background:rgba(255,255,255,.12);
  font-size:12px;
}
.dm2m-cat-chip.is-active .dm2m-cat-chip-count{
  background:rgba(0,0,0,.10);
}
.dm2m-cat-detail{
  margin-top:14px;
}
.dm2m-cat-detail-card{
  display:flex;
  gap:16px;
  align-items:center;
  border:1px solid rgba(255,255,255,.22);
  border-radius:16px;
  background:#0b0b0b;
  padding:16px;
}
.dm2m-cat-detail-main{flex:1 1 auto;min-width:0}
.dm2m-cat-detail-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.dm2m-cat-detail-kicker{
  opacity:.72;
  font-size:12px;
  margin-bottom:4px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.dm2m-cat-detail-title{
  margin:0;
  font-size:24px;
  line-height:1.1;
}
.dm2m-cat-detail-meta{
  margin-top:6px;
  opacity:.8;
  font-size:13px;
}
.dm2m-cat-detail-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.dm2m-cat-detail-media{
  width:78px;
  height:78px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  flex:0 0 auto;
}
.dm2m-cat-detail-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.dm2m-search-bar{
  width:100%;
  margin:0 0 12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.18);
  background:#000;
  color:#fff;
}
.dm2m-empty-state{
  border:1px dashed rgba(255,255,255,.2);
  border-radius:14px;
  padding:18px;
  opacity:.86;
  background:rgba(255,255,255,.03);
}
@media (max-width:700px){
  .dm2m-cat-detail-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .dm2m-cat-detail-title{font-size:21px}
  .dm2m-cat-chip{padding:10px 14px;min-height:44px}
}


.dm2m-cat-entry{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.dm2m-cat-edit-chip{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:transparent;
  color:rgba(255,255,255,.88);
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.dm2m-cat-edit-chip.is-active,
.dm2m-cat-edit-chip:hover{
  border-color:rgba(255,255,255,.35);
  background:rgba(255,255,255,.08);
  color:#fff;
}
.dm2m-cat-detail[hidden]{
  display:none !important;
}
@media (max-width:700px){
  .dm2m-cat-entry{
    gap:6px;
  }
  .dm2m-cat-edit-chip{
    min-height:44px;
    padding:10px 12px;
  }
}


/* Rifinitura richiesta: niente titoli sezione, pulsanti aggiunta espliciti, categoria + modifica compatta */
.dm2m-section-head-cats,
.dm2m-section-head-prods{
  justify-content:flex-start;
  margin-bottom:12px;
}
.dm2m-section-head-cats .dm2m-btn,
.dm2m-section-head-prods .dm2m-btn{
  min-height:42px;
  padding:10px 16px;
}
.dm2m-cats-list{
  gap:12px !important;
  align-items:center;
}
.dm2m-cat-entry{
  gap:6px;
  align-items:center;
}
.dm2m-cat-chip{
  padding:12px 16px;
}
.dm2m-cat-edit-chip{
  min-height:38px;
  padding:8px 12px;
  font-size:13px;
  line-height:1;
  background:rgba(255,255,255,.03);
}
.dm2m-cat-entry .dm2m-cat-chip{
  margin-right:0;
}
@media (max-width:700px){
  .dm2m-section-head-cats .dm2m-btn,
  .dm2m-section-head-prods .dm2m-btn{
    min-height:40px;
    padding:9px 14px;
  }
  .dm2m-cat-edit-chip{
    min-height:34px;
    padding:7px 10px;
    font-size:12px;
  }
}


/* ============================================================
   UI tweak 2.0.6 — gruppi categoria + modifica compatti e in riga
   ============================================================ */
.dm2m-cats-list{
  display:grid !important;
  grid-auto-flow:column !important;
  grid-auto-columns:max-content !important;
  justify-content:flex-start !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  padding:4px 0 6px !important;
  margin:0 !important;
  white-space:nowrap;
}
.dm2m-cat-entry{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  width:max-content !important;
  flex:0 0 auto !important;
  padding:4px !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.04) !important;
  box-shadow:none !important;
}
.dm2m-cat-entry.is-active{
  border-color:rgba(255,255,255,.42) !important;
  background:rgba(255,255,255,.08) !important;
}
.dm2m-cat-entry.is-editing{
  border-color:#fff !important;
  box-shadow:0 0 0 2px rgba(255,255,255,.16) inset !important;
}
.dm2m-cat-chip{
  flex:0 0 auto !important;
  margin:0 !important;
  min-height:40px !important;
  padding:10px 14px !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.dm2m-cat-chip.is-active{
  background:#fff !important;
  color:#000 !important;
  border-radius:999px !important;
}
.dm2m-cat-chip-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  font-size:12px;
}
.dm2m-cat-edit-chip{
  flex:0 0 auto !important;
  min-height:32px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  font-size:12px !important;
  line-height:1 !important;
  background:rgba(255,255,255,.05) !important;
  border-color:rgba(255,255,255,.22) !important;
}
.dm2m-cat-edit-chip.is-active,
.dm2m-cat-edit-chip:hover{
  background:rgba(255,255,255,.12) !important;
  border-color:rgba(255,255,255,.38) !important;
}
@media (max-width:700px){
  .dm2m-cats-list{gap:10px !important;}
  .dm2m-cat-entry{gap:5px !important;padding:3px !important;}
  .dm2m-cat-chip{min-height:36px !important;padding:8px 12px !important;}
  .dm2m-cat-edit-chip{min-height:30px !important;padding:6px 9px !important;font-size:11px !important;}
}


/* ============================================================
   UI tweak 2.0.8 — pulsanti aggiunta compatti e affiancati
   ============================================================ */
.dm2m-section-head-actions{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  margin-bottom:14px !important;
}
.dm2m-section-head-actions .dm2m-btn{
  min-height:38px !important;
  padding:8px 12px !important;
  border-radius:12px !important;
  font-size:14px !important;
  line-height:1.1 !important;
}
.dm2m-section-head-prods{
  display:none !important;
}
@media (max-width:700px){
  .dm2m-section-head-actions{
    gap:8px !important;
    margin-bottom:12px !important;
  }
  .dm2m-section-head-actions .dm2m-btn{
    min-height:36px !important;
    padding:8px 11px !important;
    font-size:13px !important;
  }
}


.dm2w-meta-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(240px,1fr);
  gap:14px;
  align-items:start;
}
.dm2w-meta-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:14px;
  background:rgba(255,255,255,.03);
}
.dm2w-statechips-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.dm2w-statechip{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:112px;
  padding:14px 10px;
  border-radius:14px;
  border:2px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:#fff;
  cursor:pointer;
  transition:border-color .15s, background .15s, transform .1s;
}
.dm2w-statechip:hover{border-color:rgba(255,255,255,.3);transform:scale(1.02)}
.dm2w-statechip.active{
  border-color:#22c55e;
  background:rgba(34,197,94,.14);
  color:#bbf7d0;
}
.dm2w-statechip-ico,
.dm2w-statechip-ico svg{
  width:28px;
  height:28px;
  display:block;
}
.dm2w-statechip-name{
  font-size:12px;
  font-weight:700;
  text-align:center;
}
@media(max-width:760px){
  .dm2w-meta-grid{grid-template-columns:1fr}
}
.dm2m-btn-danger{background:#b93b3b!important;color:#fff!important;border-color:#b93b3b!important}
.dm2m-btn-danger:hover{background:#932e2e!important}

.dm2m-toolbar-toggle{display:none;width:38px;height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#fff;font-size:20px;cursor:pointer;align-items:center;justify-content:center;line-height:1;flex-shrink:0}
.dm2m-toolbar-btns{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:768px){
  .dm2m-topbar{position:relative;display:flex;align-items:center;gap:10px}
  .dm2m-topbar .dm2m-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
  .dm2m-topbar .dm2m-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;margin-left:auto}
  /* Burger a SINISTRA del topbar (spostato via JS come primo figlio) */
  .dm2m-topbar > .dm2m-toolbar-toggle{flex-shrink:0;order:-1}
  .dm2m-toolbar-toggle{display:inline-flex}
  /* Dropdown burger: apre dal burger a sinistra */
  .dm2m-toolbar-btns{display:none;position:absolute;top:100%;left:6px;right:auto;z-index:100;background:#1a1a1a;border:1px solid rgba(255,255,255,.15);border-radius:14px;padding:8px;margin-top:6px;min-width:200px;box-shadow:0 12px 32px rgba(0,0,0,.5);flex-direction:column;gap:4px}
  .dm2m-toolbar-btns.is-open{display:flex}
  .dm2m-toolbar-btns .dm2m-btn,
  .dm2m-toolbar-btns .dm2m-view-menu{font-size:13px!important;padding:10px 14px!important;border-radius:10px!important;min-height:38px!important;justify-content:flex-start!important;width:100%!important;text-align:left!important}
  /* Dropdown "Vai a categoria" a DESTRA del topbar */
  .dm2m-cat-jump--in-topbar{
    max-width:170px !important;
    min-width:0 !important;
    padding:8px 10px !important;
    font-size:12px !important;
    background:rgba(255,255,255,.08) !important;
    color:#fff !important;
    border:1px solid rgba(255,255,255,.25) !important;
    border-radius:10px !important;
  }
}
@media(max-width:420px){
  .dm2m-topbar .dm2m-title{display:none}
  .dm2m-cat-jump--in-topbar{max-width:200px !important}
}

.dm2m-print-styles-popup{position:absolute;top:100%;right:0;z-index:200;background:#1a1a1a;border:1px solid rgba(255,255,255,.15);border-radius:14px;padding:10px;min-width:240px;max-height:70vh;overflow-y:auto;box-shadow:0 12px 32px rgba(0,0,0,.6);display:flex;flex-direction:column;gap:4px}
.dm2m-print-styles-popup::-webkit-scrollbar{width:6px}
.dm2m-print-styles-popup::-webkit-scrollbar-track{background:transparent}
.dm2m-print-styles-popup::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:3px}
/* Overlay backdrop per popup Stampa su mobile (creato via JS) */
.dm2m-psp-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:9998;display:none;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
/* Mobile: popup Stampa diventa modal fullscreen centrato con overlay */
@media(max-width:768px){
  .dm2m-psp-backdrop{display:block}
  .dm2m-print-styles-popup,
  .dm2m-print-styles-popup--mobile{
    position:fixed !important;
    top:50% !important;
    right:auto !important;
    left:50% !important;
    transform:translate(-50%,-50%) !important;
    width:calc(100vw - 32px) !important;
    max-width:380px !important;
    max-height:80vh !important;
    padding:14px !important;
    gap:6px !important;
    box-shadow:0 20px 60px rgba(0,0,0,.8) !important;
    z-index:9999 !important;
  }
  .dm2m-psp-title{font-size:15px !important;text-align:center !important;padding:8px 10px !important;opacity:1 !important;border-bottom:1px solid rgba(255,255,255,.12) !important;margin-bottom:4px !important}
  .dm2m-psp-btn{padding:12px 14px !important;font-size:14px !important;min-height:44px !important}
  .dm2m-psp-close{padding:12px 14px !important;font-size:14px !important;min-height:44px !important;margin-top:8px !important;background:rgba(255,255,255,.05) !important}
}
.dm2m-psp-title{font-size:13px;font-weight:700;color:#fff;padding:6px 10px;opacity:.7}
.dm2m-psp-btn{appearance:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#fff;padding:10px 14px;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;text-align:left;transition:background .15s}
.dm2m-psp-btn:hover{background:rgba(255,255,255,.12)}
.dm2m-psp-close{appearance:none;border:1px solid rgba(255,255,255,.1);background:transparent;color:#999;padding:8px 14px;border-radius:10px;font-size:12px;cursor:pointer;text-align:center;margin-top:4px}
.dm2m-psp-bg-row{display:flex;flex-direction:column;gap:4px;margin-bottom:4px}
.dm2m-psp-bg-opt{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid rgba(255,255,255,.1);border-radius:8px;color:#ccc;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s}
.dm2m-psp-bg-opt:hover{border-color:rgba(255,255,255,.25)}
.dm2m-psp-bg-opt.is-active{border-color:#4a9eff;background:rgba(74,158,255,.1);color:#fff}
.dm2m-psp-bg-opt input{display:none}
