﻿@charset "UTF-8";
@import url(https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap);

/* ===================================================================
   SIDEBAR REDESIGN  (ported from UI_Related_File/stylesheets/style.css
   lines 1262-3245 of the Salesmatic build, 2026-10-05).

   Loaded AFTER /stylesheets/style.css in views/header.ejs so these
   rules win.  Scoped to .sm-sidebar-wrap / .sm-* so the rest of the
   Distomatic pages are untouched.

   The two brand tokens below live in style.css in the source build;
   they are repeated here so this file is self-contained.
=================================================================== */
:root {
  --navy-deep : #1e1050;
  --navy      : #2d1b69;
}
/* ═══════════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR VISUAL REDESIGN  v1.0
   Scoped entirely to .sm-sidebar-wrap — preserves all MetisMenu /
   EJS / permission / collapse functionality untouched.
   Only the visual layer is overridden here.
═══════════════════════════════════════════════════════════════════════ */
/* ─── Design tokens ──────────────────────────────────────────────── */
:root {
  --sm-gradient  : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  --sm-top-shade : rgba(0, 0, 0, 0.12);
  --sm-hover     : rgba(255, 255, 255, 0.14);
  --sm-active    : #ffffff1a;
  --sm-border    : rgba(255, 255, 255, 0.18);
  --sm-text      : rgba(255, 255, 255, 0.82);
  --sm-teal      : #cbc4f0;
  --sm-dim       : rgba(255, 255, 255, 0.52);
  --sm-white     : #FFFFFF;
  --sm-accent    : #D4AAFF;
  --sm-ic-bg     : rgba(255, 255, 255, 0.14);
  --sm-ic-hover  : rgba(255, 255, 255, 0.24);
  --sm-radius    : 8px;
  --sm-trans     : all 0.15s ease;
  --sm-dot-dim   : rgba(255, 255, 255, 0.48);
  /* Selected submenu item: a light lavender pill with dark ink, matching the
     reference design. The base theme used #ba86ebc7 here and the first pass
     of this redesign used a flat white overlay (--sm-active), which read as
     grey against the purple gradient rather than as part of the theme. */
  --sm-pill      : #e3d8fb;
  --sm-pill-ink  : #2d1b69;
  /* Open parent row: tinted with the accent instead of plain white, so the
     whole active chain stays in the purple family. */
  --sm-active-top: rgba(212, 170, 255, 0.16);
  /* Sidebar layout heights — adjust if navbar or logo strip changes */
  --sm-navbar-h  : 70px;   /* top navigation bar */
  --sm-logo-h    : 60px;   /* org logo / company-name strip */
  --sm-footer-h  : 162px;  /* sticky footer (3 items × ~41px + border/padding) */
}
/* ─── Sidebar container ──────────────────────────────────────────── */
.left-side-menu.sm-sidebar-wrap {
  background-image : var(--sm-gradient) !important;
  background-color : transparent !important;
  bottom           : 0 !important;
  display          : flex !important;
  flex-direction   : column !important;
  overflow         : hidden !important;
  box-shadow       : 3px 0 28px rgba(139,92,246,0.16) !important;
  border-right     : 1px solid rgba(139,92,246,0.12) !important;
  font-family      : 'Plus Jakarta Sans', sans-serif !important;
}
/* ─── Slim scrollbar (overrides slimscroll injected elements) ─────── */
.sm-sidebar-wrap .slimscroll-menu {
  background : transparent !important;
}
.sm-sidebar-wrap .slimScrollBar {
  background     : rgba(123,47,232,0.55) !important;
  border-radius  : 3px !important;
  width          : 5px !important;
  right          : 2px !important;
  display        : block !important;
  opacity        : 0 !important;
  transition     : opacity 0.18s ease !important;
  pointer-events : none !important;
}
.sm-sidebar-wrap .sm-nav-scroll:hover .slimScrollBar {
  opacity        : 1 !important;
  pointer-events : auto !important;
}
.sm-sidebar-wrap .slimScrollRail {
  background : transparent !important;
  width      : 1px          !important;
  right      : 1px          !important;
}
/* ─── Organisation brand card ────────────────────────────────────── */
.sm-sidebar-wrap .organization-switch.user-box {
  background     : transparent !important;
  border-bottom  : 1px solid rgba(255,255,255,0.10) !important;
  /* padding        : 10px 12px 12px !important; */
  padding: 0px 5px 5px !important;
  display        : flex !important;
  align-items    : stretch !important;
  justify-content: center !important;
  gap            : 7px !important;
  cursor         : default !important;
  pointer-events : none !important;
}
.sm-sidebar-wrap .organization-switch.user-box:hover {
  background     : transparent !important;
}
   
/* ── Logo pill — frosted glass container ── */
/* .sm-org-logo-wrap {
  display        : flex;
  align-items    : center;
  justify-content: center;
  background     : rgba(255,255,255,0.10);
  border         : 1px solid rgba(255,255,255,0.18);
  border-radius  : 10px;
  padding        : 8px 8px;
  min-height     : 44px;
  box-shadow     : 0 2px 10px rgba(0,0,0,0.14),
                   inset 0 1px 0 rgba(255,255,255,0.14);
  width: fit-content;
} */
 .sm-org-logo-wrap {
  display        : flex;
  align-items    : center;
  justify-content: center;
  background     : rgba(255,255,255,0.10);
  border         : 1px solid rgba(255,255,255,0.18);
  border-radius  : 10px;
  padding        : 8px 8px;
  min-height     : 44px;
  box-shadow     : 0 2px 10px rgba(0,0,0,0.14),
                   inset 0 1px 0 rgba(255,255,255,0.14);
  width: fit-content;
}
/* Actual logo image */
/* .sm-org-logo-img {
  max-height     : 28px;
  max-width      : 100%;
  width          : auto;
  object-fit     : contain;
  display        : block;
  filter         : drop-shadow(0 1px 3px rgba(0,0,0,0.20));
} */
 .sm-org-logo-img {
  height         : 52px;
  width          : 115px;
  max-width      : 100%;
  object-fit     : contain;
  background     : #fff;
  display        : block;
  filter         : drop-shadow(0 1px 3px rgba(0,0,0,0.20));
}
/* Fallback initial (no logo) — keeps same pill look */
.sm-org-initial {
  width          : 30px;
  height         : 30px;
  border-radius  : 8px;
  background     : linear-gradient(135deg,rgba(255,255,255,0.28),rgba(255,255,255,0.10));
  display        : flex;
  align-items    : center;
  justify-content: center;
  font-size      : 16px;
  font-weight    : 800;
  color          : #fff;
  text-shadow    : 0 1px 4px rgba(0,0,0,0.22);
}
/* ── Bottom info row: name + status badge ── */
/* .sm-org-info {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
  gap            : 6px;
  padding        : 0 2px;
}

.sm-org-name {
  font-size      : 10.5px;
  font-weight    : 600;
  color          : rgba(255,255,255,0.78);
  overflow       : hidden;
  text-overflow  : ellipsis;
    white-space: nowrap;
  flex           : 1;
  min-width      : 0;
  letter-spacing : 0.05px;
} */
/* "Live" badge with pulsing green dot */
/* .sm-org-status {
  display        : inline-flex;
  align-items    : center;
  gap            : 4px;
  font-size      : 9px;
  font-weight    : 700;
  color          : rgba(255,255,255,0.50);
  text-transform : uppercase;
  letter-spacing : 0.6px;
  flex-shrink    : 0;
}
.sm-org-dot {
  width          : 6px;
  height         : 6px;
  border-radius  : 50%;
  background     : #4ade80;
  display        : inline-block;
  box-shadow     : 0 0 0 0 rgba(74,222,128,0.70);
  animation      : smOrgDotPulse 2.2s ease-in-out infinite;
} */
@keyframes smOrgDotPulse {
  0%,100% { box-shadow: 0 0 0 0   rgba(74,222,128,0.70); }
  50%     { box-shadow: 0 0 0 4px rgba(74,222,128,0.00); }
}
/* ── Enlarged (icon-only): show pill only, hide info row ── */
body.enlarged .sm-org-info        { display: none !important; }
body.enlarged .sm-org-logo-wrap   {
  padding   : 5px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
}
body.enlarged .sm-org-logo-img    { max-height: 22px !important; }
body.enlarged .sm-org-initial     { width: 24px !important; height: 24px !important; font-size: 13px !important; }
/* ─── Menu list container ────────────────────────────────────────── */
.sm-sidebar-wrap ul.metismenu#side-menu {
  padding: 4px 8px 8px !important;
}

/* ─── Section group headers (.menu-title, stock class from the base
   theme — unused until now) — labels the sidebar's module sections
   (Overview / Sales / Operations / System) ─────────────────────── */
.sm-sidebar-wrap ul.metismenu#side-menu > li.menu-title {
  padding        : 16px 14px 6px !important;
  font-size      : 10.5px !important;
  font-weight    : 500 !important;
  letter-spacing : .08em !important;
  text-transform : uppercase !important;
  color          : var(--sm-dim) !important;
  background     : transparent !important;
  pointer-events : none !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu > li.menu-title:first-child {
  padding-top: 8px !important;
}
/* Icon-only ("enlarged") mode has no room for text labels — hide,
   same treatment already used for item label spans in enlarged mode. */
body.enlarged .sm-sidebar-wrap li.menu-title { display: none !important; }
/* ─── Top-level menu item <a> ─────────────────────────────────────── */
.sm-sidebar-wrap ul.metismenu#side-menu > li > a {
  display        : flex !important;
  align-items    : center !important;
  /* gap            : 8px !important; */
  /* padding        : 7px 9px !important; */
  border-radius  : var(--sm-radius) !important;
  margin-bottom  : 1px !important;
  color          : var(--sm-teal) !important;
  font-size      : 12px !important;
  font-family    : 'Plus Jakarta Sans', sans-serif !important;
  transition     : var(--sm-trans) !important;
  position       : relative !important;
  overflow       : hidden !important;
  text-decoration: none !important;
  white-space    : nowrap !important;
}

/* Icon box ── wraps the <i> icon */
.sm-sidebar-wrap ul.metismenu#side-menu > li > a > i {
  width          : 20px !important;
  height         : 22px !important;
  min-width      : 20px !important;
  border-radius  : 7px !important;
  /* background     : var(--sm-ic-bg) !important; */
  display        : inline-flex !important;
  align-items    : center !important;
  justify-content: center !important;
  font-size      : 18px !important;
  color          : var(--sm-accent) !important;
  flex-shrink    : 0 !important;
  transition     : var(--sm-trans) !important;
}

/* ── Inline SVG icons on top-level rows ───────────────────────────
   Every top-level menu icon carries a real <svg> inside its <i>
   (views/sidebar.ejs). An icon font is text in a private-use
   codepoint: nothing paints until the webfont lands, a tofu box can
   show in the gap, and a failed font request leaves the menu with no
   icons at all. Inline SVG paints with the first frame.

   The <i> and its class attribute are kept EXACTLY as they were, and
   deliberately so: sidebar_order.js builds a submenu parent's saved
   storage key out of that class string (keyFor -> 'i:' + cls), so
   dropping ti-truck-delivery would silently invalidate every user's
   saved menu order. The font glyph is suppressed through the
   data-svg marker instead, which no JS reads.

   An attribute selector rather than :has(> svg) on purpose - if :has
   were unsupported the glyph would come back and every icon would be
   drawn twice, on top of itself. */
.sm-sidebar-wrap ul.metismenu#side-menu i[data-svg]::before {
  content : none !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu .sm-ic {
  width        : 1em;        /* = the <i>'s font-size, so collapsed mode scales too */
  height       : 1em;
  display      : block;
  fill         : currentColor;   /* follows the row's hover / active colour */
  flex-shrink  : 0;
}

