/* SupremeTrader workspace: shared layout and component system. */
:root {
  --bg: #0c0f13; --panel: #13171d; --panel2: #191f27; --line: #272d35;
  --text: #edf1f5; --muted: #939da9; --green: #70e1c2; --blue: #89baff;
  --red: #ff8293; --amber: #edc17b; --radius: 14px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.55; color-scheme: dark;
}
body { background: var(--bg); }
a { color: var(--green); text-underline-offset: 4px; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { transition: background .16s, color .16s, border-color .16s; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }
.ui-icon { flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--green); color: #10231c; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-sidebar { width: 240px; padding: 30px 18px 16px; background: #101318; border-right: 1px solid var(--line); backdrop-filter: none; overflow-y: auto; }
.brand { display: flex; text-decoration: none; color: var(--text); margin: 0 8px 35px; gap: 11px; }
.brand .logo { position: relative; width: 36px; height: 38px; border: 1px solid #83ebcd; border-radius: 11px; background: var(--green); color: #102c25; font-size: 25px; font-weight: 850; font-style: italic; box-shadow: none; }
.brand .logo > span { position: absolute; width: 6px; height: 6px; background: #101318; border: 2px solid var(--green); right: -3px; top: 2px; border-radius: 50%; }
.brand-copy { display: block; }
.brand b { font-size: 18px; letter-spacing: -.7px; font-weight: 750; }
.brand b > span { font-weight: 400; }
.brand small { font-size: 8px; letter-spacing: 2px; color: #8e9aa6; margin-top: 1px; }
.app-sidebar nav { display: flex; flex-direction: column; gap: 24px; }
.nav-group { display: grid; gap: 4px; }
.nav-label { padding-left: 13px; margin: 0 0 6px; font-size: 9px; letter-spacing: 1.8px; font-weight: 650; color: #78838f; }
.app-sidebar nav a { display: flex; justify-content: flex-start; min-height: 43px; padding: 10px 12px; gap: 12px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 500; color: #a5aeb9; }
.app-sidebar nav a .nav-text { width: auto; font-size: inherit; text-align: left; }
.app-sidebar nav a > .ui-icon { width: 19px; height: 19px; color: #838e9b; }
.app-sidebar nav a:hover { background: #1b222a; color: #fff; }
.app-sidebar nav a.active { color: #a5f3db; background: #1a302b; border-color: #29473d; box-shadow: none; }
.app-sidebar nav a.active > .ui-icon { color: var(--green); }
.nav-tag { margin-left: auto; font-size: 8px; border: 1px solid #39443a; padding: 1px 5px; border-radius: 4px; color: #b9c59e; }
.sidebar-footer { margin-top: auto; padding-top: 28px; }
.app-sidebar .sidebar-footer form { display: block; }
.mode { padding: 12px 13px; border-radius: 9px; background: #171c23; font-size: 11px; letter-spacing: 0; }
.mode-heading { display: block; color: #d5dde6; font-weight: 600; }
.mode small { display: block; margin: 4px 0 0 15px; color: var(--muted); font-size: 10px; }
.mode i { width: 6px; height: 6px; box-shadow: none !important; }
.sidebar-footer .ghost { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border: 0; text-align: left; font-size: 12px; }
.mobile-topbar, .nav-backdrop { display: none; }
.dashboard { margin-left: 240px; max-width: 1900px; padding: 0 36px 48px; min-width: 0; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; height: 64px; margin-bottom: 30px; border-bottom: 1px solid var(--line); color: #828d9b; font-size: 11px; }
.workspace-bar b { color: #c6cdd6; font-weight: 500; }
.breadcrumb-divider { padding: 0 13px; color: #525b68; }
.workspace-mode { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: 1px; border: 1px solid #314438; background: #19241d; border-radius: 5px; padding: 4px 8px; color: #b1d2ae; }
.workspace-mode i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.workspace-mode.paper { border-color: #30455c; background: #18222d; color: #a5c6eb; }
.dashboard > .page-header { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.eyebrow { font-size: 9px; letter-spacing: 1.9px; color: #86938e; font-weight: 600; margin: 0 0 7px; }
h1 { font-size: clamp(27px, 2.5vw, 37px); font-weight: 650; letter-spacing: -1.2px; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
h3 { font-size: 13px; color: #c5cdd5; }
.page-description { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.primary, .secondary, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 10px 15px; font-size: 12px; font-weight: 600; border-radius: 7px; text-decoration: none; box-shadow: none; }
.primary { background: var(--green); color: #10291f; border: 1px solid var(--green); }
.primary:hover { background: #9befd7; filter: none; }
.secondary { border: 1px solid #343d47; background: #1a2028; color: #dce3eb; }
.secondary:hover, .ghost:hover { background: #262e38; border-color: #566170; }
.run-cycle { white-space: nowrap; }
.run-cycle .ui-icon { width: 15px; height: 15px; }
.ghost { border-color: var(--line); }
.danger-link { font-size: 12px; border-radius: 6px; }
.danger-link:hover { background: #341f28; }
.panel, .stats article { min-width: 0; padding: 23px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.panel-title { gap: 15px; margin-bottom: 21px; align-items: center; }
.panel-title h2 { margin: 0; }
.panel-title p { font-size: 12px; margin: 6px 0 0; }
.panel-title .eyebrow { font-size: 9px; margin: 0 0 5px; }
.text-link, .panel-title a { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; color: #a6b9b1; text-decoration: none; }
.text-link:hover, .panel-title a:hover { color: var(--green); }
.text-link .ui-icon, .panel-title a .ui-icon { width: 16px; height: 16px; }
.grid { gap: 20px; }
.grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.dashboard > section, .dashboard > form, .dashboard > details { margin-bottom: 20px; }
.stats { gap: 16px; margin-bottom: 20px; }
.stats article { padding: 21px; }
.stats small { color: #a1aab6; font-size: 12px; }
.stats strong { font-size: clamp(24px, 2.3vw, 34px); font-weight: 600; letter-spacing: -.9px; font-variant-numeric: tabular-nums; }
.stats em { color: #929da9; font-size: 11px; }
.stats article:first-child { background: #17251f; border-color: #2d483d; }
.system-health { background: #12181b; border-radius: 9px; margin-bottom: 24px !important; }
.system-health > summary { padding: 12px 16px; font-size: 11px; }
.system-health > summary strong { font-weight: 500; color: #b8c6bd; font-size: 11px; }
.system-health > summary small { font-size: 10px; color: #89958e; }
.health-light, .health-item > span { box-shadow: none !important; width: 6px; height: 6px; }
.health-item { background: #141b20; padding: 14px; }
.health-item b { font-size: 11px; }
.health-item small { font-size: 11px; margin-top: 3px; }
.system-health-warning { border-color: #51452e; }
.system-health-error { border-color: #60363e; }
.system-health-error > summary strong { color: var(--red); }
.system-health-warning > summary strong { color: var(--amber); }
.overview-top { display: grid; grid-template-columns: minmax(290px, 1.05fr) minmax(0, 2fr); gap: 20px; }
.capital-card { padding: 25px 27px 20px; background: linear-gradient(115deg, #213b31, #182722); border: 1px solid #385748; border-radius: var(--radius); }
.capital-heading, .capital-heading > span:first-child { display: flex; align-items: center; gap: 9px; }
.capital-heading { justify-content: space-between; color: #b8d3c7; font-size: 12px; }
.subtle-badge { display: inline-flex; padding: 3px 7px; border: 1px solid #43564b; border-radius: 5px; font-size: 9px; letter-spacing: .7px; color: #b6c9bd; }
.capital-value { font-size: clamp(32px, 3.2vw, 49px); font-weight: 600; line-height: 1.3; letter-spacing: -1.7px; margin: 20px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.capital-value > span { color: #86a597; font-weight: 400; margin-right: 5px; }
.capital-value > small { margin-left: 9px; font-size: 11px; letter-spacing: 0; color: #9fb8ac; font-weight: 500; }
.capital-allocation { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #a3bbae; }
.capital-allocation b { margin-left: 7px; color: #dcece3; font-weight: 500; }
.capital-note { margin: 10px 0 18px; color: #a3bbae; font-size: 10px; }
.allocation-track { height: 4px; margin: 10px 0 18px; background: #30463c; border-radius: 10px; overflow: hidden; }
.allocation-track > span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.capital-link { display: flex; align-items: center; justify-content: space-between; color: #d9e8e0; font-size: 11px; text-decoration: none; }
.capital-link .ui-icon { width: 16px; height: 16px; }
.overview-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { display: flex; flex-direction: column; padding: 23px 19px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.metric-card:hover { background: #1a2027; border-color: #45554d; }
.metric-icon { display: grid; place-items: center; width: 33px; height: 33px; margin-bottom: 17px; border: 1px solid #303a43; background: #1b242c; border-radius: 9px; color: #a7b8c7; }
.metric-card:nth-child(2) .metric-icon { color: #c5b1e9; background: #25212f; border-color: #3c344b; }
.metric-card:nth-child(3) .metric-icon { color: #dcc797; background: #2b281e; border-color: #443e2e; }
.metric-card > small { color: #a0aab6; font-size: 11px; }
.metric-card > strong { display: block; font-size: 38px; line-height: 1.3; font-weight: 550; letter-spacing: -1px; margin: 6px 0 14px; }
.metric-card > span:last-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: auto; font-size: 10px; color: #8794a1; }
.metric-card > span:last-child .ui-icon { width: 14px; height: 14px; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.overview-rail { display: grid; gap: 20px; grid-column: 2; grid-row: 1; }
.recent-orders { grid-column: 1 / -1; }
.overview-signal { color: var(--text); text-decoration: none; padding: 18px 0; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; }
.overview-signal:hover { background: #19221f; }
.signal-author { display: flex; flex-wrap: wrap; gap: 3px 14px; align-items: center; }
.signal-author b { font-size: 12px; font-weight: 600; }
.signal-author small { font-size: 9px; color: #88939f; }
.overview-signal p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; margin: 6px 0; font-size: 12px; color: #adb5c0; overflow-wrap: anywhere; }
.signal-asset { font-size: 10px; color: #83b2a4; }
.signal-direction { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; color: #b1bac5; background: #252b34; font-size: 9px; font-weight: 600; white-space: nowrap; }
.signal-direction.buy, .signal-direction.bullish, mark.filled { color: #9be5c7; background: #20392f; }
.signal-direction.sell, .signal-direction.bearish, mark.failed, mark.rejected { color: #ff9dab; background: #3b242d; }
.signal-direction.pending { color: #d9c094; background: #302b20; }
.platform { width: 34px; height: 34px; border-radius: 10px; }
.platform.x { color: #e2e6ec; background: #252a32; }
.security-card > .panel-title > .ui-icon { color: #8a9e91; }
.safety { padding: 12px; background: #1a2b23; border-color: #304b3d; gap: 10px; }
.safety b { font-size: 11px; font-weight: 600; }
.safety p { font-size: 10px; line-height: 1.6; margin-top: 3px; color: #b0c4b8; }
.safety > span { flex: 0 0 23px; width: 23px; height: 23px; font-size: 12px; }
.safety.armed p { color: #e1abb2; }
.security-card .text-link, .attention-card .text-link { justify-content: space-between; width: 100%; padding-top: 15px; border-top: 1px solid var(--line); }
.security-card, .attention-card { padding: 21px; }
.security-card h2, .attention-card h2 { font-size: 14px; }
.risk-limits { display: grid; gap: 14px; margin: 20px 0; font-size: 11px; }
.risk-limits > div { display: flex; justify-content: space-between; gap: 10px; }
.risk-limits dt { color: #97a2ad; }
.risk-limits dd { margin: 0; font-variant-numeric: tabular-nums; }
.attention-card p { font-size: 12px; line-height: 1.7; }
.table-wrap { max-width: 100%; scrollbar-width: thin; scrollbar-color: #425048 transparent; }
table { font-variant-numeric: tabular-nums; }
th { background: #181d24; color: #a1aab5; padding: 12px 14px; font-size: 9px; letter-spacing: .8px; font-weight: 600; }
td { padding: 17px 14px; color: #bec7d1; border-bottom: 1px solid #242b33; font-size: 12px; }
td small, td code { color: #939eab; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #191f26; }
td .ghost { margin-top: 0; }
mark { border-radius: 5px; padding: 4px 7px; font-size: 10px; }
.empty { padding: 34px 20px; line-height: 1.7; font-size: 12px; }
.designed-empty { padding: 50px 20px; }
.designed-empty > .ui-icon { width: 32px; height: 32px; color: #88b6a6; }
.designed-empty h3 { margin: 15px 0 6px; font-size: 16px; color: #d9e2df; }
.designed-empty p { max-width: 330px; margin: 0 auto 20px; }
form label { color: #bdc6d0; font-size: 12px; font-weight: 500; margin: 17px 0; }
input, select, textarea { background: #0f141a; border-color: #323b46; border-radius: 7px; min-height: 42px; margin-top: 7px; padding: 10px 12px; color: #e4ebf2; font-size: 13px; }
input::placeholder, textarea::placeholder { color: #73808e; }
input:focus, select:focus, textarea:focus { border-color: #73bda3; box-shadow: 0 0 0 3px #70e1c212; }
input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; min-height: 0; accent-color: var(--green); vertical-align: middle; margin: 0 6px 0 0; }
input[type="range"] { accent-color: var(--green); padding: 0; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
.switch input { display: block; position: absolute; opacity: 0; width: 32px; height: 24px; }
.switch input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 4px; }
.form-grid { gap: 0 22px; }
.toggles { flex-wrap: wrap; }
form.toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 20px; align-items: end; padding: 16px; margin-bottom: 20px; background: #191f26; border: 1px solid var(--line); border-radius: 9px; }
form.toggles label { display: block; min-width: 0; margin: 0; }
form.toggles label:has(input[type="checkbox"]) { display: flex; align-items: center; min-height: 42px; }
form.toggles input[type="number"], form.toggles input[type="range"] { width: 100%; }
form label > small { display: block; color: #8996a4; font-size: 11px; font-weight: 400; margin-top: 6px; }
.danger-zone { background: #2b2024; border-color: #503039; border-radius: 9px; padding: 16px; }
.danger-zone p { color: #d7acb5; line-height: 1.7; }
.integration-grid { gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.integration-head { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.integration-head p, .privacy-note { color: #929fac; line-height: 1.65; }
.integration-head i.connected { box-shadow: none; }
.settings-layout { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: 25px; align-items: start; }
.section-navigation { position: sticky; top: 22px; display: grid; gap: 5px; }
.section-navigation p { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; padding: 0 11px; margin: 7px 0 10px; }
.section-navigation a { padding: 10px 11px; font-size: 12px; text-decoration: none; border-left: 2px solid #303b35; color: #a3aea9; border-radius: 0 5px 5px 0; }
.section-navigation a:hover { color: #c6f2df; background: #1d2c25; border-color: var(--green); }
.settings-content { min-width: 0; }
.settings-content > .panel { margin-bottom: 20px; scroll-margin-top: 20px; }
.settings-content > .panel > h2 { padding-bottom: 17px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.save-fixed { position: sticky; bottom: 18px; margin: 16px 0; z-index: 3; box-shadow: 0 5px 25px #0007; }
.feed-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; }
.feed-tools > span { font-size: 11px; color: var(--muted); }
body[data-tab="feed"] .panel-title { flex-wrap: wrap; }
body[data-tab="feed"] .panel-title > .feed-tools { width: 100%; padding: 14px; background: #191e25; border-radius: 8px; }
.message { scroll-margin-top: 25px; }
.message summary { padding: 21px 0; }
.message summary p { font-size: 13px; color: #b6c0cc; line-height: 1.75; overflow-wrap: anywhere; }
.message:not([open]) summary p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.message summary small { color: #8a98a8; }
.message summary > div { min-width: 0; }
.message[open] { background: #151e22; padding: 0 14px; margin: 0 -14px; border-radius: 10px; }
.analysis.smart-analysis { background: #10171b; border: 1px solid #2a3935; padding: 20px; }
.fold-section, .early-bird-settings, .portfolio-section { border: 1px solid var(--line); background: var(--panel); border-radius: 11px; margin-bottom: 20px; overflow: clip; }
.fold-section > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 22px; list-style: none; font-size: 13px; font-weight: 600; }
.fold-section > summary::after { content: '+'; color: var(--green); font-size: 21px; font-weight: 400; }
.fold-section[open] > summary::after { content: '−'; }
.fold-section > summary::-webkit-details-marker { display: none; }
.fold-section > .panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; }
.portfolio-section[open] > summary, .portfolio-section > summary:hover { background: #1c2622; }
.portfolio-section > summary small { color: #97a79e; }
.early-bird-settings-body { padding: 20px; }
.early-bird-settings > summary { padding: 18px 22px; }
dialog { background: var(--panel); border-color: #3e4a44; border-radius: 17px; }
.modal-form { padding: 27px; }
.modal-head { border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.modal-head button { min-width: 40px; min-height: 40px; border-radius: 7px; }
.source-extra, .purchase-config details { margin: 15px 0; }
.signal-network { margin-bottom: 20px; }
.network-live { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #344238; border-radius: 999px; color: #aab8ae!important; }
.network-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.network-live.on i { background: var(--green); box-shadow: 0 0 8px #36e49b88; }
.network-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.network-summary article { padding: 14px; border: 1px solid #29352f; border-radius: 10px; background: #111a16; }
.network-summary small,.network-summary span { display: block; color: var(--muted); font-size: 10px; }
.network-summary strong { display: block; margin: 4px 0; font-size: 22px; }
.network-warning { display: flex; gap: 9px; padding: 11px 13px; margin-bottom: 13px; border: 1px solid #684b29; border-radius: 9px; background: #2d2115; color: #e8c48f; font-size: 11px; }
.network-warning span { color: #bc9d71; overflow-wrap: anywhere; }
.network-meta { display: flex; flex-wrap: wrap; gap: 9px 20px; margin: 12px 0; color: var(--muted); font-size: 11px; }
.network-meta b { color: #cbd7cf; }
.network-progress { width: 105px; height: 5px; margin-bottom: 5px; overflow: hidden; border-radius: 99px; background: #28322e; }
.network-progress i { display: block; width: var(--progress); height: 100%; background: linear-gradient(90deg,#398c73,var(--green)); }
.network-table mark.validated_positive { color: var(--green); }
.network-table mark.validated_negative { color: var(--red); }
.network-results { margin-bottom: 20px; }
.network-results > summary span { display: flex; align-items: baseline; gap: 9px; }
.network-results > summary small { color: var(--muted); font-weight: 400; }
.network-results .panel { padding-top: 8px; }
.shadow-return.positive { color: var(--green); }
.shadow-return.negative { color: var(--red); }
.network-results mark.historical { color: #aab4c0; }
.network-results mark.forward { color: var(--green); }
.network-backtest-note { margin: 4px 0 14px; font-size: 11px; }
.source-extra > summary, .purchase-config details > summary { padding: 12px 0; cursor: pointer; color: #c4d4ca; }
.alert { font-size: 13px; line-height: 1.65; }
.alert.danger { opacity: 1; transform: none; }
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100dvh; padding: 0; }
.auth-story { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; padding: 48px 60px; background: radial-gradient(ellipse at 25% 60%, #24423566, transparent 65%), #111b17; border-right: 1px solid #2b3931; }
.auth-story .brand { margin: 0; }
.auth-story-content { max-width: 500px; margin: 60px 0; }
.auth-story-content h2 { font-size: clamp(34px, 4vw, 62px); line-height: 1.15; letter-spacing: -2px; font-weight: 500; margin: 20px 0; }
.auth-story-content h2 span { color: var(--green); }
.auth-story-content p { max-width: 370px; font-size: 14px; line-height: 1.9; color: #a2b4a9; }
.auth-flow { display: flex; gap: 10px; margin-top: 35px; align-items: center; flex-wrap: wrap; color: #7ba38d; }
.auth-flow span { border: 1px solid #3b5041; border-radius: 6px; padding: 8px 13px; color: #bdd1c4; font-size: 11px; }
.auth-story > small { color: #83978a; font-size: 10px; letter-spacing: 1px; }
.auth-card { width: min(420px, calc(100% - 60px)); padding: 24px 0; background: none; border: 0; border-radius: 0; box-shadow: none; justify-self: center; }
.auth-card > .brand { display: none; }
.auth-card h1 { font-size: 30px; letter-spacing: -.8px; }
.auth-card > p { margin: 12px 0 32px; font-size: 13px; }
.auth-card form label { margin: 20px 0; }
.auth-card input { min-height: 48px; }
.auth-card .primary { width: 100%; min-height: 47px; margin-top: 12px; }
@media (min-width: 1550px) { .dashboard { padding-inline: 48px; } .overview-layout { grid-template-columns: minmax(0, 1fr) 350px; } }
@media (max-width: 1200px) and (min-width: 901px) {
  .app-sidebar { width: 205px; padding-inline: 12px; }
  .brand b { font-size: 16px; }
  .dashboard { margin-left: 205px; padding-inline: 24px; }
  .overview-top { grid-template-columns: 1fr; }
  .overview-layout { grid-template-columns: minmax(0, 1fr) 275px; }
  .capital-value { margin-block: 12px; }
  .metric-card { padding: 18px; }
  .metric-icon { margin-bottom: 10px; }
  .settings-layout { grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 900px) { .network-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } .network-warning { flex-direction: column; } }
@media (min-width: 901px) and (max-width: 1000px) {
  .app-sidebar .brand-copy { display: block; }
  .app-sidebar .brand { margin-left: 8px; }
  .app-sidebar .mode { display: block; }
  .grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  body, body[data-tab="settings"], body[data-tab="costs"] { padding-bottom: 0; overflow-x: clip; }
  .mobile-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 22px; background: #101318f5; border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
  .mobile-topbar .brand { margin: 0; }
  .mobile-topbar .brand-copy { display: block; }
  .mobile-topbar .brand b { font-size: 17px; }
  .mobile-topbar .logo { width: 30px; height: 32px; font-size: 21px; }
  .mobile-topbar button { min-height: 40px; width: 42px; padding: 8px; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(285px, 85vw); height: 100dvh; padding: 25px 18px; transform: translateX(-100%); visibility: hidden; box-shadow: none; }
  .app-sidebar .brand, .app-sidebar .brand-copy, .app-sidebar .mode { display: flex; }
  .app-sidebar .brand-copy, .app-sidebar .mode { display: block; }
  .app-sidebar nav { display: flex; flex-direction: column; flex: 0 0 auto; overflow: visible; padding: 0; gap: 20px; }
  .app-sidebar nav a, .app-sidebar nav a:not(.active) { flex: auto; flex-direction: row; justify-content: flex-start; min-height: 44px; min-width: 0; font-size: 13px; gap: 12px; padding: 10px 12px; scroll-snap-align: none; }
  .app-sidebar .sidebar-footer form { display: block; }
  body.navigation-open { overflow: hidden; }
  .navigation-open .app-sidebar { transform: translateX(0); visibility: visible; }
  .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; border: 0; background: #0009; backdrop-filter: blur(3px); }
  .dashboard { margin: 0; width: 100%; max-width: none; padding: 0 22px 30px; }
  .workspace-bar { height: 48px; margin-bottom: 23px; }
  .overview-top { grid-template-columns: minmax(0, 1fr); }
  .capital-value { font-size: 43px; }
  .overview-layout { grid-template-columns: minmax(0, 1fr); }
  .overview-rail { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-orders { grid-row: 2; }
  .grid.two, .integration-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .section-navigation { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .section-navigation p { width: 100%; margin: 0; padding: 0; }
  .section-navigation a { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
  .auth-story { padding: 40px 30px; }
  .auth-story-content h2 { font-size: 40px; }
  .auth-card { width: calc(100% - 45px); }
}
@media (max-width: 620px) {
  .dashboard { padding-inline: 16px; }
  .mobile-topbar { padding-inline: 16px; }
  .workspace-bar { font-size: 10px; margin-bottom: 20px; }
  .workspace-mode { font-size: 9px; }
  .dashboard > .page-header { flex-wrap: wrap; align-items: flex-start; gap: 15px; margin-bottom: 21px; }
  .dashboard > header h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.8px; }
  .page-description { font-size: 12px; max-width: 340px; line-height: 1.65; }
  .dashboard > .page-header .run-cycle { min-height: 38px; font-size: 11px; padding: 8px 11px; }
  .panel, .stats article { padding: 18px; border-radius: 11px; }
  .panel-title { align-items: flex-start; gap: 13px; }
  .panel-title a { font-size: 10px; }
  .stats { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats strong { font-size: 26px; overflow-wrap: anywhere; }
  .stats small, .stats em { font-size: 11px; }
  .capital-card { padding: 22px; }
  .capital-value { font-size: clamp(30px, 9vw, 43px); white-space: normal; overflow-wrap: anywhere; }
  .overview-top { gap: 12px; }
  .overview-metrics { gap: 8px; }
  .metric-card { padding: 14px 11px; border-radius: 10px; }
  .metric-icon { width: 28px; height: 28px; margin-bottom: 13px; }
  .metric-icon .ui-icon { width: 16px; height: 16px; }
  .metric-card > small { font-size: 10px; min-height: 31px; line-height: 1.5; }
  .metric-card > strong { font-size: 30px; margin: 5px 0 8px; }
  .metric-card > span:last-child { font-size: 9px; line-height: 1.5; }
  .metric-card > span:last-child .ui-icon { display: none; }
  .overview-layout, .overview-rail { gap: 14px; }
  .overview-rail { grid-template-columns: minmax(0, 1fr); }
  .overview-signal { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .overview-signal > .signal-direction { grid-column: 2; justify-self: start; }
  .signal-author { flex-direction: column; align-items: flex-start; }
  .signal-author small { font-size: 9px; }
  .overview-signal p { font-size: 13px; }
  .platform { width: 30px; height: 30px; }
  .system-health > summary { gap: 8px; }
  .system-health > summary { display: grid; grid-template-columns: 6px auto 1fr 8px; }
  .system-health > summary strong { justify-self: end; }
  .system-health > summary small { grid-row: 2; grid-column: 2 / 4; padding: 0; width: auto; }
  .system-health > summary i { grid-row: 1; grid-column: 4; }
  .panel-title > .subtle-badge { width: auto; }
  .system-health > summary strong { font-size: 10px; }
  .system-health > summary small { font-size: 9px; }
  .health-item { padding: 12px; }
  .health-item small { font-size: 11px; }
  input, select, textarea { font-size: 16px; min-height: 46px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  form label { font-size: 13px; }
  .save-fixed { bottom: 12px; right: auto; max-width: 100%; min-height: 46px; }
  .table-wrap { overflow-x: auto; }
  .mobile-card-table tr { background: #171d24; border-color: #303943; padding: 15px; }
  .mobile-card-table td { font-size: 13px; color: #d1d9e2; }
  .mobile-card-table td::before { color: #94a2b1; font-size: 9px; }
  .mobile-card-table[data-sortable] thead tr { flex-wrap: wrap; }
  .message summary { gap: 10px; }
  .message summary p { font-size: 14px; }
  .analysis.smart-analysis { margin-left: 0; padding: 14px; }
  .feed-tools, .feed-tools form { width: 100%; }
  .early-bird-settings-body { padding: 10px; }
  dialog { height: auto; max-height: 90dvh; margin-bottom: 0; }
  .modal-form { padding: 18px; }
  .modal-head { top: -18px; background: var(--panel); }
  .auth { display: flex; flex-direction: column; justify-content: center; min-height: 100dvh; padding: 30px 22px; }
  .auth-story { display: none; }
  .auth-card { width: min(420px, 100%); padding: 0; }
  .auth-card > .brand { display: flex; margin: 0 0 50px; }
  .auth-card .brand-copy { display: block; }
  .auth-card h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
