:root {
  color-scheme: dark;
  --bg: #0a1020;
  --bg-strong: #060b16;
  --bg-overlay: rgba(7, 12, 24, 0.78);
  --panel: rgba(15, 23, 39, 0.9);
  --panel-strong: rgba(19, 30, 49, 0.96);
  --panel-soft: rgba(20, 28, 44, 0.76);
  --panel-elevated: rgba(10, 17, 31, 0.92);
  --line: rgba(122, 143, 176, 0.18);
  --line-strong: rgba(122, 143, 176, 0.3);
  --text: #edf3ff;
  --muted: #96a7c8;
  --muted-strong: #bac8e2;
  --accent: #68a8ff;
  --accent-strong: #97c5ff;
  --accent-soft: #9185ff;
  --success: #1fd289;
  --warning: #ffbe55;
  --danger: #ff7f8f;
  --info: #63a7ff;
  --safe: #6ce6bc;
  --long: #1fd289;
  --short: #ff7f8f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 3px rgba(104, 168, 255, 0.24);
  --chart-grid: rgba(124, 142, 169, 0.16);
  --chart-guide: rgba(124, 142, 169, 0.12);
  --chart-line: #70b0ff;
  --chart-point: #a7cbff;
  --chart-fill-start: rgba(112, 176, 255, 0.3);
  --chart-fill-end: rgba(112, 176, 255, 0.02);
  --chart-position: #23d991;
  --chart-contrast: #08111f;
  --chart-surface: #0f172a;
  --chart-label: #d6e5ff;
  --app-width: min(100vw - 24px, 1900px);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #edf2fb;
  --bg-strong: #dae5f5;
  --bg-overlay: rgba(243, 246, 252, 0.82);
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(250, 252, 255, 0.96);
  --panel-soft: rgba(243, 247, 255, 0.82);
  --panel-elevated: rgba(255, 255, 255, 0.96);
  --line: rgba(80, 101, 132, 0.16);
  --line-strong: rgba(80, 101, 132, 0.28);
  --text: #182235;
  --muted: #5f7391;
  --muted-strong: #364863;
  --accent: #286fd8;
  --accent-strong: #1755af;
  --accent-soft: #6b5fd9;
  --success: #0d8d5b;
  --warning: #b97711;
  --danger: #c44454;
  --info: #286fd8;
  --safe: #0d8d5b;
  --long: #0d8d5b;
  --short: #c44454;
  --shadow: 0 22px 55px rgba(39, 57, 85, 0.14);
  --shadow-soft: 0 12px 28px rgba(39, 57, 85, 0.1);
  --focus-ring: 0 0 0 3px rgba(40, 111, 216, 0.14);
  --chart-grid: rgba(84, 104, 135, 0.12);
  --chart-guide: rgba(84, 104, 135, 0.08);
  --chart-line: #286fd8;
  --chart-point: #3f88f0;
  --chart-fill-start: rgba(40, 111, 216, 0.2);
  --chart-fill-end: rgba(40, 111, 216, 0.03);
  --chart-position: #0d8d5b;
  --chart-contrast: #f6f9ff;
  --chart-surface: #f7faff;
  --chart-label: #22314a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at top left, rgba(104, 168, 255, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(145, 133, 255, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg-strong) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Aptos", "Segoe UI Variable", "Trebuchet MS", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.app-shell {
  width: var(--app-width);
  margin: 0 auto;
  padding: 14px 0 28px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.topbar,
.panel,
.login-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-strong) 0%, var(--panel) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace-topbar,
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-radius: 28px;
  padding: 24px 28px;
}

.workspace-topbar {
  position: relative;
  z-index: 1;
}

