/**
 * Chrome SCP staff — Liquid Glass allineato al portale client (client-portal-chrome-glass.css).
 * Scope: body.staff-side — non modifica scp.css.
 */

html:has(body.staff-side) {
  background-color: #070f1a;
}

body.staff-side {
  --portal-chrome-bg: #131d31;
  --portal-chrome-bg-nav: #0f1828;
  --portal-chrome-bg-deep: rgba(8, 18, 34, 0.96);
  --portal-chrome-header-control: #1a2a42;
  --portal-chrome-header-control-border: #3d5678;
  --portal-chrome-footer-glass-top: rgba(10, 22, 38, 0.92);
  --portal-chrome-footer-glass-mid: rgba(6, 14, 28, 0.96);
  --portal-chrome-footer-glass-bottom: rgba(3, 8, 18, 0.98);
  --portal-chrome-border: rgba(255, 255, 255, 0.24);
  --portal-chrome-border-soft: rgba(255, 255, 255, 0.12);
  --portal-chrome-text: #f1f5f9;
  --portal-chrome-muted: #cbd5e1;
  /* Allineamento tipografico al portale client (Montserrat + Open Sans in staff-head) */
  --glass-font-sans: "Montserrat", "Open Sans", system-ui, -apple-system, sans-serif;
  --portal-chrome-accent: #a8dcff;
  --portal-chrome-accent-strong: #d4eeff;
  --portal-chrome-blur: 10px;
  --portal-chrome-radius: 18px;
  /* Raggio pannelli secondari — unica fonte per fogli staff (coda, directory, ticket view) */
  --glass-radius-sm: 14px;
  --glass-blur: 12px;
  --mp-staff-header-min: 60px;
  /*
   * Spazio sotto l’header fisso: deve coprire almeno #header-constrain (min 56px + padding 0.45rem×2) + bordo header.
   * Solo --mp-staff-header-min (60px) era troppo basso → #sub_nav-wrap sticky e padding #pjax-container si sovrapponevano al chrome.
   */
  --mp-staff-header-offset: calc(56px + 0.45rem + 0.45rem + 1px);
  /* Altezza stimata sub-nav (pill + padding jb-overflowmenu; può andare a due righe — vedi slack su tickets sticky bar) */
  --mp-staff-subnav-h: 60px;
  /* Colonna contenuto: stesso rientro orizzontale per sub-nav, #content e bordo testo */
  --mp-staff-column-pad-x: clamp(0.85rem, 2.5vw, 1.5rem);
  --mp-staff-column-inset-left: max(env(safe-area-inset-left, 0px), var(--mp-staff-column-pad-x));
  --mp-staff-column-inset-right: max(env(safe-area-inset-right, 0px), var(--mp-staff-column-pad-x));
  --select2-surface: rgba(255, 255, 255, 0.94);
  --select2-surface-dropdown: rgba(252, 254, 255, 0.92);
  --select2-border-inner: rgba(15, 23, 42, 0.14);
  --select2-text: #0f172a;
  --select2-muted: #475569;
  --select2-radius: 16px;
  --select2-radius-inner: 12px;
  --select2-shadow-trigger: 0 2px 8px rgba(0, 14, 40, 0.08), 0 10px 32px rgba(2, 18, 45, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --select2-dropdown-border: rgba(26, 111, 212, 0.62);
  --select2-dropdown-outline: rgba(15, 23, 42, 0.14);
  --select2-shadow-dropdown: 0 0 0 1px var(--select2-dropdown-outline), 0 18px 44px rgba(0, 6, 28, 0.42), 0 8px 24px rgba(26, 55, 120, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  --select2-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.28);
  --select2-highlight-start: #1a6fd4;
  --select2-highlight-end: #4f46e5;
  /* Allineamento header ↔ sub-nav (stesso modello del portale client) */
  --portal-chrome-nav-link-bg: #182335;
  --portal-chrome-nav-link-border: #354560;
  /* Cluster #nav.pull-right.pjax — pill vetro (header) */
  --mp-staff-header-nav-pill-bg: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.03) 42%,
    rgba(12, 22, 40, 0.65) 100%
  );
  --mp-staff-header-nav-pill-bg-solid: rgba(18, 30, 50, 0.78);
  --mp-staff-header-nav-pill-border: rgba(255, 255, 255, 0.2);
  --mp-staff-header-nav-pill-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 6px 20px rgba(0, 8, 24, 0.35);
  /* Unica scala tipo per pill #header e sub-nav coda (stesso look “Aperto” / voci coda) */
  --mp-staff-pill-nav-font-size: clamp(11px, 0.45rem + 0.32vw, 13px);
  --mp-staff-pill-nav-letter-spacing: 0.015em;
  --mp-staff-pill-nav-line-height: 1.28;
  /* Sinistra header = colonna testo; destra riserva hamburger (≥ colonna) */
  --portal-header-pad-left: var(--mp-staff-column-inset-left);
  --portal-header-pad-right: max(64px, calc(58px + env(safe-area-inset-right, 0px)), var(--mp-staff-column-inset-right));
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--portal-chrome-text);
  min-height: 100vh;
  background-color: #070f1a;
  background-image:
    radial-gradient(ellipse 100% 80% at 8% 12%, rgba(38, 120, 220, 0.42), transparent 58%),
    radial-gradient(ellipse 80% 70% at 92% 8%, rgba(130, 90, 240, 0.22), transparent 52%),
    radial-gradient(ellipse 70% 55% at 48% 96%, rgba(0, 170, 165, 0.14), transparent 48%),
    linear-gradient(168deg, #0a1628 0%, #0e1b2e 38%, #121f33 100%);
  background-attachment: scroll;
}

body.staff-side::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  body.staff-side {
    --portal-header-pad-right: max(12px, env(safe-area-inset-right, 0px), var(--mp-staff-column-inset-right));
  }
}

body.staff-side > #container {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Skip link */
.mp-staff-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100000;
}
.mp-staff-skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  background: #1e3a5f;
  color: #fff !important;
  border-radius: 10px;
  border: 2px solid var(--portal-chrome-accent);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Header top bar — solido, fixed come stack client */
body.staff-side > #container > #header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  background: var(--portal-chrome-bg) !important;
  background-image: none !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  height: auto !important;
  /* Non restare sotto --mp-staff-header-offset (area cliccabile / vetro coerente col padding pjax) */
  min-height: max(var(--mp-staff-header-min), calc(56px + 0.45rem + 0.45rem)) !important;
  overflow: visible !important;
  z-index: 900 !important;
}

body.staff-side #header-constrain {
  max-width: 1264px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem 0.65rem;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
  padding-left: var(--portal-header-pad-left) !important;
  padding-right: var(--portal-header-pad-right) !important;
  box-sizing: border-box;
  min-height: 56px;
  position: relative;
  overflow: visible !important;
}

/* Ordine visivo come client: logo | cluster azioni a destra */
body.staff-side #header-constrain #header-logo {
  order: 1;
  flex: 0 1 auto;
  min-width: 0;
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0;
  text-decoration: none !important;
}

body.staff-side #header-constrain #nav.pull-right,
body.staff-side #header-constrain #nav,
body.staff-side #header-constrain #nav.pull-right.pjax {
  order: 2;
  float: none !important;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto !important;
  margin-right: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 0.4rem 0.55rem;
  max-width: none;
  position: relative !important;
  top: 0 !important;
  transform: none !important;
  font-family: var(--glass-font-sans);
  font-size: clamp(13px, 0.68rem + 0.28vw, 15px);
  line-height: 1.35;
  color: var(--portal-chrome-muted);
  -webkit-font-smoothing: antialiased;
  /* Niente striscia grigia scp.css (#eee) / staff-desktop sotto le pill vetro */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

@media screen and (min-width: 761px) and (max-width: 900px) {
  body.staff-side #header-constrain #nav.pull-right,
  body.staff-side #header-constrain #nav,
  body.staff-side #header-constrain #nav.pull-right.pjax {
    flex-wrap: wrap !important;
    row-gap: 0.3rem !important;
  }
}

@media screen and (max-width: 760px) {
  body.staff-side {
    --portal-header-pad-right: max(10px, calc(48px + env(safe-area-inset-right, 0px)));
    --portal-header-pad-left: max(10px, env(safe-area-inset-left, 0px));
  }
}

/* Hamburger a destra (niente più #right-buttons) */
body.staff-side #header-constrain #right-menu {
  order: 3;
  flex: 0 0 auto;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 52px !important;
  min-width: 52px !important;
  height: auto !important;
  min-height: 56px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 0 0.35rem !important;
  padding: 0 !important;
  z-index: 920;
}

@media screen and (min-width: 761px) {
  body.staff-side #header-constrain #right-menu {
    display: none !important;
  }
}

body.staff-side #header-constrain #right-menu .c-hamburger {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  border-radius: clamp(5px, 0.5vw, 7px) !important;
  border: 1px solid var(--portal-chrome-header-control-border) !important;
  background: var(--portal-chrome-header-control) !important;
  box-sizing: border-box !important;
}

body.staff-side #header-constrain #right-menu .c-hamburger span {
  top: 50% !important;
  margin-top: -2px;
  left: 12px !important;
  right: 12px !important;
}

body.staff-side .c-hamburger span,
body.staff-side .c-hamburger span::before,
body.staff-side .c-hamburger span::after {
  background: rgba(248, 250, 252, 0.92) !important;
  background-color: rgba(248, 250, 252, 0.92) !important;
}

/* Pill “control” header (#nav.pull-right.pjax): liquid glass + tipografia */
body.staff-side #header #nav > a,
body.staff-side #header #nav > span > a {
  position: relative !important;
  top: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 0 0.35rem !important;
  padding: clamp(0.28rem, 0.4vw + 0.14rem, 0.42rem) clamp(0.5rem, 1vw + 0.25rem, 0.75rem) !important;
  border-radius: clamp(8px, 0.55vw, 11px) !important;
  min-height: clamp(32px, 2.8vw + 22px, 38px) !important;
  min-width: clamp(32px, 2.8vw + 22px, 38px) !important;
  box-sizing: border-box !important;
  border: 1px solid var(--mp-staff-header-nav-pill-border) !important;
  background: var(--mp-staff-header-nav-pill-bg), var(--mp-staff-header-nav-pill-bg-solid) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--mp-staff-header-nav-pill-shadow) !important;
  color: var(--portal-chrome-text) !important;
  font-weight: 600 !important;
  line-height: var(--mp-staff-pill-nav-line-height) !important;
  font-size: var(--mp-staff-pill-nav-font-size) !important;
  text-decoration: none !important;
  letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