/* Label <span> (not the .menu-arrow span) */
.sm-sidebar-wrap ul.metismenu#side-menu > li > a > span:not(.menu-arrow) {
  flex          : 1 !important;
  min-width     : 0 !important;
  color         : var(--sm-teal) !important;
  font-size     : 13px !important;
  font-weight   : 500 !important;
  overflow      : hidden !important;
  text-overflow : ellipsis !important;
  white-space   : nowrap !important;
  transition    : color 0.12s !important;
  margin-top: 2px !important;
}

/* ─── Hover: top-level ───────────────────────────────────────────── */
.sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover {
  background     : var(--sm-hover) !important;
  text-decoration: none !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover > i {
  /* background: var(--sm-ic-hover) !important; */
  color     : var(--sm-accent) !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover > span:not(.menu-arrow) {
  color: var(--sm-white) !important;
}

/* ─── Active: top-level (MetisMenu adds .mm-active) ─────────────── */
.sm-sidebar-wrap ul.metismenu#side-menu > li.mm-active > a {
  background: var(--sm-active-top) !important;
  color     : var(--sm-white) !important;
}
/* Left accent bar */
.sm-sidebar-wrap ul.metismenu#side-menu > li.mm-active > a::before {
  content      : '' !important;
  position     : absolute !important;
  left         : 0 !important;
  top          : 22% !important;
  bottom       : 22% !important;
  width        : 3px !important;
  background   : var(--sm-accent) !important;
  border-radius: 0 2px 2px 0 !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu > li.mm-active > a > i {
  background: rgba(123,47,232,0.14) !important;
  color     : var(--sm-accent) !important;
}
.sm-sidebar-wrap ul.metismenu#side-menu > li.mm-active > a > span:not(.menu-arrow) {
  color: var(--sm-white) !important;
}

/* ─── Chevron (.menu-arrow) ──────────────────────────────────────── */
/* Base app.min.css sets position:absolute; right:20px — reset to static
   so the arrow is a normal flex item inside the <a> row                 */
.sm-sidebar-wrap .menu-arrow {
  position       : static !important;
  display        : inline-flex !important;
  align-items    : center !important;
  justify-content: center !important;
  margin-left    : auto !important;
  width          : 16px !important;
  height         : 16px !important;
  flex-shrink    : 0 !important;
  border         : none !important;
  background     : none !important;
}
.sm-sidebar-wrap .menu-arrow::before {
  content       : "" !important;
  box-sizing    : border-box !important;
  width         : 7px !important;
  height        : 7px !important;
  border-style  : solid !important;
  border-width  : 2px 2px 0 0 !important;
  border-color  : var(--sm-dim) !important;
  border-radius : 0 3px 0 0 !important; /* round off the chevron's tip */
  color       : var(--sm-dim) !important;
  transform     : rotate(45deg) !important;
  transition    : transform 0.2s ease, border-color 0.15s !important;
  display     : block !important;
  line-height : 1 !important;
}
/* Rotate chevron when submenu is open */
.sm-sidebar-wrap ul.metismenu#side-menu > li.mm-active > a .menu-arrow::before {
  transform    : rotate(45deg) !important;
  border-color : var(--sm-accent) !important;
  color    : var(--sm-accent) !important;
}

/* ─── Submenu container ──────────────────────────────────────────── *
 * :not(.sm-footer-submenu) throughout this block: the footer's submenu
 * reuses the .nav-second-level class for base positioning but has its
 * own dedicated rules further down (real icons, not the dot indicator,
 * different padding) — without the exclusion these !important rules
 * always won, squashing the footer's real icons into blank 5px dots
 * and overriding its own display/padding.                            */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) {
  background  : transparent !important;
  padding     : 2px 0 2px 6px !important;
  margin-left : 0 !important;
}

/* ─── Submenu item <a> ───────────────────────────────────────────── */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a {
  display        : flex !important;
  align-items    : center !important;
  gap            : 8px !important;
  padding        : 7px 8px 7px 28px !important;
  border-radius  : 7px !important;
  margin-bottom  : 1px !important;
  color          : var(--sm-teal) !important;
  font-size      : 12.5px !important;
  font-weight    : 500 !important;
  transition     : var(--sm-trans) !important;
  position       : relative !important;
  text-decoration: none !important;
  white-space    : nowrap !important;
  overflow       : hidden !important;
  text-overflow  : ellipsis !important;
}

/* Dot indicator (replaces the MDI arrow icon visually) */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a > i {
  font-size  : 0 !important;        /* hide icon glyph */
  width      : 5px !important;
  min-width  : 5px !important;
  height     : 5px !important;
  background : var(--sm-dot-dim) !important;
  border-radius: 50% !important;
  display    : inline-flex !important;
  flex-shrink: 0 !important;
  transition : background 0.12s !important;
  align-self : center !important;
}

/* Span labels inside submenus — no font-size/font-weight here on purpose:
   it inherits 12.5px/500 straight from the <a> rule above, so items render
   identically whether sidebar.ejs wraps the label in <span> or leaves it
   as a bare text node. A previous version duplicated 13px here (and
   before that 11.5px), which was fighting the <a>'s own size and made
   "span" menu items render differently from "no span" ones (e.g.
   Secondary Sales vs Primary Sales submenus). */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a > span {
  color        : var(--sm-teal) !important;
  overflow     : hidden !important;
  text-overflow: ellipsis !important;
  white-space  : nowrap !important;
}

/* Reset any inline margin-left on sub-links */
.sm-sidebar-wrap .nav-second-level li > a[style*="margin-left"] {
  margin-left: 0 !important;
}

/* Submenu hover */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a:hover {
  background     : var(--sm-hover) !important;
  color          : var(--sm-white) !important;
  /* font-weight    : 600 !important; */
  text-decoration: none !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a:hover > i {
  background: var(--sm-accent) !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a:hover > span {
  color: var(--sm-white) !important;
}

/* Submenu active (MetisMenu mm-active or manual .active class) */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active {
  background : var(--sm-pill) !important;
  color      : var(--sm-pill-ink) !important;
  font-weight: 700 !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a > i,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active > i {
  background: var(--sm-pill-ink) !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a > span,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active > span {
  color: var(--sm-pill-ink) !important;
}

/* ─── Sub-section group headers ──────────────────────────────────── */
/* These are <li style="background:#8a2be229"> non-clickable dividers */
.sm-sidebar-wrap .nav-second-level li[style*="8a2be2"] {
  background   : transparent !important;
  border-top   : 1px solid var(--sm-border) !important;
  margin-top   : 6px !important;
  padding-top  : 2px !important;
}
.sm-sidebar-wrap .nav-second-level li[style*="8a2be2"] > a {
  color          : var(--sm-teal) !important;
  font-size      : 8.5px !important;
  font-weight    : 700 !important;
  text-transform : uppercase !important;
  letter-spacing : 0.7px !important;
  padding        : 6px 8px 3px 12px !important;
  cursor         : default !important;
  pointer-events : none !important;
  background     : transparent !important;
  border-radius  : 0 !important;
}
.sm-sidebar-wrap .nav-second-level li[style*="8a2be2"] > a::before { display: none !important; }
.sm-sidebar-wrap .nav-second-level li[style*="8a2be2"] > a > i     { display: none !important; }

/* ─── Hide fixed copyright ghost item ────────────────────────────── */
.sm-sidebar-wrap #side-menu > li[style*="position: fixed"] {
  display: none !important;
}

/* ─── Topbar logo area: purple gradient to match sidebar theme ───── */
.navbar-custom a.logo.theme_bg_color {
  background-image: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
}

/* ════════════════════════════════════════════════════════════════════
   FLEX SIDEBAR — scrollable nav + sticky bottom dock
════════════════════════════════════════════════════════════════════ */

/* ─── Make the sidebar a flex column ─────────────────────────────── */
.left-side-menu.sm-sidebar-wrap {
  display        : flex        !important;
  flex-direction : column      !important;
  padding        : 0           !important;
  overflow       : hidden      !important;
}

/* ─── Logo / org-switch: fixed top strip ─────────────────────────── */
.sm-sidebar-wrap .organization-switch.user-box {
  flex-shrink: 0 !important;
}

/* ─── Scrollable nav zone ─────────────────────────────────────────── */
.sm-nav-scroll {
  flex           : 1;
  min-height     : 0;
  overflow-y     : auto;
  overflow-x     : hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(123,47,232,0.28) transparent;
}
.sm-nav-scroll::-webkit-scrollbar       { width: 5px; }
.sm-nav-scroll::-webkit-scrollbar-track { background: transparent; }
.sm-nav-scroll::-webkit-scrollbar-thumb { background: rgba(123,47,232,0.45); border-radius: 3px; }
.sm-nav-scroll::-webkit-scrollbar-thumb:hover { background: rgba(123,47,232,0.65); }

/* SlimScroll injects inline height AND width on BOTH the wrapper div AND

   the scroll-content div — cap both so CSS flex bounds always win          */
.sm-nav-scroll > .slimScrollDiv,
.sm-nav-scroll > .slimScrollDiv > .slimscroll-menu {
  height     : 100% !important;
  max-height : 100% !important;
  width      : auto !important;
}
/* ── Enlarged (icon-only) ──────────────────────────────────────────
   Keep slimScrollDiv at 50px so centered icons stay inside the
   visible sidebar column. Flyouts use position:fixed — they escape
   the container entirely and need no overflow tweak here.           */
body.enlarged .sm-nav-scroll > .slimScrollDiv {
  width : 50px !important;
  /* do NOT override overflow — leave slimscroll's overflow:hidden intact
     so its internal scroll calculations stay consistent and the layout
     restores cleanly when switching back to normal mode             */
}
/* Keep the menu list and icon rows at exactly 50px */
body.enlarged .sm-sidebar-wrap .slimscroll-menu,
body.enlarged .sm-sidebar-wrap #sidebar-menu,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu {
  width : 50px !important;
}
/* Flyout panels — size to their own widest item (position:fixed, escapes overflow) */
body.enlarged #sidebar-menu > ul > li.mm-active > ul.nav-second-level,
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level.sm-flyout-open,
body.enlarged #sidebar-menu > ul > li.sm-flyout-pinned > ul.nav-second-level {
  width : max-content !important;
}

/* ─── Sticky bottom dock ─────────────────────────────────────────── */
.sm-sidebar-dock {
  flex-shrink    : 0;
  border-top     : none;
  padding        : 5px 8px 43px; /* 43 = 31px nav_hide_logo bar + 12px breathing room */
  background     : transparent;
}

/* Dock item — mirrors top-level metismenu item */
.sm-sidebar-dock .sm-dock-item {
  display        : flex           !important;
  align-items    : center         !important;
  gap            : 8px            !important;
  padding        : 7px 9px        !important;
  border-radius  : var(--sm-radius) !important;
  color          : var(--sm-teal) !important;
  font-size      : 12px           !important;
  font-weight    : 600            !important;
  text-decoration: none           !important;
  transition     : var(--sm-trans) !important;
  white-space    : nowrap         !important;
  cursor         : pointer        !important;
}
.sm-sidebar-dock .sm-dock-item:hover {
  background     : var(--sm-hover) !important;
  color          : var(--sm-white) !important;
  text-decoration: none            !important;
}
.sm-sidebar-dock .sm-dock-item > i {
  width          : 27px           !important;
  height         : 27px           !important;
  min-width      : 27px           !important;
  border-radius  : 7px            !important;
  background     : var(--sm-ic-bg) !important;
  display        : inline-flex    !important;
  align-items    : center         !important;
  justify-content: center         !important;
  font-size      : 14px           !important;
  color          : var(--sm-accent) !important;
  flex-shrink    : 0              !important;
  transition     : var(--sm-trans) !important;
}
.sm-sidebar-dock .sm-dock-item:hover > i {
  background: var(--sm-ic-hover) !important;
  color     : var(--sm-accent)   !important;
}
.sm-sidebar-dock .sm-dock-item > span:not(.menu-arrow) {
  flex          : 1              !important;
  color         : var(--sm-teal) !important;
  transition    : color 0.12s    !important;
}
.sm-sidebar-dock .sm-dock-item:hover > span:not(.menu-arrow) {
  color: var(--sm-white) !important;
}
/* Active state (fly-up open) */
.sm-sidebar-dock .sm-dock-item.active {
  background: var(--sm-active) !important;
}
.sm-sidebar-dock .sm-dock-item.active > i {
  background: rgba(123,47,232,0.14) !important;
  color     : var(--sm-accent)       !important;
}
.sm-sidebar-dock .sm-dock-item.active > span:not(.menu-arrow) {
  color: var(--sm-white) !important;
}
.sm-sidebar-dock .sm-dock-item.active .menu-arrow::before {
  transform    : rotate(135deg) !important;
  border-color : var(--sm-accent) !important;
  color    : var(--sm-accent) !important;
}

/* ─── Dock dropdown panels — inline, opens below trigger ─────────── */
.sm-dock-flyup {
  position     : static;
  background   : rgba(255,255,255,0.10);
  border       : 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  margin       : 2px 8px 4px;
  padding      : 4px 0;
  overflow     : hidden;
}
.sm-dock-popup-link {
  display        : flex;
  align-items    : center;
  gap            : 9px;
  padding        : 7px 9px;
  border-radius  : var(--sm-radius);
  color          : var(--sm-teal);
  font-size      : 11.5px;
  font-weight    : 500;
  text-decoration: none !important;
  transition     : var(--sm-trans);
  white-space    : nowrap;
}
.sm-dock-popup-link:hover {
  background     : var(--sm-hover);
  color          : var(--sm-white) !important;
  text-decoration: none            !important;
}
.sm-dock-popup-link > i {
  font-size  : 14px;
  width      : 18px;
  text-align : center;
  color      : var(--sm-accent);
  flex-shrink: 0;
}
.sm-dock-popup-link > span { color: var(--sm-teal); }
.sm-dock-popup-link:hover > span { color: var(--sm-white); }

/* ─── Collapsed sidebar state (body.sidebar-enable) — handled in v1.5 block ── */

/* ─── enlarged / sidebar-enable: sm-sidebar-wrap always stays full-width ─
   Override the app.min.css collapsed behaviour so text labels never
   disappear — regardless of DevTools being open or viewport width.       */
body.enlarged .left-side-menu.sm-sidebar-wrap,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap {
  width    : 240px !important;
  position : fixed !important;
}
/* Keep nav spans visible */
body.enlarged .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a > span,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a > span {
  display      : inline !important;
  padding-left : 0 !important;
}
/* Keep menu-arrow visible */
body.enlarged .left-side-menu.sm-sidebar-wrap #sidebar-menu .menu-arrow,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap #sidebar-menu .menu-arrow {
  display : inline-flex !important;
}
/* Restore row layout (app.min.css centred icons) */
body.enlarged .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a {
  justify-content : flex-start !important;
  gap             : 8px        !important;
  /* padding         : 8px 10px   !important; */
  min-height      : auto       !important;
}
/* Restore icon size */
body.enlarged .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a i,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a i {
  font-size  : 14px !important;
  margin-right: 0  !important;
}
/* Keep dock text visible too */
body.enlarged .sm-sidebar-wrap .sm-sidebar-dock .sm-dock-item > span:not(.menu-arrow),
body.sidebar-enable .sm-sidebar-wrap .sm-sidebar-dock .sm-dock-item > span:not(.menu-arrow) {
  display : inline !important;
}
body.enlarged .sm-sidebar-wrap .sm-sidebar-dock .sm-dock-item,
body.sidebar-enable .sm-sidebar-wrap .sm-sidebar-dock .sm-dock-item {
  justify-content : flex-start !important;
  gap             : 8px        !important;
  padding         : 7px 9px    !important;
}
/* End SALESMATIC SIDEBAR REDESIGN */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR ENHANCEMENTS  v1.1
   ① Active-state background (.left-side-menu-dark override)
   ② nav_hide_logo gradient when sidebar is expanded
   ③ float-left.mh > a.logo.theme_bg_color → gradient + icon wrap
   ④ Responsive icon boxes in sidebar + topbar
   ⑤ Enhanced topbar title / breadcrumb text
