.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.local-workspace-switcher {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  position: relative;
  z-index: 5;
}

.local-workspace-switcher select {
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  line-height: 1.2;
}

.workspace-switcher__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.workspace-switcher__trigger[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
}

.workspace-switcher__trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-switcher__caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255, 255, 255, 0.75);
}

.workspace-switcher__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: min(240px, 40vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #16203a;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.workspace-switcher__menu[hidden] {
  display: none;
}

.workspace-switcher__search {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #0e1730;
  color: #e8eefc;
  font: inherit;
  font-size: 0.85rem;
}

.workspace-switcher__search::placeholder {
  color: rgba(232, 238, 252, 0.5);
}

.workspace-switcher__empty {
  margin: 4px 10px;
  color: rgba(232, 238, 252, 0.6);
  font-size: 0.85rem;
}

.workspace-switcher__option {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8eefc;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: start;
  cursor: pointer;
}

.workspace-switcher__option:hover,
.workspace-switcher__option.is-selected {
  background: rgba(35, 103, 242, 0.35);
  color: #ffffff;
}

.topbar-workspace-switcher {
  margin-top: 0;
  min-width: 0;
}

.topbar-workspace-switcher select {
  min-height: 34px;
  font-weight: 700;
  color: var(--brand-700);
  border-radius: 8px;
  padding: 4px 28px 4px 8px;
  background-color: var(--surface);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234548c9' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.client-context {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.sidebar .client-context > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-workspace > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-context strong {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

.sidebar .client-context .local-workspace-switcher select,
.sidebar .client-context .workspace-switcher__trigger {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar .client-context .button--secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.sidebar .client-context .button--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.workspace-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.workspace-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.workspace-list__item.is-active {
  border-color: color-mix(in srgb, var(--brand-600) 40%, var(--border));
  background: color-mix(in srgb, var(--brand-100) 55%, var(--surface));
}

.workspace-list__item strong {
  display: block;
  color: var(--strong);
}

.workspace-list__item small {
  color: var(--muted);
}

.workspace-create-form {
  margin-top: 8px;
}

.profile-workspace {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
