:root {
  color-scheme: dark;
  --bg-primary: #1c1c1e;
  --bg-secondary: #2c2c2e;
  --bg-tertiary: #3a3a3c;
  --sidebar-bg: rgba(39, 39, 41, 0.9);
  --toolbar-bg: rgba(44, 44, 46, 0.92);
  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-tertiary: #636366;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-active: rgba(255, 255, 255, 0.1);
  --accent: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --teal: #64d2ff;
  --shadow-soft: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-medium: 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 6px 24px rgba(0, 0, 0, 0.34);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #e8e8ed;
  --sidebar-bg: rgba(240, 240, 242, 0.92);
  --toolbar-bg: rgba(248, 248, 250, 0.92);
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-active: rgba(0, 0, 0, 0.08);
  --accent: #007aff;
  --green: #248a3d;
  --red: #d70015;
  --orange: #c93400;
  --teal: #0071a4;
  --shadow-soft: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 8px 28px rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-width: 320px; height: 100%; background: #101012; font-size: 13px; }
body { width: 100%; height: 100%; margin: 0; overflow: hidden; color: var(--text-primary); background: #101012; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: 0; }
button { border: 0; cursor: default; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.auth-gate { width: 100vw; height: 100vh; display: grid; place-items: center; overflow: auto; padding: 32px 16px; color: var(--text-primary); background: #101012; }
.auth-state, .auth-panel { width: min(420px, 100%); padding: 28px; border: 0.5px solid var(--border-strong); border-radius: 12px; background: var(--bg-secondary); box-shadow: var(--shadow-medium); }
.auth-state { text-align: center; }.auth-state p:last-child { margin-bottom: 0; color: var(--text-secondary); }
.auth-mark, .account-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--accent); font: 600 12px "SF Mono", Menlo, monospace; }
.auth-panel h1 { margin: 6px 0 8px; font-size: 22px; line-height: 28px; }.eyebrow { margin: 16px 0 0; color: var(--accent); font-size: 11px; font-weight: 600; }.auth-copy { margin: 0 0 18px; color: var(--text-secondary); line-height: 18px; }.auth-form { margin-top: 20px; }.auth-form .field { margin-bottom: 12px; }.auth-footnote { margin: 16px 0 0; color: var(--text-tertiary); font-size: 11px; line-height: 17px; }.form-message { margin: 8px 0 12px; font-size: 11px; line-height: 17px; }.form-message.error { color: var(--red); }.form-message.success { color: var(--green); }.text-button { margin-top: 16px; padding: 0; color: var(--accent); background: transparent; }

.window { width: 100vw; height: 100vh; display: grid; grid-template-rows: 52px minmax(0, 1fr); overflow: hidden; background: var(--bg-primary); }
.titlebar { min-width: 0; display: grid; grid-template-columns: 224px minmax(240px, 1fr) auto; align-items: center; border-bottom: 0.5px solid var(--border); background: var(--toolbar-bg); backdrop-filter: saturate(180%) blur(20px); z-index: 20; }
.window-identity { min-width: 0; display: flex; align-items: center; gap: 8px; padding-left: 16px; }
.window-identity strong { margin-left: 4px; overflow: hidden; color: var(--text-secondary); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.traffic { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2); }
.traffic.red { background: #ff5f57; }.traffic.yellow { background: #febc2e; }.traffic.green { background: #28c840; }
.global-search { justify-self: center; width: min(420px, 82%); height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--text-secondary); background: var(--bg-tertiary); border-radius: 6px; box-shadow: inset 0 0 0 0.5px var(--border-strong); }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text-primary); background: transparent; }
.global-search kbd { color: var(--text-tertiary); font: 9px "SF Mono", Menlo, monospace; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.account-button { max-width: 150px; min-height: 28px; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; padding: 5px 8px; border-radius: 6px; color: var(--text-primary); background: var(--bg-tertiary); box-shadow: var(--shadow-soft); }.account-button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.account-button:hover { background: color-mix(in srgb, var(--bg-tertiary) 82%, var(--text-primary)); }
.sync-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.status-dot.warn { background: var(--orange); }.status-dot.error { background: var(--red); }

.icon-button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--text-secondary); background: transparent; }
.icon-button:hover { color: var(--text-primary); background: var(--surface-hover); }
.toolbar-button, .primary-button, .secondary-button { min-height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 11px; border-radius: 6px; color: var(--text-primary); background: var(--bg-tertiary); box-shadow: var(--shadow-soft); }
.primary-button, .toolbar-button.primary { color: #fff; background: var(--accent); box-shadow: none; }
.secondary-button:hover, .toolbar-button:hover { background: color-mix(in srgb, var(--bg-tertiary) 82%, var(--text-primary)); }
.full-width { width: 100%; }

.app-shell { min-width: 0; min-height: 0; display: grid; grid-template-columns: 224px minmax(460px, 1fr) 320px; }
.sidebar { min-height: 0; overflow: auto; padding: 10px 8px 14px; border-right: 0.5px solid var(--border); background: var(--sidebar-bg); backdrop-filter: saturate(180%) blur(20px); }
.nav-group { margin-top: 10px; }.nav-group:first-child { margin-top: 0; }
.nav-label { padding: 0 9px 4px; color: var(--text-tertiary); font-size: 11px; font-weight: 600; }
.nav-item { width: 100%; min-height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border-radius: 6px; color: var(--text-secondary); background: transparent; text-align: left; }
.nav-item:hover { color: var(--text-primary); background: var(--surface-hover); }.nav-item.active { color: var(--text-primary); background: var(--surface-active); }
.nav-glyph { width: 16px; color: var(--text-tertiary); text-align: center; font: 11px "SF Mono", Menlo, monospace; }.nav-item.active .nav-glyph { color: var(--accent); }
.nav-count { margin-left: auto; color: var(--text-tertiary); font-size: 11px; }
.sidebar-footer { margin-top: 16px; padding: 12px 9px 0; border-top: 0.5px solid var(--border); color: var(--text-tertiary); font-size: 11px; }
.sidebar-footer div { display: flex; justify-content: space-between; margin-top: 6px; gap: 10px; }

.workspace { min-width: 0; min-height: 0; overflow: auto; background: var(--bg-primary); }
.view { display: none; min-height: 100%; }.view.active { display: block; }
.view-header { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 0.5px solid var(--border); }
.view-title { min-width: 0; }.view-title h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; }.view-title p { margin: 2px 0 0; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.badge { min-height: 18px; display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; color: var(--text-secondary); background: var(--bg-tertiary); font-size: 9px; line-height: 12px; white-space: nowrap; }
.badge.green { color: var(--green); }.badge.red { color: var(--red); }.badge.orange { color: var(--orange); }.badge.blue { color: var(--accent); }
.positive { color: var(--green) !important; }.negative { color: var(--red) !important; }.warning { color: var(--orange) !important; }

.market-strip { display: flex; gap: 18px; padding: 8px 16px; overflow-x: auto; border-bottom: 0.5px solid var(--border); color: var(--text-secondary); font-size: 11px; }
.market-strip span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }.market-strip strong { color: var(--text-primary); font-weight: 500; }
.metrics-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 0.5px solid var(--border); }
.metric { min-width: 0; padding: 12px 16px; border-right: 0.5px solid var(--border); }.metric:last-child { border-right: 0; }
.metric > span { display: block; color: var(--text-secondary); font-size: 11px; }.metric strong { display: block; margin-top: 3px; overflow: hidden; font-size: 17px; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }.metric small { display: block; margin-top: 2px; overflow: hidden; color: var(--text-tertiary); text-overflow: ellipsis; white-space: nowrap; }