═══════════════════════════════════════════════════════════════════ */

/* ─── ① Active-state override ─────────────────────────────────────
   Targets the app.min.css rule:
   .left-side-menu-dark .left-side-menu #sidebar-menu>ul>li>a.active
   AND the plain a.active variant that can appear alongside mm-active  */

.left-side-menu-dark .left-side-menu #sidebar-menu > ul > li > a.active,
.left-side-menu-dark .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active,
.left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active {
  background    : var(--sm-active-top) !important;
  color         : var(--sm-white)  !important;
  border-radius : var(--sm-radius) !important;
  position      : relative         !important;
}

/* Left accent bar on a.active (mirrors the mm-active rule) */
.left-side-menu-dark .left-side-menu #sidebar-menu > ul > li > a.active::before,
.left-side-menu-dark .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active::before,
.left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active::before {
  content       : '' !important;
  position      : absolute         !important;
  left          : 0                !important;
  top           : 22%              !important;
  bottom        : 22%              !important;
  width         : 3px              !important;
  background    : var(--sm-accent) !important;
  border-radius : 0 2px 2px 0      !important;
}

/* Active icon box */
.left-side-menu-dark .left-side-menu #sidebar-menu > ul > li > a.active > i,
.left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active > i {
  background : rgba(123,47,232,0.14) !important;
  color      : var(--sm-accent)       !important;
}

/* Active label text */
.left-side-menu-dark .left-side-menu #sidebar-menu > ul > li > a.active > span:not(.menu-arrow),
.left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active > span:not(.menu-arrow) {
  color: var(--sm-white) !important;
}
/* ─── ② Slimscroll inner area — keep transparent over sidebar gradient */
.sm-sidebar-wrap .slimscroll-menu.theme_bg_color {
  background-color : transparent !important;
  background-image : none        !important;
}

/* ─── ② nav_hide_logo — gradient background when sidebar is expanded ─
   app.min.css applies background-color:#343b4a!important to .navbar-custom.
   Use html body prefix (specificity boost) + literal gradient value
   (avoids CSS var resolution issues) to guarantee the gradient wins.   */

html body .navbar-custom.nav_hide_logo {
  background       : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  box-shadow       : none !important;
  border           : none !important;
}
/* Also cover the inner UL/LI which may have inherited white */
html body .navbar-custom.nav_hide_logo ul,
html body .navbar-custom.nav_hide_logo li {
  background : transparent !important;
}

/* Collapse/expand arrows inside nav_hide_logo */
.navbar-custom.nav_hide_logo .mdi-arrow-left,
.navbar-custom.nav_hide_logo .mdi-arrow-right,
.navbar-custom.nav_hide_logo a.logo i {
  color       : var(--sm-white)  !important;
  font-size   : 20px             !important;
  line-height : 31px             !important;
  transition  : color 0.15s ease !important;
}
.navbar-custom.nav_hide_logo a.logo:hover i {
  color: var(--sm-accent) !important;
}

/* ─── ③ Topbar logo link — gradient, full topbar height ───────────
   The topbar is 70px tall (light bg in dark-sidebar theme).
   The logo link was only as tall as its image (~44px), leaving a
   white strip at the bottom of the topbar. Fix: height:70px so the
   gradient covers the full topbar height on the left logo area.      */

.navbar-custom .menu-left li.float-left.mh > a.logo.theme_bg_color {
  background-image  : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-color  : transparent !important;
  display           : flex        !important;
  align-items       : center      !important;
  justify-content   : center      !important;
  height            : 70px        !important;
  /* app.min.css's base .logo{width:70px} was sized for the old square
     icon-only image — too narrow for the text wordmark, causing it to
     overflow. Match the sidebar's own width so it lines up below it. */
  width             : 240px       !important;
  border-right      : 1px solid rgba(0,0,0,0.15) !important;
  transition        : opacity 0.15s ease !important;
}
.navbar-custom .menu-left li.float-left.mh > a.logo.theme_bg_color:hover {
  opacity: 0.88 !important;
}

/* Also cover the li wrapper so no white bleeds around the link */
.navbar-custom .menu-left li.float-left.mh:first-child {
  background : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  height     : 70px !important;
  display    : flex !important;
  align-items: center !important;
  padding    : 0 !important;
}

/* ─── ③ Logo span wrappers — correct show/hide per mode ───────────
   app.min.css default: logo-sm hidden, logo-lg shown.
   Our previous rule set display:flex on BOTH which broke enlarged hide.
   Fix: hide logo-sm in normal mode; only logo-lg gets flex here.      */

/* Small icon: hidden by default — only shown in enlarged (below) */
.navbar-custom .menu-left li.float-left.mh > a.logo .logo-sm {
  display : none !important;
}

/* Full wordmark: always shown in normal/expanded mode */
.navbar-custom .menu-left li.float-left.mh > a.logo .logo-lg {
  display         : flex          !important;
  align-items     : center        !important;
  justify-content : center        !important;
  overflow        : hidden        !important;
}

/* Small icon (shown when sidebar collapsed) */
.navbar-custom .menu-left li.float-left.mh > a.logo .logo-sm img {
  max-height : 40px         !important;
  width      : auto         !important;
  max-width  : 100%         !important;
  object-fit : contain      !important;
  display    : block        !important;
  height     : auto         !important;
}

/* Full wordmark (shown when sidebar expanded) */
.navbar-custom .menu-left li.float-left.mh > a.logo .logo-lg img {
  /* max-height : 44px         !important;
  max-width  : 184px        !important; */
  width      : 100%         !important;
  height     : auto         !important;
  object-fit : contain      !important;
  display    : block        !important;
}

/* Text wordmark — replaces the blurry /images/salesmatic.png raster logo
   with a real, crisp text logotype in the sidebar's own brand font. */
.sm-logo-text {
  font-family    : 'Plus Jakarta Sans', sans-serif !important;
  font-size      : 34px !important;
  font-weight    : 800 !important;
  color          : #ffffff !important;
  letter-spacing : 0.2px !important;
  white-space    : nowrap !important;
  line-height    : 1 !important;
}
/* ─── ④ Sidebar icon boxes — responsive scale ─────────────────────  */
@media (max-width: 1280px) {
  .sm-sidebar-wrap ul.metismenu#side-menu > li > a {
    /* padding: 6px 8px !important; */
  }
  .sm-sidebar-wrap ul.metismenu#side-menu > li > a > i {
    width     : 25px  !important;
    height    : 25px  !important;
    min-width : 25px  !important;
    font-size : 13px  !important;
  }
}
@media (max-width: 767px) {
  .sm-sidebar-wrap ul.metismenu#side-menu > li > a > i {
    width     : 24px  !important;
    height    : 24px  !important;
    min-width : 24px  !important;
    font-size : 12px  !important;
  }
  .navbar-custom .menu-left li.float-left.mh > a.logo .logo-lg img {
    max-width  : 130px !important;
  }
}

/* ─── ⑤ Enhanced topbar title + breadcrumb text ───────────────────*/

