
.profile-switcher {
  position: relative;
}

.profile-picker-trigger {
  width: 100%;
  border: 1px solid #2b3a56;
  border-radius: 11px;
  background: #101828;
  color: var(--text-0);
  font-weight: 700;
  min-height: 42px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.profile-picker-trigger:hover {
  border-color: #4D6BFE;
}

.profile-picker-trigger:hover {
  border-color: rgba(169, 186, 210, 0.4);
}

.profile-picker-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #71c69c;
  box-shadow: 0 0 0 3px rgba(113, 198, 156, 0.2);
  flex: 0 0 auto;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 35;
  border: 1px solid #2b3a56;
  border-radius: 12px;
  background: #101828;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.profile-dropdown-list {
  max-height: 280px;
  overflow: auto;
}

.profile-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.profile-dropdown-row:last-child {
  border-bottom: 0;
}

.profile-dropdown-row.active {
  background: rgba(77, 107, 254, 0.08);
}

.profile-dropdown-name {
  min-width: 0;
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--text-0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.profile-action-btn {
  border: 0;
  border-radius: 6px;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  min-height: 24px;
  cursor: pointer;
}

.profile-action-btn.select {
  background: #10b981;
}

.profile-action-btn.delete {
  background: #ef4444;
}

.profile-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-checkbox {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

.profile-bulk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #1d2942;
  background: #0d1524;
}

.profile-bulk-btn {
  border: 1px solid #2b3a56;
  border-radius: 6px;
  color: var(--text-0);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  min-height: 24px;
  background: #16213a;
  cursor: pointer;
  transition: all 100ms ease;
}

.profile-bulk-btn:hover {
  background: #1b2846;
  border-color: #3a4d73;
}

.profile-bulk-btn.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.profile-bulk-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.profile-create-btn {
  width: calc(100% - 16px);
  margin: 8px;
  border: 1px solid #4D6BFE;
  border-radius: 8px;
  background: linear-gradient(135deg, #4D6BFE 0%, #3557ec 100%);
  color: var(--text-0);
  font-weight: 600;
  min-height: 32px;
  cursor: pointer;
}

.nav-group-title {
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-2);
}

.nav-block {
  display: grid;
  gap: 3px;
}

.nav-item {
  position: relative;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  padding: 9px 11px;
  transition: background-color 110ms ease, color 110ms ease;
}

.nav-item:hover {
  color: var(--text-0);
  background: rgba(136, 160, 198, 0.14);
}

.nav-item.active {
  color: var(--text-0);
  background: linear-gradient(90deg, rgba(126, 150, 186, 0.22), rgba(46, 59, 78, 0.2));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #8dafdf 0%, #6f97d6 100%);
}

.main-shell {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-1);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-0);
}

.topbar p {
  margin: 3px 0 0;
  color: var(--text-2);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-toggle-btn {
  min-width: 108px;
}

.runtime-engine-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #101828;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
}

.runtime-engine-top select {
  width: auto;
  min-width: 132px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #101828;
  color: var(--text-0);
  border: 1px solid var(--line);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #101828;
  color: var(--text-1);
  font-weight: 600;
}

.status-chip.online {
  border-color: rgba(75, 191, 132, 0.45);
  background: rgba(52, 83, 67, 0.45);
  color: #ccead8;
}

.status-chip.offline {
  border-color: rgba(217, 111, 111, 0.45);
  background: rgba(84, 47, 50, 0.45);
  color: #efd2d2;
}

.page-host {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 20px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}