.monitor-grid { min-height: 560px; display: grid; grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); }
.signal-pane { min-width: 0; border-right: 0.5px solid var(--border); }
.section-toolbar { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-bottom: 0.5px solid var(--border); }
.section-toolbar strong { font-size: 12px; }.segmented { display: inline-flex; padding: 2px; border-radius: 6px; background: var(--bg-secondary); box-shadow: inset 0 0 0 0.5px var(--border); }
.segmented button { min-width: 48px; height: 24px; padding: 0 8px; border-radius: 4px; color: var(--text-secondary); background: transparent; }.segmented button.active { color: var(--text-primary); background: var(--bg-tertiary); box-shadow: var(--shadow-soft); }
.signal-row { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 12px; border-bottom: 0.5px solid var(--border); color: inherit; background: transparent; text-align: left; }
.signal-row:hover { background: var(--surface-hover); }.signal-row.selected { background: var(--surface-active); }
.signal-symbol { display: flex; align-items: baseline; gap: 7px; }.signal-symbol strong { font-size: 13px; }.signal-symbol span { min-width: 0; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.signal-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }.signal-price { text-align: right; }.signal-price strong { display: block; font: 500 12px "SF Mono", Menlo, monospace; }.signal-price span { font-size: 11px; }
.chart-pane { min-width: 0; padding: 14px 16px; }.quote-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.quote-head h2 { margin: 0; font-size: 17px; }.quote-head p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }.quote-value { text-align: right; }.quote-value strong { display: block; font: 600 17px "SF Mono", Menlo, monospace; }
.chart-wrap { height: 260px; position: relative; margin-top: 12px; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }.chart-grid { position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0, transparent 63px, var(--border) 64px); }.chart-wrap svg { position: absolute; inset: 8px 0; width: 100%; height: calc(100% - 16px); }
.evidence-band { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }.evidence-band div { padding: 10px 8px; border-right: 0.5px solid var(--border); }.evidence-band div:last-child { border-right: 0; }.evidence-band span { display: block; color: var(--text-secondary); font-size: 11px; }.evidence-band strong { display: block; margin-top: 3px; }
.context-note { margin-top: 14px; padding: 1px 0 1px 10px; border-left: 2px solid var(--orange); color: var(--text-secondary); line-height: 18px; }

