/* ============================================================
   ELISEE SCOUT — MODERN LUXURY SIDEBAR SYSTEM
   Design macOS Style, Accordion Tree, Mini-Sidebar & Flyout Menu
   Palette Ufficiale Elisee Scout: Dark Glass & Neon Cyan
   ============================================================ */

:root {
  --es-sb-width-expanded: 252px;
  --es-sb-width-collapsed: 72px;
  --es-sb-bg: #070a12;
  --es-sb-bg-glass: rgba(7, 10, 18, 0.94);
  --es-sb-border: rgba(255, 255, 255, 0.08);
  --es-sb-cyan: #38bdf8;
  --es-sb-cyan-glow: rgba(56, 189, 248, 0.28);
  --es-sb-active-bg: rgba(56, 189, 248, 0.12);
  --es-sb-text-main: #f8fafc;
  --es-sb-text-dim: #94a3b8;
  --es-sb-text-muted: #64748b;
  --es-sb-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   CONTENITORE SIDEBAR PRINCIPALE
   ============================================================ */
.es-modern-sidebar,
.es-pro-sidebar,
.es-obs-sidebar,
.es-cos-sidebar,
.es-at-sidebar,
.es-med-sidebar,
.es-gk-sidebar,
.es-ma-sidebar {
  width: var(--es-sb-width-expanded) !important;
  min-width: var(--es-sb-width-expanded) !important;
  background: var(--es-sb-bg-glass) !important;
  border-right: 1px solid var(--es-sb-border) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex !important;
  flex-direction: column !important;
  padding: 16px 12px 20px !important;
  position: fixed !important;
  top: 72px !important;
  left: 0 !important;
  bottom: 0 !important;
  height: calc(100vh - 72px) !important;
  height: calc(100dvh - 72px) !important;
  box-sizing: border-box !important;
  z-index: 92 !important;
  transition: width 0.28s var(--es-sb-ease), min-width 0.28s var(--es-sb-ease), padding 0.28s var(--es-sb-ease);
  overflow-x: visible !important;
  overflow-y: auto;
}

@supports (scrollbar-width: none) {
  .es-modern-sidebar,
  .es-pro-sidebar,
  .es-obs-sidebar,
  .es-cos-sidebar,
  .es-at-sidebar,
  .es-med-sidebar,
  .es-gk-sidebar,
  .es-ma-sidebar {
    scrollbar-width: none;
  }
}

.es-modern-sidebar::-webkit-scrollbar,
.es-pro-sidebar::-webkit-scrollbar,
.es-obs-sidebar::-webkit-scrollbar,
.es-cos-sidebar::-webkit-scrollbar,
.es-at-sidebar::-webkit-scrollbar,
.es-med-sidebar::-webkit-scrollbar,
.es-gk-sidebar::-webkit-scrollbar,
.es-ma-sidebar::-webkit-scrollbar {
  display: none;
}

/* ============================================================
   STATO COLLASSATO (MINI-SIDEBAR ~72px)
   ============================================================ */
body.es-sidebar-is-collapsed .es-modern-sidebar,
body.es-sidebar-is-collapsed .es-pro-sidebar,
body.es-sidebar-is-collapsed .es-obs-sidebar,
body.es-sidebar-is-collapsed .es-cos-sidebar,
body.es-sidebar-is-collapsed .es-at-sidebar,
body.es-sidebar-is-collapsed .es-med-sidebar,
body.es-sidebar-is-collapsed .es-gk-sidebar,
body.es-sidebar-is-collapsed .es-ma-sidebar {
  width: var(--es-sb-width-collapsed) !important;
  min-width: var(--es-sb-width-collapsed) !important;
  padding: 16px 8px 20px !important;
}

/* Riallineamento dinamico del contenuto della pagina */
.es-pro-dash-wrap,
.es-obs-dash-container,
.es-cos-dash-wrap,
.es-player-dash-wrap,
.es-at-dash-container,
.es-med-dash-container,
.es-gk-dash-container,
.es-ma-dash-container,
.es-pro-main,
.es-cos-main,
.es-obs-main {
  transition: padding-left 0.28s var(--es-sb-ease) !important;
  padding-left: calc(var(--es-sb-width-expanded) + 18px) !important;
}

body.es-sidebar-is-collapsed .es-pro-dash-wrap,
body.es-sidebar-is-collapsed .es-obs-dash-container,
body.es-sidebar-is-collapsed .es-cos-dash-wrap,
body.es-sidebar-is-collapsed .es-player-dash-wrap,
body.es-sidebar-is-collapsed .es-at-dash-container,
body.es-sidebar-is-collapsed .es-med-dash-container,
body.es-sidebar-is-collapsed .es-gk-dash-container,
body.es-sidebar-is-collapsed .es-ma-dash-container,
body.es-sidebar-is-collapsed .es-pro-main,
body.es-sidebar-is-collapsed .es-cos-main,
body.es-sidebar-is-collapsed .es-obs-main {
  padding-left: calc(var(--es-sb-width-collapsed) + 18px) !important;
}

/* ============================================================
   TOP BAR: MAC OS DOTS (TRAFFIC LIGHTS)
   ============================================================ */
.es-msb-mac-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.es-msb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.85;
}