body.staff-side #header #nav > a:first-child {
  margin-left: 0 !important;
}

body.staff-side #header #nav > a:hover,
body.staff-side #header #nav > a:focus-visible,
body.staff-side #header #nav > span > a:hover,
body.staff-side #header #nav > span > a:focus-visible {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 45%,
      rgba(30, 55, 92, 0.55) 100%
    ),
    rgba(32, 52, 82, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.45) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 26px rgba(0, 24, 60, 0.42);
  text-decoration: none !important;
  outline: none !important;
}

body.staff-side #header #nav > a svg,
body.staff-side #header #nav > span > a svg {
  flex-shrink: 0;
  /* staff-desktop `#nav.pull-right svg` usa position+top: rompe il centro nella pill inline-flex */
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  box-sizing: content-box;
}

body.staff-side #header #nav > span.mp-staff-user-menu {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  position: relative;
}

body.staff-side #header #nav > span.mp-staff-user-menu.inactive:hover > a#profile-link,
body.staff-side #header #nav > span.mp-staff-user-menu.inactive:focus-within > a#profile-link {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 45%,
      rgba(30, 55, 92, 0.55) 100%
    ),
    rgba(32, 52, 82, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.45) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 26px rgba(0, 24, 60, 0.42);
  outline: none !important;
}

body.staff-side #header #nav > a svg path,
body.staff-side #header #nav > span > a svg path {
  fill: currentColor !important;
}

/* -------------------------------------------------------------------------- */
/* Corpo (#content): cluster .pull-right.flush-right — pill vetro come client   */
/* -------------------------------------------------------------------------- */
body.staff-side #pjax-container #content .pull-right.flush-right {
  position: relative;
  z-index: 4;
  text-align: right;
  color: var(--portal-chrome-text) !important;
  /* Sostituisce il float legacy: fascio azioni compatto, wrappa senza sovrapposizioni */
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem 0.45rem !important;
  float: none !important;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: middle;
}

/* Esempio categories: .pull-right annidato dentro .pull-right */
body.staff-side #pjax-container #content .pull-right.flush-right .pull-right.flush-right {
  margin-left: 0 !important;
  width: 100%;
  justify-content: flex-end !important;
}

/* Footer modali / form: stesso modello flex (no float) */
body.staff-side #pjax-container #content span.buttons.pull-right {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem 0.45rem !important;
  float: none !important;
  max-width: 100%;
  box-sizing: border-box;
  vertical-align: middle;
}

body.staff-side #pjax-container #content .pull-right.flush-right a.green.button,
body.staff-side #pjax-container #content .pull-right.flush-right a.button:not(.attached),
body.staff-side #pjax-container #content .pull-right.flush-right button.button:not(.attached),
body.staff-side #pjax-container #content .pull-right.flush-right input[type="submit"] {
  position: relative !important;
  top: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
 
  padding: clamp(0.22rem, 0.35vw + 0.12rem, 0.38rem) clamp(0.42rem, 0.9vw + 0.2rem, 0.65rem) !important;
  border-radius: clamp(6px, 0.5vw, 10px) !important;
  min-height: clamp(32px, 3vw + 20px, 40px) !important;
  box-sizing: border-box !important;
  border: 1px solid var(--portal-chrome-header-control-border) !important;
  background: var(--portal-chrome-header-control) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 8px 22px rgba(0, 8, 22, 0.22) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: inherit !important;
  text-decoration: none !important;
  letter-spacing: 0.01em !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.staff-side #pjax-container #content .pull-right.flush-right a.green.button:first-child,
body.staff-side #pjax-container #content .pull-right.flush-right a.button:not(.attached):first-child,
body.staff-side #pjax-container #content .pull-right.flush-right .action-button:first-child {
  margin-left: 0 !important;
}

body.staff-side #pjax-container #content .pull-right.flush-right a.green.button:hover,
body.staff-side #pjax-container #content .pull-right.flush-right a.green.button:focus-visible,
body.staff-side #pjax-container #content .pull-right.flush-right a.button:not(.attached):hover,
body.staff-side #pjax-container #content .pull-right.flush-right a.button:not(.attached):focus-visible,
body.staff-side #pjax-container #content .pull-right.flush-right button.button:hover,
body.staff-side #pjax-container #content .pull-right.flush-right button.button:focus-visible,
body.staff-side #pjax-container #content .pull-right.flush-right input[type="submit"]:hover,
body.staff-side #pjax-container #content .pull-right.flush-right input[type="submit"]:focus-visible {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(180, 220, 255, 0.55) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 6px 20px rgba(0, 30, 70, 0.35) !important;
  text-decoration: none !important;
}

/* Action dropdown / assign: niente float sui figli (compatibile con pill inline-flex) */
body.staff-side #pjax-container #content .pull-right.flush-right .action-button,
body.staff-side #pjax-container #content .pull-right.flush-right .action-button > span,
body.staff-side #pjax-container #content .pull-right.flush-right .action-button > a {
  float: none !important;
}

body.staff-side #pjax-container #content .pull-right.flush-right .action-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
  vertical-align: middle;
}

body.staff-side #pjax-container #content .pull-right.flush-right .action-button i.icon-caret-down.pull-right {
  float: none !important;
  margin-left: 0.15rem !important;
  margin-right: 0 !important;
}

body.staff-side #header #nav ul.mp-staff-nav-primary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.35rem 0.45rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Tab principali header (Ticket, Utenti…) + dropdown */
body.staff-side #header #nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

body.staff-side #header #nav li > a {
  position: relative;
  isolation: isolate;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(6px, 0.45vw + 3px, 9px) clamp(11px, 0.75vw + 6px, 14px) !important;
  min-height: clamp(32px, 2vw + 20px, 38px) !important;
  box-sizing: border-box !important;
  border-radius: clamp(8px, 0.5vw, 11px) !important;
  border: 1px solid var(--mp-staff-header-nav-pill-border) !important;
  background: var(--mp-staff-header-nav-pill-bg), var(--mp-staff-header-nav-pill-bg-solid) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--mp-staff-header-nav-pill-shadow) !important;
  color: var(--portal-chrome-muted) !important;
  font-family: var(--glass-font-sans) !important;
  font-weight: 600 !important;
  line-height: var(--mp-staff-pill-nav-line-height) !important;
  font-size: var(--mp-staff-pill-nav-font-size) !important;
  letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  margin: 0 0 0 0.35rem !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease !important;
}

body.staff-side #header #nav li:first-child > a {
  margin-left: 0 !important;
}

/* Solo voce attiva: chip liquid glass (parità concettuale con client #nav li a.active) */
body.staff-side #header #nav li.active > a,
body.staff-side #header #nav li > a.active {
  position: relative !important;
  overflow: hidden !important;
  border-radius: clamp(10px, 0.55vw + 6px, 14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  background: linear-gradient(
      168deg,
      rgba(120, 200, 255, 0.4) 0%,
      rgba(55, 130, 240, 0.34) 42%,
      rgba(28, 72, 200, 0.55) 100%
    ) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 0 0 1px rgba(56, 145, 255, 0.22) inset,
    0 6px 22px rgba(8, 44, 120, 0.42),
    0 2px 10px rgba(0, 20, 80, 0.2) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 8, 28, 0.35);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.18s ease !important;
}

body.staff-side #header #nav li.active > a::before,
body.staff-side #header #nav li > a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.06) 40%,
    transparent 58%
  );
  opacity: 0.88;
  mix-blend-mode: soft-light;
}

body.staff-side #header #nav li.active > a:hover,
body.staff-side #header #nav li.active > a:focus-visible,
body.staff-side #header #nav li > a.active:hover,
body.staff-side #header #nav li > a.active:focus-visible {
  background: linear-gradient(
      168deg,
      rgba(140, 215, 255, 0.48) 0%,
      rgba(70, 150, 255, 0.4) 40%,
      rgba(36, 92, 220, 0.62) 100%
    ) !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  color: #ffffff !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34) inset,
    0 0 0 1px rgba(120, 190, 255, 0.28) inset,
    0 10px 28px rgba(12, 56, 150, 0.5),
    0 0 22px rgba(56, 145, 255, 0.18) !important;
  outline: none !important;
  transform: translateY(-1px);
}

body.staff-side #header #nav li.active > a:focus-visible,
body.staff-side #header #nav li > a.active:focus-visible {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34) inset,
    0 0 0 1px rgba(120, 190, 255, 0.28) inset,
    0 10px 28px rgba(12, 56, 150, 0.5),
    0 0 0 3px rgba(56, 145, 255, 0.35),
    0 0 22px rgba(56, 145, 255, 0.18) !important;
}

body.staff-side #header #nav li:not(.active) > a:hover,
body.staff-side #header #nav li:not(.active) > a:focus-visible {
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 45%,
      rgba(24, 42, 68, 0.72) 100%
    ),
    var(--mp-staff-header-nav-pill-bg-solid) !important;
  border-color: rgba(168, 220, 255, 0.38) !important;
  color: var(--portal-chrome-text) !important;
  outline: none !important;
}

/*
 * Dropdown voci header (Ticket → Apri, …): vetro come .customQ-dropdown — blur sul ::before,
 * box trasparente + isolation (niente “doppio blur” sul contenuto).
 */