.navbar-custom .menu-left li.float-left.mh.mt-2 {
  height         : 70px !important;
  display        : flex !important;
  flex-direction : column !important;
  justify-content: center !important;
  margin-top     : 0 !important;
}

.navbar-custom .menu-left li.float-left.mh h5 {
  font-size     : 14px    !important;
  font-weight   : 700     !important;
  color         : #1e0a4a !important;
  margin        : 0       !important;
  line-height   : 1.25    !important;
  letter-spacing: -0.2px  !important;
}

.navbar-custom .menu-left li.float-left.mh .pl-2[style*="font-size:12px"],
.navbar-custom .menu-left li.float-left.mh .pl-2 + .pl-2 {
  /* color         : #7c5ce8  !important; */
  font-size     : 11.5px   !important;
  font-weight   : 500      !important;
  line-height   : 1.4      !important;
  letter-spacing: 0.05px   !important;
}

/* Sidebar menu item label — subtle letter-spacing refinement */
.sm-sidebar-wrap ul.metismenu#side-menu > li > a > span:not(.menu-arrow) {
  letter-spacing: 0.7px !important;
}
.sm-sidebar-wrap .nav-second-level li > a,
.sm-sidebar-wrap .nav-second-level li > a > span {
  letter-spacing: 0.7px !important;
}

/* End SALESMATIC SIDEBAR ENHANCEMENTS v1.1 */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR FIXES  v1.2
   ① Logo-lg hidden in enlarged/collapsed mode
   ② nav_hide_logo logo link gradient (no .theme_bg_color class)
   ③ Enlarged sidebar — restore gradient background
   ④ Enlarged mode hover effects (mirror normal mode)
   ⑤ Enlarged submenu flyout — contained + scrollable inside sidebar
═══════════════════════════════════════════════════════════════════ */

/* ─── ① Enlarged/wrap mode: respect app.min.css logo-lg:none rule ── */
/* Our display:flex !important on .logo-lg overrides enlarged:none — fix that */
body.enlarged .navbar-custom .menu-left li.float-left.mh > a.logo .logo-lg {
  display : none !important;
}
body.enlarged .navbar-custom .menu-left li.float-left.mh > a.logo .logo-sm {
  display         : flex !important;
  align-items     : center !important;
  justify-content : center !important;
}
/* Shrink the logo bar itself to match the collapsed 50px sidebar rail —
   without this it stays at the expanded-mode 240px width (set below for
   the text wordmark) and sits as a wide navy header above a narrow icon
   column, an obvious mismatch. */
body.enlarged .navbar-custom .menu-left li.float-left.mh > a.logo.theme_bg_color {
  width : 50px !important;
}

/* ─── ② nav_hide_logo logo link — gradient (no .theme_bg_color) ─── */
/* <a class="logo"> has no .theme_bg_color; app.min.css sets bg:#fff.
   Use literal gradient + html body prefix so the var() can't fail.   */
html body .navbar-custom.nav_hide_logo a.logo {
  /* background  : linear-gradient(170deg, #5b35c9 0%, #43279b 45%, #2f1a75 100%) !important; */
  display     : flex !important;
  align-items : center !important;
  justify-content: center !important;
  height      : 31px !important;
  width       : 100% !important;
}
html body .navbar-custom.nav_hide_logo a.logo i {
  color     : #5b3fc4 !important;
  font-size : 20px !important;
}
html body .navbar-custom.nav_hide_logo a.logo:hover i {
  color: #ac9ee6 !important;
}

/* ─── ③ Enlarged + sidebar-enable sidebar positioning & gradient ────
   app.min.css "enlarged" changes sidebar to position:absolute relative
   to #wrapper (max-width:1300px; overflow:hidden; margin:0 auto).
   This displaces the sidebar from its viewport anchor (top:70px) and
   makes the menu block appear "after" the topbar logo area.
   Fix: force position:fixed in both collapsed modes so the sidebar
   always anchors to the viewport exactly as in normal expanded mode.  */

body.enlarged .left-side-menu.sm-sidebar-wrap {
  position         : fixed !important;
  top              : 70px !important;
  left             : 0 !important;
  width            : 50px !important;
  bottom           : 0 !important;
  background-image : var(--sm-gradient) !important;
  background-color : transparent !important;
  overflow         : hidden !important;    /* flyouts use position:fixed so they escape */
  display          : flex !important;
  flex-direction   : column !important;
}

/* ─── Icon-only mode: hide org card entirely ─────────────────────── */
body.enlarged .sm-sidebar-wrap .organization-switch.user-box {
  display: none !important;
}

/* Center icons, remove horizontal padding that overflows 50px column */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu {
  padding: 4px 4px 8px !important;
}
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a {
  justify-content: center !important;
  /* padding        : 7px 0 !important; */
  gap            : 0 !important;
}
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a > .menu-arrow {
  display: none !important;
}

/* Dock flyup panels don't fit in 50px — suppress in enlarged mode */
body.enlarged .sm-sidebar-wrap .sm-dock-flyup {
  display: none !important;
}
body.enlarged .sm-sidebar-wrap .sm-sidebar-dock {
  padding: 5px 4px 43px !important;
}

body.sidebar-enable .left-side-menu.sm-sidebar-wrap {
  position : fixed !important;
  top      : 70px !important;
  left     : 0 !important;
  bottom   : 0 !important;
  background-image : var(--sm-gradient) !important;
  background-color : transparent !important;
}

body.enlarged .sm-sidebar-wrap .slimScrollDiv,
body.enlarged .sm-sidebar-wrap .slimscroll-menu,
body.sidebar-enable .sm-sidebar-wrap .slimScrollDiv,
body.sidebar-enable .sm-sidebar-wrap .slimscroll-menu {
  background : transparent !important;
}

/* Menu list: no bottom padding needed in enlarged (profile dock hidden) */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu {
  padding-bottom : 8px !important;
}

/* ─── ④ Enlarged: keep spans hidden; icon highlight on hover ──────── */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a > span:not(.menu-arrow) {
  display: none !important;
}
/* app.min.css ships its own native "hover to widen and reveal label"
   behaviour for the icon-only sidebar: #sidebar-menu>ul>li:hover>a{
   width:calc(190px + 50px); ...}. We replaced that native flyout with
   our own JS-driven .sm-flyout-open panel, but this width rule was
   never neutralized — on hover the trigger <a> still balloons to
   240px, so its centered icon re-centers ~65px to the right, landing
   underneath our flyout panel and looking like it vanished. Pin the
   width back to the 50px column. */
body.enlarged .sm-sidebar-wrap #sidebar-menu > ul > li:hover > a,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li:hover > a,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover {
  width      : 100% !important;
  transition : none !important;
}
body.enlarged .sm-sidebar-wrap #sidebar-menu > ul > li:hover > a {
  background-color : var(--sm-hover) !important;
  color            : var(--sm-white) !important;
  border-radius    : var(--sm-radius) !important;
}
body.enlarged .sm-sidebar-wrap #sidebar-menu > ul > li:hover > a > i {
  background : rgba(123,47,232,0.16) !important;
  color      : var(--sm-white) !important;
}
/* Same hover-white fix, matched against the actual ul.metismenu#side-menu
   path (the #sidebar-menu-scoped rules above don't match every icon). */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li:hover > a,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover {
  background-color : var(--sm-hover) !important;
  color            : var(--sm-white) !important;
  border-radius    : var(--sm-radius) !important;
}

/* Sidebar Wrap Icon Hover */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li:hover > a > i,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a:hover > i {
  background : var(--sm-hover) !important;
  color      : var(--sm-white) !important;
}

/* ── Enlarged: menu icons match dock (profile) icon size ─────────────
   Normal mode: icon box is 20×22 px, font 12 px.
   Dock icon  : 27×27 px, font 14 px  — both in normal AND enlarged.
   These rules bring the sidebar menu icons up to the same size so
   they look equally prominent in icon-only mode.                    */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a {
  padding        : 5px 0 !important;   /* vertical breathing room */
  overflow       : visible !important; /* prevent icon box edges being clipped */
  margin-left: -4px;
}
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li > a > i {
  width          : 27px !important;
  height         : 27px !important;
  min-width      : 27px !important;
  font-size      : 14px !important;
}
/* ── Enlarged: collapse/expand toggle (nav_hide_logo) — shrink the
   icon itself to the same 27×27 footprint as the menu icons above,
   instead of a bare 20px glyph stretched across the full 31px strip.
   The anchor stays full-size (its own flex centering places the icon). */
body.enlarged .navbar-custom.nav_hide_logo a.logo i {
  width          : 27px !important;
  height         : 27px !important;


  min-width      : 27px !important;
  display        : inline-flex !important;
  align-items  : center !important;
  justify-content: center !important;
  font-size      : 20px !important;
  line-height    : normal !important;
}

/* The bar itself is class="navbar-custom" too, so without this it keeps
   app.min.css's default fixed left:0/right:0 (240px, via inline max-width)
   even when the sidebar collapses to 50px — causing it to spill out past
   the collapsed sidebar's edge over the main content. Clamp it in sync. */
body.enlarged .navbar-custom.nav_hide_logo {
  width     : 50px !important;
  max-width : 50px !important;
}
body.enlarged .navbar-custom.nav_hide_logo ul {
  min-width : 50px !important;
}

/* NOTE: the old plain-:hover, white-panel flyout ("⑤ Enlarged submenu
   flyout") that used to live here has been removed. It targeted the
   same `#sidebar-menu > ul > li:hover > ul` markup as the newer
   JS-driven .sm-flyout-open/.sm-flyout-pinned system below, and its
   `#sidebar-menu` ID selector out-specificity'd the newer class-based
   hover/color rules for the <a>/<i> children — so edits to those never
   visibly applied. The JS system (search "sm-flyout-open" further down)
   is the only flyout implementation now.                              */

/* End SALESMATIC SIDEBAR FIXES v1.2 */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR POLISH  v1.3
   ① Profile dock + nav_hide_logo overlap — dock sits above the arrow
   ② Sidebar width transition — 0.15s so collapse/expand feels instant
   ③ Topbar logo width transition — syncs with sidebar so gradient area
      shrinks/grows together (no logo-theme flash during toggle)
   ④ nav_hide_logo z-index lowered — profile dock sits on top of arrow
═══════════════════════════════════════════════════════════════════ */

/* ─── ① Profile dock — raised above the 31px nav_hide_logo strip ─── */
.sm-profile-dock {
  bottom  : 31px !important;  /* clear the nav_hide_logo (position:fixed;bottom:0;height:31px) */
}

/* Footer is now in-flow flex — menu needs no extra bottom padding for a dock overlay */
.sm-sidebar-wrap ul.metismenu#side-menu {
  padding-bottom : 8px !important;
}

/* In enlarged mode the dock is avatar-only (≈45px); still clear the arrow */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu {
  padding-bottom : 10px !important;
  margin-left: -5px !important;
}
body.enlarged .sm-profile-dock {
  bottom: 31px !important;
}

/* ─── ② Sidebar width transition — faster, matched to logo ─────────
   app.min.css: transition-duration:.2s — override to 0.15s           */
.left-side-menu.sm-sidebar-wrap {
  transition-duration : 0.15s !important;
}

/* ─── ③ Topbar logo area — width transition synced with sidebar ─────
   Without this: sidebar animates 0.15s but logo jumps to 50px at t=0
   (logo theme flash). Adding same-duration width transition fixes it. */
.navbar-custom .menu-left li.float-left.mh > a.logo.theme_bg_color {
  transition : width 0.15s ease, opacity 0.15s ease !important;
}
/* The li wrapper also needs to shrink in sync */
.navbar-custom .menu-left li.float-left.mh:first-child {
  transition : width 0.15s ease !important;
}

