.server-state {
  display: inline-flex;
  align-items: center;
  padding-inline: 4px 2px;
  color: var(--muted-strong);
}

.state-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutral);
}

.state-dot[data-state="online"] {
  background: var(--positive);
}

.state-dot[data-state="offline"] {
  background: var(--negative);
}

.state-dot[data-state="loading"] {
  background: var(--warning);
}

.field > span,
.cell-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icon-button {
  display: inline-flex;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.dashboard-action-rail {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  pointer-events: auto;
}

.dashboard-action-rail > button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 5px;
  background: transparent;
  border-color: color-mix(in srgb, var(--border) 25%, transparent);
  opacity: .58;
  box-shadow: none;
  transition: opacity .15s ease, background-color .15s ease, border-color .15s ease;
}

.dashboard-action-rail button[aria-expanded="true"],
.dashboard-action-rail button[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  opacity: .78;
}

.dashboard-action-rail > button:hover,
.dashboard-action-rail > button:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, var(--surface-alt) 28%, transparent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.dashboard-action-rail > button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.dashboard-action-rail .metascalp-official-logo {
  display: block;
  width: 22px;
  height: 22px;
  max-width: none;
  filter: grayscale(1);
}

.dashboard-action-rail [aria-pressed="true"] .metascalp-official-logo {
  filter: none;
}

.dashboard-action-rail [data-error="true"] {
  border-color: var(--negative);
}

.theme-toggle {
  padding: 0;
}

.theme-toggle__icon {
  color: var(--muted-strong);
  font-size: 14px;
}

.column-freeze-toggle {
  padding: 0;
  color: var(--muted);
}

.column-freeze-toggle > span {
  font-size: 14px;
  line-height: 1;
}

.column-freeze-toggle.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.error-banner {
  padding: 6px 8px;
  border: 1px solid var(--negative);
  border-radius: var(--radius-sm);
  background: var(--negative-bg);
  color: var(--negative);
}
