/* TEPRO CRM shared navigation: applies to every module without changing ACLs. */
:root {
  --tepro-nav-ink: #172b43;
  --tepro-nav-muted: #64748b;
  --tepro-nav-line: #e7edf3;
  --tepro-nav-hover: #f3f6fa;
  --tepro-nav-active: #eaf2f9;
  --tepro-nav-accent: #2563a6;
}

#menu.sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 230px !important;
  padding: 0 12px 12px;
  background: #fff;
  border-right: 1px solid var(--tepro-nav-line);
  box-shadow: 8px 0 28px rgb(15 23 42 / 3%);
}

[dir="rtl"] #menu.sidebar {
  border-right: 0;
  border-left: 1px solid var(--tepro-nav-line);
}

#menu .sidebar-user-profile {
  flex: 0 0 auto;
  margin: 72px 0 12px !important;
}

#menu .sidebar-user-profile > a.profile {
  min-height: 66px;
  padding: 10px 9px;
  border-color: var(--tepro-nav-line) !important;
  border-radius: 12px;
  background: #fff !important;
  color: var(--tepro-nav-ink) !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

#menu .sidebar-user-profile > a.profile:hover,
#menu .sidebar-user-profile > a.profile:focus {
  border-color: #cbd8e5 !important;
  background: #fbfdff !important;
  box-shadow: 0 3px 10px rgb(15 23 42 / 6%);
}

#menu .sidebar-user-profile .staff-profile-image-small {
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--tepro-nav-line);
}

#menu .sidebar-user-profile .dropdown-menu {
  z-index: 1100;
  border: 1px solid var(--tepro-nav-line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgb(15 23 42 / 12%);
}

#side-menu.nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 7px 0 12px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

#side-menu.nav::-webkit-scrollbar {
  display: none;
}

#side-menu.nav::before {
  display: block;
  padding: 8px 11px 9px;
  color: #8996a6;
  content: "ÇALIŞMA ALANI";
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

#side-menu.nav > li {
  margin: 2px 0;
  border: 0;
}

#side-menu.nav > li > a,
#side-menu.nav > li > a:visited {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #475569;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

#side-menu.nav > li > a .menu-icon {
  display: inline-flex;
  width: 20px;
  min-width: 20px;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #718096;
  font-size: 16px;
  text-align: center;
}

#side-menu.nav > li:not(.active) > a:hover,
#side-menu.nav > li:not(.active) > a:focus {
  border-color: #edf1f5;
  background: var(--tepro-nav-hover);
  color: var(--tepro-nav-ink);
}

#side-menu.nav > li.active > a,
#side-menu.nav > li.active > a:hover,
#side-menu.nav > li.active > a:focus {
  border-color: #d9e6f2;
  background: var(--tepro-nav-active);
  color: var(--tepro-nav-ink);
  box-shadow: none;
  font-weight: 650;
}

#side-menu.nav > li.active > a .menu-icon,
#side-menu.nav > li > a:hover .menu-icon,
#side-menu.nav > li > a:focus .menu-icon {
  color: var(--tepro-nav-accent);
}

#side-menu .menu-text,
#side-menu .sub-menu-text {
  min-width: 0;
  flex: 1 1 auto;
}

#side-menu .arrow {
  margin-left: auto;
  padding: 0;
  color: #94a3b8;
  font-size: 12px;
}

#side-menu .fa.arrow:before {
  content: "\f107";
}

#side-menu .active > a > .fa.arrow:before {
  content: "\f106";
}

#side-menu .nav-second-level {
  margin: 2px 0 7px 15px;
  padding: 3px 0 3px 10px;
  border-left: 1px solid #e5ebf1;
  background: transparent;
}

[dir="rtl"] #side-menu .nav-second-level {
  margin-right: 15px;
  margin-left: 0;
  padding-right: 10px;
  padding-left: 0;
  border-right: 1px solid #e5ebf1;
  border-left: 0;
}

#side-menu .nav-second-level li a {
  display: flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 7px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

#side-menu .nav-second-level li.active > a {
  background: #f1f6fb !important;
  color: var(--tepro-nav-accent) !important;
  font-weight: 650;
}

#side-menu .nav-second-level li:not(.active) > a:hover,
#side-menu .nav-second-level li:not(.active) > a:focus {
  background: #f7f9fb !important;
  color: var(--tepro-nav-ink) !important;
}

#side-menu #setup-menu-item {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--tepro-nav-line);
}

#side-menu .pinned_project > a {
  border-radius: 8px;
}

@media (max-width: 768px) {
  #menu.sidebar,
  body.page-small #menu.sidebar,
  body.page-small.show-sidebar #menu.sidebar {
    position: fixed;
    z-index: 1050;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, calc(100vw - 44px)) !important;
    margin-left: 0;
    padding: env(safe-area-inset-top) 14px env(safe-area-inset-bottom);
    transform: translateX(-105%);
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1), box-shadow 260ms ease;
    box-shadow: none;
    will-change: transform;
  }

  body.page-small.show-sidebar #menu.sidebar {
    transform: translateX(0);
    box-shadow: 18px 0 48px rgb(15 23 42 / 18%);
  }

  [dir="rtl"] #menu.sidebar,
  [dir="rtl"] body.page-small #menu.sidebar,
  [dir="rtl"] body.page-small.show-sidebar #menu.sidebar {
    right: 0;
    left: auto;
    transform: translateX(105%);
  }

  [dir="rtl"] body.page-small.show-sidebar #menu.sidebar {
    transform: translateX(0);
    box-shadow: -18px 0 48px rgb(15 23 42 / 18%);
  }

  #menu .sidebar-user-profile {
    margin-top: 14px !important;
    margin-bottom: 12px !important;
  }

  #side-menu.nav > li > a {
    min-height: 46px;
    font-size: 14px;
  }

  #side-menu .nav-second-level li a {
    min-height: 42px;
    font-size: 13px;
  }

  body.page-small.show-sidebar #wrapper {
    margin-right: 0;
    margin-left: 0;
  }

  [dir="rtl"] body.page-small.show-sidebar #wrapper {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu.sidebar,
  #menu .sidebar-user-profile > a.profile,
  #side-menu.nav > li > a {
    scroll-behavior: auto;
    transition-duration: .01ms !important;
  }
}