/* ─── ④ nav_hide_logo — lower z-index so profile dock sits on top ───
   .navbar-custom sets z-index:100; we drop it below dock's z-index:50 */
html body .navbar-custom.nav_hide_logo {
  z-index : 40 !important;
}

/* ─── ⑤ Main topbar — white background to match light theme ──────── */
html body .navbar-custom {
  background-color : #FFFFFF !important;
  border-bottom    : 1px solid rgba(139,92,246,0.14) !important;
  box-shadow       : 0 2px 16px rgba(123,47,232,0.08) !important;
}

/* End SALESMATIC SIDEBAR POLISH v1.3 */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR v1.4  — Continuous fixed gradient
   All left-column elements (topbar logo, sidebar, nav strip) share a
   single viewport-anchored gradient via background-attachment:fixed +
   background-size:240px 100vh.  Each element shows its own "slice"
   of that gradient so colours flow seamlessly top-to-bottom with no
   visual seam between the logo area and the sidebar body.
═══════════════════════════════════════════════════════════════════ */

/* ─── Topbar logo link ────────────────────────────────────────────── */
.navbar-custom .menu-left li.float-left.mh > a.logo.theme_bg_color {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
}

/* ─── Topbar logo LI wrapper ──────────────────────────────────────── */
.navbar-custom .menu-left li.float-left.mh:first-child {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
}

/* ─── Main sidebar ────────────────────────────────────────────────── */
.left-side-menu.sm-sidebar-wrap {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
}

/* ─── Enlarged / mobile sidebar ───────────────────────────────────── */
body.enlarged .left-side-menu.sm-sidebar-wrap,
body.sidebar-enable .left-side-menu.sm-sidebar-wrap {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
}

/* ─── nav_hide_logo strip — bottom slice of same gradient ─────────── */
html body .navbar-custom.nav_hide_logo {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
  /* box-shadow            : 3px 0 0 rgba(0,0,0,0.15) !important; */
  border                : none !important;
}
/* Fix v1.1 bug: must be transparent so parent gradient shows */
html body .navbar-custom.nav_hide_logo ul,
html body .navbar-custom.nav_hide_logo li {
  background : transparent !important;
}
/* The anchor inside also needs the fixed gradient (app.min sets bg:#fff on .logo) */
html body .navbar-custom.nav_hide_logo a.logo {
  background-image      : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  background-attachment : fixed !important;
  background-size       : 240px 100vh !important;
  background-position   : 0 0 !important;
  background-repeat     : no-repeat !important;
  background-color      : transparent !important;
  display               : flex !important;
  align-items           : center !important;
  justify-content       : center !important;
  height                : 31px !important;
  width                 : 100% !important;
}
html body .navbar-custom.nav_hide_logo a.logo i {
  color     : var(--sm-accent) !important;
  font-size : 20px !important;
}
html body .navbar-custom.nav_hide_logo a.logo:hover i {
  color: #A855F7 !important;
}

.noti-icon_img {
  height: 30px;
  transform-origin: 50% 0%;
  animation: bellRing 3s ease-in-out infinite;
}

@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  2%  { transform: rotate(16deg); }
  4%  { transform: rotate(-14deg); }
  6%  { transform: rotate(12deg); }
  8%  { transform: rotate(-10deg); }
  10% { transform: rotate(8deg); }
  12% { transform: rotate(-6deg); }
  14% { transform: rotate(4deg); }
  16% { transform: rotate(-2deg); }
  18% { transform: rotate(0deg); }
}

.noti-icon-badge-single, .noti-icon-badge-multiple,
.msg-icon-badge-single, .msg-icon-badge-multiple {
  background-color: #ff5954 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}


.comment-icon_img {
  height: 35px;
  transform-origin: 50% 50%;
}

.comment-icon_img:hover {
  animation: commentPop 2.4s ease-in-out infinite;
}

@keyframes commentPop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  8%       { transform: scale(1.18) rotate(-6deg); }
  16%      { transform: scale(0.94) rotate(4deg); }
  24%      { transform: scale(1.08) rotate(-2deg); }
  32%      { transform: scale(1) rotate(0deg); }
}

/* .new_btn_style {
    background-color: #7B2FE8 !important;
    border-radius: 10px !important;
} */

/* End SALESMATIC SIDEBAR v1.4 */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR v1.5
   Dock flyup menus — Notifications + Profile moved from sidebar menu
   into the profile dock as hover-triggered flyup panels.
═══════════════════════════════════════════════════════════════════ */

/* ─── Profile wrap (replaces sm-profile-item as the flex row) ────── */
.sm-dock-profile-wrap {
  display       : flex;
  align-items   : center;
  gap           : 9px;
  flex          : 1;
  min-width     : 0;
  position      : relative;
  cursor        : pointer;
  border-radius : var(--sm-radius);
  padding       : 4px 5px;
  margin        : -4px -5px;
  transition    : var(--sm-trans);
}
.sm-dock-profile-wrap:hover {
  background: var(--sm-hover);
}

/* ─── Notification bell wrapper ──────────────────────────────────── */
.sm-notif-wrap {
  position  : relative;
  flex-shrink: 0;
}

/* ─── Flyup panel (shared base) ──────────────────────────────────── */
.sm-dock-flyup {
  position     : absolute;
  bottom       : calc(100% + 10px);
  background   : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border       : 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding      : 6px;
  min-width    : 185px;
  display      : none;
  box-shadow   : 0 -6px 28px rgba(123,47,232,0.14), 0 0 0 1px rgba(139,92,246,0.06);
  z-index      : 300;
}
.sm-profile-flyup { left : 0; }
.sm-notif-flyup   { right: 0; }

/* Show flyup on hover of each wrap */
.sm-dock-profile-wrap:hover .sm-dock-flyup,
.sm-notif-wrap:hover        .sm-dock-flyup {
  display: block;
}

/* ─── Flyup link rows ─────────────────────────────────────────────── */
.sm-dock-flyup a {
  display        : flex;
  align-items    : center;
  gap            : 10px;
  padding        : 9px 12px;
  color          : var(--sm-teal);
  font-size      : 11.5px;
  font-weight    : 500;
  border-radius  : 7px;
  text-decoration: none;
  white-space    : nowrap;
  transition     : var(--sm-trans);
}
.sm-dock-flyup a:hover {
  background: var(--sm-hover);
  color     : var(--sm-white);
}
.sm-dock-flyup a i {
  font-size : 14px;
  color     : var(--sm-accent);
  width     : 18px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.12s;
}
.sm-dock-flyup a:hover i { color: var(--sm-accent); }
.sm-dock-flyup a span    { flex: 1; }

/* ─── Collapsed sidebar (sidebar-enable) — hide right-side dock items  */
body.sidebar-enable .sm-sidebar-wrap .sm-profile-info,
body.sidebar-enable .sm-sidebar-wrap .sm-online-dot,
body.sidebar-enable .sm-sidebar-wrap .sm-notif-wrap {
  display: none !important;
}
body.sidebar-enable .sm-sidebar-wrap .sm-profile-dock {
  justify-content: center;
  gap            : 0;
}
body.sidebar-enable .sm-sidebar-wrap .sm-dock-profile-wrap {
  flex          : 0 0 auto;
  justify-content: center;
  gap           : 0;
  padding       : 0;
  margin        : 0;
}

.new_dash_clor {
  background: #7B2FE8 !important;
}

/* End SALESMATIC SIDEBAR v1.5 */

/* ═══════════════════════════════════════════════════════════════════
   SALESMATIC SIDEBAR v1.6
   Dock flyup redesign — panels stack INSIDE the sidebar above the
   dock row using flex-direction:column. No position:absolute flyups.
   Hover reveal uses CSS :has() (Chrome 105+, FF 121+, Safari 15.4+).
═══════════════════════════════════════════════════════════════════ */

/* ─── Dock: column layout — popup stacks above avatar row ────────── */
.sm-profile-dock {
  display        : flex !important;
  flex-direction : column !important;
  align-items    : stretch !important;
  gap            : 0 !important;
  padding        : 0 !important;
}

/* ─── Popup panels (hidden by default, shown via JS click) ───────── */
.sm-dock-popup {
  padding        : 4px 8px 6px;
  border-bottom  : none;
}

/* ─── Link items inside popup — styled like sidebar menu items ────── */
.sm-dock-link {
  display        : flex;
  align-items    : center;
  gap            : 8px;
  padding        : 7px 9px;
  border-radius  : var(--sm-radius);
  color          : var(--sm-teal);
  font-size      : 12px;
  font-weight    : 500;
  text-decoration: none;
  transition     : var(--sm-trans);
  white-space    : nowrap;
  overflow       : hidden;
}
.sm-dock-link:hover {
  background     : var(--sm-hover);
  color          : var(--sm-white);
}
.sm-dock-link i {
  width          : 27px;
  height         : 27px;
  min-width      : 27px;
  border-radius  : 7px;
  background     : var(--sm-ic-bg);
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  font-size      : 13px;
  color          : var(--sm-accent);
  flex-shrink    : 0;
  transition     : var(--sm-trans);
}
.sm-dock-link:hover i {
  background     : var(--sm-ic-hover);
  color          : var(--sm-accent);
}

/* ─── Avatar row ─────────────────────────────────────────────────── */
.sm-dock-row {
  display        : flex;
  align-items    : center;
  gap            : 9px;
  padding        : 7px 9px 11px;
}

/* ─── Profile trigger (avatar + name, flex:1) ────────────────────── */
.sm-profile-trigger {
  display        : flex;
  align-items    : center;
  gap            : 9px;
  flex           : 1;
  min-width      : 0;
  cursor         : pointer;
  border-radius  : var(--sm-radius);
  padding        : 4px 5px;
  margin         : -4px -5px;
  transition     : var(--sm-trans);
}
.sm-profile-trigger:hover { background: var(--sm-hover); }

/* ─── Notification trigger wrapper ───────────────────────────────── */
.sm-notif-trigger {
  flex-shrink    : 0;
  display        : flex;
  align-items    : center;
}

/* ─── Sidebar menu bottom padding ────────────────────────────────── */
/* Footer is in-flow flex — no overlay clearance needed */
.sm-sidebar-wrap ul.metismenu#side-menu {
  padding-bottom : 8px !important;
}

/* ─── Collapsed (sidebar-enable): hide popup + profile text + bell ── */
body.sidebar-enable .sm-sidebar-wrap .sm-dock-popup,
body.sidebar-enable .sm-sidebar-wrap .sm-profile-info,
body.sidebar-enable .sm-sidebar-wrap .sm-online-dot,
body.sidebar-enable .sm-sidebar-wrap .sm-notif-trigger {
  display: none !important;
}
body.sidebar-enable .sm-sidebar-wrap .sm-dock-row {
  justify-content: center;
  gap            : 0;
  padding        : 7px 0 11px;
}
body.sidebar-enable .sm-sidebar-wrap .sm-profile-trigger {
  flex           : 0 0 auto;
  justify-content: center;
  gap            : 0;
  padding        : 4px;
  margin         : -4px;
}
/* ═══════════════════════════════════════════════════════════════
   COLLAPSED SIDEBAR FLYOUT  (body.enlarged)
   Hover shows flyout; click on the icon row pins it open;
   second click unpins.  Single-item labels use .sm-label-tip.
═══════════════════════════════════════════════════════════════ */

/* ─── Normal mode safety guard — ensure nav-second-level is NEVER
     left in a broken state by enlarged-mode CSS cleanup.
     Metismenu controls display/height during animation;
     we must not override it here — only reset extra props.       */
#sidebar-menu > ul > li.submenuclick > ul.nav-second-level:not(.sm-flyout-open) {
  position  : static !important;
  left      : auto !important;
  top       : auto !important;
  transform : none !important;
  box-shadow: none !important;
}