body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul {
  width: min(300px, 94vw) !important;
  min-width: 13.5rem !important;
  margin: 0.28rem 0 0 !important;
  padding: 0.42rem 0.35rem 0.45rem !important;
  position: absolute !important;
  left: 0 !important;
  top: 100% !important;
  z-index: 950 !important;
  list-style: none !important;
  box-sizing: border-box !important;
  border-radius: var(--glass-radius-sm, 14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: linear-gradient(
    165deg,
    rgba(20, 34, 56, 0.97) 0%,
    rgba(10, 20, 38, 0.98) 52%,
    rgba(6, 14, 28, 0.99) 100%
  ) !important;
  max-height: none !important;
  height: auto !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 52px rgba(0, 4, 22, 0.55),
    0 8px 24px rgba(0, 8, 30, 0.35) !important;
  overflow: visible !important;
  isolation: isolate !important;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    visibility 0s linear 0.14s,
    opacity 0.16s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    155deg,
    rgba(32, 52, 82, 0.38) 0%,
    rgba(14, 28, 50, 0.78) 45%,
    rgba(6, 14, 30, 0.92) 100%
  );
  -webkit-backdrop-filter: blur(var(--glass-blur, 12px)) saturate(168%);
  backdrop-filter: blur(var(--glass-blur, 12px)) saturate(168%);
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::-webkit-scrollbar {
  width: 8px;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(165, 200, 240, 0.45) 0%,
    rgba(90, 130, 190, 0.4) 100%
  );
  border: 2px solid transparent;
  background-clip: padding-box;
}

body.rtl.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul {
  left: auto !important;
  right: 0 !important;
}

/* Menu utente (#nav.pull-right): pannello allineato a destra del trigger */
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul {
  left: auto !important;
  right: 0 !important;
}

body.rtl.staff-side #header #nav span.mp-staff-user-menu.inactive > ul {
  left: 0 !important;
  right: auto !important;
}

/* Hover + focus-within: submenu usabile anche da tastiera (WCAG) */
body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive):hover > ul,
body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive):focus-within > ul {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition-delay: 0s;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  /* Compatta come riga pill sub-nav (evita altezze 44px+ rispetto alle tab) */
  padding: 0.12rem 0.4rem !important;
  border: none !important;
  border-radius: clamp(8px, 0.5vw, 11px) !important;
  list-style: none !important;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li:hover,
body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li:focus-within {
  background: linear-gradient(
    95deg,
    rgba(56, 130, 246, 0.22) 0%,
    rgba(255, 255, 255, 0.07) 52%,
    rgba(255, 255, 255, 0.03) 100%
  ) !important;
  box-shadow:
    inset 3px 0 0 0 rgba(147, 197, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li:has(> a.mp-staff-user-menu__logout):hover,
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li:has(> a.mp-staff-user-menu__logout):focus-within {
  background: linear-gradient(
    95deg,
    rgba(239, 68, 68, 0.24) 0%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0.02) 100%
  ) !important;
  box-shadow:
    inset 3px 0 0 0 rgba(252, 165, 165, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li:has(> a.mp-staff-user-menu__logout) > a i {
  color: rgba(254, 202, 202, 0.95) !important;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li a {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  min-height: clamp(34px, 2.4vw + 22px, 38px) !important;
  box-sizing: border-box !important;
  padding: clamp(0.26rem, 0.38vw + 0.12rem, 0.38rem) clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  margin: 0 !important;
  border-radius: clamp(8px, 0.5vw, 11px) !important;
  color: var(--portal-chrome-text) !important;
  background-color: transparent !important;
  border: none !important;
  font-family: var(--glass-font-sans) !important;
  font-weight: 600 !important;
  font-size: var(--mp-staff-pill-nav-font-size) !important;
  letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
  line-height: var(--mp-staff-pill-nav-line-height) !important;
  text-decoration: none !important;
  text-align: start !important;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease !important;
}

/* Sprite legacy su tab nav (Utenti, …) — non sul menu utente con <i> inline */
body.staff-side #header #nav li.inactive li a {
  padding-inline-start: 2.2rem !important;
  background-repeat: no-repeat !important;
  background-position: left 0.62rem center !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a {
  padding-inline-start: clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  background-image: none !important;
  background-position: initial !important;
}

body.rtl.staff-side #header #nav li.inactive li a {
  padding-inline-start: 0.65rem !important;
  padding-inline-end: 2.35rem !important;
  background-position: right 0.62rem center !important;
}

body.rtl.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a {
  padding-inline-start: clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  padding-inline-end: clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  background-position: initial !important;
}

/* Menu utente: icone inline flex — no float #nav.pull-right, no SVG/svg.css 20px */
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i[class^="icon-"],
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i[class*=" icon-"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: static !important;
  top: auto !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  background-image: none !important;
  color: rgba(212, 238, 255, 0.92) !important;
  font-size: 14px !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i[class^="icon-"]:before,
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i[class*=" icon-"]:before {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 14px !important;
  position: static !important;
  top: auto !important;
  margin: 0 !important;
  background: none !important;
  background-size: 0 !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i.icon-user:before {
  content: "\f007" !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a > i.icon-off:before {
  content: "\f011" !important;
}

body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a:hover > i[class^="icon-"],
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a:focus-visible > i[class^="icon-"],
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a:hover > i[class*=" icon-"],
body.staff-side #header #nav span.mp-staff-user-menu.inactive > ul li > a:focus-visible > i[class*=" icon-"] {
  color: #ffffff !important;
}

body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li a:hover,
body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) li a:focus-visible {
  background-color: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Riga "primary-only" (es. Interventi) — uniforma colori interni al look queue */
body.staff-side #header #nav li.inactive li.primary-only,
body.staff-side #header #nav li.inactive li.primary-only:hover,
body.staff-side #header #nav li.inactive li.primary-only:focus-within {
  color: var(--portal-chrome-text, #f1f5f9) !important;
}

body.staff-side #header #nav li.inactive li.primary-only > a,
body.staff-side #header #nav li.inactive li.primary-only > a.truncate,
body.staff-side #header #nav li.inactive li.primary-only > span,
body.staff-side #header #nav li.inactive li.primary-only > span.newItemQ,
body.staff-side #header #nav li.inactive li.primary-only > span.queue-count {
  color: var(--portal-chrome-text, #f1f5f9) !important;
  text-shadow: none !important;
  font-variant-numeric: tabular-nums !important;
}

/* Desktop header dropdown: normalizza TUTTE le voci (classi legacy a.Ticket/a.staff/…) = tipografia pill coda / tab */
@media screen and (min-width: 1025px) {
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul > li > a,
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul > li > a[class] {
    display: flex !important;
    align-items: center !important;
    min-height: clamp(34px, 2.4vw + 22px, 38px) !important;
    padding: clamp(0.26rem, 0.38vw + 0.12rem, 0.38rem) clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
    padding-inline-start: 0.78rem !important;
    border-radius: clamp(8px, 0.5vw, 11px) !important;
    background-image: none !important;
    background-position: initial !important;
    color: var(--portal-chrome-text, #f1f5f9) !important;
    font-size: var(--mp-staff-pill-nav-font-size) !important;
    font-weight: 600 !important;
    letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
    line-height: var(--mp-staff-pill-nav-line-height) !important;
    text-shadow: none !important;
  }
}

body.staff-side #header #nav li.inactive li.primary-only:hover > a,
body.staff-side #header #nav li.inactive li.primary-only:hover > a.truncate,
body.staff-side #header #nav li.inactive li.primary-only:hover > span,
body.staff-side #header #nav li.inactive li.primary-only:focus-within > a,
body.staff-side #header #nav li.inactive li.primary-only:focus-within > a.truncate,
body.staff-side #header #nav li.inactive li.primary-only:focus-within > span {
  color: #ffffff !important;
}

body.staff-side #header #nav li.inactive li.primary-only > a i,
body.staff-side #header #nav li.inactive li.primary-only > span i {
  color: rgba(212, 238, 255, 0.9) !important;
  opacity: 0.9 !important;
}

body.staff-side #header #nav li.inactive li.primary-only:hover > a,
body.staff-side #header #nav li.inactive li.primary-only:focus-within > a {
  color: #ffffff !important;
}

@media (prefers-reduced-motion: reduce) {
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul {
    transform: none !important;
    transition: visibility 0s linear 0.14s, opacity 0.12s ease !important;
  }

  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive):hover > ul,
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive):focus-within > ul {
    transform: none !important;
  }
}

body.staff-side #header-title {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: clamp(11px, 0.38rem + 0.95vw, 15px) !important;
  line-height: 1.2 !important;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

body.staff-side #header-subtitle {
  color: var(--portal-chrome-muted) !important;
  font-size: clamp(9.5px, 0.32rem + 0.65vw, 12.5px) !important;
  font-weight: 500 !important;
  line-height: 1.32 !important;
  letter-spacing: 0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.staff-side #header #header-text {
  display: none !important;
}

body.staff-side #header a#header-logo:hover {
  color: var(--portal-chrome-accent-strong) !important;
}

/* dark-mode.css impone top:4px su #nav.pull-right — disallinea il flex header */
body.staff-side.dark-mode #header-constrain #nav.pull-right,
body.staff-side.dark-mode #header-constrain #nav,
body.staff-side.dark-mode #header-constrain #nav.pull-right.pjax {
  top: 0 !important;
}

body.staff-side #header #left-logo {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 0.35rem 0.5rem !important;
  /* staff-desktop: margin 12px / height fissi — disallinea il blocco rispetto a #nav in flex */
  margin: 0 0.65rem 0 0 !important;
  width: auto !important;
  max-width: min(100vw, 320px) !important;
  height: auto !important;
  min-height: 0 !important;
  float: none !important;
  min-width: 0;
}

body.staff-side #header #header-image {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  flex-shrink: 0;
}

body.staff-side #header #header-image img,
body.staff-side #header #header-logo img {
  display: block !important;
  max-height: clamp(24px, 1.2vw + 18px, 32px) !important;
  width: auto !important;
  object-fit: contain !important;
  vertical-align: middle;
}

/* -------------------------------------------------------------------------- */
/* Sub-nav — liquid glass (allineata alle pill header #nav.pull-right)         */
/* -------------------------------------------------------------------------- */
/* staff-mobile (≤900px) aggiunge margin-left alle voci — pill già distanziate con gap */
@media screen and (max-width: 900px) {
  body.staff-side #sub_nav-wrap #sub_nav li > a {
    margin-left: 0 !important;
  }
}