.content-pad { padding: 16px 18px 28px; }.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.panel-title h2 { margin: 0; font-size: 15px; line-height: 20px; }.section-gap { margin-top: 22px; }
.table-scroll { width: 100%; overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }.data-table th { height: 32px; padding: 0 10px; border-bottom: 0.5px solid var(--border-strong); color: var(--text-tertiary); font-size: 11px; font-weight: 500; text-align: left; }.data-table td { height: 42px; padding: 5px 10px; overflow: hidden; border-bottom: 0.5px solid var(--border); text-overflow: ellipsis; white-space: nowrap; }.data-table .empty-cell { height: 96px; color: var(--text-secondary); text-align: center; }

.market-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0.5px solid var(--border); border-left: 0.5px solid var(--border); }.market-source-grid > div { min-height: 160px; padding: 14px; border-right: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }.market-source-grid h2 { margin: 10px 0 0; font-size: 15px; }.market-source-grid p { min-height: 38px; color: var(--text-secondary); line-height: 18px; }

.backtest-layout { display: grid; grid-template-columns: minmax(240px, 34%) minmax(0, 1fr); border-top: 0.5px solid var(--border); }.control-panel { padding: 14px 16px 24px; border-right: 0.5px solid var(--border); }.analysis-panel { min-width: 0; padding: 14px 16px 24px; }
.ai-compose { padding: 11px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 9%, var(--bg-secondary)); box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--accent) 32%, transparent); }.compose-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.ai-compose textarea { width: 100%; min-height: 92px; margin: 9px 0; padding: 8px; resize: vertical; border: 0; border-radius: 6px; color: var(--text-primary); background: var(--bg-primary); box-shadow: inset 0 0 0 0.5px var(--border-strong); line-height: 18px; }
.contract-panel { margin-top: 12px; padding: 11px; border-left: 2px solid var(--accent); background: var(--bg-secondary); }.contract-list { margin: 0; }.contract-list div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 7px 0; border-bottom: 0.5px solid var(--border); }.contract-list dt { color: var(--text-secondary); }.contract-list dd { margin: 0; line-height: 17px; }.inference-list { display: grid; gap: 5px; margin: 10px 0; }.inference-item { color: var(--orange); font-size: 11px; line-height: 16px; }
.form-section { margin-top: 18px; }.form-section h3 { margin: 0 0 10px; font-size: 12px; }.field { display: grid; gap: 5px; margin-bottom: 10px; }.field > span { color: var(--text-secondary); font-size: 11px; }.field input, .field select, .field textarea { width: 100%; min-height: 30px; padding: 5px 8px; border: 0; border-radius: 6px; color: var(--text-primary); background: var(--bg-secondary); box-shadow: inset 0 0 0 0.5px var(--border-strong); outline: 0; }.field textarea { min-height: 72px; resize: vertical; line-height: 18px; }
.button-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.analysis-empty { min-height: 460px; display: grid; place-items: center; align-content: center; color: var(--text-secondary); text-align: center; }.analysis-empty h2 { margin: 0; color: var(--text-primary); font-size: 15px; }.analysis-empty p { margin: 6px 0 0; }.state-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 8px; background: var(--bg-secondary); }
.equity-chart { height: 250px; position: relative; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }.equity-chart svg { position: absolute; inset: 8px 0; width: 100%; height: calc(100% - 16px); }.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }.result-grid > div { padding: 10px; border-right: 0.5px solid var(--border); }.result-grid > div:last-child { border-right: 0; }.result-grid span { display: block; color: var(--text-secondary); font-size: 11px; }.result-grid strong { display: block; margin-top: 4px; font: 600 15px "SF Mono", Menlo, monospace; }

