/* Theme controls do not participate in navigation or call state. */
.workspace-actions { display: flex; align-items: center; gap: 12px; }
button.theme-toggle {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  min-height: 38px; padding: 7px 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); white-space: nowrap;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-track { width: 30px; height: 18px; padding: 3px; border-radius: 99px; background: #a0a7b2; }
.theme-track::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.theme-toggle[aria-checked="true"] .theme-track { background: #4582f4; }
.theme-toggle[aria-checked="true"] .theme-track::after { transform: translateX(12px); }
.login-theme { position: absolute; top: 20px; right: 20px; }
.login-screen { position: relative; padding-top: 80px; }
@media (max-width: 600px) {
  .workspace-actions .workspace-tag { display: none; }
  button.theme-toggle { gap: 7px; padding: 6px 10px; font-size: 12px; }
  .workspace-bar { gap: 8px; }
}

/* Slate surfaces, soft white type and restrained blue accents. All geometry
   and visibility continue to come from the shared Studio stylesheet. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1017;
  --card: #131b25;
  --text: #e7edf6;
  --muted: #9aa8ba;
  --accent: #e7edf6;
  --danger: #d74747;
  --ok: #4cda8b;
  --border: #2a3747;
}
[data-theme="dark"] .sidebar.card,
[data-theme="dark"] .workspace-bar { background: #111923; }
[data-theme="dark"] .workspace-tag,
[data-theme="dark"] .placeholder-code,
[data-theme="dark"] .history-pill { background: #1a2533; }
[data-theme="dark"] .nav { color: #b0bdce; background: transparent; }
[data-theme="dark"] .nav:hover { background: #1d2a39; }
[data-theme="dark"] .nav.active { background: #e7edf6; color: #15202d; }
[data-theme="dark"] #btn-logout { color: #ffa0a7; }
[data-theme="dark"] .admin-app .brand-sub { color: var(--muted); }
[data-theme="dark"] .metrics,
[data-theme="dark"] .team-row,
[data-theme="dark"] .saved-agent-item { background: var(--card); }
[data-theme="dark"] label,
[data-theme="dark"] .steps strong { color: #c0ccdb; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #0e1620; border-color: var(--border); }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #8696aa; }
[data-theme="dark"] input[type=checkbox],
[data-theme="dark"] input[type=radio] { accent-color: #73a7ff; }
[data-theme="dark"] button { background: #213044; }
[data-theme="dark"] button:hover:not(:disabled) { background: #2d4058; }
[data-theme="dark"] button.primary { background: #e7edf6; color: #15202d; }
[data-theme="dark"] button.primary:hover:not(:disabled) { background: #cbd9eb; }
[data-theme="dark"] button.danger,
[data-theme="dark"] button.call-action-stop { background: #bd3038; color: #fff; }
[data-theme="dark"] button.danger:hover:not(:disabled) { background: #a42630; }
[data-theme="dark"] button.browser-operations-drain { background: #351e28; color: #ffb3b8; border-color: #79404b; }
[data-theme="dark"] button.browser-operations-drain:hover:not(:disabled) { background: #4c2633; }
[data-theme="dark"] button.theme-toggle { background: #182332; }
[data-theme="dark"] button.theme-toggle:hover { background: #233248; }
[data-theme="dark"] a { color: #91bcff; }
[data-theme="dark"] :where(button, input, select, textarea, a):focus-visible { outline-color: #91bcff; }
[data-theme="dark"] .pill.idle { color: #c6d3e3; background: #223044; }
[data-theme="dark"] .pill.run { background: #173c2e; color: #79e7ad; }
[data-theme="dark"] .check-fail,
[data-theme="dark"] .entity-config-error,
[data-theme="dark"] .login-error { color: #ffa0a7; }
[data-theme="dark"] .entity-stale { color: #edc679; }
[data-theme="dark"] .saved-agent-item.active-runtime { background: #142a24; border-color: #387d5e; }
[data-theme="dark"] .history-item { background: #182332; }
[data-theme="dark"] .history-item:hover,
[data-theme="dark"] .history-item.active { background: #25354a; border-color: #7798bf; }
[data-theme="dark"] .history-pill.accent { color: #a5c9ff; border-color: #6186b7; }
[data-theme="dark"] .history-pill.ok { color: #79e7ad; }
[data-theme="dark"] .history-transcript-view,
[data-theme="dark"] #logs { background: #0e1620; color: #b9c8da; }
[data-theme="dark"] .bubble.user { background: #203954; }
[data-theme="dark"] .bubble.agent { background: #253041; }
[data-theme="dark"] .reporting-table th,
[data-theme="dark"] .entity-table th { background: #1a2533; color: var(--muted); }
[data-theme="dark"] .reporting-table tbody tr:hover { background: #1c293a; }
[data-theme="dark"] .reporting-bar-track { background: #243247; }
[data-theme="dark"] .reporting-bar-fill { background: #7aa8ec; }
[data-theme="dark"] .login-screen { background: var(--bg); }
[data-theme="dark"] .nav:hover:not(:disabled) { background: #1d2a39; }
[data-theme="dark"] .nav.active:hover:not(:disabled) { background: #d2dff0; color: #15202d; }