/* ─── Suppress inline submenu in collapsed (enlarged) mode ───── */
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level {
  display  : none !important;
  height   : 0 !important;
  overflow : hidden !important;
}

/* ─── Flyout stacking-context escape ───────────────────────────────
   .sm-sidebar-wrap inherits app.min.css's own enlarged/mobile rules
   (".enlarged .left-side-menu{position:absolute;z-index:5}" and the
   mobile ".left-side-menu{z-index:10!important}"). position+z-index
   together create a stacking context, so the flyout's own z-index:50
   below is only ever compared *inside* that context — it can never
   out-rank page elements outside it, like .navbar-custom (z-index:100),
   which is why the popup was rendering under the topbar/table header.
   Bump the wrapper's z-index only while a flyout is actually open, so
   it doesn't permanently out-rank navbar dropdowns the rest of the time. */
body.enlarged .left-side-menu.sm-sidebar-wrap:has(.sm-flyout-open),
body.sidebar-enable .left-side-menu.sm-sidebar-wrap:has(.sm-flyout-open) {
  z-index: 1055 !important;
}
/* ─── Keep the trigger icon visible above the flyout's own shadow ───
   The flyout ul is a sibling of the icon's <a> with a higher z-index
   (50 vs. the icon's default auto/0), so its background/box-shadow
   paints over the 50px icon column during hover — making the icon
   look like it disappears. Give the icon a higher local z-index while
   its flyout is open so it stays on top.                              */
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li.submenuclick:hover > a,
body.enlarged .sm-sidebar-wrap ul.metismenu#side-menu > li.submenuclick.sm-flyout-pinned > a {
  position : relative !important;
  z-index  : 51 !important;
}
/* ─── Flyout panel — hover (sm-flyout-open on ul) or pinned ──── */
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level.sm-flyout-open,
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > ul.nav-second-level {
  display       : block !important;
  position      : fixed !important;
  left          : 50px !important;
  width         : 220px !important;   /* app.min.css's native flyout rule
                                          (#sidebar-menu>ul>li:hover>ul) sets
                                          a plain, non-!important width:500px
                                          on this same markup — pin it here
                                          so that leftover rule can't win.  */
  min-width     : 220px !important;
  max-height    : calc(100vh - 90px) !important;
  overflow-y    : auto !important;
  overflow-x    : hidden !important;
  background    : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  /* Top corners are 0: the separate .sm-flyout-header bar sits directly
     above this box now and owns the top-right rounding instead.       */
  border-radius : 0 0 10px 0 !important;
  box-shadow    : 6px 0 24px rgba(0,0,0,0.40) !important;
  padding       : 0 0 10px !important;
  z-index       : 50 !important;
  transform     : none !important;
  height        : auto !important;
  opacity       : 1 !important;
  scrollbar-width : thin !important;
  scrollbar-color : rgba(123,47,232,0.28) transparent !important;
}
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level.sm-flyout-open::-webkit-scrollbar,
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > ul.nav-second-level::-webkit-scrollbar {
  width: 5px;
}
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level.sm-flyout-open::-webkit-scrollbar-thumb,
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > ul.nav-second-level::-webkit-scrollbar-thumb {
  background: rgba(123,47,232,0.45);
  border-radius: 3px;
}
body.enlarged #sidebar-menu > ul > li.submenuclick > ul.nav-second-level.sm-flyout-open::-webkit-scrollbar-thumb:hover,
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > ul.nav-second-level::-webkit-scrollbar-thumb:hover {
  background: rgba(123,47,232,0.65);
}

/* ─── Force full opacity on flyout items — block any upstream dim ─ */
html body.enlarged .nav-second-level.sm-flyout-open,
html body.enlarged .nav-second-level.sm-flyout-open li,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level li {
  opacity: 1 !important;
}

/* ─── Pinned icon: keep icon row highlighted ─────────────────── */
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > a {
  background : rgba(255,255,255,0.14) !important;
  border-left: 3px solid rgba(255,255,255,0.8) !important;
}

/* ─── Group label header ─────────────────────────────────────── */
.sm-sidebar-wrap .sm-flyout-header {
  display: none;
}
body.enlarged #sidebar-menu > ul > li.submenuclick:has(> ul.nav-second-level.sm-flyout-open) > .sm-flyout-header,
body.enlarged #sidebar-menu > ul > li.submenuclick.sm-flyout-pinned > .sm-flyout-header,
body.enlarged .sm-footer-menu > li.submenuclick:has(> .sm-footer-submenu.sm-flyout-open) > .sm-flyout-header,
body.enlarged .sm-footer-menu > li.sm-flyout-pinned > .sm-flyout-header {
  display        : block !important;
  position         : fixed !important;
  left             : 50px !important;
  width            : 220px !important;
  height           : 40px !important;
  box-sizing       : border-box !important;
  padding          : 11px 16px 0 !important;
  color          : #fff !important;
  font-weight    : 700 !important;
  font-size      : 11.5px !important;
  letter-spacing : 0.07em !important;
  text-transform : uppercase !important;
  background       : var(--navy) !important;
  background-color : var(--navy) !important;
  opacity          : 1 !important;
  margin           : 0 !important;
  border-radius    : 0 10px 0 0 !important;
  z-index          : 1056 !important;
}

/* ─── Links inside flyout — mirrors the normal-mode submenu exactly ── *
 * Same colors as .sm-sidebar-wrap .nav-second-level (dim white base,
 * pure white + accent dot on hover) since the flyout uses the same
 * gradient background. "html body.enlarged" prefix is only there for
 * specificity, to win over the normal-mode rules on the same markup.
 * :not(.sm-footer-submenu): the footer flyout ul carries this same
 * .nav-second-level class and was matching these selectors too — the
 * values happened to be identical to its own dedicated rules below, so
 * nothing looked wrong, but DevTools showed THIS block as the one
 * actually winning instead of the footer's own rule. Excluded so each
 * flyout is only ever styled by its own dedicated block.               */

/* Base state: same dim-white as the normal-mode submenu text       */
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a,
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a > span,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a > span {
  color          : var(--sm-teal) !important;
  opacity        : 1 !important;
  text-decoration: none !important;
}
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a {
  padding        : 7px 16px !important;
  display        : flex !important;
  font-size      : 12.5px !important;
  white-space    : nowrap !important;
  transition     : background 0.12s !important;
}

/* Hover — identical to the normal-mode submenu hover (var(--sm-hover)) */
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li:not([style*="background"]) > a:hover,
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li:not([style*="background"]) > a:focus,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li:not([style*="background"]) > a:hover,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li:not([style*="background"]) > a:focus {
  background : var(--sm-hover) !important;
}
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a:hover,
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a:hover > span,
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a:focus,
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a:focus > span,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a:hover,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a:hover > span,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a:focus,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a:focus > span {
  color   : var(--sm-white) !important;
  opacity : 1 !important;
}

/* Bullet dot — same dim-dot/accent-on-hover as the normal-mode submenu.
   :not(.sm-footer-submenu): the footer flyout reuses .nav-second-level
   too, but its icons are real FA glyphs, not dot indicators — without
   the exclusion this squashed them into blank 5px circles.            */
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a > i,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a > i {
  background    : var(--sm-dot-dim) !important;
  color         : transparent !important;
  width         : 5px !important;
  height        : 5px !important;
  min-width     : 5px !important;
  border-radius : 50% !important;
  display       : inline-flex !important;
  flex-shrink   : 0 !important;
}
html body.enlarged .nav-second-level.sm-flyout-open:not(.sm-footer-submenu) li > a:hover > i,
html body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level:not(.sm-footer-submenu) li > a:hover > i {
  background : var(--sm-accent) !important;
  color      : transparent !important;
}

/* ─── Section sub-header rows (dark purple-tinted li) ────────── */
body.enlarged .nav-second-level.sm-flyout-open li[style*="background"] > a,
body.enlarged li.submenuclick.sm-flyout-pinned .nav-second-level li[style*="background"] > a {
  font-weight    : 700 !important;
  font-size      : 11px !important;
  color          : #fff !important;
  letter-spacing : 0.05em !important;
  text-transform : uppercase !important;
  cursor         : default !important;
  pointer-events : none !important;
}

/* ─── Single-item label tooltip ──────────────────────────────── */
.sm-label-tip {
  position      : fixed;
  left          : 50px;   /* flush against the 50px collapsed sidebar —
                              54px left a visible gap before the pill   */
  transform     : translateY(-50%);
  background    : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color         : #fff;
  font-size     : 12px;
  font-weight   : 600;
  padding       : 5px 12px;
  border-radius : 0 7px 7px 0;
  box-shadow    : 3px 3px 12px rgba(0,0,0,0.30);
  white-space   : nowrap;
  z-index       : 1055;
  pointer-events: none;
  opacity       : 0;
  transition    : opacity 0.12s;
}
.sm-label-tip.sm-label-tip-show {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   STICKY SIDEBAR FOOTER  (.sm-sidebar-footer)
   Pinned at bottom of the flex-column sidebar; items styled to
   match the main metismenu items exactly.
═══════════════════════════════════════════════════════════════ */

.sm-sidebar-footer {
  flex-shrink : 0;
  border-top     : 1px solid rgba(255,255,255,0.18);
  width       : 100%;
  z-index     : 10;
  /* 31px clears the nav_hide_logo arrow bar + 8px breathing room */
  padding        : 10px 0 39px;
  margin-bottom: -38px;
}

.sm-footer-menu {
  list-style : none;
  margin     : 0;
  padding    : 0 8px;
}

/* ── Top-level footer link — identical rhythm to side-menu > li > a ── */
.sm-footer-menu > li > a {
  display        : flex;
  align-items    : center;
  gap            : 8px;
  padding        : 8px 7px;
  border-radius  : var(--sm-radius);
  margin-bottom  : 1px;
  color          : var(--sm-teal) !important;
  font-size      : 13px;
  font-weight    : 500;
  text-decoration: none;
  white-space    : nowrap;
  overflow       : hidden;
  transition     : var(--sm-trans);
  letter-spacing : 0.7px !important;
}
.sm-footer-menu > li > a:hover {
  background : var(--sm-hover) !important;
  color      : var(--sm-white) !important;
  text-decoration: none;
}

/* Icon — same 27×27 rounded box as main menu */
.sm-footer-menu > li > a > i {
  width: 20px;
  height: 22px;
  min-width: 20px;
  border-radius  : 7px;
  /* background     : var(--sm-ic-bg); */
  display        : inline-flex;
  align-items    : center;
  justify-content: center;
  font-size      : 18px;
  color          : var(--sm-accent) !important;
  flex-shrink    : 0;
  transition     : var(--sm-trans);
}
.sm-footer-menu > li > a:hover > i {
  /* background : var(--sm-ic-hover); */
  color      : var(--sm-accent) !important;
}

/* Label span */
.sm-footer-menu > li > a > span:not(.menu-arrow) {
  flex      : 1;
  min-width : 0;
  color     : var(--sm-teal) !important;
}
.sm-footer-menu > li > a:hover > span:not(.menu-arrow) {
  color : var(--sm-white) !important;
}

/* Arrow */
.sm-footer-menu > li > a > .menu-arrow {
  margin-left : auto;
  color       : var(--sm-teal) !important;
  font-size   : 11px;
  transition  : transform 0.2s;
}
.sm-footer-menu > li.sf-open > a > .menu-arrow {
  transform : rotate(90deg);
}

/* ── Footer submenu (accordion, same as nav-second-level) ──────── */
.sm-footer-submenu {
  list-style : none;
  padding    : 0;
  margin     : 0;
  overflow    : hidden;
  max-height  : 0;
  transition  : max-height 0.28s ease;
}
.sm-footer-submenu.sf-open {
  /* 2 items × ~41px + padding ≈ 100px; give generous cap */
  max-height  : 120px;
}
.sm-footer-submenu li > a {
  display         : flex;
  align-items     : center;
  gap             : 8px;
  position        : relative;
  overflow        : hidden;
  padding         : 8px 8px 8px 16px;
  font-size       : 12.5px;
  font-weight     : 500;
  color           : var(--sm-teal) !important;
  text-decoration : none;
  transition      : var(--sm-trans);
  border-radius: 8px;
}
.sm-footer-submenu li > a > i {
  width       : 14px;
  flex-shrink : 0;
  text-align  : center;
  font-size   : 18px;
  color       : var(--sm-teal);
}
.sm-footer-submenu li > a:hover {
  background : var(--sm-hover) !important;
  color      : var(--sm-white) !important;
}
.sm-footer-submenu li > a:hover > i {
  color : var(--sm-white);
}

/* ─── Enlarged (icon-only) — hide text/arrow, centre icon ──────── */
body.enlarged .sm-sidebar-footer {
  /* Keep 39px bottom so nav_hide_logo bar doesn't cover the icon */
  padding : 4px 0 39px;
}
body.enlarged .sm-footer-menu {
  padding : 0;
}
body.enlarged .sm-footer-menu > li > a {
  padding         : 5px 0;
  justify-content : center;
  border-radius   : 0;
  gap             : 0;
  margin-left: -10px;
}
body.enlarged .sm-footer-menu > li > a > span:not(.menu-arrow),
body.enlarged .sm-footer-menu > li > a > .menu-arrow {
  display : none !important;
}
/* Same icon-over-shadow fix as the main menu (see comment near the
   main flyout escape rule) — the footer flyout is also a higher
   z-index sibling of this icon's <a>.                              */
body.enlarged .sm-footer-menu > li.submenuclick:hover > a,
body.enlarged .sm-footer-menu > li.submenuclick.sm-flyout-pinned > a {
  position : relative !important;
  z-index  : 51 !important;
}
/* Same 27×27 box / 14px glyph as the main menu's enlarged icons — was
   32×32, visibly bigger than every icon above it. */
body.enlarged .sm-footer-menu > li > a > i {
  width     : 27px !important;
  height    : 27px !important;
  min-width : 27px !important;
  font-size : 14px !important;
}
/* ─── Reset max-height transition in enlarged (flyout uses position:fixed) */
body.enlarged .sm-footer-submenu {
  max-height  : 0 !important;
  overflow    : hidden !important;
  transition  : none !important;
}

/* ─── Footer flyout panel (enlarged mode) ─────────────────────── */
body.enlarged .sm-footer-submenu.sm-flyout-open,
body.enlarged .sm-footer-menu > li.sm-flyout-pinned > .sm-footer-submenu {
  display       : block !important;
  position      : fixed !important;
  left          : 50px !important;
  min-width     : 220px !important;
  max-height    : calc(100vh - 90px) !important;
  overflow-y    : auto !important;
  background    : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%) !important;
  border-radius : 0 0 10px 0 !important;
  box-shadow    : 6px 0 24px rgba(0,0,0,0.40) !important;
  z-index       : 1055 !important;
}

