/* workspace-ui.css — workspace switcher in the sidebar (dark surface). */
.ws-switch {
  position: relative;
  padding: 8px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}
.ws-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #eaf3ee;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s ease;
}
.ws-trigger:hover { background: rgba(255, 255, 255, 0.1); }
.ws-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-caret { font-size: 10px; color: #93b3a6; transition: transform 0.15s ease; }
.ws-switch.open .ws-caret { transform: rotate(180deg); }

.ws-menu {
  display: none;
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: calc(100% + 6px);
  z-index: 300;
  background: #ffffff;
  border: 1px solid #dfe6e2;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(13, 43, 34, 0.28);
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.ws-switch.open .ws-menu { display: block; }
.ws-menu-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #74827c;
  padding: 6px 8px 8px;
}
.ws-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #14231e;
}
.ws-item:hover { background: #eef6f2; }
.ws-item.active { background: #e5f3ed; }
.ws-mark {
  flex: 0 0 18px;
  height: 18px;
  border: 1px solid #c3d2cb;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #128c7e;
}
.ws-item.active .ws-mark { border-color: #128c7e; background: #128c7e; color: #fff; }
.ws-item-name { flex: 1; min-width: 0; }
.ws-item-name b, .ws-item-name small { display: block; }
.ws-item-name b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-item-name small { font-size: 10px; color: #74827c; margin-top: 1px; }

/* collapsed sidebar: show only a compact dot-button */
.shell.nav-collapsed .ws-switch { padding: 6px 0 2px; }
.shell.nav-collapsed .ws-trigger {
  justify-content: center;
  padding: 8px 0;
  border-color: transparent;
  background: transparent;
}
.shell.nav-collapsed .ws-name,
.shell.nav-collapsed .ws-caret { display: none; }
.shell.nav-collapsed .ws-trigger::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #37c892;
}
.shell.nav-collapsed .ws-menu { left: 8px; right: auto; min-width: 210px; bottom: calc(100% + 8px); }

@media (max-width: 900px) {
  .ws-name { display: none; }
  .ws-trigger { justify-content: center; }
  .ws-switch .ws-menu { min-width: 230px; }
}

/* create-workspace footer inside the switcher menu */
.ws-divider { height: 1px; background: #e4ebe7; margin: 6px 8px; }
.ws-create { padding: 0 2px 4px; }
.ws-create-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px dashed #b9cfc6;
  border-radius: 9px;
  background: transparent;
  color: #0e7c5f;
  padding: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
}
.ws-create-btn:hover { background: #eef6f2; border-color: #0e7c5f; }
.ws-create-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 2px 2px;
}
.ws-create-form[hidden] { display: none; }
.ws-create-name {
  width: 100%;
  border: 1px solid #c3d2cb;
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: #14231e;
  background: #fff;
  box-sizing: border-box;
}
.ws-create-name:focus { outline: 2px solid rgba(18, 140, 126, 0.35); border-color: #128c7e; }
.ws-create-actions { display: flex; gap: 6px; justify-content: flex-end; }
.ws-create-actions button {
  border-radius: 8px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ws-create-go { border: 0; background: #128c7e; color: #fff; }
.ws-create-go:hover { background: #0e7c5f; }
.ws-create-cancel { border: 1px solid #c3d2cb; background: #fff; color: #4a5a53; }
.ws-create-cancel:hover { background: #f0f4f2; }
.ws-create-go:disabled, .ws-create-cancel:disabled { opacity: 0.55; cursor: default; }
.ws-create-status { font-size: 11px; color: #0e7c5f; padding: 2px 2px 0; min-height: 14px; }
.ws-create-status.err { color: #b3261e; }