body.staff-side #pjax-container #sub_nav-wrap,
body.staff-side #sub_nav-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: var(--mp-staff-subnav-h);
  /* Fascia vetro: centra verticalmente il nav / ul rispetto all’altezza fascia (prima padding sul nav spingeva le pill verso il basso). */
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  align-content: center !important;
  position: relative;
  isolation: isolate;
  overflow: visible !important;
  height: auto !important;
  z-index: 835;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.07) 0%,
      rgba(255, 255, 255, 0.02) 48%,
      rgba(4, 12, 28, 0.45) 100%
    ),
    rgba(10, 22, 38, 0.55) !important;
  /* FIX C: layer GPU senza will-change (evita doppio pass compositor con hover chrome). */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 10px 36px rgba(0, 4, 22, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.staff-side #sub_nav-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='sn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23sn)' opacity='0.1'/%3E%3C/svg%3E");
  opacity: 0.35;
  /* mix-blend-mode: overlay rimosso: su Edge/Mac M1 causava artefatti compositing
   * quando il parent ha backdrop-filter + will-change:transform (doppio compositor pass) */
}

/* Nessuna voce sub-nav: fascia minima senza blur pesante */
body.staff-side #sub_nav-wrap.sub_nav-wrap--minimal {
  min-height: 6px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(10, 22, 38, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.staff-side #sub_nav-wrap.sub_nav-wrap--minimal::before {
  opacity: 0.25;
}

body.staff-side:has(#sub_nav-wrap.sub_nav-wrap--minimal) {
  --mp-staff-subnav-h: 8px;
}

/* jb-overflowmenu: scp.css forza 35×960px — qui layout fluido come header */
body.staff-side #sub_nav-wrap nav.jb-overflowmenu,
body.staff-side #sub_nav-wrap #customQ_nav.jb-overflowmenu {
  position: relative !important;
  width: 100% !important;
  max-width: 1264px !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: center !important;
  gap: 0.35rem 0.5rem !important;
  /* Solo orizzontale: il padding verticale rompeva il centro visivo rispetto a #sub_nav-wrap */
  padding: 0 var(--mp-staff-column-inset-right) 0 var(--mp-staff-column-inset-left) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  z-index: 1;
}

body.staff-side #sub_nav-wrap nav:not(.jb-overflowmenu) {
  width: 100%;
  max-width: 1264px;
  margin: 0 auto;
  padding: 0 var(--mp-staff-column-inset-right) 0 var(--mp-staff-column-inset-left) !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  overflow: visible !important;
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
}

/* Solo la lista primaria occupa lo spazio; il container overflow resta compatto */
body.staff-side #sub_nav-wrap .jb-overflowmenu ul.jb-overflowmenu-menu-primary {
  position: static !important;
  inset: auto !important;
  overflow: visible !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  /* jb.overflow.menu imposta height/right inline — qui serve flex + wrap */
  height: auto !important;
  right: auto !important;
}

body.staff-side #sub_nav-wrap nav ul#sub_nav {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.35rem 0.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  height: auto !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  line-height: normal !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  clear: none !important;
  white-space: normal !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

@media screen and (min-width: 761px) {
  body.staff-side #sub_nav-wrap nav.jb-overflowmenu,
  body.staff-side #sub_nav-wrap #customQ_nav.jb-overflowmenu,
  body.staff-side #sub_nav-wrap nav ul#sub_nav {
    flex-wrap: nowrap !important;
  }

  /*
   * overflow-x sul nav tagliava i .customQ-dropdown (overflow-y:visible diventa auto se l’altro asse non è visible).
   * Resta overflow: visible sul nav; eventuale striscia lunga va a capo o scrolla la pagina, non il menu code.
   */
  body.staff-side #sub_nav-wrap nav.jb-overflowmenu,
  body.staff-side #sub_nav-wrap #customQ_nav.jb-overflowmenu {
    overflow: visible !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Dropdown code ticket (.customQ-dropdown) — sopra #content, liquid glass      */
/* -------------------------------------------------------------------------- */
body.staff-side #sub_nav-wrap #sub_nav li:has(> .customQ-dropdown),
body.staff-side #sub_nav-wrap ul#sub_nav li.top-queue,
body.staff-side #sub_nav-wrap ul#sub_nav li.primary-only.item {
  position: relative !important;
  z-index: 0;
}

body.staff-side #sub_nav-wrap #sub_nav li:has(> .customQ-dropdown):hover,
body.staff-side #sub_nav-wrap #sub_nav li:has(> .customQ-dropdown):focus-within,
body.staff-side #sub_nav-wrap ul#sub_nav li.top-queue:hover,
body.staff-side #sub_nav-wrap ul#sub_nav li.top-queue:focus-within,
body.staff-side #sub_nav-wrap ul#sub_nav li.primary-only.item:hover,
body.staff-side #sub_nav-wrap ul#sub_nav li.primary-only.item:focus-within {
  z-index: 892 !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  top: 100% !important;
  /* margin-top creava un vuoto tra pill e pannello: il mouse usciva dal li → submenu chiuso. Lo spazio è padding interno (area hover continua). */
  margin-top: 0 !important;
  z-index: 893 !important;
  min-width: min(260px, calc(100vw - 2rem)) !important;
  max-width: min(340px, 94vw) !important;
  max-height: min(72vh, 440px) !important;
  /* Nascosto a riposo: display:flex qui vinceva su scp.css e lasciava i pannelli sempre aperti */
  display: none !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  padding: 0.42rem 0 0 !important;
  border-radius: var(--glass-radius-sm, 14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: linear-gradient(
    165deg,
    rgba(20, 34, 56, 0.97) 0%,
    rgba(10, 20, 38, 0.98) 52%,
    rgba(6, 14, 28, 0.99) 100%
  ) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur, 12px)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur, 12px)) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 20px 52px rgba(0, 4, 22, 0.55),
    0 8px 24px rgba(0, 8, 30, 0.35) !important;
  /* visible: sottomenu annidati (.subMenuQ) fuori dal box; lo scroll resta su ul.scroll-height */
  overflow: visible !important;
}

body.rtl.staff-side #sub_nav-wrap .customQ-dropdown {
  left: auto !important;
  right: 0 !important;
}

/* Code ticket: dropdown su hover o focus tastiera sul tab trigger */
body.staff-side #sub_nav-wrap ul#sub_nav > li:hover > .customQ-dropdown,
body.staff-side #sub_nav-wrap ul#sub_nav > li:focus-within > .customQ-dropdown,
body.staff-side #sub_nav-wrap #customQ_nav ul#sub_nav > li:hover > .customQ-dropdown,
body.staff-side #sub_nav-wrap #customQ_nav ul#sub_nav > li:focus-within > .customQ-dropdown,
body.staff-side #sub_nav-wrap ul.jb-overflowmenu-menu-primary > li.item:hover > .customQ-dropdown,
body.staff-side #sub_nav-wrap ul.jb-overflowmenu-menu-primary > li.item:focus-within > .customQ-dropdown,
body.staff-side #sub_nav-wrap ul.jb-overflowmenu-menu-secondary > li.item:hover > .customQ-dropdown,
body.staff-side #sub_nav-wrap ul.jb-overflowmenu-menu-secondary > li.item:focus-within > .customQ-dropdown {
  display: flex !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: min(58vh, 360px) !important;
  margin: 0 !important;
  padding: 0.28rem 0.35rem 0.45rem !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  list-style: none !important;
  background: rgba(0, 4, 14, 0.22) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  border-radius: 0 0 10px 10px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) rgba(255, 255, 255, 0.05);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height::-webkit-scrollbar {
  width: 8px;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height::-webkit-scrollbar-track {
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(165, 200, 240, 0.45) 0%,
    rgba(90, 130, 190, 0.4) 100%
  );
  border: 2px solid transparent;
  background-clip: padding-box;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li {
  margin: 0 !important;
  padding: 0.28rem 0.5rem !important;
  border: none !important;
}

/*
 * Contatore (span.queue-count) + titolo (a.truncate): scp usa float sullo span → disallineo verticale.
 * Flex + order: titolo a sinistra, numero a destra, stessa baseline/altezza riga.
 */
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)),
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) {
  display: flex !important;
  align-items: center !important;
  gap: 0 0.45rem;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)):not(.subQ),
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ):not(.subQ) {
  flex-wrap: nowrap !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li.subQ,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li.subQ {
  flex-wrap: wrap !important;
  align-content: flex-start;
}

/* DOM: span poi <a> — order per ordine visivo coerente con margin-left:auto sul contatore */
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > a.truncate,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > a:first-of-type,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) > a.truncate,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) > a:first-of-type {
  order: 1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-right: 0 !important; /* scp: margin-right:60px sul link */
  align-self: center !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > span.pull-right,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > span.queue-count,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > span.newItemQ,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) > span.pull-right,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) > span.queue-count,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ > li:not(.personalQ) > span.newItemQ {
  order: 2 !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  align-self: center !important;
  line-height: 1.25 !important;
  padding: 0 !important;
}

