.highlighted {
  background-color: #ffd700 !important;
}

.brand-link2 .brand-image2 {
  float: left;
  line-height: 1;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  margin-top: -3px;
  max-height: 70px;
  width: auto;
}

/* ═══════════ GLASSMORPHISM NAV ═══════════ */

/* Pin the nav via sticky so it stays visible on scroll WITHOUT overlapping
   page content. Legacy assets/js/main.js adds Bootstrap's `.fixed-top`
   (position:fixed) on scroll>50px, which slid page content UNDER the bar
   (e.g. the Settings "Company (super-admin)" selector at the top). Neutralise
   that fixed positioning — the sticky header already handles pinning and
   reserves its own space in flow, so nothing hides beneath it. */
.header {
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar.fixed-top {
  position: static !important;
}
/* style.css sets `.main { margin-top: -7rem }` — a leftover template hack that
   pulled page content up UNDER the navbar (hero pages hid it; the Settings
   selector got clipped). Neutralise it so content sits below the sticky header. */
.main {
  margin-top: 0 !important;
}

/* Base navbar: dark glass */
.navbar {
  background: rgba(5,38,78,0.92) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Scrolled state: slightly more opaque */
.navbar.fixed-top {
  background: rgba(5,38,78,0.96) !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.25) !important;
}

/* Logo on dark bg */
.navbar-brand img {
  max-height: 36px;
  width: auto;
  background: #fff;
  padding: 5px 12px;
  border-radius: 10px;
}

/* Nav links: white */
.navbar .nav-item .nav-link,
.navbar.fixed-top .nav-item .nav-link {
  color: rgba(255,255,255,0.8) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
  padding: 10px 0 !important;
  margin-right: 18px !important;
  transition: color 0.2s !important;
}
.navbar .nav-item .nav-link:hover,
.navbar .nav-item:hover .nav-link,
.navbar .nav-item .nav-link.active,
.navbar.fixed-top .nav-item .nav-link.active,
.navbar.fixed-top .nav-item:hover .nav-link {
  color: #fff !important;
}

/* Active dot under nav link */
.navbar .nav-item:hover .nav-link::after,
.navbar .nav-item .nav-link.active::after {
  /* Override the dropdown caret only for non-dropdown items */
}

/* Nav icons */
.navbar .nav-item .nav-link .nav-icon {
  margin-right: 5px;
  font-size: 13px;
  opacity: 0.7;
}
.navbar .nav-item:hover .nav-link .nav-icon {
  opacity: 1;
}

/* Dropdown caret */
.dropdown-toggle::after {
  opacity: 0.5;
  font-size: 11px !important;
  transition: opacity 0.2s;
}
.nav-item:hover .dropdown-toggle::after {
  opacity: 0.9;
}

/* Dropdown menus: glass white */
@media all and (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    padding: 8px !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.08) !important;
    min-width: 220px;
  }

  .navbar .nav-item .dropdown-menu li {
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
  }
  .navbar .nav-item .dropdown-menu li:last-child {
    border-bottom: none !important;
  }

  .navbar .nav-item .dropdown-menu .dropdown-item {
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
    transition: all 0.2s !important;
  }
  .navbar .nav-item .dropdown-menu .dropdown-item:hover {
    background: #f0f4ff !important;
    color: #3C65F5 !important;
    padding-left: 14px !important;
  }
  .navbar .nav-item .dropdown-menu .dropdown-item::before {
    display: none !important;
  }
  .navbar .nav-item .dropdown-menu .dropdown-item .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #f0f4ff;
    color: #3C65F5 !important;
    font-size: 12px;
    margin-right: 10px;
    transition: all 0.2s;
  }
  .navbar .nav-item .dropdown-menu .dropdown-item:hover .nav-icon {
    background: #3C65F5;
    color: #fff !important;
  }
}

/* Right buttons: glass style */
.header-nav-right {
  gap: 8px !important;
}
.header-nav-right .theme-btn,
.header-nav-right .theme-btn2 {
  background: rgba(255,255,255,0.12) !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: none !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  transition: all 0.2s !important;
}
.header-nav-right .theme-btn:hover,
.header-nav-right .theme-btn2:hover {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.header-nav-right .theme-btn::before,
.header-nav-right .theme-btn2::before {
  display: none !important;
}

/* Mobile toggler */
.navbar-toggler-btn-icon {
  color: rgba(255,255,255,0.8) !important;
}
.navbar-toggler-btn-icon i {
  color: rgba(255,255,255,0.8) !important;
}

/* Mobile menu: dark glass */
@media all and (max-width: 991px) {
  .navbar {
    background: rgba(5,38,78,0.97) !important;
  }
  .navbar-collapse {
    background: rgba(5,38,78,0.98) !important;
    border-radius: 0 0 14px 14px;
    max-height: 70vh !important;
    padding: 8px 16px !important;
  }
  .navbar .nav-item .nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-size: 14px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .navbar .nav-item .nav-link:hover {
    color: #fff !important;
  }
  .navbar .dropdown-menu {
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 4px 0 !important;
  }
  .navbar .dropdown-menu .dropdown-item {
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px !important;
    padding: 8px 16px !important;
  }
  .navbar .dropdown-menu .dropdown-item:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08) !important;
  }
  .navbar .dropdown-menu .dropdown-item .nav-icon {
    color: rgba(255,255,255,0.5) !important;
    margin-right: 8px;
  }
  .dropdown-toggle::after {
    color: rgba(255,255,255,0.4) !important;
  }
}