.review-layout { display: grid; grid-template-columns: minmax(260px, 40%) 1fr; gap: 20px; }.review-layout h2 { margin: 0 0 8px; font-size: 15px; }.review-layout p { color: var(--text-secondary); line-height: 18px; }
.settings-content { max-width: 800px; }.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }.wide-field { grid-column: 1 / -1; }.purpose-fieldset { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; padding: 10px 12px; border: 0.5px solid var(--border-strong); border-radius: 6px; }.purpose-fieldset legend { padding: 0 5px; color: var(--text-secondary); font-size: 11px; }.purpose-fieldset label { display: inline-flex; align-items: center; gap: 6px; }.button-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }.setting-row { min-height: 54px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; border-bottom: 0.5px solid var(--border); }.setting-row p { margin: 4px 0 0; color: var(--text-secondary); font-size: 11px; }

.account-body, .admin-body { min-width: 0; }.account-summary { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 0.5px solid var(--border); }.account-summary strong, .account-summary span { display: block; }.account-summary span { margin-top: 3px; color: var(--text-secondary); font-size: 11px; }.account-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }.account-facts div { min-width: 0; padding: 8px; background: var(--bg-primary); }.account-facts span, .account-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.account-facts span { color: var(--text-secondary); font-size: 10px; }.account-facts strong { margin-top: 3px; font-size: 11px; }.account-actions { justify-content: flex-start; margin-top: 0; }.account-section, .admin-section { margin-top: 20px; padding-top: 16px; border-top: 0.5px solid var(--border); }.account-section h3, .admin-section h3 { margin: 0; font-size: 13px; }.dialog-copy { margin: 0 0 14px; color: var(--text-secondary); line-height: 18px; }.member-list { display: grid; border-top: 0.5px solid var(--border); }.member-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 0.5px solid var(--border); }.member-row strong, .member-row span { display: block; }.member-row span { margin-top: 3px; overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.member-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }.member-actions .secondary-button { min-height: 26px; padding: 4px 8px; font-size: 11px; }.one-time-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; margin-top: 16px; padding: 10px; border-left: 2px solid var(--orange); background: var(--bg-primary); }.one-time-result p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }.one-time-token { grid-column: 1 / -1; min-width: 0; display: block; overflow-wrap: anywhere; padding: 8px; color: var(--orange); background: var(--bg-secondary); font: 11px "SF Mono", Menlo, monospace; }.one-time-result .secondary-button { grid-column: 2; grid-row: 1; }

