/* Merchant navigation owns its layout independently from the operations console. */
#dashboard .merchant-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex: none;
  flex-direction: column;
  width: 232px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 23px 14px 14px;
  background: #102632;
  color: #a5bbc3;
  border-right: 1px solid #183540;
}

#dashboard .merchant-brand {
  flex: none;
  margin: 0 12px 23px;
  gap: 10px;
}

#dashboard .merchant-brand img {
  width: 31px;
  height: 31px;
}

#dashboard .merchant-brand .brand-copy [data-brand-zh] {
  color: #9fb7bf;
  font-size: 10px;
  letter-spacing: .04em;
}

#dashboard .merchant-brand .brand-copy [data-brand-en] {
  color: #f5fafb;
  font-size: 17px;
}

#dashboard .merchant-workspace {
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #2b424d;
  border-radius: 10px;
  background: #1a323e;
}

#dashboard .merchant-workspace > b {
  flex: none;
  width: 31px;
  height: 31px;
  border: 1px solid #37635f;
  border-radius: 9px;
  background: #204b48;
  color: #8de3cd;
  font-size: 13px;
  font-weight: 600;
}

#dashboard .merchant-workspace > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e0ebee;
  font-size: 12px;
  line-height: 1.5;
}

#dashboard .merchant-workspace small {
  margin-top: 2px;
  color: #8fa8b2;
  font-size: 10px;
  font-weight: 400;
}

#dashboard .merchant-navigation {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  padding: 0 4px 8px 0;
  gap: 3px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #36515d transparent;
}

#dashboard .merchant-navigation::-webkit-scrollbar {
  width: 4px;
}

#dashboard .merchant-navigation::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #36515d;
}

#dashboard .merchant-nav-group {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

#dashboard .merchant-nav-heading {
  margin: 0 12px 3px;
  color: #78949f;
  font-size: 10px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: .06em;
}

#dashboard .merchant-navigation .merchant-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  gap: 11px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 8px;
  background: transparent;
  color: #a5bbc3;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  transition: background .15s ease, color .15s ease;
}

#dashboard .merchant-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  color: #8da9b5;
}

#dashboard .merchant-nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

#dashboard .merchant-navigation .merchant-nav-count {
  float: none;
  flex: none;
  max-width: 48px;
  overflow: hidden;
  padding: 0 6px;
  border-radius: 5px;
  background: #233f4b;
  color: #9bb8c3;
  font-size: 10px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
}

#dashboard .merchant-navigation .merchant-nav-link:hover {
  background: #1a3441;
  color: #edf6f7;
}

#dashboard .merchant-navigation .merchant-nav-link:hover .merchant-icon {
  color: #bed1d8;
}

#dashboard .merchant-navigation .merchant-nav-link.active {
  background: #204b51;
  color: #f1fffb;
  font-weight: 600;
}

#dashboard .merchant-nav-link.active::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #46d7b6;
  content: "";
}

#dashboard .merchant-navigation .merchant-nav-link.active .merchant-icon {
  color: #6ce0c4;
}

#dashboard .merchant-navigation .merchant-nav-link.active .merchant-nav-count {
  background: #2b6266;
  color: #b6f3e4;
}

#dashboard .merchant-nav-link:focus-visible,
#dashboard .merchant-sidebar a:focus-visible {
  outline: 2px solid #76e2cc;
  outline-offset: -2px;
}

#dashboard .merchant-sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 7px 0;
  border-top: 1px solid #28414d;
  color: #88a5b0;
  font-size: 10px;
  line-height: 20px;
}

#dashboard .merchant-system-status {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

#dashboard .merchant-system-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #47c6a5;
}

#dashboard .merchant-sidebar-footer a {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  padding: 2px 3px;
  border-radius: 4px;
  color: #a3bdc8;
  font-size: 10px;
}

#dashboard .merchant-sidebar-footer a:hover {
  color: #effaf8;
}

#dashboard .merchant-sidebar-footer .merchant-icon {
  width: 14px;
  height: 14px;
  color: currentColor;
}

@media (max-width: 900px) {
  #dashboard .merchant-sidebar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #dashboard .merchant-nav-link {
    transition: none;
  }
}