.workspace-brand {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.workspace-brand h1,
.login-panel h1,
.topbar h1 {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI Variable", "Trebuchet MS", sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-copy {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.55;
}

.workspace-command-deck {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.workspace-status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.status-cluster-card {
  min-width: 0;
  min-width: 126px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.topbar-actions,
.panel-actions,
.button-stack-inline,
.legend-row,
.flag-list,
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.panel-actions > *,
.topbar-actions > * {
  min-width: 0;
}

.topbar-actions {
  justify-content: flex-end;
}

.pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status-badge.running,
.status-badge.connected,
.status-badge.configured_demo_read_only,
.status-badge.applied,
.status-badge.recommend_approve,
.status-badge.healthy,
.status-badge.enabled,
.status-badge.active-runtime {
  background: rgba(31, 210, 137, 0.12);
  color: var(--success);
  border-color: rgba(31, 210, 137, 0.24);
}

.status-badge.paused,
.status-badge.queued,
.status-badge.awaiting_authorization,
.status-badge.awaiting_account_binding,
.status-badge.degraded,
.status-badge.warning,
.status-badge.caution,
.status-badge.neutral {
  background: rgba(255, 190, 85, 0.12);
  color: var(--warning);
  border-color: rgba(255, 190, 85, 0.22);
}

.status-badge.stopped,
.status-badge.initialized,
.status-badge.info,
.status-badge.inactive-runtime,
.status-badge.disabled {
  background: rgba(122, 143, 176, 0.12);
  color: var(--muted-strong);
  border-color: var(--line);
}

.status-badge.killed,
.status-badge.error,
.status-badge.rejected,
.status-badge.failed,
.status-badge.blocked,
.status-badge.recommend_reject {
  background: rgba(255, 127, 143, 0.12);
  color: var(--danger);
  border-color: rgba(255, 127, 143, 0.22);
}

.workspace-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.summary-panel {
  align-self: start;
}

#global-error,
#control-feedback,
#runtime-warning-box {
  margin: 0;
}

#dashboard-root {
  margin-top: 0;
}

.panel,
.login-panel {
  border-radius: 26px;
  padding: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-header > :first-child {
  min-width: 0;
  flex: 1 1 auto;
}

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

.panel-header-compact {
  margin-bottom: 12px;
}

.panel-header h2,
.panel-header h3 {
  margin: 4px 0 0;
  font-family: "Bahnschrift", "Segoe UI Variable", "Trebuchet MS", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.panel-header h2 {
  font-size: 1.28rem;
}

.panel-header h3 {
  font-size: 1.05rem;
}

.panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.stats-grid,
.stats-row,
.meta-grid,
.toggle-grid,
.two-column-grid,
.three-column-grid,
.workstation-bottom-grid {
  display: grid;
  gap: 14px;
}

.stats-grid,
.stats-row {
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
}

.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.two-column-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.three-column-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workstation-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: start;
}

.workspace-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.workspace-column > * {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.workspace-column-left,
.workspace-column-right {
  align-self: start;
}

.workspace-column-center {
  min-width: 0;
}

.chart-workspace-panel {
  padding-bottom: 18px;
}

.chart-shell {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    linear-gradient(180deg, rgba(6, 11, 22, 0.2), rgba(6, 11, 22, 0)),
    var(--chart-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.chart-shell-dominant {
  min-height: 420px;
}

.chart-shell svg {
  width: 100%;
  height: 360px;
  display: block;
}

.chart-shell-dominant svg {
  height: 420px;
}

.chart-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.workspace-focus-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.focus-chip {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.focus-chip-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.focus-chip-value {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-weight: 700;
  font-size: 1rem;
}

.focus-chip .overflow-value-group {
  margin-top: 0;
}

.focus-chip.tone-safe {
  border-color: rgba(31, 210, 137, 0.22);
  background: rgba(31, 210, 137, 0.08);
}

.focus-chip.tone-warning {
  border-color: rgba(255, 190, 85, 0.22);
  background: rgba(255, 190, 85, 0.08);
}

.focus-chip.tone-danger {
  border-color: rgba(255, 127, 143, 0.22);
  background: rgba(255, 127, 143, 0.08);
}

.stat-card,
.meta-card,
.toggle-card,
.workspace-subpanel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-soft);
}

.stat-card,
.meta-card,
.toggle-card {
  padding: 14px 16px;
}

.workspace-subpanel {
  padding: 18px;
}

.stat-label,
.meta-label {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overflow-value-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin-top: 8px;
}

.stat-value,
.meta-value,
.meta-list-value,
.table-cell-value,
.focus-chip-value,
.overflow-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-value,
.meta-value {
  display: block;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.overflow-value.allow-wrap,
.table-cell-value.allow-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}

.value-copy-button {
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.72rem;
  line-height: 1;
  transition: opacity 120ms ease, color 120ms ease, border-color 120ms ease;
}

.overflow-value-group:hover .value-copy-button,
.overflow-value-group:focus-within .value-copy-button {
  opacity: 1;
  pointer-events: auto;
}

.value-copy-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button-small {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.button-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #061120;
  border-color: transparent;
  font-weight: 700;
}

[data-theme="light"] .button-primary {
  color: #f7fbff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.button-danger {
  background: linear-gradient(180deg, var(--danger) 0%, #ff9ca8 100%);
  border-color: transparent;
  color: #1d0d12;
  font-weight: 700;
}

[data-theme="light"] .button-danger {
  color: #fff7f9;
}

.button-ghost,
.button-segment {
  border-color: var(--line);
  background: transparent;
}

.button-segment.is-active {
  border-color: rgba(104, 168, 255, 0.3);
  background: rgba(104, 168, 255, 0.14);
  color: var(--accent-strong);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted-strong);
}

.flag-pill button {
  border: 0;
  background: none;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 700;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(122, 143, 176, 0.1);
}

.meta-list-label {
  flex: 0 1 42%;
  min-width: 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-list .overflow-value-group {
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-top: 0;
}

.table-wrap td .overflow-value-group {
  margin-top: 0;
}

.meta-list span:last-child,
.meta-list-value {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-weight: 700;
}

.summary-meta-list div:last-child,
.compact-meta-list div:last-child {
  border-bottom: 0;
}

.summary-meta-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  align-content: start;
}

.summary-meta-list div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
}

.table-wrap-viewport {
  max-height: 320px;
}

.table-wrap-wide {
  max-height: 420px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  text-align: left;
  background: rgba(8, 12, 24, 0.9);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--line);
}

[data-theme="light"] thead th {
  background: rgba(248, 250, 255, 0.95);
}

tbody td {
  padding: 12px;
  border-bottom: 1px solid rgba(122, 143, 176, 0.08);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.9rem;
  min-width: 0;
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(104, 168, 255, 0.06);
}

.table-empty {
  color: var(--muted);
  text-align: center;
  font-family: "Aptos", "Segoe UI Variable", "Trebuchet MS", sans-serif;
}

.table-cell-value {
  display: block;
  max-width: 100%;
}

.table-row-selected td,
.is-selected-row td {
  background: rgba(104, 168, 255, 0.12);
}

.alert {
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid transparent;
}

.alert-error {
  background: rgba(255, 127, 143, 0.12);
  color: var(--danger);
  border-color: rgba(255, 127, 143, 0.2);
}

.alert-warning {
  background: rgba(255, 190, 85, 0.12);
  color: var(--warning);
  border-color: rgba(255, 190, 85, 0.18);
}

.alert-success {
  background: rgba(31, 210, 137, 0.12);
  color: var(--success);
  border-color: rgba(31, 210, 137, 0.18);
}

.hidden {
  display: none !important;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-swatch-equity,
.legend-swatch.long-entry {
  background: var(--chart-line);
}

.legend-swatch-position,
.legend-swatch.long-exit {
  background: var(--chart-position);
}

.legend-swatch-runtime,
.legend-swatch.event-control {
  background: var(--accent-soft);
}

.legend-swatch.short-entry,
.legend-swatch.event-risk {
  background: var(--warning);
}

.legend-swatch.short-exit,
.legend-swatch.event-broker {
  background: var(--danger);
}

.broker-account-selection {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.broker-account-selection-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.broker-account-selection select,
.broker-account-selection input,
.stack-form input,
.stack-form select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .broker-account-selection select,
[data-theme="light"] .broker-account-selection input,
[data-theme="light"] .stack-form input,
[data-theme="light"] .stack-form select {
  background: rgba(255, 255, 255, 0.9);
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 6px;
}

.stack-form span {
  color: var(--muted);
  font-size: 0.88rem;
}

.broker-demo-order-form,
.stack-cluster {
  display: grid;
  gap: 16px;
}

.broker-demo-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.proposal-review-grid {
  margin-top: 4px;
}

.inline-form-action {
  display: grid;
  gap: 8px;
  align-content: end;
}

.workstation-bottom {
  margin-top: 16px;
}

.workstation-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collapsible-panel.is-collapsed .panel-body {
  display: none;
}

.panel-toggle-button {
  white-space: nowrap;
}

.login-page {
  min-height: calc(100vh - 28px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(1100px, 100%);
  padding: 26px;
}

.login-panel-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.login-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 24px;
}

.login-copy-block {
  display: grid;
  gap: 14px;
  align-content: start;
}

.login-copy-block h1 {
  margin-top: 0;
}

.login-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-rail-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  display: grid;
  gap: 8px;
}

.login-form-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-elevated);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel-span-2 {
  grid-column: span 2;
}

.code-block {
  max-height: 380px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-elevated);
  color: var(--muted-strong);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 0.86rem;
}

.broker-events-wrap {
  margin-top: 0;
}

.chart-shell .trade-marker {
  cursor: pointer;
}

.chart-shell .trade-marker.is-selected {
  filter: drop-shadow(0 0 8px rgba(104, 168, 255, 0.4));
}

@media (max-width: 1380px) {
  .workstation-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .workspace-column-right {
    grid-column: span 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .workspace-summary-grid,
  .login-hero,
  .login-rail,
  .workstation-bottom-grid,
  .workspace-column-right {
    grid-template-columns: 1fr;
  }

  .workstation-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel-span-2 {
    grid-column: span 1;
  }

  .workspace-topbar,
  .topbar,
  .broker-account-selection {
    flex-direction: column;
  }

  .workspace-command-deck,
  .topbar-actions {
    justify-items: stretch;
    width: 100%;
  }

  .workspace-status-cluster,
  .topbar-actions {
    justify-content: flex-start;
  }

  .summary-meta-list {
    grid-template-columns: 1fr;
  }

  .summary-meta-list div:nth-last-child(-n + 2) {
    border-bottom: 1px solid rgba(122, 143, 176, 0.1);
  }

  .summary-meta-list div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 16px, 1900px);
    padding-top: 8px;
  }

  .workspace-topbar,
  .topbar,
  .panel,
  .login-panel {
    border-radius: 22px;
  }

  .workspace-topbar,
  .topbar {
    padding: 18px;
  }

  .panel,
  .login-panel {
    padding: 18px;
  }

  .workspace-status-cluster {
    width: 100%;
  }

  .status-cluster-card {
    flex: 1 1 140px;
  }

  .broker-demo-order-grid,
  .toggle-grid,
  .meta-grid,
  .stats-grid,
  .stats-row,
  .two-column-grid,
  .three-column-grid,
  .workspace-focus-strip {
    grid-template-columns: 1fr;
  }

  .workspace-legend-actions {
    justify-content: flex-start;
  }

  .broker-account-selection-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .chart-shell-dominant svg,
  .chart-shell svg {
    height: 320px;
  }
}
