/**
 * Единый стиль боковых вкладок (как HRM: sidebar-admin__nav 0.92rem, padding 0.62×0.72).
 */
.platform-app--bms .module-sidebar-nav,
.platform-app--mes .mes-app__nav {
  font-size: 0.92rem;
  gap: 0.42rem;
}

.module-nav__btn,
.mes-nav__btn,
.platform-app--mes .mes-nav__btn {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  padding: 0.62rem 0.72rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.module-nav__btn:hover,
.mes-nav__btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #e2e8f0;
}

.module-nav__btn--sub,
.mes-nav__btn--sub {
  padding-left: 1.35rem;
  font-size: 0.88rem;
}

.module-nav__btn--active,
.mes-nav__btn--active {
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.module-nav__btn > svg,
.mes-nav__btn > svg,
.mes-nav__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

.module-nav__label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-app--bms .module-nav__btn--active {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.22);
}

.platform-app--bms .module-nav__btn--active svg {
  color: #1d4ed8;
}

.platform-app--bms .module-nav__sublist {
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid #e2e8f0;
}

.platform-app--mes .mes-nav__btn--active {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.22);
}

.mes-nav__section {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.mes-nav__section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.mes-nav__section-label {
  margin: 0 0 0.15rem;
  padding: 0 0.72rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.mes-nav__section-items {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.mes-nav__sub {
  gap: 0.1rem;
  padding-left: 0.35rem;
  margin-left: 0.35rem;
  border-left: 1px solid #e2e8f0;
}

.mes-nav__sub-num {
  color: #15803d;
  background: rgba(22, 163, 74, 0.12);
}

/* —— Sidebar module brand card (Yoonix polish) —— */
.bms-sidebar__brand,
.ems-sidebar__brand,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.68rem 0.72rem;
  margin-bottom: 0.55rem;
  border-radius: 14px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 18px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.bms-sidebar__brand::before,
.ems-sidebar__brand::before,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 95% at 100% 0%, rgba(79, 124, 255, 0.08), transparent 58%);
}

.bms-sidebar__brand {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) padding-box,
    linear-gradient(135deg, rgba(79, 124, 255, 0.4), rgba(37, 99, 235, 0.32), rgba(138, 92, 255, 0.22)) border-box;
  box-shadow:
    0 6px 20px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ems-sidebar__brand {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) padding-box,
    linear-gradient(135deg, rgba(34, 197, 94, 0.36), rgba(22, 163, 74, 0.3), rgba(79, 124, 255, 0.14)) border-box;
  box-shadow:
    0 6px 20px rgba(22, 163, 74, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ems-sidebar__brand::before {
  background: radial-gradient(ellipse 85% 95% at 100% 0%, rgba(22, 163, 74, 0.09), transparent 58%);
}

#appScreen.workspace-admin--hrm-module .hrm-sidebar__brand {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) padding-box,
    linear-gradient(135deg, rgba(138, 92, 255, 0.38), rgba(124, 58, 237, 0.32), rgba(79, 124, 255, 0.18)) border-box;
  box-shadow:
    0 6px 20px rgba(124, 58, 237, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border-bottom: none;
}

#appScreen.workspace-admin--hrm-module .hrm-sidebar__brand::before {
  background: radial-gradient(ellipse 85% 95% at 100% 0%, rgba(124, 58, 237, 0.09), transparent 58%);
}

.bms-sidebar__mark,
.ems-sidebar__mark,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__mark {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 6px 16px rgba(15, 23, 42, 0.14);
}

.bms-sidebar__mark {
  background: linear-gradient(145deg, #4f7cff 0%, #2563eb 55%, #5b4fd9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 6px 18px rgba(37, 99, 235, 0.34);
}

.ems-sidebar__mark {
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 6px 18px rgba(22, 163, 74, 0.32);
}

#appScreen.workspace-admin--hrm-module .hrm-sidebar__mark {
  color: #fff;
  background: linear-gradient(145deg, #8a5cff 0%, #7c3aed 55%, #6d28d9 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 6px 18px rgba(124, 58, 237, 0.32);
}

.bms-sidebar__titles,
.ems-sidebar__titles,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__titles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.bms-sidebar__name,
.ems-sidebar__name,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f172a;
}

.bms-sidebar__tag,
.ems-sidebar__tag,
#appScreen.workspace-admin--hrm-module .hrm-sidebar__tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.bms-sidebar__tag {
  color: #2563eb;
}

.ems-sidebar__tag {
  color: #15803d;
}

#appScreen.workspace-admin--hrm-module .hrm-sidebar__tag {
  color: #6d28d9;
}