html body.enlarged .sm-footer-submenu.sm-flyout-open,
html body.enlarged .sm-footer-submenu.sm-flyout-open li,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li {
  opacity: 1 !important;
}

/* Same colors as the main-menu flyout / normal-mode submenu: dim white
   at rest, pure white + light hover background on :hover.            */
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a,
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a > span,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a > span {
  color          : var(--sm-teal) !important;
  opacity        : 1 !important;
  text-decoration: none !important;
}
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a:hover,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a:hover,
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a:hover > span,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a:hover > span {
  background : var(--sm-hover) !important;
  color      : var(--sm-white) !important;
}
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a > i,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a > i {
  color : var(--sm-dot-dim) !important;
}
html body.enlarged .sm-footer-submenu.sm-flyout-open li > a:hover > i,
html body.enlarged li.sm-flyout-pinned > .sm-footer-submenu li > a:hover > i {
  color : var(--sm-accent) !important;
}


/* ═══════════════════════════════════════════════════════════════
   DISTOMATIC LOCAL ADJUSTMENTS
   The source build hides .nav_hide_logo (the 31px collapse-arrow
   strip at the bottom of the sidebar) and reserves space for it in
   .sm-sidebar-dock's padding. Distomatic keeps that strip visible
   and has no dock, so something above it must reserve the clearance
   — otherwise the last menu item sits behind the arrow bar.

   The .sm-order-foot that used to be the bottom-most block and carry
   this clearance is gone - its controls moved into the header kebab -
   so the scroll area now carries it in both states.
═══════════════════════════════════════════════════════════════ */
.sm-sidebar-wrap .sm-nav-scroll {
  padding-bottom : 36px !important;
}

/* The collapse-arrow strip sits above the sidebar's own gradient. */
html body .navbar-custom.nav_hide_logo {
  z-index : 1001 !important;
}

/* Distomatic's dashboard.gif banner lives in the topbar menu-left list;
   keep it clear of the gradient logo block. */
.navbar-custom .menu-left > img {
  margin-left : 12px !important;
}


/* ===============================================================
   SIDEBAR MENU ORDERING  (sm-order-*)
   The "Rearrange menu" control plus the drag states it puts on the
   metismenu rows. Paired with /sidebar_order.js.
   =============================================================== */

/* --- the kebab in the org-card header ---------------------------
   These three controls used to sit in a bar pinned under the last menu
   item: permanent vertical space for something used once in a while,
   and on a short window a strip sitting on top of the last row. Behind
   a kebab they cost nothing until opened - the same move, and the same
   control, as the report sidebar (custom_css/report_sub_menu.css).

   Absolutely positioned rather than a flex sibling, so the org logo
   stays optically centred in the card instead of being pushed left by
   a 26px button. */
.sm-sidebar-wrap .sm-org-card { position: relative; }

.sm-sidebar-wrap .sm-menu {
  position : absolute;
  right    : 6px;
  top      : 50%;
  transform: translateY(-50%);
  z-index  : 12;
  /* The org card is pointer-events:none (it is a brand plate, not a
     control, and the base theme made the whole thing clickable). That
     would inherit straight down onto the button, so take it back here -
     a child declaring auto wins for itself. */
  pointer-events : auto;
}

.sm-sidebar-wrap .sm-menu-btn {
  width          : 26px;
  height         : 26px;
  display        : flex;
  align-items    : center;
  justify-content: center;
  padding        : 0;
  background     : transparent;
  border         : 1px solid transparent;
  border-radius  : var(--sm-radius);
  color          : var(--sm-dim);
  cursor         : pointer;
  transition     : var(--sm-trans);
}
.sm-menu-ic { width: 15px; height: 15px; display: block; }

.sm-sidebar-wrap .sm-menu-btn:hover {
  background   : var(--sm-hover);
  border-color : var(--sm-border);
  color        : var(--sm-white);
}
.sm-sidebar-wrap .sm-menu-btn.is-open {
  background   : var(--sm-active);
  border-color : var(--sm-accent);
  color        : var(--sm-white);
}
.sm-sidebar-wrap .sm-menu-btn:focus-visible {
  outline      : none;
  border-color : var(--sm-accent);
  box-shadow   : 0 0 0 2px rgba(212, 170, 255, 0.35);
}

/* Opens below the button and hugs the sidebar's right edge. Wider than
   the 26px button but narrower than the sidebar, so it never spills over
   the page content.

   A WHITE surface, not another panel in the sidebar's purple: a popup
   painted in the same colour as the thing behind it has only its shadow
   to separate the two, and over a dark sidebar that shadow does nothing.
   It is also what the report sidebar's kebab already does, so the two
   menus read as one control rather than two. That means the palette
   inside here is the LIGHT one - the --sm-* tokens are all tuned for
   white-on-purple and would be invisible. */
.sm-sidebar-wrap .sm-menu-pop {
  position     : absolute;
  top          : calc(100% + 6px);
  right        : 0;
  z-index      : 1040;
  min-width    : 206px;
  padding      : 5px;
  background   : #ffffff;
  border       : 1px solid #e4e7f2;
  border-radius: 10px;
  box-shadow   : 0 14px 34px rgba(16, 10, 45, 0.30),
                 0 2px 6px rgba(16, 10, 45, 0.14);
  display      : flex;
  flex-direction: column;
  gap          : 2px;
}
.sm-sidebar-wrap .sm-menu-pop[hidden] { display: none; }

