/* Reference-driven visual treatment for the top business navigation only. */
.app-shell .top-sections {
  --business-nav-divider: color-mix(in srgb, var(--shell-border) 72%, transparent);
  --business-nav-selected: color-mix(in srgb, var(--shell-accent) 17%, var(--shell-raised));
  gap: 3px;
  font-family: var(--ui-font);
}

.app-shell .topbar .my-apps-trigger {
  min-height: 46px !important;
  padding: 0 13px !important;
  gap: 10px;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--shell-text) !important;
  font-size: 14px !important;
  font-weight: 680 !important;
  letter-spacing: 0;
}

.app-shell .topbar .my-apps-trigger-icon {
  width: 23px;
  height: 23px;
  border-radius: 0;
  color: var(--shell-accent);
  background: transparent;
}

.app-shell .topbar .my-apps-trigger-icon svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.15;
}

.app-shell .topbar .my-apps-trigger:hover,
.app-shell .topbar .my-apps-trigger.active {
  border-color: color-mix(in srgb, var(--shell-accent) 52%, var(--shell-border)) !important;
  background: var(--business-nav-selected) !important;
  box-shadow: none !important;
}

.app-shell .topbar .business-category-nav {
  gap: 3px;
}

.app-shell .topbar .business-category-nav-item {
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background .16s ease, border-color .16s ease;
}

.app-shell .topbar .business-category-nav-item:hover {
  background: color-mix(in srgb, var(--shell-accent) 8%, var(--shell-bg));
}

.app-shell .topbar .business-category-nav-item.is-open {
  border-color: var(--shell-accent);
  background: var(--business-nav-selected);
}

.app-shell .topbar .business-category-nav-item.is-open::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(100% + 1px);
  left: calc(50% - 5px);
  border: 5px solid transparent;
  border-bottom-color: var(--shell-accent);
  pointer-events: none;
}

.app-shell .topbar .business-category-trigger,
.app-shell .topbar .business-category-menu-toggle {
  min-height: 44px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--shell-text) !important;
}

.app-shell .topbar .business-category-trigger {
  padding: 0 2px 0 12px !important;
  gap: 9px;
  font-size: 14px !important;
  font-weight: 680 !important;
  letter-spacing: 0;
}

.app-shell .topbar .business-category-trigger > i {
  color: color-mix(in srgb, var(--shell-accent) 56%, var(--shell-text-2));
}

.app-shell .topbar .business-category-trigger svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.app-shell .topbar .business-category-nav-item.is-open .business-category-trigger > i {
  color: var(--shell-accent);
}

.app-shell .topbar .business-category-menu-toggle {
  width: 27px;
  padding: 0 8px 0 2px !important;
  color: var(--shell-text-2) !important;
  font-size: 12px !important;
}

.app-shell .topbar .business-category-nav-item.is-open .business-category-menu-toggle {
  color: var(--shell-text) !important;
}

.app-shell .topbar .business-category-menu {
  top: calc(100% + 8px);
  max-height: calc(100dvh - var(--topbar-height) - 18px);
}

.app-shell .topbar .app-cascade-stack {
  gap: 7px;
}

.app-shell .topbar .app-cascade-panel {
  width: 286px;
  max-height: min(560px, calc(100dvh - var(--topbar-height) - 18px));
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--shell-accent) 55%, var(--shell-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--shell-bg) 72%, var(--shell-raised));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.app-shell .topbar .app-mega-menus {
  width: 250px;
}

.app-shell .topbar .app-mega-option,
.app-shell .topbar .app-mega-route {
  min-height: 51px;
  padding: 0 13px;
  border: 0;
  border-bottom: 1px solid var(--business-nav-divider);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--shell-text-2);
  font-family: var(--ui-font);
  font-size: 14px;
  font-weight: 540;
  line-height: 1.35;
}

.app-shell .topbar .app-mega-option:last-child,
.app-shell .topbar .app-mega-route:last-child {
  border-bottom-color: transparent;
}

.app-shell .topbar .app-mega-option {
  grid-template-columns: 25px minmax(0, 1fr) 14px;
  gap: 10px;
}