/* Righe elenco: hover vetro + bordo sinistro; no “blocco” piatto su titoli sezione */
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) {
  margin-inline: 0.2rem !important;
  border-radius: 10px !important;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)):hover,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)):focus-within {
  background: linear-gradient(
    95deg,
    rgba(56, 130, 246, 0.22) 0%,
    rgba(255, 255, 255, 0.07) 52%,
    rgba(255, 255, 255, 0.03) 100%
  ) !important;
  box-shadow:
    inset 3px 0 0 0 rgba(147, 197, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* Un solo strato hover: la riga (li) porta il vetro; evita patch blu duplicata da staff-global su <a> */
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > a:hover,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height > li:not(.personalQ):not(:has(> h4)) > a:focus-visible {
  background: transparent !important;
}

/*
 * Sottomenu annidate: niente flyout assoluto a destra (verrebbe tagliato da overflow-y su .scroll-height).
 * Espansione in flusso sotto la riga: il mouse resta dentro li.subQ → hover stabile.
 */
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ {
  position: relative !important;
  align-items: stretch !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ:before,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ:after {
  display: none !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ > ul.subMenuQ {
  order: 3 !important;
  flex: 0 0 100% !important;
  align-self: stretch !important;
  display: none !important;
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin: 0.18rem 0 0.2rem 0 !important;
  padding: 0.3rem 0.4rem 0.35rem !important;
  list-style: none !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  border-inline-start: 3px solid rgba(125, 185, 255, 0.45) !important;
  background: rgba(0, 8, 22, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ.mp-subq-hover > ul.subMenuQ,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ:hover > ul.subMenuQ,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ:focus-within > ul.subMenuQ {
  display: block !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ li {
  margin: 0.05rem 0 !important;
  padding: 0.2rem 0.35rem !important;
  border-radius: 8px !important;
  transition: background 0.14s ease;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ li:hover,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height ul.subMenuQ li:focus-within {
  background: rgba(255, 255, 255, 0.09) !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ) > span.newItemQ,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height .queue-count {
  color: var(--portal-chrome-accent-strong, #d4eeff) !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  font-variant-numeric: tabular-nums !important;
  text-shadow: none !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ) > a.truncate,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ) > a {
  color: var(--portal-chrome-text, #f1f5f9) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-shadow: none !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ):hover > a,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ):hover > a.truncate,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li:not(.personalQ):focus-within > a {
  color: #ffffff !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ.mp-subq-hover > a i.icon-caret-down,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ:hover > a i.icon-caret-down,
body.staff-side #sub_nav-wrap .customQ-dropdown ul.scroll-height li.subQ:focus-within > a i.icon-caret-down {
  color: rgba(255, 255, 255, 0.85) !important;
  opacity: 1 !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown li.personalQ {
  border-bottom-color: rgba(255, 255, 255, 0.14) !important;
  background: transparent !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown li h4,
body.staff-side #sub_nav-wrap .customQ-dropdown li.top-level {
  color: var(--portal-chrome-muted, #cbd5e1) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  margin: 0.5rem 0.65rem 0.25rem !important;
  font-family: var(--glass-font-sans, "Montserrat", system-ui, sans-serif) !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown .add-queue {
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: rgba(0, 8, 22, 0.35) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown .add-queue a.full-width {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 0.45rem 0.75rem !important;
  color: var(--portal-chrome-accent-strong, #d4eeff) !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  text-decoration: none !important;
  transition: background 0.12s ease, color 0.12s ease;
}

body.staff-side #sub_nav-wrap .customQ-dropdown .add-queue a.full-width:hover,
body.staff-side #sub_nav-wrap .customQ-dropdown .add-queue a.full-width:focus-visible {
  background: rgba(56, 130, 246, 0.25) !important;
  color: #ffffff !important;
  outline: none !important;
}

body.staff-side #sub_nav-wrap .customQ-dropdown .add-queue a span {
  color: inherit !important;
  opacity: 1 !important;
}

body.staff-side #sub_nav-wrap nav ul#sub_nav > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  display: flex !important;
  align-items: center !important;
}

/* Pill sub-nav = stessa scala tipo delle pill header (mp-staff-pill-nav-*) */
body.staff-side #sub_nav-wrap nav ul#sub_nav > li > a {
  position: relative !important;
  isolation: isolate;
  top: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(0.26rem, 0.38vw + 0.12rem, 0.38rem) clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  min-height: clamp(34px, 2.4vw + 22px, 38px) !important;
  box-sizing: border-box !important;
  border-radius: clamp(8px, 0.55vw, 11px) !important;
  border: 1px solid var(--mp-staff-header-nav-pill-border) !important;
  background: var(--mp-staff-header-nav-pill-bg), var(--mp-staff-header-nav-pill-bg-solid) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--mp-staff-header-nav-pill-shadow) !important;
  line-height: var(--mp-staff-pill-nav-line-height) !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
  color: var(--portal-chrome-text) !important;
  font-weight: 600 !important;
  font-size: var(--mp-staff-pill-nav-font-size) !important;
  letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 !important;
  text-decoration: none !important;
  background-image: none !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

body.staff-side #sub_nav-wrap nav ul#sub_nav > li > a:hover,
body.staff-side #sub_nav-wrap nav ul#sub_nav > li > a:focus-visible {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 45%,
      rgba(30, 55, 92, 0.55) 100%
    ),
    rgba(32, 52, 82, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.45) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 26px rgba(0, 24, 60, 0.42) !important;
  outline: none !important;
}

body.staff-side #sub_nav-wrap nav ul#sub_nav > li > a.active,
body.staff-side #sub_nav-wrap nav ul#sub_nav a.active {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(120, 190, 255, 0.35) 48%,
      rgba(26, 111, 212, 0.92) 100%
    ),
    rgba(22, 90, 180, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.55) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 22px rgba(26, 111, 212, 0.45) !important;
}

/* Code ticket (jb-overflowmenu): pill identiche; item senza padding legacy scp */
body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.35rem 0.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
}

body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item:hover {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item > a {
  position: relative;
  isolation: isolate;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  padding: clamp(0.26rem, 0.38vw + 0.12rem, 0.38rem) clamp(0.48rem, 0.85vw + 0.22rem, 0.68rem) !important;
  min-height: clamp(34px, 2.4vw + 22px, 38px) !important;
  border-radius: clamp(8px, 0.55vw, 11px) !important;
  border: 1px solid var(--mp-staff-header-nav-pill-border) !important;
  background: var(--mp-staff-header-nav-pill-bg), var(--mp-staff-header-nav-pill-bg-solid) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--mp-staff-header-nav-pill-shadow) !important;
  color: var(--portal-chrome-text) !important;
  font-weight: 600 !important;
  line-height: var(--mp-staff-pill-nav-line-height) !important;
  font-size: var(--mp-staff-pill-nav-font-size) !important;
  letter-spacing: var(--mp-staff-pill-nav-letter-spacing) !important;
  text-decoration: none !important;
  margin: 0 !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
}

body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item > a:hover,
body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item > a:focus-visible,
body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item:hover > a {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 45%,
      rgba(30, 55, 92, 0.55) 100%
    ),
    rgba(32, 52, 82, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.45) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 26px rgba(0, 24, 60, 0.42) !important;
}

body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item > a.active {
  color: #ffffff !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(120, 190, 255, 0.35) 48%,
      rgba(26, 111, 212, 0.92) 100%
    ),
    rgba(22, 90, 180, 0.88) !important;
  border-color: rgba(168, 220, 255, 0.55) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 22px rgba(26, 111, 212, 0.45) !important;
}

/* Contenitore “altre code” + handle — vetro, niente grigio legacy */
body.staff-side #sub_nav-wrap .jb-overflowmenu-container {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: stretch !important;
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
}

body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: clamp(34px, 2.4vw + 22px, 40px) !important;
  min-height: clamp(34px, 2.4vw + 22px, 38px) !important;
  padding: 0 0.35rem !important;
  box-sizing: border-box !important;
  border-radius: clamp(8px, 0.55vw, 11px) !important;
  border: 1px solid var(--mp-staff-header-nav-pill-border) !important;
  background: var(--mp-staff-header-nav-pill-bg), var(--mp-staff-header-nav-pill-bg-solid) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--mp-staff-header-nav-pill-shadow) !important;
  color: var(--portal-chrome-muted) !important;
  line-height: 1 !important;
}

body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle:hover,
body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle:focus-visible {
  color: #ffffff !important;
  border-color: rgba(168, 220, 255, 0.45) !important;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 45%,
      rgba(30, 55, 92, 0.55) 100%
    ),
    rgba(32, 52, 82, 0.88) !important;
  outline: none !important;
}

/*
 * jb.overflow.menu + scp.js nascondono il handle quando non ci sono voci in overflow.
 * La regola sopra usa display:inline-flex !important → annullava display:none di jQuery
 * e lasciava un pulsante vuoto cliccabile. Qui si ripristina il comportamento del widget.
 */
body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle[style*="display: none"],
body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle[style*="display:none"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.staff-side #sub_nav-wrap .jb-overflowmenu-menu-secondary {
  z-index: 860 !important;
  background: rgba(12, 22, 40, 0.94) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: var(--glass-radius-sm) !important;
  box-shadow: 0 12px 40px rgba(0, 4, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  padding: 0.35rem 0 !important;
}

body.staff-side #sub_nav-wrap .jb-overflowmenu-menu-secondary li.item > a {
  color: var(--portal-chrome-text) !important;
}

body.staff-side #sub_nav-wrap .jb-overflowmenu-menu-secondary li.item:hover > a {
  color: #ffffff !important;
}

body.staff-side #pjax-container {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--mp-staff-header-offset) + env(safe-area-inset-top, 0px));
  margin-top: 0 !important;
}

body.staff-side #pjax-container #sub_nav-wrap {
  position: sticky;
  top: calc(var(--mp-staff-header-offset) + env(safe-area-inset-top, 0px));
  z-index: 835;
}

/* Area contenuto principale — stessi inset orizzontali della sub-nav */
body.staff-side #pjax-container #content {
  position: relative;
  z-index: 1;
  max-width: 1264px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 1.25rem var(--mp-staff-column-inset-right) 2.5rem var(--mp-staff-column-inset-left) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: 50vh;
}

/* Pannello vetro contenuto (wrapper opzionale) */
body.staff-side .mp-staff-glass-panel {
  position: relative;
  isolation: isolate;
  border-radius: var(--portal-chrome-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 4, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 1.25rem;
  overflow: hidden;
  /* FIX E: contain isola layout/style del pannello dal resto del DOM - riduce invalidazioni. */
  contain: layout style;
  /* FIX G: translate3d forza layer GPU dedicato su overflow:hidden+border-radius su Metal.
   * Il clipping del border-radius avviene DOPO il compositor pass senza questo hint
   * => pixel neri ai bordi. backface-visibility rafforza la promozione layer. */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

body.staff-side .mp-staff-glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    165deg,
    rgba(18, 32, 54, 0.93) 0%,
    rgba(10, 20, 38, 0.96) 55%,
    rgba(8, 16, 32, 0.97) 100%
  );
  /* FIX B: backdrop-filter rimosso da ::before - su Metal/Chromium il pseudo-element
   * non ottiene compositor layer proprio; il blur viene renderizzato sul layer parent.
   * Con border-radius+overflow:hidden sul parent => pixel neri ai bordi arrotondati.
   * Background alzato a 0.93-0.97 alpha per compensare (visivamente identico). */
}

body.staff-side .mp-staff-glass-panel > * {
  position: relative;
  z-index: 1;
}

/* Coda ticket: dropdown azioni non tagliati dal bordo arrotondato del pannello */
body.staff-side .mp-staff-glass-panel--queue {
  overflow: visible !important;
}