.sm-sidebar-wrap .sm-menu-item {
  display        : flex;
  align-items    : center;
  gap            : 9px;
  width          : 100%;
  background     : transparent;
  border         : 0;
  border-radius  : var(--sm-radius);
  color          : #3d4259;
  font-family    : 'Plus Jakarta Sans', sans-serif;
  font-size      : 11.5px;
  font-weight    : 600;
  letter-spacing : 0.2px;
  line-height    : 1.2;
  text-align     : left;
  padding        : 8px 9px;
  cursor         : pointer;
  transition     : var(--sm-trans);
}
.sm-sidebar-wrap .sm-menu-item:hover {
  background : #f3eeff;
  color      : var(--navy, #2d1b69);
}
.sm-sidebar-wrap .sm-menu-item[hidden] { display: none; }
/* Reorder mode is on: the row that turned it on says so, and says how to
   turn it off (its label becomes "Done rearranging"). */
.sm-sidebar-wrap .sm-menu-item[aria-pressed="true"] {
  background : linear-gradient(120deg, var(--navy, #2d1b69), var(--navy-deep, #1e1050));
  color      : #ffffff;
}
.sm-sidebar-wrap .sm-menu-item[aria-pressed="true"] .sm-order-ic {
  color : #d4aaff;
}
.sm-sidebar-wrap .sm-menu-item:focus-visible {
  outline    : none;
  box-shadow : 0 0 0 2px #ffffff, 0 0 0 4px rgba(123, 47, 232, 0.55);
}

/* The gesture has no button of its own, so the menu is where it gets
   mentioned - otherwise nothing on screen says it exists. */
.sm-sidebar-wrap .sm-menu-hint {
  color       : #868ca3;
  font-family : 'Plus Jakarta Sans', sans-serif;
  font-size   : 10px;
  line-height : 1.4;
  padding     : 7px 9px 4px;
  margin-top  : 3px;
  border-top  : 1px solid #ecedf4;
}

/* Inline SVG, not an icon font — sized in px, coloured via currentColor.
   The outlines are filled (lifted from tabler-icons.ttf), so no stroke.
   On the white menu the sidebar's pale --sm-accent would wash out, so the
   icons take the brand purple at full strength instead. */
.sm-sidebar-wrap .sm-order-ic {
  width       : 14px;
  height      : 14px;
  flex-shrink : 0;
  color       : #7b2fe8;
  fill        : currentColor;
  display     : block;
}

/* Reports on an in-place rearrange, which happens with the kebab closed,
   so it sits under the org card rather than inside the popup. */
.sm-sidebar-wrap .sm-order-status {
  flex-shrink : 0;
  color       : var(--sm-accent);
  background  : rgba(212, 170, 255, 0.12);
  border-radius: var(--sm-radius);
  font-family : 'Plus Jakarta Sans', sans-serif;
  font-size   : 10px;
  line-height : 1.45;
  margin      : 6px 8px 0;
  padding     : 5px 8px;
}
.sm-sidebar-wrap .sm-order-status:empty { display: none; }

/* --- rows while rearranging --- */
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li {
  position   : relative;
  cursor     : grab;
  border-radius: var(--sm-radius);
  outline-offset: -2px;
}
/* The row you are moving. Uses :focus (not :focus-visible) so a row picked
   up by click reads the same as one reached by keyboard, and sits in the
   accent purple rather than the white-tinted hover - the two were close
   enough before that you could not tell which row was actually selected. */
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li:focus {
  outline    : none;
  background : rgba(212, 170, 255, 0.22) !important;
  box-shadow : 0 2px 12px rgba(0, 0, 0, 0.22);
  z-index    : 3;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li:focus::before {
  content      : '';
  position     : absolute;
  left         : 0;
  top          : 6px;
  bottom       : 6px;
  width        : 3px;
  background   : var(--sm-accent);
  border-radius: 0 2px 2px 0;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li:focus > a > span:not(.menu-arrow) {
  color       : var(--sm-white) !important;
  font-weight : 600 !important;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li:focus .sm-order-grip {
  color : var(--sm-accent);
}

/* Pull the other rows back while one is held, so the moving row leads the
   eye. :has() is unsupported on older engines - there it simply does not
   dim, which costs nothing. */
.sm-sidebar-wrap ul#side-menu.sm-reorder-on:has(> li:focus) > li:not(:focus) {
  opacity : 0.55;
}

/* After an Alt + Arrow the row has jumped position; flash it so the eye
   follows it to the new slot instead of hunting for it. */
@keyframes smOrderLanded {
  0%   { background: rgba(212, 170, 255, 0.55); }
  100% { background: rgba(212, 170, 255, 0.22); }
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li.sm-order-moved {
  animation : smOrderLanded 0.45s ease-out;
}

/* Reduced-motion users get the colour, not the animation. */
@media (prefers-reduced-motion: reduce) {
  .sm-sidebar-wrap ul#side-menu.sm-reorder-on > li.sm-order-moved { animation: none; }
}
/* Submenus would make the rows jump around mid-drag — collapse them
   visually for the duration, without touching MetisMenu's own state. */
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li > ul.nav-second-level {
  display : none !important;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li > a {
  pointer-events : none;     /* the whole row is the drag target */
  padding-left   : 22px !important;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li > a .menu-arrow {
  visibility : hidden;
}

.sm-sidebar-wrap .sm-order-grip {
  position    : absolute;
  left        : 2px;
  top         : 50%;
  transform   : translateY(-50%);
  display     : inline-flex;
  align-items : center;
  color       : var(--sm-dim);
  pointer-events: none;
  z-index     : 2;
}
.sm-sidebar-wrap .sm-order-grip-ic {
  width  : 14px;
  height : 14px;
  fill   : currentColor;
  display: block;
}

.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li.sm-order-dragging {
  opacity : 0.45;
  cursor  : grabbing;
}
.sm-sidebar-wrap ul#side-menu.sm-reorder-on > li:not(.sm-order-dragging):not(:focus):hover {
  background : rgba(255, 255, 255, 0.08);
}

/* --- long press to rearrange (/sidebar_order.js) ---
   Held row follows the pointer. The grabbing cursor is set on <body> and
   not on the row, because with pointer capture the pointer spends most of
   the drag over other rows - or off the sidebar entirely. Selection is off
   for the duration so a drag across labels does not paint a text selection
   behind it. */
body.sm-lp-dragging,
body.sm-lp-dragging * {
  cursor      : grabbing !important;
  user-select : none !important;
  -webkit-user-select: none !important;
}

/* A long press ends by leaving reorder mode, which drops .sm-reorder-on and
   with it the scoped landing flash above. Repeat it unscoped so the row the
   user just dropped still flashes where it landed. */
.sm-sidebar-wrap ul#side-menu > li.sm-order-moved {
  animation : smOrderLanded 0.45s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .sm-sidebar-wrap ul#side-menu > li.sm-order-moved { animation: none; }
}

/* --- collapsed (icon-only) sidebar has no room for any of this ---
   The org card shrinks to a ~36px logo pill there, which the kebab would
   sit on top of, and the status line has no width to read in. Alt + M
   still opens the window, which is why it is on the shortcut list. */
body.enlarged .sm-sidebar-wrap .sm-menu,
body.enlarged .sm-sidebar-wrap .sm-order-status {
  display : none !important;
}


/* ===============================================================
   FULL SCREEN MODE  (topbar .sm-fs-item)
   Paired with /fullscreen_mode.js, which puts .sm-fs-on on <body>
   while fullscreen is actually active.
   =============================================================== */

.navbar-custom .topnav-menu > li.sm-fs-item {
  float       : left;
  display     : flex;
  align-items : center;
  gap         : 6px;
  height      : 70px;
  padding     : 0 6px 0 10px;
}

.sm-fs-item .sm-fs-nav,
.sm-fs-item .sm-kbd-btn,
.sm-fs-item .sm-fs-toggle {
  position        : relative;
  display         : inline-flex;
  align-items     : center;
  justify-content : center;
  width           : 34px;
  height          : 34px;
  padding         : 0;
  font-size       : 19px;          /* the SVGs are sized in em */
  border          : 1px solid rgba(45, 27, 105, 0.16);
  border-radius   : 9px;
  background      : rgba(45, 27, 105, 0.04);
  color           : #2d1b69;
  cursor          : pointer;
  transition      : var(--sm-trans);
  -webkit-appearance: none;
          appearance: none;
}

.sm-fs-item .sm-fs-nav:hover,
.sm-fs-item .sm-kbd-btn:hover,
.sm-fs-item .sm-fs-toggle:hover {
  background   : rgba(45, 27, 105, 0.10);
  border-color : rgba(45, 27, 105, 0.30);
  color        : #1e1050;
}
.sm-fs-item .sm-fs-nav:active,
.sm-fs-item .sm-kbd-btn:active,
.sm-fs-item .sm-fs-toggle:active { transform: translateY(1px); }

.sm-fs-item .sm-fs-nav:focus-visible,
.sm-fs-item .sm-kbd-btn:focus-visible,
.sm-fs-item .sm-fs-toggle:focus-visible {
  outline        : 2px solid var(--sm-accent);
  outline-offset : 2px;
}

/* Active (fullscreen on) — mirrors the sidebar's purple */
.sm-fs-item .sm-fs-toggle[aria-pressed="true"] {
  background   : linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-color : var(--navy-deep);
  color        : #fff;
}

/* Back / Forward exist only while the browser's own chrome is hidden. */
.sm-fs-item .sm-fs-nav { display: none; }
body.sm-fs-on .sm-fs-item .sm-fs-nav { display: inline-flex; }

/* Nothing on that side of history (fullscreen_mode.js works out which).
   Dimmed and left in place rather than hidden: a pair that comes and
   goes would shift the other buttons sideways on every navigation, and
   the tooltip on a visible-but-dead button can say why it is dead. */
.sm-fs-item .sm-fs-nav:disabled {
  opacity : 0.34;
  cursor  : default;
}
/* The hover lift and the press nudge are what make a button look live,
   so both are taken back off - but hover itself is left working, since
   that is what shows the tooltip explaining the greyed-out state.
   (pointer-events:none here would silence that tooltip too.) */
.sm-fs-item .sm-fs-nav:disabled:hover {
  background   : rgba(45, 27, 105, 0.04);
  border-color : rgba(45, 27, 105, 0.16);
  color        : #2d1b69;
}
.sm-fs-item .sm-fs-nav:disabled:active { transform: none; }

/* --- tooltips (data-tip), below the button so they can't clip the topbar --- */
.sm-fs-item [data-tip]::after {
  content        : attr(data-tip);
  position       : absolute;
  top            : calc(100% + 7px);
  left           : 50%;
  transform      : translateX(-50%);
  background     : var(--navy-deep);
  color          : #fff;
  font-family    : 'Plus Jakarta Sans', sans-serif;
  font-size      : 11px;
  font-weight    : 600;
  letter-spacing : 0.2px;
  line-height    : 1;
  white-space    : nowrap;
  padding        : 6px 8px;
  border-radius  : 6px;
  box-shadow     : 0 4px 14px rgba(30, 16, 80, 0.28);
  opacity        : 0;
  visibility     : hidden;
  pointer-events : none;
  transition     : opacity 0.12s ease;
  z-index        : 1002;
}
.sm-fs-item [data-tip]:hover::after,
.sm-fs-item [data-tip]:focus-visible::after {
  opacity    : 1;
  visibility : visible;
}

/* On a narrow screen the topbar is already tight — drop the tooltips. */
@media (max-width: 767px) {
  .navbar-custom .topnav-menu > li.sm-fs-item { padding: 0 2px 0 4px; gap: 4px; }
  .sm-fs-item [data-tip]::after { display: none; }
}


/* ===============================================================
   LONG MENU LABELS
   At 240px a submenu label gets ~169px of text width, and several
   labels need more than that ("Receipt Mismatch Approval",
   "Company <outlet_label> Price Groups", ...). The base redesign
   clipped them with text-overflow:ellipsis, which hides the end of
   the word with no way to read it.

   Labels here are EJS-driven - outlet_label and the chiller display
   name are per-company settings - so no amount of shortening the
   text fixes this for every tenant. Two changes, in order:

     1. reclaim the padding the dot indicator does not need
        (28px left padding for a 5px dot + 8px gap), worth ~10px
     2. let anything still too long WRAP instead of being clipped,
        so a label is never unreadable whatever a company calls it
   =============================================================== */

/* 1. tighter indent - the dot still reads as an indent at 18px */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a {
  padding-left : 18px !important;
}

/* 2. wrap rather than clip.
   Scoped away from the collapsed-mode flyouts: those are sized with
   width:max-content, so they already show the full label on one line
   and must keep white-space:nowrap to measure themselves correctly. */
body:not(.enlarged) .sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a,
body:not(.enlarged) .sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a > span {
  white-space   : normal !important;
  overflow      : visible !important;
  text-overflow : clip !important;
  overflow-wrap : anywhere;
  line-height   : 1.35 !important;
}

/* Keep the dot aligned to the first line of a wrapped label rather
   than floating to the vertical centre of a two-line row. */
body:not(.enlarged) .sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a {
  align-items : flex-start !important;
}
body:not(.enlarged) .sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a > i {
  align-self : flex-start !important;
  margin-top : 6px !important;
}


/* ===============================================================
   ACTIVE-STATE COLOUR, continued
   Hover must not flatten the selected pill back to the generic
   white overlay, and the base theme's own active colours
   (app.min.css: #b528e4 top level, #ba86ebc7 submenu) are
   outranked here so the whole active chain reads as one theme.
   =============================================================== */
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a:hover,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active:hover {
  background : var(--sm-pill) !important;
  color      : var(--sm-pill-ink) !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a:hover > span,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active:hover > span {
  color : var(--sm-pill-ink) !important;
}
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li.mm-active > a:hover > i,
.sm-sidebar-wrap .nav-second-level:not(.sm-footer-submenu) li > a.active:hover > i {
  background : var(--sm-pill-ink) !important;
}

/* Out-rank app.min.css's .left-side-menu-dark active colours. */
.left-side-menu-dark .left-side-menu.sm-sidebar-wrap .nav-second-level li > a.active,
.left-side-menu-dark .left-side-menu.sm-sidebar-wrap .nav-third-level  li > a.active {
  background-color : var(--sm-pill) !important;
  color            : var(--sm-pill-ink) !important;
}
.left-side-menu-dark .left-side-menu.sm-sidebar-wrap #sidebar-menu > ul > li > a.active {
  background-color   : var(--sm-active-top) !important;
  color              : var(--sm-white) !important;
  border-right-color : transparent !important;
}