.inspector { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 0.5px solid var(--border); background: var(--bg-secondary); }.inspector-head { padding: 14px 14px 10px; border-bottom: 0.5px solid var(--border); }.inspector-title { display: flex; justify-content: space-between; gap: 8px; }.inspector-title h2 { margin: 0; font-size: 17px; }.inspector-title p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }.data-source { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.inspector-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px 0; }.inspector-tabs button { height: 28px; color: var(--text-secondary); background: transparent; border-bottom: 2px solid transparent; }.inspector-tabs button.active { color: var(--text-primary); border-color: var(--accent); }.inspector-scroll { min-height: 0; flex: 1; overflow: auto; padding: 12px 14px 18px; }.inspector-panel { display: none; }.inspector-panel.active { display: block; }
.score-row { min-height: 34px; display: grid; grid-template-columns: 78px 1fr 38px; gap: 8px; align-items: center; border-bottom: 0.5px solid var(--border); }.score-row > span { color: var(--text-secondary); }.score-track { height: 5px; overflow: hidden; border-radius: 3px; background: var(--bg-tertiary); }.score-fill { width: 50%; height: 100%; background: var(--accent); }.score-fill.green { background: var(--green); }.score-fill.red { background: var(--red); }.score-row strong { overflow: hidden; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.inspector-section { margin-top: 16px; }.inspector-section h3 { margin: 0 0 7px; font-size: 12px; }.inspector-section ul { margin: 0; padding: 0; list-style: none; }.inspector-section li { position: relative; padding: 5px 0 5px 14px; color: var(--text-secondary); line-height: 17px; }.inspector-section li::before { position: absolute; top: 11px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--green); content: ""; }.inspector-section .counter li::before { background: var(--orange); }.plan-line { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 8px 0; border-bottom: 0.5px solid var(--border); }.plan-line span { color: var(--text-secondary); }.inspector-actions { padding: 10px 12px; border-top: 0.5px solid var(--border); }.inspector-actions button { width: 100%; }.mobile-close { display: none; }

.empty-state { min-height: 140px; display: grid; place-items: center; align-content: center; padding: 20px; color: var(--text-secondary); text-align: center; }.empty-state strong { color: var(--text-primary); }.empty-state span { margin-top: 5px; font-size: 11px; }

dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 12px; color: var(--text-primary); background: var(--bg-secondary); box-shadow: var(--shadow-medium); } dialog::backdrop { background: rgba(0, 0, 0, 0.48); backdrop-filter: blur(2px); }.dialog-shell { margin: 0; }.dialog-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 0.5px solid var(--border); }.dialog-head h2 { margin: 0; font-size: 15px; }.dialog-body { padding: 14px 16px 16px; }.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.order-side { margin-bottom: 12px; }
#adminDialog { width: min(760px, calc(100vw - 32px)); }
.toast-stack { position: fixed; z-index: 100; top: 66px; right: 16px; display: grid; gap: 8px; pointer-events: none; }.toast { min-width: 280px; max-width: 360px; display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--toolbar-bg); box-shadow: var(--shadow-medium); backdrop-filter: saturate(180%) blur(20px); animation: toast-in 220ms var(--ease); }.toast strong { display: block; font-size: 12px; }.toast span { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 11px; line-height: 16px; }@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .titlebar { grid-template-columns: 196px minmax(220px, 1fr) auto; }
  .app-shell { grid-template-columns: 196px minmax(430px, 1fr) 280px; }
  .window-identity strong, .sync-state span:last-child { display: none; }
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }.metric:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2) { border-bottom: 0.5px solid var(--border); }
  .monitor-grid { grid-template-columns: minmax(270px, 42%) minmax(0, 1fr); }
  .result-grid { grid-template-columns: repeat(2, 1fr); }.result-grid > div:nth-child(2) { border-right: 0; }.result-grid > div:nth-child(-n+2) { border-bottom: 0.5px solid var(--border); }
}