.es-msb-dot-close { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, 0.4); }
.es-msb-dot-min { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.4); }
.es-msb-dot-max { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, 0.4); }

/* In stato collassato i dots restano orizzontali o centrati */
body.es-sidebar-is-collapsed .es-msb-mac-dots {
  justify-content: center;
  gap: 5px;
  padding: 2px 0 12px;
}

/* ============================================================
   PROFILO UTENTE HEADER
   ============================================================ */
.es-msb-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  margin-bottom: 16px;
  position: relative;
}

.es-msb-user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--es-sb-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  background: #101624;
}

.es-msb-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
}

.es-msb-user-role {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--es-sb-text-muted);
}

.es-msb-user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--es-sb-text-main);
  text-overflow: ellipsis;
  overflow: hidden;
}

body.es-sidebar-is-collapsed .es-msb-user-card {
  justify-content: center;
  padding: 4px 0;
}

body.es-sidebar-is-collapsed .es-msb-user-info {
  display: none !important;
}

/* ============================================================
   PULSANTE TOGGLE FLUTTUANTE (COLLAPSE/EXPAND)
   ============================================================ */
.es-msb-floating-toggle {
  position: absolute;
  top: 38px;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0d1422;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--es-sb-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 8px rgba(56, 189, 248, 0.3);
  transition: transform 0.25s var(--es-sb-ease), background 0.2s, border-color 0.2s;
}

.es-msb-floating-toggle:hover {
  background: #131e33;
  border-color: #38bdf8;
  color: #ffffff;
  transform: scale(1.1);
}

.es-msb-floating-toggle svg {
  transition: transform 0.28s var(--es-sb-ease);
}

body.es-sidebar-is-collapsed .es-msb-floating-toggle svg {
  transform: rotate(180deg);
}

/* ============================================================
   SEZIONE LABEL "MAIN" / "NAVIGAZIONE"
   ============================================================ */
.es-msb-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--es-sb-text-muted);
  padding: 6px 10px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.es-sidebar-is-collapsed .es-msb-section-title {
  display: none !important;
}

/* ============================================================
   VOCI MENU & ALBERO DI NAVIGAZIONE (TREE ACCORDION)
   ============================================================ */
.es-msb-nav-tree {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.es-msb-item-wrap {
  position: relative;
  width: 100%;
}

.es-msb-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--es-sb-text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.es-msb-btn svg.es-msb-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: color 0.2s;
}

.es-msb-btn .es-msb-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-msb-btn .es-msb-chevron {
  width: 13px;
  height: 13px;
  color: var(--es-sb-text-muted);
  transition: transform 0.25s var(--es-sb-ease);
}

.es-msb-btn.is-open .es-msb-chevron {
  transform: rotate(180deg);
}

.es-msb-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--es-sb-cyan);
  border-color: rgba(56, 189, 248, 0.16);
}

.es-msb-btn.is-active {
  background: var(--es-sb-active-bg);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--es-sb-cyan);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}

