.app-switcher {
  --switcher-bg: var(--sidebar-bg, var(--panel, var(--card-bg, #fff)));
  --switcher-border: var(--border, var(--line, #e2e8f0));
  --switcher-text: var(--text, #0f172a);
  --switcher-muted: var(--muted, var(--text-dim, #64748b));
  --switcher-hover: var(--hover, rgba(37, 99, 235, 0.08));
  --switcher-accent: var(--accent, #2563eb);

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: inherit;
  line-height: inherit;
  vertical-align: middle;
}

.app-switcher__brand {
  flex: 0 0 auto;
}

.app-switcher__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0 19px 0 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.app-switcher__trigger::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  opacity: 0.72;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.app-switcher__trigger:hover,
.app-switcher__trigger:focus-visible,
.app-switcher.is-open .app-switcher__trigger {
  background: var(--switcher-hover);
  color: var(--switcher-accent);
  outline: none;
}

.app-switcher.is-open .app-switcher__trigger::after {
  opacity: 1;
  transform: translateY(-35%) rotate(225deg);
}

.app-switcher__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 9px);
  z-index: 1000;
  display: none;
  min-width: 150px;
  padding: 5px;
  border: 1px solid var(--switcher-border);
  border-radius: 10px;
  background: var(--switcher-bg);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.app-switcher.is-open .app-switcher__menu {
  display: grid;
  gap: 2px;
}

.app-switcher__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--switcher-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.app-switcher__item:hover,
.app-switcher__item:focus-visible {
  background: var(--switcher-hover);
  color: var(--switcher-accent);
  outline: none;
}

.app-switcher__item.is-active {
  background: var(--switcher-hover);
  color: var(--switcher-accent);
}

.app-switcher__item.is-active::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

@media (max-width: 480px) {
  .app-switcher__menu {
    min-width: 138px;
  }
}
