:root {
  --font: -apple-system, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Shared height for nav / inspector pane chrome (border-box). */
  --pane-chrome-height: 36px;

  --radius: 8px;
  --radius-sm: 6px;

  --bg: #17181c;
  --bg-elevated: #1f2025;
  --bg-inset: #14151a;
  --border: #2c2d33;
  --text: #e7e7ea;
  --text-muted: #9a9ba3;
  --accent: #6366f1;
  --accent-strong: #818cf8;
  --selection: rgba(59, 130, 246, 0.28);
  --danger: #ef4444;
  --success: #22c55e;
  --running: #2dd4bf;
  --warning: #eab308;
}

* {
  box-sizing: border-box;
}

/* Every focusable control gets the same visible ring — buttons, inputs,
   and other keyboard-operable controls share one focus treatment instead
   of relying on inconsistent browser defaults. */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  /* Single body size everywhere. Hierarchy comes from spacing, muted
     color, and weight — not new sizes. */
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
}

h3 {
  color: var(--text-muted);
  font-weight: 500;
}

p {
  margin: 0;
}

.muted {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* App shell */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.top-bar-start {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.header-nav-item {
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}

.header-nav-item:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.header-nav-item.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--selection);
  font-weight: 500;
}

.top-bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.app-title {
  font-weight: 500;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.brand-mark-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 2px;
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.view-pane {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Column pages fill the center pane — no inset max-width cards. */
.workspace-center > .view-pane > * {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

/* 3-column workspace — polynome projects-layout clone */

.workspace-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: row;
  min-width: 0;
  position: relative;
}

.workspace-layout::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--pane-chrome-height);
  height: 1px;
  background: var(--border);
  z-index: 4;
  pointer-events: none;
}

.workspace-layout.is-compact::after {
  display: none;
}

