/* Staff theme. Customer-facing pages keep their own theme and storage. */
.workspace-sidebar-head,
.workspace-mobile-tools,
.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.login-brand-row { margin-bottom: 26px; }
.login-brand-row .login-brand { margin-bottom: 0; }

.workspace-theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 39px;
  width: 39px;
  min-height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 18px;
}

.workspace-theme-toggle[hidden],
.workspace-theme-toggle .ti-sun,
.workspace-theme-toggle[aria-pressed="true"] .ti-moon { display: none; }
.workspace-theme-toggle[aria-pressed="true"] .ti-sun { display: inline-block; }

.workspace-theme-toggle:hover,
.workspace-theme-toggle[aria-pressed="true"] {
  border-color: var(--workspace-info-edge, #a9bdf3);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

@media (max-width: 900px) {
  .workspace-sidebar-head { display: none; }
}

[data-workspace-theme="dark"] {
  color-scheme: dark;
  --bg: #111927;
  --surface: var(--workspace-panel);
  --surface-soft: var(--workspace-soft);
  --line: var(--workspace-edge);
  --line-soft: #2a384d;
  --border: var(--workspace-edge);
  --text: var(--workspace-strong-text);
  --muted: var(--workspace-muted-text);
  --ink: #f1f5fd;
  --brand: #3359da;
  --brand-dark: var(--workspace-info-text);
  --brand-soft: #233658;
  --brand-strong: #284bc4;
  --focus: #91b6ff;
  --blue: var(--workspace-info-text);
  --green: var(--workspace-ok-text);
  --yellow: var(--workspace-warn-text);
  --red: var(--workspace-error-text);
  --button-fill: #30445f;
  --danger-fill: #a23741;
  --shadow-soft: 0 14px 34px #060c16a3;
  --workspace-panel: #182336;
  --workspace-soft: #1d2a3e;
  --workspace-raised: #26364d;
  --workspace-control: #151f30;
  --workspace-nav: #101722;
  --workspace-edge: #354761;
  --workspace-strong-text: #eaf1fc;
  --workspace-muted-text: #afbed2;
  --workspace-subtle-text: #93a5be;
  --workspace-glass: #182336f7;
  --workspace-focus-ring: #91b6ff38;
  --workspace-info-bg: #23385a;
  --workspace-info-text: #a9c6ff;
  --workspace-info-edge: #43628f;
  --workspace-ok-bg: #203b33;
  --workspace-ok-text: #82dbad;
  --workspace-ok-edge: #386555;
  --workspace-warn-bg: #3a3023;
  --workspace-warn-text: #f5c880;
  --workspace-warn-edge: #70562f;
  --workspace-error-bg: #3d2a34;
  --workspace-error-text: #ffa79e;
  --workspace-error-edge: #774853;
  --workspace-violet-bg: #332d4e;
  --workspace-violet-text: #c7bbff;
  background: var(--bg);
  color: var(--text);
}

[data-workspace-theme="dark"] :is(.sidebar, .workspace-navigation, .workspace-mobile-bar) {
  background: var(--workspace-nav);
}

[data-workspace-theme="dark"] .login {
  background: radial-gradient(ellipse at 16% 8%, #263a61, transparent 56%), var(--bg);
}

[data-workspace-theme="dark"] :is(input, textarea, select):not(:disabled, [readonly], [type="checkbox"], [type="radio"], [type="range"]) {
  background-color: var(--workspace-control);
}

[data-workspace-theme="dark"] :is(input, textarea)::placeholder {
  color: var(--workspace-subtle-text);
}

[data-workspace-theme="dark"] :is(a, button, summary, input, textarea, select, [tabindex="0"]):focus-visible {
  outline-color: var(--focus);
}

[data-workspace-theme="dark"] .segmented input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.workspace-theme-toggle:focus-visible {
  outline: 2px solid var(--focus, var(--brand));
  outline-offset: 2px;
}