/* React app sidebar override.
   This file is loaded before the Vite bundle, so important rules keep the
   clean monochrome sidebar visible even when dev still serves an older bundle. */
:root {
  --atto-sidebar-width: 272px !important;
  --atto-sidebar-collapsed-width: 64px !important;
  --atto-sidebar-bg: #f7f7f7 !important;
  --atto-sidebar-line: #e7e7e7 !important;
  --atto-sidebar-text: #3f3f46 !important;
  --atto-sidebar-muted: #8a8a8f !important;
  --atto-sidebar-active: #111111 !important;
  --atto-main-bg: #ffffff !important;
}

.app-main {
  background: #ffffff !important;
}

.app-main__container {
  max-width: none !important;
  width: 100% !important;
  padding: 20px 22px 34px !important;
}

.app-sidebar {
  color: #30415f !important;
  background: linear-gradient(180deg, #f8faff 0%, #f4f7fc 100%) !important;
  border-right: 1px solid #e3eaf7 !important;
  box-shadow: none !important;
}

.app-sidebar__header {
  min-height: 72px !important;
  padding: 16px 14px 14px !important;
  border-bottom: 1px solid #e7edf8 !important;
}

.app-sidebar__brand {
  justify-content: center !important;
  min-width: 136px !important;
  height: 40px !important;
  padding: 6px 12px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid #dfe7f5 !important;
  color: #171717 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 10px 24px rgba(31, 65, 124, 0.05) !important;
}

.app-sidebar__brand:hover {
  background: #f8fbff !important;
}

.app-sidebar__brand img {
  max-width: 116px !important;
  max-height: 26px !important;
}

.app-sidebar__collapse {
  width: 28px !important;
  height: 28px !important;
  border: 1px solid #d7e1f3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #6a7ea5 !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.app-sidebar__collapse:hover {
  background: #f5f8ff !important;
  border-color: #c7d6f3 !important;
  color: #14376f !important;
}

.app-sidebar__nav {
  padding: 14px 12px 10px !important;
  scrollbar-color: #cad7ef transparent !important;
}

.app-sidebar__group {
  padding: 0 !important;
  margin-bottom: 12px !important;
  border-bottom: 0 !important;
}

.app-sidebar__group-toggle,
.app-sidebar__item,
.app-sidebar__direct,
.app-sidebar__utility,
.app-sidebar__logout {
  min-height: 36px !important;
  padding: 8px 10px !important;
  gap: 9px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #30415f !important;
  font-size: 13px !important;
  font-weight: 450 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.app-sidebar__group-toggle {
  min-height: 38px !important;
  background: rgba(255, 255, 255, 0.74) !important;
  border-color: #e5ebf6 !important;
  color: #23395f !important;
  font-weight: 600 !important;
}

.app-sidebar__group-toggle i,
.app-sidebar__item i,
.app-sidebar__direct i,
.app-sidebar__utility i,
.app-sidebar__logout i {
  width: 16px !important;
  color: #7a8fb8 !important;
  font-size: 13px !important;
}

.app-sidebar__group-toggle:hover,
.app-sidebar__item:hover,
.app-sidebar__direct:hover,
.app-sidebar__utility:hover,
.app-sidebar__logout:hover {
  background: #f5f8ff !important;
  color: #14376f !important;
  border-color: #d7e3fb !important;
}

.app-sidebar__group--open > .app-sidebar__group-toggle {
  background: #eef4ff !important;
  color: #14376f !important;
  border-color: #d7e3fb !important;
}

.app-sidebar__items {
  gap: 4px !important;
  padding: 8px 0 0 8px !important;
}

.app-sidebar__item--active,
.app-sidebar__direct--active {
  background: linear-gradient(135deg, #edf3ff 0%, #f8fbff 100%) !important;
  color: #14376f !important;
  border-color: #d7e3fb !important;
  box-shadow: 0 8px 18px rgba(60, 101, 245, 0.08) !important;
  font-weight: 600 !important;
}

.app-sidebar__item--active i,
.app-sidebar__direct--active i {
  color: #315efb !important;
}

.app-sidebar__footer {
  padding: 12px !important;
  border-top: 1px solid #e7edf8 !important;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.72) 0%, rgba(244, 247, 252, 0.95) 100%) !important;
}

.app-sidebar__utility {
  margin-bottom: 8px !important;
  background: #ffffff !important;
  border-color: #dfe7f5 !important;
  box-shadow: 0 8px 18px rgba(15, 50, 88, 0.05) !important;
}

@media (min-width: 992px) {
  .app-sidebar--collapsed .app-sidebar__header {
    min-height: 72px !important;
    padding: 14px 8px !important;
  }

  .app-sidebar--collapsed .app-sidebar__brand {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: #ffffff !important;
  }

  .app-sidebar--collapsed .app-sidebar__collapse {
    top: 18px !important;
    right: -14px !important;
    width: 26px !important;
    height: 26px !important;
  }
}

@media (max-width: 991.98px) {
  .app-mobilebar {
    min-height: 56px !important;
    padding: 9px 14px !important;
    background: rgba(247, 247, 247, 0.96) !important;
    border-bottom: 1px solid #e7e7e7 !important;
    box-shadow: none !important;
  }

  .app-mobilebar__toggle,
  .app-mobilebar__logout,
  .app-sidebar__close {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #303036 !important;
    border: 1px solid #dddddd !important;
  }

  .app-sidebar {
    width: min(300px, calc(100vw - 28px)) !important;
  }
}

.app-sidebar__utility {
  box-shadow: 0 8px 18px rgba(15, 50, 88, 0.05) !important;
}

.app-sidebar__utility:hover {
  background: #f5f8ff !important;
}

html.theme-dark,
html[data-theme='dark'] {
  --atto-sidebar-bg: #171717 !important;
  --atto-sidebar-line: #2f2f2f !important;
  --atto-sidebar-text: #d4d4d4 !important;
  --atto-sidebar-muted: #a3a3a3 !important;
  --atto-sidebar-active: #f5f5f5 !important;
  --atto-main-bg: #171717 !important;
}

html.theme-dark .app-main,
html[data-theme='dark'] .app-main {
  background: #171717 !important;
  color: #f5f5f5 !important;
}

html.theme-dark .app-sidebar,
html[data-theme='dark'] .app-sidebar {
  background: #171717 !important;
  border-right-color: #2f2f2f !important;
  color: #d4d4d4 !important;
}

html.theme-dark .app-sidebar__header,
html[data-theme='dark'] .app-sidebar__header,
html.theme-dark .app-sidebar__footer,
html[data-theme='dark'] .app-sidebar__footer {
  background: #171717 !important;
  border-color: #2f2f2f !important;
}

html.theme-dark .app-sidebar__brand,
html[data-theme='dark'] .app-sidebar__brand {
  background: #f5f5f5 !important;
  border-color: #3a3a3a !important;
  color: #171717 !important;
  box-shadow: none !important;
}

html.theme-dark .app-sidebar__brand:hover,
html[data-theme='dark'] .app-sidebar__brand:hover {
  background: #ffffff !important;
}

html.theme-dark .app-sidebar__collapse,
html[data-theme='dark'] .app-sidebar__collapse,
html.theme-dark .app-sidebar__group-toggle,
html[data-theme='dark'] .app-sidebar__group-toggle,
html.theme-dark .app-sidebar__utility,
html[data-theme='dark'] .app-sidebar__utility,
html.theme-dark .app-sidebar__theme-toggle,
html[data-theme='dark'] .app-sidebar__theme-toggle {
  background: #202020 !important;
  border-color: #343434 !important;
  color: #e5e5e5 !important;
  box-shadow: none !important;
}

html.theme-dark .app-sidebar__group-toggle i,
html[data-theme='dark'] .app-sidebar__group-toggle i,
html.theme-dark .app-sidebar__item i,
html[data-theme='dark'] .app-sidebar__item i,
html.theme-dark .app-sidebar__direct i,
html[data-theme='dark'] .app-sidebar__direct i,
html.theme-dark .app-sidebar__utility i,
html[data-theme='dark'] .app-sidebar__utility i,
html.theme-dark .app-sidebar__logout i,
html[data-theme='dark'] .app-sidebar__logout i,
html.theme-dark .app-sidebar__theme-toggle i,
html[data-theme='dark'] .app-sidebar__theme-toggle i {
  color: #a3a3a3 !important;
}

html.theme-dark .app-sidebar__item,
html[data-theme='dark'] .app-sidebar__item,
html.theme-dark .app-sidebar__direct,
html[data-theme='dark'] .app-sidebar__direct,
html.theme-dark .app-sidebar__logout,
html[data-theme='dark'] .app-sidebar__logout {
  background: transparent !important;
  border-color: transparent !important;
  color: #d4d4d4 !important;
}

html.theme-dark .app-sidebar__group-toggle:hover,
html[data-theme='dark'] .app-sidebar__group-toggle:hover,
html.theme-dark .app-sidebar__item:hover,
html[data-theme='dark'] .app-sidebar__item:hover,
html.theme-dark .app-sidebar__direct:hover,
html[data-theme='dark'] .app-sidebar__direct:hover,
html.theme-dark .app-sidebar__utility:hover,
html[data-theme='dark'] .app-sidebar__utility:hover,
html.theme-dark .app-sidebar__logout:hover,
html[data-theme='dark'] .app-sidebar__logout:hover,
html.theme-dark .app-sidebar__group--open > .app-sidebar__group-toggle,
html[data-theme='dark'] .app-sidebar__group--open > .app-sidebar__group-toggle,
html.theme-dark .app-sidebar__item--active,
html[data-theme='dark'] .app-sidebar__item--active,
html.theme-dark .app-sidebar__direct--active,
html[data-theme='dark'] .app-sidebar__direct--active {
  background: #292929 !important;
  border-color: #3f3f3f !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 #3f63f1 !important;
}

html.theme-dark .app-sidebar__item--active i,
html[data-theme='dark'] .app-sidebar__item--active i,
html.theme-dark .app-sidebar__direct--active i,
html[data-theme='dark'] .app-sidebar__direct--active i {
  color: #6f8cff !important;
}

html.theme-dark .app-sidebar__nav,
html[data-theme='dark'] .app-sidebar__nav {
  scrollbar-color: #3a3a3a transparent !important;
}

html.theme-dark .app-mobilebar,
html[data-theme='dark'] .app-mobilebar {
  background: #171717 !important;
  border-bottom-color: #2f2f2f !important;
}

html.theme-dark .app-mobilebar__toggle,
html[data-theme='dark'] .app-mobilebar__toggle,
html.theme-dark .app-mobilebar__logout,
html[data-theme='dark'] .app-mobilebar__logout,
html.theme-dark .app-sidebar__close,
html[data-theme='dark'] .app-sidebar__close {
  background: #202020 !important;
  border-color: #343434 !important;
  color: #f5f5f5 !important;
}

body.theme-dark .app-main,
body[data-theme='dark'] .app-main {
  background: #171717 !important;
  color: #f5f5f5 !important;
}

body.theme-dark .app-sidebar,
body[data-theme='dark'] .app-sidebar,
body.theme-dark .app-sidebar__header,
body[data-theme='dark'] .app-sidebar__header,
body.theme-dark .app-sidebar__footer,
body[data-theme='dark'] .app-sidebar__footer {
  background: #171717 !important;
  border-color: #2f2f2f !important;
  color: #d4d4d4 !important;
}

body.theme-dark .app-sidebar__collapse,
body[data-theme='dark'] .app-sidebar__collapse,
body.theme-dark .app-sidebar__group-toggle,
body[data-theme='dark'] .app-sidebar__group-toggle,
body.theme-dark .app-sidebar__utility,
body[data-theme='dark'] .app-sidebar__utility,
body.theme-dark .app-sidebar__theme-toggle,
body[data-theme='dark'] .app-sidebar__theme-toggle {
  background: #202020 !important;
  border-color: #343434 !important;
  color: #e5e5e5 !important;
  box-shadow: none !important;
}

body.theme-dark .app-sidebar__item,
body[data-theme='dark'] .app-sidebar__item,
body.theme-dark .app-sidebar__direct,
body[data-theme='dark'] .app-sidebar__direct,
body.theme-dark .app-sidebar__logout,
body[data-theme='dark'] .app-sidebar__logout {
  background: transparent !important;
  border-color: transparent !important;
  color: #d4d4d4 !important;
}

body.theme-dark .app-sidebar__group--open > .app-sidebar__group-toggle,
body[data-theme='dark'] .app-sidebar__group--open > .app-sidebar__group-toggle,
body.theme-dark .app-sidebar__item--active,
body[data-theme='dark'] .app-sidebar__item--active,
body.theme-dark .app-sidebar__direct--active,
body[data-theme='dark'] .app-sidebar__direct--active {
  background: #292929 !important;
  border-color: #3f3f3f !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 #3f63f1 !important;
}

body.theme-dark .app-sidebar__brand,
body[data-theme='dark'] .app-sidebar__brand {
  background: #f5f5f5 !important;
  border-color: #3a3a3a !important;
  color: #171717 !important;
  box-shadow: none !important;
}

/* Dark canvas for the pre-mount/loading window. Bootstrap loads a light
   `body{background:#fff}` in <head> before React mounts; this static head
   stylesheet overrides it for dark so there's no white flash before
   .app-main paints. Keyed off <html> (where theme.ts sets the marker). */
html[data-theme='dark'] body,
html.theme-dark body {
  background-color: #171717;
}