.workspace-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.workspace-main > .split-shell {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.workspace-layout .split-primary > .split-shell {
  height: 100%;
  min-height: 0;
}

.workspace-left,
.workspace-center,
.workspace-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.workspace-left {
  border-right: 1px solid transparent;
}

.workspace-right {
  border-left: 1px solid transparent;
}

.pane-chrome {
  box-sizing: border-box;
  flex: 0 0 var(--pane-chrome-height);
  height: var(--pane-chrome-height);
  max-height: var(--pane-chrome-height);
  min-height: 0;
  margin: 0;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.workspace-layout .pane-chrome {
  border-bottom-color: transparent;
  background: var(--bg);
}

.pane-chrome-label {
  color: var(--text-muted);
  font-weight: 500;
}

.layout-toggles {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.layout-toggle.active {
  border-color: var(--accent);
  color: var(--text);
}

.nav-rail,
.inspector-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.nav-rail-body,
.inspector-pane-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.inspector-pane-body {
  padding: var(--space-3);
}

.nav-rail-item {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-rail-item:hover {
  background: var(--bg-elevated);
}

.nav-rail-item.active {
  background: var(--selection);
  box-shadow: inset 3px 0 0 var(--accent-strong);
  color: var(--text);
  font-weight: 500;
}

/* Status bar */

.status-bar {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 24px;
  padding: 0 var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.status-bar-track {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.status-bar.is-loading .status-bar-track {
  opacity: 1;
}

.status-bar-track-bar {
  height: 100%;
  width: 35%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-strong),
    transparent
  );
  animation: status-bar-slide 1.1s ease-in-out infinite;
}

@keyframes status-bar-slide {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.status-bar-start,
.status-bar-center,
.status-bar-end {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.status-bar-start {
  flex: 1;
  gap: var(--space-3);
}

.status-bar-center {
  flex: 2;
  justify-content: center;
  overflow: hidden;
}

.status-bar-stats {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 24px;
}

.status-bar-end {
  flex: 1;
  margin-inline-start: 0;
  justify-content: flex-end;
  flex-shrink: 0;
}

.status-bar-path {
  flex-shrink: 1;
  min-width: 0;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 24px;
}

.status-bar-loading,
.status-bar-message-text {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 24px;
}

.status-bar-message {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.status-bar-message.is-success .status-bar-message-text,
.status-bar-message.is-error .status-bar-message-text {
  color: var(--text);
  font-weight: 500;
}

.status-bar-message.is-error .status-bar-message-text {
  color: var(--danger);
}

.status-bar-action {
  flex-shrink: 0;
  font: inherit;
  color: var(--accent-strong);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.status-bar-action:hover {
  text-decoration: underline;
}

.status-bar-dismiss {
  flex-shrink: 0;
  font: inherit;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
}

.status-bar-dismiss:hover {
  color: var(--text);
}

.app-version {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: text;
  line-height: 24px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--accent-strong);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.small {
  padding: var(--space-1) var(--space-2);
}

.btn.icon {
  padding: var(--space-1);
  width: 28px;
  height: 28px;
  justify-content: center;
}

.btn.icon-label {
  gap: var(--space-1);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

.btn.danger.armed {
  background: var(--danger);
  color: white;
}

.btn.cursor-open .cursor-icon {
  display: block;
}

/* Segmented control */

.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.segment {
  padding: var(--space-1) var(--space-4);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.segment.active {
  background: var(--accent);
  color: white;
}

/* Form fields */

.search-input {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: var(--text-muted);
}

.field input,
.field textarea {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
}

.field-error {
  margin: 0;
  color: var(--danger);
}

.field-label {
  display: block;
  color: var(--text-muted);
}

/* Dropzone — system file picker (drag / browse) */

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-inset);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
  outline: none;
}

.dropzone:hover:not(.is-disabled),
.dropzone:focus-visible:not(.is-disabled) {
  border-color: var(--accent);
}

.dropzone.is-dragover {
  border-style: solid;
  border-color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-inset));
}

.dropzone.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.dropzone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  pointer-events: none;
}

.dropzone-icon {
  display: inline-flex;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.dropzone-preview {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.dropzone-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 28rem;
}

.dropzone-label {
  color: var(--text);
  font-weight: 500;
}

.dropzone-hint {
  font-weight: 400;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-muted);
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge.running {
  border-color: var(--running);
  color: var(--running);
}

.badge.warn {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  color: var(--danger);
}

.badge.clean {
  border-color: var(--success);
  color: var(--success);
}

.badge.dirty {
  border-color: var(--warning);
  color: var(--warning);
}

/* Panels */

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pane-panel {
  height: 100%;
  min-height: 0;
  border-radius: 0;
  border: none;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
}

.pane-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.panel-header-end {
  justify-content: flex-end;
}

.panel-actions {
  display: inline-flex;
  gap: var(--space-2);
}

/* Resizable shell splits (columns / rows) — pairs with ResizableSplit */

.split-shell {
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.split-shell-dragging {
  user-select: none;
  cursor: inherit;
}

.split-shell-dragging.split-shell-horizontal,
.split-shell-dragging .split-handle-col {
  cursor: col-resize;
}

.split-shell-dragging.split-shell-vertical,
.split-shell-dragging .split-handle-row {
  cursor: row-resize;
}

.split-primary,
.split-secondary {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.split-handle {
  background: var(--border);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.split-handle::after {
  content: "";
  position: absolute;
  inset: -2px;
}

.split-handle-col {
  cursor: col-resize;
}

.split-handle-row {
  cursor: row-resize;
}

.split-handle:hover,
.split-shell-dragging .split-handle {
  background: var(--accent);
}

/* Status dot — pairs with the StatusDot component */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-stopped {
  background: var(--border);
}

.dot-pending {
  background: var(--warning);
}

.dot-running {
  background: var(--running);
}

.dot-blocked {
  background: var(--danger);
  opacity: 0.65;
}

.dot-crashed {
  background: var(--danger);
}

/* Empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-6);
}

.empty-state p {
  max-width: 360px;
  color: var(--text-muted);
}

/* Overlay scrollbars — never reserve gutter space. Styling
   `::-webkit-scrollbar` forces classic (layout-shifting) scrollbars in
   WebKit, so we leave them unstyled and rely on the platform overlay.
   Firefox gets a thin transparent track. */

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: auto;
}

html.is-scrolling,
html.is-scrolling * {
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

/* Circular panel spinner (first-paint only; named work uses the strip) */

.spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.spinner-ring {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong, var(--border));
  border-top-color: var(--accent-strong, var(--text-muted));
  border-radius: 50%;
  animation: spinner-rotate 0.7s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.panel-spinner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2) 0;
}

/* Floating notify hosts — growl (top), toast (bottom-left), snackbar (bottom-center). */

.notify-growls,
.notify-toasts,
.notify-snackbar-host {
  pointer-events: none;
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-4);
}

.notify-growls {
  inset-inline: 0;
  top: var(--space-4);
  align-items: center;
}

.notify-toasts {
  left: var(--space-4);
  bottom: calc(28px + var(--space-4));
  align-items: flex-start;
  max-width: min(360px, calc(100vw - 2rem));
}

.notify-snackbar-host {
  inset-inline: 0;
  bottom: calc(28px + var(--space-4));
  align-items: center;
}

.notify-growl,
.notify-toast,
.notify-snackbar {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  max-width: 420px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: notify-enter 180ms ease-out;
}

.notify-toast {
  max-width: 360px;
}

.notify-snackbar {
  max-width: 480px;
}

@keyframes notify-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .notify-growl,
  .notify-toast,
  .notify-snackbar {
    animation: none;
  }
}

.notify-growl.is-error,
.notify-toast.is-error,
.notify-snackbar.is-error {
  border-color: var(--danger);
}

.notify-growl.is-error .notify-message,
.notify-toast.is-error .notify-message {
  color: var(--danger);
  font-weight: 500;
}

.notify-toast.is-success .notify-message {
  color: var(--success);
}

.notify-message {
  flex: 1;
  min-width: 0;
}

.notify-action {
  flex-shrink: 0;
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.notify-action:hover {
  border-color: var(--accent);
  color: var(--text);
}

.notify-dismiss {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.notify-dismiss:hover {
  opacity: 1;
}

/* Auth (setup / sign-in) */

.auth-panel {
  width: min(360px, 90vw);
  text-align: left;
}

.auth-panel h1 {
  margin: 0 0 var(--space-1);
}

/* Account view — bleed column; panels are internal chrome only */

.account-view {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
}

.workspace-center .account-view > .panel {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.account-email {
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.user-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.user-row:last-child {
  border-bottom: none;
}

.user-row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.user-email {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email-secondary {
  font-size: 0.875em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Brands (admin) — full-bleed center column */

.brands-view {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.brands-view > .pane-chrome {
  justify-content: space-between;
}

.brand-create {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
  justify-content: flex-end;
  max-width: 28rem;
}

.brand-create-field {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.brand-create-field input {
  height: 28px;
}

.brands-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  box-sizing: border-box;
  min-height: var(--pane-chrome-height);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}

.brand-search {
  flex: 1;
  min-width: 10rem;
  margin: 0;
}

.brand-search input {
  height: 28px;
}

.brand-row-badges {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  flex-shrink: 0;
}

.brands-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.brand-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-empty {
  margin: 0;
  padding: var(--space-3);
  color: var(--text-muted);
}

.brand-edit-field {
  flex: 1;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.brand-row:hover {
  background: var(--bg-elevated);
}

.brand-row.selected {
  background: var(--selection);
  box-shadow: inset 3px 0 0 var(--accent-strong);
  color: var(--text);
}

.entity-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.1em;
  height: 1.1em;
  color: var(--text-muted);
  opacity: 0.95;
}

.brand-row.selected .entity-icon,
.nav-rail-item.active .entity-icon {
  color: var(--accent-strong);
}

.user-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.users-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.brand-search-status {
  white-space: nowrap;
}

.hover-rename {
  min-width: 0;
  flex: 1;
}

.hover-rename-display {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.hover-rename-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hover-rename-hint {
  color: var(--text-muted);
  flex-shrink: 0;
}

.hover-rename-input {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  color: var(--text);
  font: inherit;
}

.brand-inspector-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-3);
}

.brand-inspector-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-inspector-actions {
  display: flex;
  justify-content: flex-end;
}

.brand-inspector-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.brand-inspector-section h3 {
  margin: 0;
}

.brand-invite-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.brand-invite-field {
  margin: 0;
}

.brand-member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.brand-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.brand-member-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.brand-member-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

a.app-title {
  text-decoration: none;
  color: inherit;
}

a.btn.active {
  font-weight: 600;
}

/* Kit layout helpers */
.side-rail {
  display: flex;
  width: fit-content;
  min-width: 144px;
  flex-shrink: 0;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
}
.content-column {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
}
.content-column-centered {
  align-items: center;
  justify-content: center;
}
.content-column-inner {
  display: flex;
  width: 100%;
  max-width: 24rem;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}
.btn-icon-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.field-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.field-actions > :last-child {
  margin-left: auto;
}