/* SOTTOMENU AD ALBERO CON LINEE GUIDA VERTICALI */
.es-msb-sub-tree {
  position: relative;
  padding-left: 24px;
  margin-top: 2px;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Linea verticale guida */
.es-msb-sub-tree::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 12px;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.es-msb-sub-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 14px;
  font-size: 0.77rem;
  font-weight: 500;
  color: var(--es-sb-text-dim);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
}

/* Connettore orizzontale a L */
.es-msb-sub-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  width: 9px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.es-msb-sub-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.es-msb-sub-item.is-active {
  background: rgba(56, 189, 248, 0.14);
  color: var(--es-sb-cyan);
  font-weight: 700;
  border-color: rgba(56, 189, 248, 0.3);
}

/* In stato collassato i sotto-alberi normali si nascondono */
body.es-sidebar-is-collapsed .es-msb-sub-tree {
  display: none !important;
}

body.es-sidebar-is-collapsed .es-msb-btn {
  justify-content: center;
  padding: 10px 0;
}

body.es-sidebar-is-collapsed .es-msb-btn .es-msb-label,
body.es-sidebar-is-collapsed .es-msb-btn .es-msb-chevron {
  display: none !important;
}

/* ============================================================
   FLYOUT POPOVER FLOATING (PER MINI-SIDEBAR)
   ============================================================ */
.es-msb-flyout {
  position: absolute;
  left: calc(100% + 12px);
  top: 0;
  width: 170px;
  background: #0d1322;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.15);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.2s var(--es-sb-ease), transform 0.2s var(--es-sb-ease), visibility 0.2s;
  z-index: 1000;
}

/* Freccia di raccordo laterale */
.es-msb-flyout::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: #0d1322;
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  transform: rotate(45deg);
}

body.es-sidebar-is-collapsed .es-msb-item-wrap:hover .es-msb-flyout,
body.es-sidebar-is-collapsed .es-msb-item-wrap.is-flyout-open .es-msb-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.es-msb-flyout-item {
  padding: 7px 10px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--es-sb-text-dim);
  border-radius: 6px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
}

.es-msb-flyout-item:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}

.es-msb-flyout-item.is-active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--es-sb-cyan);
  font-weight: 700;
}

/* ============================================================
   SEZIONE MESSAGGI / QUICK STAFF
   ============================================================ */
.es-msb-contacts-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.es-msb-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s;
}

.es-msb-contact-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.es-msb-contact-avatar {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.es-msb-contact-name {
  font-size: 0.76rem;
  color: var(--es-sb-text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.es-sidebar-is-collapsed .es-msb-contact-row {
  justify-content: center;
  padding: 4px 0;
}

body.es-sidebar-is-collapsed .es-msb-contact-name {
  display: none !important;
}

/* ============================================================
   BOTTOM ACTION CARD ("LET'S START!" & CTA "+")
   ============================================================ */
.es-msb-bottom-action {
  margin-top: auto;
  padding-top: 14px;
  position: sticky;
  bottom: 0;
  background: var(--es-sb-bg-glass);
}

.es-msb-action-card {
  background: rgba(18, 25, 38, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  transition: all 0.2s;
}

.es-msb-action-card-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.es-msb-action-card-desc {
  font-size: 0.68rem;
  color: var(--es-sb-text-muted);
  line-height: 1.35;
  margin: 0;
}

.es-msb-cta-btn {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  transition: transform 0.18s, box-shadow 0.18s;
  width: 100%;
}

.es-msb-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5);
}

/* In stato collassato: Card si contrae in un solo pulsante circolare [+] */
body.es-sidebar-is-collapsed .es-msb-action-card {
  background: transparent;
  border: none;
  padding: 0;
}

body.es-sidebar-is-collapsed .es-msb-action-card-title,
body.es-sidebar-is-collapsed .es-msb-action-card-desc,
body.es-sidebar-is-collapsed .es-msb-cta-btn span {
  display: none !important;
}

body.es-sidebar-is-collapsed .es-msb-cta-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVITY & MOBILE DRAWER
   ============================================================ */
@media (max-width: 992px) {
  .es-msb-floating-toggle {
    display: none !important;
  }
  .es-modern-sidebar,
  .es-pro-sidebar,
  .es-obs-sidebar,
  .es-cos-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--es-sb-ease);
  }
  .es-modern-sidebar.is-open,
  .es-pro-sidebar.is-open,
  .es-obs-sidebar.is-open,
  .es-cos-sidebar.is-open {
    transform: translateX(0);
  }
  .es-pro-dash-wrap,
  .es-obs-dash-container,
  .es-cos-dash-wrap,
  .es-player-dash-wrap {
    padding-left: 14px !important;
  }
}

