/* Lead X workspace navigation: one consistent icon system at every width. */
#appShell .rail {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  z-index: 10;
  background: linear-gradient(180deg, #171d3b 0%, #131831 100%);
  border-right: 1px solid rgba(205, 199, 255, .12);
}

#appShell .rail-label {
  color: #aab1d5;
  letter-spacing: .17em;
}

#appShell .rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  margin-bottom: 5px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #c9cde7;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

#appShell .rail-link .nav-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(211, 205, 255, .12);
  border-radius: 11px;
  background: rgba(206, 198, 255, .07);
  color: #d1c9ff;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

#appShell .rail-link .nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

#appShell .rail-link .nav-text {
  display: block;
  width: auto;
  min-width: 0;
  color: inherit;
  font-size: inherit;
}

#appShell .rail-link:not(.selected):hover {
  transform: translateX(2px);
  background: rgba(188, 176, 255, .11);
  border-color: rgba(211, 205, 255, .14);
  color: #fff;
}

#appShell .rail-link:not(.selected):hover .nav-icon {
  background: rgba(188, 176, 255, .15);
  border-color: rgba(211, 205, 255, .25);
}

#appShell .rail-link.selected {
  background: linear-gradient(105deg, rgba(164, 145, 255, .27), rgba(164, 145, 255, .10));
  border-color: rgba(204, 192, 255, .32);
  color: #fff;
  box-shadow: inset 3px 0 0 #c9bcff, 0 10px 22px rgba(8, 10, 35, .13);
}

#appShell .rail-link.selected .nav-icon {
  background: #dcd4ff;
  border-color: #dcd4ff;
  color: #44339b;
  box-shadow: 0 4px 12px rgba(17, 13, 58, .14);
}

#appShell .rail-link:focus-visible {
  outline: 2px solid #e7e1ff;
  outline-offset: 2px;
}

@media (max-width: 950px) and (min-width: 651px) {
  #appShell .rail { width: 82px; padding-inline: 11px; }
  #appShell .rail-link { justify-content: center; min-height: 54px; padding: 5px; }
  #appShell .rail-link .nav-icon { flex-basis: 42px; width: 42px; height: 42px; }
  #appShell .rail-link .nav-icon svg { width: 22px; height: 22px; }
  #appShell .rail-link .nav-text { display: none; }
  #appShell .rail-link:not(.selected):hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  #appShell .rail-link, #appShell .rail-link .nav-icon { transition: none; }
  #appShell .rail-link:not(.selected):hover { transform: none; }
}