@media (max-width: 900px) {
  .auth-gate { place-items: start center; padding: 18px 12px; }.auth-state, .auth-panel { margin: auto 0; padding: 22px 18px; }.auth-panel h1 { font-size: 20px; line-height: 26px; }
  .window { grid-template-rows: 48px minmax(0, 1fr); }
  .titlebar { grid-template-columns: 1fr auto; }
  .window-identity { padding-left: 12px; }.traffic, .global-search, .sync-state, .toolbar-button .button-label { display: none; }.window-identity strong { display: block; margin: 0; color: var(--text-primary); font-size: 13px; font-weight: 600; }.toolbar-actions { grid-column: 2; }.toolbar-button { width: 28px; padding: 0; }.account-button { max-width: 82px; padding: 5px; }
  .app-shell { display: block; position: relative; }.workspace { height: 100%; padding-bottom: 58px; }
  .sidebar { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; height: 58px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 6px 5px; overflow: hidden; border-top: 0.5px solid var(--border); border-right: 0; }.nav-group { display: contents; }.nav-label, .sidebar-footer, .nav-item:not(.mobile-primary) { display: none; }.nav-item.mobile-primary { min-height: 48px; display: grid; place-items: center; align-content: center; gap: 1px; padding: 2px; border-radius: 6px; font-size: 9px; text-align: center; }.nav-item.mobile-primary .nav-glyph { width: auto; font-size: 13px; }.nav-count { display: none; }
  .view-header { min-height: 58px; align-items: flex-start; padding: 10px 12px; }.view-title h1 { font-size: 17px; line-height: 22px; }.view-title p { max-width: 240px; }.market-strip { padding: 7px 12px; }.metric { padding: 10px 12px; }.metric strong { font-size: 15px; }
  .monitor-grid { display: block; min-height: 0; }.signal-pane { border-right: 0; }.chart-pane { display: none; }.content-pad { padding: 12px 12px 22px; }
  .backtest-layout { display: block; }.control-panel { padding: 14px 12px 22px; border-right: 0; border-bottom: 0.5px solid var(--border); }.analysis-panel { padding: 14px 12px 22px; }.analysis-empty { min-height: 220px; }.equity-chart { height: 210px; }
  .market-source-grid, .settings-grid, .review-layout { grid-template-columns: 1fr; }.wide-field { grid-column: auto; }.market-source-grid > div { min-height: 130px; }
  .data-table { min-width: 620px; }.settings-content { max-width: none; }
  .inspector { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; height: min(78vh, 690px); transform: translateY(105%); transition: transform 250ms var(--ease); border-top: 0.5px solid var(--border-strong); border-left: 0; border-radius: 12px 12px 0 0; box-shadow: var(--shadow-medium); }.inspector.open { transform: translateY(0); }.mobile-close { display: grid; }
  dialog, #adminDialog { width: 100%; max-width: none; max-height: 88vh; margin: auto 0 0; border-radius: 12px 12px 0 0; }.account-facts { grid-template-columns: 1fr; }.member-row { grid-template-columns: 1fr; }.member-actions { justify-content: flex-start; }.one-time-result { grid-template-columns: minmax(0, 1fr) auto; }.toast-stack { top: 58px; right: 10px; left: 10px; }.toast { min-width: 0; max-width: none; }
}