body.staff-side .mp-staff-glass-root {
  position: relative;
  z-index: 1;
}

/* Footer crediti legacy nascosto (stesso pattern client secondo #footer) */
body.staff-side #footer.mp-staff-footer-legacy {
  display: none !important;
}

/* Footer contatti — parità client */
body.staff-side #footer-contact.footer-contact-block .footer-contact-shell {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  background: transparent !important;
}

body.staff-side #footer-contact.footer-contact-block {
  position: relative !important;
  z-index: 2 !important;
  isolation: isolate;
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -6px 28px rgba(0, 2, 12, 0.4);
}

body.staff-side #footer-contact.footer-contact-block::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(32, 72, 120, 0.22), transparent 55%),
    linear-gradient(
      180deg,
      var(--portal-chrome-footer-glass-top) 0%,
      var(--portal-chrome-footer-glass-mid) 52%,
      var(--portal-chrome-footer-glass-bottom) 100%
    );
  /* FIX B: backdrop-filter rimosso da #footer-contact::before (stesso motivo pannello).
   * Background gia' 0.92-0.98 alpha: blur non percettibile visivamente. */
}

body.staff-side #footer-contact.footer-contact-block .footer-contact-header {
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative !important;
}

body.staff-side #footer .footer-contact-header-inner,
body.staff-side #footer-contact.footer-contact-block .footer-contact-header-inner {
  position: relative !important;
  z-index: 1 !important;
  padding: 1.35rem var(--mp-staff-column-inset-right) 1.5rem var(--mp-staff-column-inset-left) !important;
  max-width: 1264px;
  margin: 0 auto;
  color: var(--portal-chrome-text) !important;
}

body.staff-side #footer .footer-contact-row,
body.staff-side #footer-contact.footer-contact-block .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 3rem;
}

body.staff-side #footer-contact.footer-contact-block .footer-contact-col {
  flex: 1 1 200px;
  min-width: min(100%, 220px);
  max-width: 360px;
  text-align: center !important;
  font-size: clamp(10px, 0.68rem + 0.16vw, 12px) !important;
  line-height: 1.55 !important;
  color: var(--portal-chrome-text) !important;
}

body.staff-side #footer-contact.footer-contact-block .footer-contact-brand {
  font-family: "Montserrat", "Open Sans", sans-serif !important;
  font-weight: 600 !important;
  color: #fff !important;
}

body.staff-side #footer-contact.footer-contact-block .footer-contact-link {
  color: var(--portal-chrome-accent-strong) !important;
  text-decoration: underline !important;
}

/* -------------------------------------------------------------------------- */
/* Banner cookie / consenso — parità client (client-portal-chrome-glass.css)  */
/* Batte staff-desktop + dark-mode piatto su #complianceouter                */
/* -------------------------------------------------------------------------- */
body.staff-side #complianceouter + #footer-contact.footer-contact-block {
  border-top-color: rgba(120, 190, 255, 0.28) !important;
}

body.staff-side #complianceouter {
  position: relative !important;
  z-index: 2 !important;
  isolation: isolate;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  color: var(--portal-chrome-text) !important;
  border-bottom: 1px solid rgba(140, 200, 255, 0.22) !important;
  box-shadow: 0 2px 16px rgba(0, 6, 22, 0.28) !important;
  padding: 0.65rem 0 !important;
  font-size: 12px !important;
  border-radius: 0 0 var(--portal-chrome-radius) var(--portal-chrome-radius);
}

body.staff-side #complianceouter::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(26, 44, 70, 0.62) 0%,
    rgba(20, 36, 58, 0.75) 100%
  );
  -webkit-backdrop-filter: blur(var(--portal-chrome-blur)) saturate(165%);
  backdrop-filter: blur(var(--portal-chrome-blur)) saturate(165%);
}

body.staff-side #compliance {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 auto !important;
  max-width: min(1264px, 100%) !important;
  width: 100% !important;
  padding: 0 clamp(0.75rem, 2.5vw, 1.35rem) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.65rem 1rem !important;
  overflow: visible !important;
  color: var(--portal-chrome-text) !important;
}

body.staff-side #icon-compliance-outer {
  float: none !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  order: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.staff-side #icon-compliance {
  width: 22px !important;
  height: 22px !important;
  fill: var(--portal-chrome-accent) !important;
  position: static !important;
  top: auto !important;
}

body.staff-side #complaince-message {
  display: block !important;
  flex: 1 1 240px !important;
  max-width: 100% !important;
  margin: 0 !important;
  line-height: 1.45 !important;
  font-size: clamp(11px, 0.95vw, 12px) !important;
  color: var(--portal-chrome-text) !important;
  font-weight: 500 !important;
}

body.staff-side a#complaince-button-link {
  flex: 0 0 auto !important;
  text-decoration: none !important;
  margin-left: auto;
}

body.staff-side #complaince-button {
  float: none !important;
  margin: 0 !important;
  padding: 0.4rem 1.1rem !important;
  height: auto !important;
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  border: 1px solid rgba(140, 200, 255, 0.55) !important;
  background: linear-gradient(155deg, #1a6fd4 0%, #2b4fd8 48%, #3d6ae0 100%) !important;
  box-shadow: 0 4px 0 rgba(5, 40, 90, 0.48), 0 6px 18px rgba(0, 40, 100, 0.28) !important;
  -webkit-transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}

body.staff-side a#complaince-button-link:hover #complaince-button,
body.staff-side a#complaince-button-link:focus-visible #complaince-button {
  filter: brightness(1.06) !important;
  box-shadow: 0 6px 0 rgba(5, 40, 90, 0.42), 0 12px 28px rgba(0, 45, 110, 0.38) !important;
  transform: translateY(-1px);
}

body.staff-side #complaince-button-label {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.03em !important;
}

body.staff-side a#compliance-link {
  color: var(--portal-chrome-accent) !important;
  border: none !important;
  padding: 0 0.2rem !important;
}

body.staff-side.dark-mode #complianceouter {
  background: transparent !important;
}

body.staff-side.dark-mode #compliance {
  color: var(--portal-chrome-text) !important;
}

@media screen and (max-width: 600px) {
  body.staff-side #complianceouter {
    min-height: 0 !important;
    padding: 0.85rem 0 !important;
  }

  body.staff-side #compliance {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    gap: 0.75rem !important;
    padding: 0
      max(clamp(1rem, 5vw, 1.5rem), env(safe-area-inset-right, 0px))
      0
      max(clamp(1rem, 5vw, 1.5rem), env(safe-area-inset-left, 0px)) !important;
  }

  body.staff-side #icon-compliance-outer {
    width: 100% !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
  }

  body.staff-side #icon-compliance {
    width: 26px !important;
    height: 26px !important;
  }

  body.staff-side #complaince-message {
    flex: 0 1 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    width: 100% !important;
    text-align: left !important;
    font-size: clamp(12px, 3.4vw, 13px) !important;
    line-height: 1.5 !important;
    padding: 0 0.15rem !important;
    box-sizing: border-box !important;
  }

  body.staff-side a#complaince-button-link {
    margin-left: 0 !important;
    margin-top: 0 !important;
    width: 100%;
    flex: 0 0 auto !important;
    align-self: stretch !important;
  }

  body.staff-side #complaince-button {
    width: 100% !important;
    justify-content: center !important;
    min-height: 42px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.staff-side a#complaince-button-link:hover #complaince-button,
  body.staff-side a#complaince-button-link:focus-visible #complaince-button {
    transform: none !important;
  }
}

@media screen and (max-width: 760px) {
  body.staff-side {
    --mp-staff-header-min: 56px;
    /* Stesso stack verticale del constrain (56 + pad); il bordo resta nel calc */
    --mp-staff-header-offset: calc(56px + 0.45rem + 0.45rem + 1px);
    /* Sub-nav code nascosta su mobile (staff-liquid-glass-parity.css) */
    --mp-staff-subnav-h: 0px;
  }

  /* Più spazio per tab + icone: hamburger compatto */
  body.staff-side #header-constrain #nav.pull-right,
  body.staff-side #header-constrain #nav {
    justify-content: flex-end;
    gap: 0.28rem 0.38rem;
  }

  body.staff-side #header-constrain #right-menu {
    width: 48px !important;
    min-width: 48px !important;
    margin-left: 0.25rem !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.staff-side::before {
    opacity: 0.06;
  }
  body.staff-side .mp-staff-glass-panel::before,
  body.staff-side #footer-contact.footer-contact-block::before {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  body.staff-side #pjax-container #sub_nav-wrap,
  body.staff-side #sub_nav-wrap {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(10, 22, 38, 0.97) !important;
  }
  body.staff-side #sub_nav-wrap::before {
    opacity: 0.12;
  }
  body.staff-side #header #nav > a,
  body.staff-side #header #nav > span > a,
  body.staff-side #header #nav li > a,
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul,
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::before {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* Voce attiva: sfondo opaco (stesso fallback client a.active) */
  body.staff-side #header #nav li.active > a,
  body.staff-side #header #nav li.active > a:hover,
  body.staff-side #header #nav li.active > a:focus-visible,
  body.staff-side #header #nav li > a.active,
  body.staff-side #header #nav li > a.active:hover,
  body.staff-side #header #nav li > a.active:focus-visible {
    background: linear-gradient(168deg, #2a7fe0 0%, #2456c8 52%, #1c4cb0 100%) !important;
    transform: none;
  }

  body.staff-side #header #nav li.active > a::before,
  body.staff-side #header #nav li > a.active::before {
    opacity: 0.42;
  }

  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul::before {
    background: rgba(14, 24, 42, 0.97) !important;
  }
  body.staff-side #sub_nav-wrap nav ul#sub_nav > li > a,
  body.staff-side #sub_nav-wrap #customQ_nav .jb-overflowmenu-menu-primary li.item > a,
  body.staff-side #sub_nav-wrap .jb-overflowmenu-container > a.jb-overflowmenu-menu-secondary-handle {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  body.staff-side #sub_nav-wrap .jb-overflowmenu-menu-secondary {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.staff-side #sub_nav-wrap .customQ-dropdown {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(14, 24, 42, 0.98) !important;
  }

  body.staff-side #complianceouter::before {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(18, 32, 52, 0.96) !important;
  }
}

