
/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px max(20px, env(safe-area-inset-left));
  padding-top: max(14px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
/* The brand is the server switcher: current server's icon + name, dashboard title underneath. */
.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: -4px -8px;
  padding: 4px 8px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.brand:not(:disabled):hover,
.brand[aria-expanded="true"] {
  background: var(--card-hover);
}
.brand:disabled {
  cursor: default;
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.brand-icon {
  display: flex;
  flex-shrink: 0;
}
.brand-icon > img,
.brand-icon > .ticon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}
.brand-icon > .ticon {
  font-size: 22px;
}
.brand-icon .ticon .letter {
  font-size: 17px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#title,
#summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#summary {
  margin-top: 2px;
  font-size: 0.8rem;
}
.brand-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.15s;
}
.brand[aria-expanded="true"] .brand-chevron {
  transform: rotate(180deg);
}
.brand:disabled .brand-chevron {
  display: none;
}
/* Other servers still loading: a thin sliding bar along the bottom (fades in after 0.3s so a fast answer shows nothing). */
.brand-bar {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  animation: load-in 0.3s 0.3s backwards;
}
.brand-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: load-slide 1.3s ease-in-out infinite;
}
.brand.busy .brand-bar {
  display: block;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  transition: border-color 0.15s;
}
.search:focus-within {
  border-color: var(--accent);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.search kbd {
  font:
    0.75rem ui-monospace,
    monospace;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.actions {
  display: flex;
  gap: 8px;
}

