.app-switcher { position: relative; }
.popup-backdrop {
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 20, .16);
  border: 0;
  border-radius: 0;
  inset: 0;
  padding: 0;
  position: fixed;
  z-index: 110;
}
:root[data-theme="neo"] .popup-backdrop:not(.link-button, .menu-toggle) { background: rgba(0, 0, 0, .34); }
.popup-backdrop[hidden] { display: none; }
.app-switcher-button { align-items: center; background: transparent; border: 0; box-shadow: none; color: var(--text); display: inline-flex; padding: 0; }
:root[data-theme="neo"] .app-switcher-button:not(.link-button, .menu-toggle) { background: transparent; color: var(--text); }
.app-switcher-button:hover { filter: none; }
.app-switcher-menu {
  background: color-mix(in srgb, var(--card) 98%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(11, 15, 20, .22);
  display: grid;
  gap: 14px;
  left: 50%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 18px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(390px, calc(100vw - 28px));
  z-index: 120;
}
.app-switcher-menu[hidden] { display: none; }
.app-switcher-head { display: grid; gap: 2px 12px; grid-template-columns: 1fr auto; }
.app-switcher-head > div:last-child { display: grid; gap: 3px; grid-column: 1 / -1; padding-top: 12px; }
.app-switcher-head strong { font-size: 18px; }
.app-switcher-head small { letter-spacing: 0; text-transform: none; }
.app-switcher-logo { display: flex; }
.app-switcher-logo .logo-frame { height: 34px; width: 96px; }
.app-switcher-logo .logo-frame img { height: 34px; }
.app-switcher-logo .logo-icon { display: none; }
.app-switcher-close, :root[data-theme="neo"] .app-switcher-close:not(.link-button, .menu-toggle) {
  align-items: center;
  aspect-ratio: 1;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  display: inline-flex;
  padding: 0;
  width: 36px;
}
.app-switcher-close .side-icon { height: 18px; width: 18px; }
.app-switcher-list { display: grid; gap: 7px; }
.app-switcher-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  display: grid;
  gap: 3px 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 68px;
  padding: 10px 12px;
  text-decoration: none;
}
.app-switcher-item:hover, .app-switcher-item.active { background: var(--card-strong); border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); text-decoration: none; }
.app-switcher-item > span {
  align-items: center;
  background: var(--text);
  border-radius: 10px;
  color: var(--card);
  display: inline-flex;
  font-weight: 900;
  grid-row: 1 / span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.app-switcher-item strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-switcher-item small { color: var(--muted); font-size: 12px; font-weight: 650; grid-column: 2; letter-spacing: 0; line-height: 1.25; text-transform: none; }
.app-switcher-item b { color: var(--muted); font-size: 20px; grid-column: 3; grid-row: 1 / span 2; }
@media (max-width: 760px) {
  .app-switcher-menu { max-height: calc(100dvh - 24px); padding: 16px; width: calc(100vw - 24px); }
}
.side-external-links { border-top: 1px solid var(--line); display: grid; gap: 4px; margin-top: 14px; padding-top: 12px; }
.side-external-link, :root[data-theme="neo"] .app-sidebar .side-external-link {
  background: transparent;
  border-color: transparent;
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 10px;
}
.side-external-link:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.side-external-icon { border: 1px solid var(--line); border-radius: 50%; flex: 0 0 auto; height: 26px; padding: 5px; width: 26px; }
@media (min-width: 761px) {
  :root:not([data-sidebar-pinned="1"]) .app-shell:not(.sidebar-pinned):not(.sidebar-edge-open) .app-sidebar .side-brand { display: none; }
  :root:not([data-sidebar-pinned="1"]) .app-shell:not(.sidebar-pinned):not(.sidebar-edge-open) .app-sidebar { top: 64px; }
  .app-sidebar .side-brand { justify-content: space-between; margin-top: 0; min-height: 44px; }
  .app-sidebar .side-brand .app-switcher { display: block; }
  .app-sidebar .side-brand .app-switcher-button .logo-icon { display: none; }
  :root:not([data-sidebar-pinned="1"]) .app-shell:not(.sidebar-pinned) .side-switcher .side-space {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  :root:not([data-sidebar-pinned="1"]) .app-shell:not(.sidebar-pinned) .side-switcher .side-space > img {
    background: transparent;
    border: 0;
    border-radius: 8px;
    height: 44px;
    width: 44px;
  }
  :root:not([data-sidebar-pinned="1"]) .app-shell.sidebar-edge-open:not(.sidebar-pinned) .side-switcher .side-space,
  .app-shell.sidebar-pinned .side-switcher .side-space {
    background: transparent;
    border: 0;
    border-radius: 0;
    justify-content: flex-start;
    padding: 8px 0 12px;
  }
  .app-shell.sidebar-edge-open .app-sidebar,
  .app-shell.sidebar-pinned .app-sidebar { z-index: 60; }
  .app-shell.sidebar-edge-open:not(.sidebar-pinned) .app-backdrop {
    backdrop-filter: blur(10px);
    background: rgba(11, 15, 20, .16);
    display: block;
    z-index: 55;
  }
}
.side-switcher-list.space-switcher-modal {
  background: color-mix(in srgb, var(--card) 98%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(11, 15, 20, .28);
  display: grid;
  gap: 12px;
  left: clamp(24px, 6vw, 88px);
  margin: 0;
  max-height: min(632px, calc(100dvh - 48px));
  overflow: hidden;
  padding: 14px;
  position: fixed;
  right: auto;
  top: clamp(80px, 17vh, 150px);
  width: min(416px, calc(100vw - 32px));
  z-index: 141;
}
.side-switcher-list.space-switcher-modal[hidden] { display: none; }
.space-switcher-head { align-items: center; display: flex; justify-content: space-between; }
.space-switcher-head > div { display: grid; gap: 2px; }
.space-switcher-head small { color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.space-switcher-head strong { font-size: 21px; }
.space-switcher-head button {
  align-items: center;
  aspect-ratio: 1;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  padding: 0;
  width: 40px;
}
.space-switcher-head .side-icon { height: 18px; width: 18px; }
.space-switcher-scroll { display: grid; gap: 8px; overflow-y: auto; padding-right: 2px; }
.space-switcher-modal .side-space-option { background: transparent; border-color: transparent; border-radius: 10px; min-height: 66px; }
.space-switcher-modal .side-space-option:hover,
.space-switcher-modal .side-space-option.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.space-switcher-modal .side-space-option.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent); }
.space-switcher-modal .space-avatar { height: 40px; width: 40px; }
.space-switcher-modal .side-space-copy strong { font-size: 16px; }
.space-switcher-modal .side-space-copy small { color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: capitalize; }
@media (max-width: 760px) {
  .side-switcher-list.space-switcher-modal {
    left: 50%;
    max-height: min(570px, calc(100dvh - 96px));
    top: max(72px, 14dvh);
    transform: translateX(-50%);
    width: min(296px, calc(100vw - 32px));
  }
}