/* =============================================================================
   RESPONSIVE NAV FIX — evita sovrapposizioni e multi-riga di pill / chips
   Cache: ?08042026w
   ============================================================================= */

/* 1. Header #nav tablet 761–900px: forza nowrap — le pill hanno già clamp()
      e si restringono prima di wrappare; il wrap causava header a 2 righe
      con offset sticky sub-nav sbagliato → sovrapposizione visiva           */
@media screen and (min-width: 761px) and (max-width: 900px) {
  body.staff-side #header-constrain #nav.pull-right,
  body.staff-side #header-constrain #nav,
  body.staff-side #header-constrain #nav.pull-right.pjax {
    flex-wrap: nowrap !important;
    row-gap: 0 !important;
    overflow: visible !important;
  }
}

/* 2. Sub-nav ≤760px: scroll orizzontale → riga singola, niente multi-livello
      – overflow-x:auto sul nav (non su #sub_nav-wrap sticky per evitare
        il noto bug sticky/overflow-container)
      – I dropdown .customQ-dropdown richiedono hover desktop; su touch sono
        inutilizzabili → nascosti; le queue pill rimangono link diretti        */
@media screen and (max-width: 760px) {
  /* Nasconde dropdown queue (non usabili su touch, tagliati da overflow-x) */
  body.staff-side #sub_nav-wrap .customQ-dropdown {
    display: none !important;
  }

  /* Nav scrollabile: nowrap + scroll orizzontale silenzioso */
  body.staff-side #sub_nav-wrap nav.jb-overflowmenu,
  body.staff-side #sub_nav-wrap #customQ_nav.jb-overflowmenu {
    flex-wrap: nowrap !important;
    max-width: none !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  body.staff-side #sub_nav-wrap nav.jb-overflowmenu::-webkit-scrollbar,
  body.staff-side #sub_nav-wrap #customQ_nav.jb-overflowmenu::-webkit-scrollbar {
    display: none !important;
  }

  /* Lista pill primarie e sub_nav: nowrap allineato al container */
  body.staff-side #sub_nav-wrap nav ul#sub_nav,
  body.staff-side #sub_nav-wrap .jb-overflowmenu ul.jb-overflowmenu-menu-primary {
    flex-wrap: nowrap !important;
  }

  /* Pill "more" overflow bucket: nascosta su mobile (sostituita dallo scroll) */
  body.staff-side #sub_nav-wrap .jb-overflowmenu-container {
    display: none !important;
  }
}

/* =============================================================================
   HAMBURGER + NAV RESPONSIVE FIX — breakpoint, hide nav, glass sidr
   Cache: ?09042026a
   ============================================================================= */

/* CSS var menu mobile allineate al design glass staff */
body.staff-side {
  --mobile-menu-bg: rgba(8, 15, 30, 0.98);
  --mobile-link-color: rgba(226, 232, 240, 0.93);
}

/* 1. Hamburger visibile a ≤1024px — sovrascrive la regola (min-width:761px) */
@media screen and (max-width: 1024px) {
  body.staff-side #header-constrain #right-menu {
    display: flex !important;
    margin-left: auto !important; /* spinge il tasto sempre a destra */
  }
}

/* 2. Desktop >1024px: niente hamburger — bordo destro header = stesso rientro di #content / sezioni
      (evita max(64px,…) sulla root che riservava spazio al tasto quando non c’è) */
@media screen and (min-width: 1025px) {
  body.staff-side {
    --portal-header-pad-right: max(env(safe-area-inset-right, 0px), var(--mp-staff-column-inset-right));
  }

  body.staff-side #header-constrain #right-menu {
    display: none !important;
  }

  /* staff-desktop #nav.pull-right: padding calc(1% + 5px) a destra — restringe cluster vs contenuto */
  body.staff-side #header-constrain #nav.pull-right,
  body.staff-side #header-constrain #nav,
  body.staff-side #header-constrain #nav.pull-right.pjax {
    padding-right: 0 !important;
  }
}

/* 3. A ≤1024px: nasconde il CONTENUTO di #nav ma lascia il div come flex-spacer.
      Nascondere #nav intero con display:none rimuove il spacer → hamburger finisce
      vicino al logo invece che a destra. Con i figli nascosti e flex:1 1 auto,
      #nav rimane e riempie lo spazio, mantenendo il layout header intatto.

      IMPORTANTE — specificità precisa:
      - body.staff-side #header #nav > a         → (2,1,2) — batte display:inline-flex !important
      - body.staff-side #header #nav > ul.mp-staff-nav-primary → (2,2,2) — batte display:flex !important
      - usare #header invece di #header-constrain per parità con le regole sorgente.
      Tutte le regole di questa lista vengono DOPO nel file → a parità di specificità, vince l'ultima. */
@media screen and (max-width: 1024px) {
  body.staff-side #header #nav > a,
  body.staff-side #header #nav > span,
  body.staff-side #header #nav > span.mp-staff-user-menu,
  body.staff-side #header #nav > button,
  body.staff-side #header #nav > ul.mp-staff-nav-primary {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  /* Dropdown legacy che potrebbe restare aperto */
  body.staff-side #header #nav li > ul,
  body.staff-side #header #nav :is(li.inactive, span.mp-staff-user-menu.inactive) > ul {
    display: none !important;
  }
}

/* 4. Pulsante hamburger: display esplicito sovrascrive staff-mobile.css
      (.c-hamburger { display:none } è una regola base globale; la nostra specificità
      body.staff-side#header-constrain#right-menu.c-hamburger > 0-1-0 vince). */
body.staff-side #header-constrain #right-menu .c-hamburger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
}

/* =============================================================================
   SIDR GLASS DESIGN — menu hamburger laterale (staff)
   Struttura: .mp-sidr-header (fisso) + .mp-sidr-body (scroll) + .mp-sidr-footer (fisso)
   ============================================================================= */

/* staff-mobile.css nasconde #sidr-right con display:none a ≥761px.
   sidr.js v2.2.1 in CSS-transition mode usa solo css('right', 0) — non tocca display.
   La visibilità fuori-schermo è gestita da right:-301px, non da display. */
body.staff-side #sidr-right {
  display: flex !important;
  flex-direction: column !important;
}

/* Overlay scuro + blur dietro il pannello (clic → chiudi) */
#mp-sidr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 18, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 9980;
  cursor: pointer;
}
#mp-sidr-overlay.mp-sidr-overlay--active {
  display: block;
}

/* ── Pannello vetro navy ──────────────────────────────────────────────────── */
body.staff-side .sidr {
  width: 320px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: linear-gradient(
      180deg,
      rgba(12, 22, 42, 0.99) 0%,
      rgba(8, 15, 30, 0.99) 55%,
      rgba(5, 10, 22, 1) 100%
    ) !important;
  -webkit-backdrop-filter: blur(var(--portal-chrome-blur, 12px)) saturate(1.2) !important;
  backdrop-filter: blur(var(--portal-chrome-blur, 12px)) saturate(1.2) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: -20px 0 60px rgba(0, 4, 22, 0.75),
              inset 1px 0 0 rgba(255, 255, 255, 0.07) !important;
  font-family: var(--glass-font-sans, "Montserrat", system-ui, sans-serif) !important;
  font-size: 14px !important;
  color: var(--portal-chrome-text, #f1f5f9) !important;
  z-index: 9990 !important;
}

/* right senza !important: sidr.js (CSS-transition mode) imposta right:0 come inline style.
   Con !important il CSS vincerebbe → pannello immobile. */
body.staff-side .sidr.right {
  right: -321px;
}

/* ── Header fisso: titolo "Menu" + bottone × chiudi ─────────────────────── */
body.staff-side .sidr .mp-sidr-header {
  flex-shrink: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 1rem 0 1.25rem !important;
  height: 56px !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055) 0%,
    transparent 100%
  ) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.staff-side .sidr .mp-sidr-title {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.14em !important;
  color: rgba(203, 213, 225, 0.6) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

body.staff-side .sidr .mp-sidr-close-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-radius: 50% !important;
  color: rgba(203, 213, 225, 0.8) !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
  padding: 0 !important;
}
body.staff-side .sidr .mp-sidr-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
body.staff-side .sidr .mp-sidr-close-btn:focus-visible {
  outline: 2px solid rgba(168, 220, 255, 0.6) !important;
  outline-offset: 2px !important;
}

/* ── Corpo scorrevole ────────────────────────────────────────────────────── */
body.staff-side .sidr .mp-sidr-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0.85rem 0 0.5rem !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
body.staff-side .sidr .mp-sidr-body::-webkit-scrollbar {
  width: 4px;
}
body.staff-side .sidr .mp-sidr-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