/* ============================================================
   HOVERSIDE1 — sidebar flottante come nel video
   Colori: palette del sito (ciano #38bdf8, vetro scuro)
   ============================================================ */
.es-sb-hover {
  --es-sb-accent: var(--accent-primary, #38bdf8);
  --es-sb-ink: var(--text-main, #f8fafc);
  --es-sb-soft: var(--text-muted, #94a3b8);
  --es-sb-chip: color-mix(in srgb, var(--text-main, #fff) 8%, transparent);
}

.es-sb-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  flex-shrink: 0;
}

.es-sb-profile img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #101624;
}

.es-sb-meta { min-width: 0; opacity: 0; transition: opacity 0.15s; }
.es-sb-name,
.es-sb-role { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.es-sb-name { color: var(--es-sb-ink); font-size: 14px; font-weight: 700; line-height: 1.2; }
.es-sb-role { color: var(--es-sb-soft); font-size: 12px; line-height: 1.3; }

.es-sb-chev {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--es-sb-soft);
  opacity: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity 0.15s;
}
.es-sb-chev svg { width: 18px; height: 18px; }

.es-sb-search {
  position: relative;
  flex: 0 0 44px;
  align-self: flex-start;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  transition: width 0.35s ease;
}
.es-sb-search input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--es-sb-ink);
  font: inherit;
  font-size: 14px;
  padding: 0 36px 0 12px;
  opacity: 0;
  outline: none;
}
.es-sb-search input::placeholder { color: var(--es-sb-soft); }
.es-sb-search svg {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 18px;
  height: 18px;
  translate: 0 -50%;
  color: var(--es-sb-soft);
  pointer-events: none;
}

.es-sb-hover nav {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@supports (scrollbar-width: none) {
  .es-sb-hover nav {
    scrollbar-width: none;
  }
}
.es-sb-hover nav::-webkit-scrollbar { display: none; }

.es-sb-hover .es-pro-side-btn,
.es-sb-hover .es-msb-btn,
.es-sb-hover nav > button,
.es-sb-hover nav > a {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  width: 100%;
  margin: 0;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--es-sb-soft) !important;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.es-sb-hover .es-pro-side-btn::before,
.es-sb-hover .es-msb-btn::before,
.es-sb-hover nav > button::before,
.es-sb-hover nav > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
  z-index: -1;
  transition: width 0.35s ease, height 0.35s ease, background-color 0.2s;
}
.es-sb-hover .es-pro-side-btn > *,
.es-sb-hover .es-msb-btn > *,
.es-sb-hover nav > button > *,
.es-sb-hover nav > a > * { position: relative; z-index: 1; }
.es-sb-hover .es-pro-side-btn svg,
.es-sb-hover .es-msb-btn svg,
.es-sb-hover nav > button svg,
.es-sb-hover nav > a svg {
  width: 22px;
  height: 22px;
  min-width: 22px;
  stroke: currentColor;
  color: inherit !important;
}
.es-sb-hover .es-pro-side-btn span,
.es-sb-hover .es-msb-btn span,
.es-sb-hover nav > button span,
.es-sb-hover nav > a span {
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
}
.es-sb-hover .es-pro-side-btn:hover,
.es-sb-hover .es-msb-btn:hover,
.es-sb-hover nav > button:hover,
.es-sb-hover nav > a:hover { color: var(--es-sb-accent) !important; }
.es-sb-hover .es-pro-side-btn[hidden],
.es-sb-hover .es-msb-btn[hidden],
.es-sb-hover nav > button[hidden],
.es-sb-hover nav > a[hidden] { display: none !important; }
.es-sb-hover .es-pro-side-btn.is-active,
.es-sb-hover .es-msb-btn.is-active,
.es-sb-hover nav > button.is-active,
.es-sb-hover nav > a.is-active,
.es-sb-hover .es-pro-side-btn.active,
.es-sb-hover nav > a.active { color: #f8fafc !important; }
.es-sb-hover .es-pro-side-btn.is-active::before,
.es-sb-hover .es-msb-btn.is-active::before,
.es-sb-hover nav > button.is-active::before,
.es-sb-hover nav > a.is-active::before,
.es-sb-hover .es-pro-side-btn.active::before,
.es-sb-hover nav > a.active::before { background: var(--es-sb-accent); }

.es-sb-actions {
  position: relative;
  flex-shrink: 0;
  height: 212px;
  margin-top: auto;
}
.es-sb-action {
  position: absolute;
  left: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--es-sb-chip);
  color: var(--es-sb-soft);
  cursor: pointer;
  transition: top 0.35s ease, left 0.35s ease, color 0.2s, background 0.2s;
}
.es-sb-action svg { width: 20px; height: 20px; }
.es-sb-action .es-sb-ico-sun { display: none; }
[data-theme="mimetico-chiaro"] .es-sb-action .es-sb-ico-moon { display: none; }
[data-theme="mimetico-chiaro"] .es-sb-action .es-sb-ico-sun { display: block; }
.es-sb-action:nth-child(1) { top: 0; }
.es-sb-action:nth-child(2) { top: 52px; }
.es-sb-action:nth-child(3) { top: 104px; }
.es-sb-action:nth-child(4) { top: 156px; }
.es-sb-action:hover { color: var(--es-sb-accent); }

@media (min-width: 1025px) {
  .es-sb-hover.es-modern-sidebar,
  .es-sb-hover.es-pro-sidebar,
  .es-sb-hover.es-obs-sidebar,
  .es-sb-hover.es-cos-sidebar,
  .es-sb-hover.es-at-sidebar,
  .es-sb-hover.es-med-sidebar,
  .es-sb-hover.es-gk-sidebar,
  .es-sb-hover.es-ma-sidebar {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    top: 88px !important;
    left: 16px !important;
    bottom: 16px !important;
    height: auto !important;
    border-radius: 24px !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: var(--bg-card, rgba(14, 17, 24, 0.92)) !important;
    color: var(--es-sb-ink);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    padding: 18px 20px 16px !important;
    overflow: hidden !important;
    gap: 10px;
    z-index: 140 !important;
    transition: width 0.35s ease, min-width 0.35s ease !important;
  }
  .es-sb-hover:is(:hover, .es-sb-lock).es-modern-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-pro-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-obs-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-cos-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-at-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-med-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-gk-sidebar,
  .es-sb-hover:is(:hover, .es-sb-lock).es-ma-sidebar {
    width: 264px !important;
    min-width: 264px !important;
    max-width: 264px !important;
  }
  /* Le barre laterali restano nascoste (vedi regole in fondo al file): niente spazio vuoto a sinistra. */
  .es-pro-shell,
  .es-cos-shell,
  .es-at-shell,
  .es-gk-shell,
  .es-ma-shell,
  .es-med-shell,
  .es-obs-shell {
    padding-left: 18px !important;
  }
  .es-pro-dash-wrap,
  .es-obs-dash-container,
  .es-cos-dash-wrap,
  .es-player-dash-wrap,
  .es-at-dash-container,
  .es-med-dash-container,
  .es-gk-dash-container,
  .es-ma-dash-container,
  .es-pro-main,
  .es-cos-main,
  .es-obs-main {
    padding-left: 0 !important;
  }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-meta,
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-chev,
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-search input,
  .es-sb-hover:is(:hover, .es-sb-lock) .es-pro-side-btn span,
  .es-sb-hover:is(:hover, .es-sb-lock) .es-msb-btn span,
  .es-sb-hover:is(:hover, .es-sb-lock) nav > button span,
  .es-sb-hover:is(:hover, .es-sb-lock) nav > a span {
    opacity: 1;
    transition: opacity 0.25s 0.1s;
  }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-search { width: 100%; }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-pro-side-btn::before,
  .es-sb-hover:is(:hover, .es-sb-lock) .es-msb-btn::before,
  .es-sb-hover:is(:hover, .es-sb-lock) nav > button::before,
  .es-sb-hover:is(:hover, .es-sb-lock) nav > a::before {
    width: 100%;
    height: 56px;
  }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-action { top: 156px; }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-action:nth-child(1) { left: 0; }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-action:nth-child(2) { left: 56px; }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-action:nth-child(3) { left: 112px; }
  .es-sb-hover:is(:hover, .es-sb-lock) .es-sb-action:nth-child(4) { left: 168px; }
  .es-sb-hover .es-pro-brand-header,
  .es-sb-hover .es-pro-sidebar-badge,
  .es-sb-hover .es-msb-mac-dots,
  .es-sb-hover .es-msb-contacts-section,
  .es-sb-hover .es-msb-bottom-action,
  .es-sb-hover .es-msb-floating-toggle { display: none !important; }
}

@media (max-width: 1024px) {
  .es-sb-hover .es-sb-meta,
  .es-sb-hover .es-sb-chev,
  .es-sb-hover .es-sb-search input,
  .es-sb-hover .es-pro-side-btn span,
  .es-sb-hover .es-msb-btn span,
  .es-sb-hover nav > button span,
  .es-sb-hover nav > a span { opacity: 1; }
  .es-sb-hover .es-sb-search { width: 100%; flex-basis: auto; }
  .es-sb-hover .es-pro-side-btn::before,
  .es-sb-hover .es-msb-btn::before,
  .es-sb-hover nav > button::before,
  .es-sb-hover nav > a::before { width: 100%; height: 56px; }
  .es-sb-hover .es-sb-actions {
    height: auto;
    display: flex;
    gap: 8px;
  }
  .es-sb-hover .es-sb-action { position: static; }
  .es-sb-hover.is-open.es-pro-sidebar,
  .es-sb-hover.is-open.es-obs-sidebar,
  .es-sb-hover.is-open.es-cos-sidebar,
  .es-sb-hover.is-open.es-at-sidebar,
  .es-sb-hover.is-open.es-med-sidebar,
  .es-sb-hover.is-open.es-gk-sidebar,
  .es-sb-hover.is-open.es-ma-sidebar {
    transform: translateX(0) !important;
  }
  .es-sb-hover.es-pro-sidebar,
  .es-sb-hover.es-obs-sidebar,
  .es-sb-hover.es-cos-sidebar,
  .es-sb-hover.es-at-sidebar,
  .es-sb-hover.es-med-sidebar,
  .es-sb-hover.es-gk-sidebar,
  .es-sb-hover.es-ma-sidebar {
    width: 280px !important;
    min-width: 280px !important;
    border-radius: 0 24px 24px 0 !important;
    background: var(--bg-card, rgba(14, 17, 24, 0.96)) !important;
    padding: 18px 16px !important;
  }
}

/* ============================================================
   SEPARAZIONE RIGIDA: VISTE PUBBLICHE VS DASHBOARD RISERVATE
   Nelle viste pubbliche (Landing Page, Home, Chi siamo, Bacheca, Mappa...),
   la sidebar a sinistra è tassativamente nascosta per non coprire il titolo
   principale "ELISEE SCOUT" e non duplicare le funzioni della Navbar.
   ============================================================ */
body:not(.is-in-role-dashboard):not(.is-player-mode):not(.is-pres-mode):not(.is-coach-mode):not(.is-vice-mode):not(.is-ds-mode):not(.is-obs-mode):not(.is-at-mode):not(.is-med-mode):not(.is-gk-mode):not(.is-ma-mode):not(.is-giorn-mode):not(.is-tm-mode):not(.is-yg-mode):not(.is-dg-mode):not(.is-ag-mode):not(.is-mk-mode):not(.is-pr-mode):not(.is-eq-mode):not(.is-sg-mode):not(.is-bt-mode):not(.is-tifoso-mode):not(.is-nu-mode):not(.is-fisio-mode) .es-sb-hover,
body:not(.is-in-role-dashboard):not(.is-player-mode):not(.is-pres-mode):not(.is-coach-mode):not(.is-vice-mode):not(.is-ds-mode):not(.is-obs-mode):not(.is-at-mode):not(.is-med-mode):not(.is-gk-mode):not(.is-ma-mode):not(.is-giorn-mode):not(.is-tm-mode):not(.is-yg-mode):not(.is-dg-mode):not(.is-ag-mode):not(.is-mk-mode):not(.is-pr-mode):not(.is-eq-mode):not(.is-sg-mode):not(.is-bt-mode):not(.is-tifoso-mode):not(.is-nu-mode):not(.is-fisio-mode) .es-pro-sidebar,
body:not(.is-in-role-dashboard):not(.is-player-mode):not(.is-pres-mode):not(.is-coach-mode):not(.is-vice-mode):not(.is-ds-mode):not(.is-obs-mode):not(.is-at-mode):not(.is-med-mode):not(.is-gk-mode):not(.is-ma-mode):not(.is-giorn-mode):not(.is-tm-mode):not(.is-yg-mode):not(.is-dg-mode):not(.is-ag-mode):not(.is-mk-mode):not(.is-pr-mode):not(.is-eq-mode):not(.is-sg-mode):not(.is-bt-mode):not(.is-tifoso-mode):not(.is-nu-mode):not(.is-fisio-mode) .es-obs-sidebar,
body:not(.is-in-role-dashboard):not(.is-player-mode):not(.is-pres-mode):not(.is-coach-mode):not(.is-vice-mode):not(.is-ds-mode):not(.is-obs-mode):not(.is-at-mode):not(.is-med-mode):not(.is-gk-mode):not(.is-ma-mode):not(.is-giorn-mode):not(.is-tm-mode):not(.is-yg-mode):not(.is-dg-mode):not(.is-ag-mode):not(.is-mk-mode):not(.is-pr-mode):not(.is-eq-mode):not(.is-sg-mode):not(.is-bt-mode):not(.is-tifoso-mode):not(.is-nu-mode):not(.is-fisio-mode) .es-modern-sidebar,
body:not(.is-in-role-dashboard):not(.is-player-mode):not(.is-pres-mode):not(.is-coach-mode):not(.is-vice-mode):not(.is-ds-mode):not(.is-obs-mode):not(.is-at-mode):not(.is-med-mode):not(.is-gk-mode):not(.is-ma-mode):not(.is-giorn-mode):not(.is-tm-mode):not(.is-yg-mode):not(.is-dg-mode):not(.is-ag-mode):not(.is-mk-mode):not(.is-pr-mode):not(.is-eq-mode):not(.is-sg-mode):not(.is-bt-mode):not(.is-tifoso-mode):not(.is-nu-mode):not(.is-fisio-mode) [class*="-sidebar"] {
  display: none !important;
}

/* Sulle sezioni home e landing page (#hero, #home-about, #view-home), nessuna sidebar può mai apparire */
body.is-public-landing .es-sb-hover,
body.is-public-landing .es-pro-sidebar,
body.is-public-landing .es-obs-sidebar,
body.is-public-landing .es-modern-sidebar,
body.is-public-landing .es-cos-sidebar,
body.is-public-landing .es-at-sidebar,
body.is-public-landing .es-med-sidebar,
body.is-public-landing .es-gk-sidebar,
body.is-public-landing .es-ma-sidebar,
body.is-public-landing [id$="-sidebar"],
body.is-public-landing [class*="-sidebar"],
body.is-public-landing #es-trash,
body.is-public-landing #es-share,
body:has(#hero:not([hidden])) .es-sb-hover,
body:has(#hero:not([hidden])) .es-pro-sidebar,
body:has(#hero:not([hidden])) [class*="-sidebar"],
body:has(#hero:not([hidden])) #es-trash,
body:has(#hero:not([hidden])) #es-share,
body:has(#view-home:not([hidden])) .es-sb-hover,
body:has(#view-home:not([hidden])) .es-pro-sidebar,
body:has(#view-home:not([hidden])) [class*="-sidebar"],
body:has(#view-home:not([hidden])) #es-trash,
body:has(#view-home:not([hidden])) #es-share,
#hero .es-sb-hover,
#hero .es-pro-sidebar,
#hero [class*="-sidebar"],
#view-home .es-sb-hover,
#view-home .es-pro-sidebar,
#view-home [class*="-sidebar"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translateX(-9999px) !important;
}