.app-shell .topbar .app-mega-route {
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 10px;
}

.app-shell .topbar .app-mega-option > i,
.app-shell .topbar .app-mega-route > i {
  color: var(--shell-accent);
}

.app-shell .topbar .app-mega-option svg,
.app-shell .topbar .app-mega-route svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.1;
}

.app-shell .topbar .app-mega-module > b {
  display: none;
}

.app-shell .topbar .app-mega-module::after {
  content: "›";
  justify-self: end;
  color: var(--shell-muted);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

html[data-scheme] .app-shell .topbar .app-mega-option:hover,
html[data-scheme] .app-shell .topbar .app-mega-route:hover {
  color: var(--shell-text);
  background: color-mix(in srgb, var(--shell-accent) 10%, var(--shell-raised));
}

html[data-scheme] .app-shell .topbar .app-mega-option.active,
html[data-scheme] .app-shell .topbar .app-mega-option.active:hover {
  border-bottom-color: transparent;
  border-radius: 9px;
  background: var(--business-nav-selected);
  color: var(--shell-text);
  font-weight: 680;
}

.app-shell .topbar .app-mega-option.active::after {
  color: var(--shell-accent);
}

.app-shell .topbar .app-mega-module[data-business-top-module="operation_copy_extract"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="operation_account_monitor"] > i { color: #62c4f6; }
.app-shell .topbar .app-mega-module[data-business-top-module="operation_content"] > i { color: #ad91fa; }
.app-shell .topbar .app-mega-module[data-business-top-module="operation_wechat_writing"] > i { color: #48d1de; }
.app-shell .topbar .app-mega-module[data-business-top-module="operation_image_design"] > i { color: #f4b35e; }
.app-shell .topbar .app-mega-module[data-business-top-module="operation_account_content"] > i { color: #68b4ff; }
.app-shell .topbar .app-mega-module[data-business-top-module="operation_medical_comments"] > i { color: #41ddb8; }

/* Distinct, reference-sized pictograms for the remaining business categories. */
.app-shell .topbar .app-mega-module[data-business-top-module="learning"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="customer_dialogue_library"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="phone_attribution"] > i { color: #72d8be; }
.app-shell .topbar .app-mega-module[data-business-top-module="assessment"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="customer_simulation"] > i { color: #74bef2; }
.app-shell .topbar .app-mega-module[data-business-top-module="customer_gold_scripts"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="utility_flower_font"] > i { color: #f1b76d; }
.app-shell .topbar .app-mega-module[data-business-route-module="customer_simulation"] > i,
.app-shell .topbar .app-mega-module[data-business-top-module="utility_skills"] > i { color: #b79af8; }

.app-shell .topbar .my-apps-trigger:focus-visible,
.app-shell .topbar .business-category-trigger:focus-visible,
.app-shell .topbar .business-category-menu-toggle:focus-visible,
.app-shell .topbar .app-mega-option:focus-visible,
.app-shell .topbar .app-mega-route:focus-visible {
  outline: 2px solid var(--shell-accent) !important;
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .app-shell .topbar .business-category-trigger { padding-left: 8px !important; gap: 6px; }
  .app-shell .topbar .business-category-menu-toggle { width: 22px; padding-right: 4px !important; }
  .app-shell .topbar .app-cascade-panel { width: 244px; }
  .app-shell .topbar .app-mega-menus { width: 220px; }
}

/* Preserve every header control at compact desktop widths without changing its action. */
@media (min-width: 1231px) and (max-width: 1439px) {
  .app-shell .topbar .topbar-brand { width: 170px; }
  .app-shell .topbar .search-box { width: 145px; flex: 0 0 145px; }
  .app-shell .topbar .user-menu { flex: 0 0 44px; width: 44px; }
  .app-shell .topbar .user-trigger { width: 44px; min-width: 44px; padding: 3px; }
  .app-shell .topbar .user-trigger .user-copy,
  .app-shell .topbar .user-trigger > i { display: none; }
}

@media (max-width: 1230px) {
  .app-shell .topbar .business-category-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell .topbar .business-category-nav-item { transition: none; }
}