/* ── Card utente ─────────────────────────────────────────────────────────── */
body.staff-side .sidr .mp-sidr-user-card {
  display: flex !important;
  align-items: center !important;
  gap: 0.8rem !important;
  margin: 0 0.75rem 1rem !important;
  padding: 0.85rem 1rem !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body.staff-side .sidr .mp-sidr-user-avatar {
  flex-shrink: 0 !important;
  width: 42px !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(168, 220, 255, 0.1) !important;
  border: 1px solid rgba(168, 220, 255, 0.18) !important;
  border-radius: 50% !important;
  color: var(--portal-chrome-accent, #a8dcff) !important;
}

body.staff-side .sidr .mp-sidr-user-info {
  flex: 1 !important;
  min-width: 0 !important;
}

body.staff-side .sidr .mp-sidr-user-name {
  display: block !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: var(--portal-chrome-accent-strong, #d4eeff) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0.3rem !important;
  padding: 0 !important;
  background: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
}

body.staff-side .sidr .mp-sidr-user-links {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex-wrap: nowrap !important;
}

body.staff-side .sidr .mp-sidr-user-link {
  display: inline !important;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  color: rgba(168, 220, 255, 0.7) !important;
  text-decoration: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  line-height: 1 !important;
  transition: color 0.13s ease !important;
  white-space: nowrap !important;
  overflow: visible !important;
}
body.staff-side .sidr .mp-sidr-user-link:hover {
  color: #ffffff !important;
}

body.staff-side .sidr .mp-sidr-user-sep {
  color: rgba(255, 255, 255, 0.2) !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

/* ── Etichette sezione ───────────────────────────────────────────────────── */
body.staff-side .sidr .mp-sidr-section-label {
  margin: 0.9rem 1.2rem 0.3rem !important;
  padding: 0 !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: rgba(203, 213, 225, 0.45) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  line-height: 1 !important;
}
body.staff-side .sidr .mp-sidr-body > .mp-sidr-section-label:first-of-type {
  margin-top: 0.1rem !important;
}

/* ── Lista voci nav (sezioni con .mp-sidr-nav-list) ─────────────────────── */
body.staff-side .sidr .mp-sidr-nav-list {
  list-style: none !important;
  margin: 0 0 0.25rem !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: block !important;
}

body.staff-side .sidr .mp-sidr-item {
  display: block !important;
  margin: 0.1rem 0.5rem !important;
  border: none !important;
  border-radius: 10px !important;
  line-height: 1 !important;
  transition: background 0.13s ease !important;
}
body.staff-side .sidr .mp-sidr-item:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}

body.staff-side .sidr .mp-sidr-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.6rem !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 10px !important;
  color: rgba(226, 232, 240, 0.88) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  background: transparent !important;
  transition: color 0.13s ease !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.staff-side .sidr .mp-sidr-item:hover .mp-sidr-link {
  color: #ffffff !important;
}

body.staff-side .sidr .mp-sidr-link-icon {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  opacity: 0.65;
  transition: opacity 0.13s ease;
}
body.staff-side .sidr .mp-sidr-item:hover .mp-sidr-link-icon {
  opacity: 1;
}

/* ── Voci dai template osTicket (navigazione principale) ─────────────────── */
body.staff-side .sidr .mp-sidr-nav-list > li {
  display: block !important;
  margin: 0.1rem 0.5rem !important;
  border: none !important;
  border-radius: 10px !important;
  line-height: 1 !important;
  transition: background 0.13s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list > li:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
body.staff-side .sidr .mp-sidr-nav-list > li:active {
  background: rgba(255, 255, 255, 0.13) !important;
}

body.staff-side .sidr .mp-sidr-nav-list > li > a,
body.staff-side .sidr .mp-sidr-nav-list > li > a.submenu-button {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 10px !important;
  color: rgba(226, 232, 240, 0.88) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  background: transparent !important;
  /* NON overflow:hidden — altrimenti il chevron ::after viene ritagliato */
  white-space: nowrap;
  transition: color 0.13s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list > li:hover > a {
  color: #ffffff !important;
  background: transparent !important;
}

/* Nasconde l'<i class="icon-sort-down"> dal template queue (sostituito dal chevron CSS) */
body.staff-side .sidr .mp-sidr-nav-list > li > a > i[class*="icon-sort"] {
  display: none !important;
}

/* Chevron a destra per link con sottomenu (::after su a.submenu-button) */
body.staff-side .sidr .mp-sidr-nav-list > li > a.submenu-button {
  justify-content: space-between !important;
}
body.staff-side .sidr .mp-sidr-nav-list > li > a.submenu-button::after {
  content: '';
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: auto !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23cbd5e1' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E") !important;
  background-size: 16px 16px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  opacity: 0.5 !important;
  transition: transform 0.22s ease, opacity 0.15s ease !important;
}
/* Chevron ruota quando il submenu è aperto */
body.staff-side .sidr .mp-sidr-nav-list > li > a.submenu-button.mp-submenu-open::after {
  transform: rotate(180deg) !important;
  opacity: 0.85 !important;
}
body.staff-side .sidr .mp-sidr-nav-list > li:hover > a.submenu-button::after {
  opacity: 0.75 !important;
}

/* ── Sub-menu coda (ul.scroll-height.submenu) ───────────────────────────── */
/*
   Struttura generata dal template:
   ul.scroll-height.submenu
   ├── li.top-level  → span.queue-count + a.truncate
   ├── li[.subQ]     → span.queue-count + a.truncate[.active] [+ i.icon-caret-down]
   │                   └── ul.subMenuQ (se ha figli, SEMPRE visibile)
   │                       └── li[.subQ] ricorsivo
   └── li.personalQ  → separatore tra code pubbliche e personali

   NOTA: display:none Senza !important — jQuery slideToggle() imposta
   style="display:block" inline che verrebbe battuto da !important.
*/

/* Contenitore submenu — si apre via slideToggle */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu {
  display: none;
  list-style: none !important;
  margin: 0.1rem 0 0.4rem 0 !important;
  padding: 0.2rem 0.5rem 0.3rem !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 10px !important;
}

/* Tab corrente: sottomenu visibile nel drawer mobile (es. Interventi → Calendario/Tabelle) */
body.staff-side .sidr .mp-sidr-nav-list > li.active > ul.submenu,
body.staff-side .sidr .mp-sidr-nav-list ul.submenu.mp-sidr-submenu--open {
  display: block;
}

body.staff-side .sidr .mp-sidr-nav-list > li.active > a.submenu-button::after {
  transform: rotate(180deg) !important;
  opacity: 0.85 !important;
}

/* ─ li generico dentro il submenu ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li {
  display: block !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  position: relative !important;
  transition: background 0.12s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li:hover {
  background: rgba(255, 255, 255, 0.07) !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li:active {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* ─ Nascondi badge count (span.queue-count) — layout mobile non ne ha spazio ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > span.queue-count,
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > span.newItemQ {
  display: none !important;
}

/* ─ Link voce (a.truncate) ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > a.truncate {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.58rem 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.825rem !important;
  font-weight: 400 !important;
  color: rgba(203, 213, 225, 0.82) !important;
  text-decoration: none !important;
  background: transparent !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  word-break: break-word !important;
  transition: color 0.12s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li:hover > a.truncate {
  color: rgba(226, 232, 240, 0.97) !important;
}

/* ─ Voce attiva (coda selezionata) ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > a.truncate.active {
  color: var(--portal-chrome-accent-strong, #d4eeff) !important;
  font-weight: 500 !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > a.truncate.active::before {
  content: '' !important;
  display: inline-block !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: var(--portal-chrome-accent, #a8dcff) !important;
  flex-shrink: 0 !important;
  margin-right: 0.1rem !important;
}

/* ─ Caret (icon-caret-down) per sotto-code con figli ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li > a.truncate > i.icon-caret-down {
  display: inline-flex !important;
  align-items: center !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  font-size: 0.75rem !important;
  opacity: 0.45 !important;
}

/* ─ li.top-level — link "Tutti i ticket" della coda principale ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.top-level {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  margin-bottom: 0.15rem !important;
  padding-bottom: 0.15rem !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.top-level > a.truncate {
  font-weight: 500 !important;
  color: rgba(168, 220, 255, 0.75) !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.top-level:hover {
  background: transparent !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.top-level:hover > a.truncate {
  color: var(--portal-chrome-accent-strong, #d4eeff) !important;
}

/* ─ li.personalQ — separatore fra code pubbliche e personali ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.personalQ {
  height: 1px !important;
  min-height: 1px !important;
  background: rgba(255, 255, 255, 0.09) !important;
  margin: 0.3rem 0.3rem !important;
  padding: 0 !important;
  border-radius: 0 !important;
  pointer-events: none !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu > li.personalQ:hover {
  background: rgba(255, 255, 255, 0.09) !important;
}

/* ─ ul.subMenuQ — sottocode annidate (sempre visibili) ─ */
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ {
  display: block !important;
  list-style: none !important;
  margin: 0 0 0.15rem 0.9rem !important;
  padding: 0 !important;
  border: none !important;
  border-left: 1px solid rgba(168, 220, 255, 0.12) !important;
  background: transparent !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  transition: background 0.12s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li > span.queue-count,
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li > span.newItemQ {
  display: none !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li > a.truncate {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  padding: 0.48rem 0.65rem !important;
  border-radius: 6px !important;
  font-size: 0.79rem !important;
  font-weight: 400 !important;
  color: rgba(203, 213, 225, 0.65) !important;
  text-decoration: none !important;
  background: transparent !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  transition: color 0.12s ease !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li:hover > a.truncate {
  color: rgba(226, 232, 240, 0.92) !important;
}
body.staff-side .sidr .mp-sidr-nav-list ul.submenu li ul.subMenuQ > li > a.truncate.active {
  color: var(--portal-chrome-accent, #a8dcff) !important;
  font-weight: 500 !important;
}

/* ─ li padre con submenu aperto — leggero highlight ─ */
body.staff-side .sidr .mp-sidr-nav-list > li:has(> a.mp-submenu-open) {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ── h1-h6 dentro sidr (da template legacy) ─────────────────────────────── */
body.staff-side .sidr h1,
body.staff-side .sidr h2,
body.staff-side .sidr h3 {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  margin: 0.7rem 1.2rem 0.2rem !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  color: rgba(203, 213, 225, 0.45) !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

/* Span "toggle menu" (text-indent legacy) */
body.staff-side .sidr .mp-sidr-close-btn span,
body.staff-side .sidr ul li span,
body.staff-side .sidr .mp-sidr-nav-list li span {
  display: none !important;
}
/* Ma NON nascondere mp-sidr-user-sep e mp-sidr-title */
body.staff-side .sidr .mp-sidr-user-sep,
body.staff-side .sidr .mp-sidr-title {
  display: inline !important;
}

/* ── Footer fisso (link di contatto) ─────────────────────────────────────── */
body.staff-side .sidr .mp-sidr-footer {
  flex-shrink: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
  background: rgba(6, 12, 26, 0.98) !important;
}

body.staff-side .sidr .mp-sidr-footer-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  padding: 0.85rem 1rem !important;
  color: rgba(203, 213, 225, 0.6) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: color 0.15s ease !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.staff-side .sidr .mp-sidr-footer-link:hover {
  color: rgba(203, 213, 225, 0.92) !important;
}

/* ── Neutralizza sidr-inner legacy (non più usato nella nuova struttura HTML) */
body.staff-side .sidr .sidr-inner {
  display: none !important;
}

/* ── Overlay legacy sidr-overlay (dalla libreria) ───────────────────────── */
body.staff-side #sidr-overlay {
  background: rgba(0, 4, 18, 0.55) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  backdrop-filter: blur(3px) !important;
  z-index: 9980 !important;
}
