:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe4ea;
  --navy: #173b68;
  --navy-open: #e8f0f8;
  --orange: #d66b24;
  --orange-open: #fff1e7;
  --gold: #b58a24;
  --danger: #9f3442;
  --gain: #d92d20;
  --gain-open: #fff0ee;
  --loss: #07883f;
  --loss-open: #ecfdf3;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(23, 32, 51, 0.06);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.topbar { height: 68px; display: flex; align-items: center; gap: 28px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--navy); color: #fff; border-radius: 9px; font-size: 12px; letter-spacing: .08em; }
nav { display: flex; gap: 8px; flex: 1; }
nav a { padding: 9px 12px; border-radius: 8px; color: var(--muted); font-size: 14px; }
nav a:hover, nav a.active { color: var(--navy); background: var(--navy-open); }
.logout-form { margin-left: auto; }
.page-shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 60px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin: 5px 0 7px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.035em; }
.page-heading p, .panel-heading p, .login-heading p { color: var(--muted); margin: 0; line-height: 1.55; }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.source-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.status-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--navy-open); color: var(--navy); }
.success-badge { background: #edf6f1; color: #2f664a; }
.live-badge { background: var(--navy-open); color: var(--navy); }
.muted-badge { background: #eceff2; color: #697281; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.metric-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card { padding: 18px; min-height: 126px; display: flex; flex-direction: column; }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { margin-top: 15px; font-size: 24px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted); margin-top: auto; padding-top: 8px; }
.gain { color: var(--gain) !important; }
.loss { color: var(--loss) !important; }
.panel { margin-bottom: 18px; overflow: hidden; }
.panel-heading { padding: 19px 21px 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0 0 4px; font-size: 18px; }
.panel-heading p { font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--muted); background: #fafbfc; font-weight: 650; text-align: left; white-space: nowrap; }
th, td { border-top: 1px solid var(--line); padding: 12px 14px; vertical-align: middle; }
td { font-variant-numeric: tabular-nums; }
td small { color: var(--muted); }
.number { text-align: right; }
.valuation-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.valuation-cell strong { font-weight: 700; }
.valuation-cell small { font-size: 10px; }
.position-valuation-cell { min-width: 142px; gap: 4px; }
.position-valuation-cell > div { display: grid; width: 100%; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.position-valuation-cell > div small { color: var(--muted); text-align: left; }
.position-valuation-cell > div span, .position-valuation-cell > div strong { text-align: right; font-variant-numeric: tabular-nums; }
.position-valuation-cell > small { max-width: 160px; color: var(--muted); text-align: right; white-space: normal; }
.movement-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.movement-cell strong { font-weight: 750; }
.movement-cell small { color: currentColor; font-size: 10px; opacity: .82; }
.signal-list { display: flex; min-width: 120px; flex-wrap: wrap; gap: 4px; }
.signal-chip { display: inline-flex; padding: 3px 6px; border-radius: 6px; background: #f2f4f7; color: var(--muted); font-size: 10px; white-space: nowrap; }
.signal-chip.positive { background: var(--gain-open); color: var(--gain); }
.signal-chip.negative { background: var(--loss-open); color: var(--loss); }
.signal-chip.warning { background: var(--orange-open); color: #8c4819; }
.position-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.button.trade-buy { color: #fff; background: var(--gain); }
.button.trade-sell { color: #fff; background: var(--loss); }
.empty { color: var(--muted); text-align: center; padding: 36px; }
.alert-list { display: flex; flex-wrap: wrap; gap: 4px; }
.alert-chip { display: inline-flex; padding: 3px 6px; border-radius: 6px; background: var(--orange-open); color: #8c4819; font-size: 11px; }
.chart-heading { align-items: end; flex-wrap: wrap; }
.chart-controls { display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.compact-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.compact-label select { min-width: 150px; }
.chart-controls .compact-label { flex-direction: column; align-items: flex-start; gap: 5px; }
.chart-controls .compact-label select { min-width: 180px; padding: 8px 10px; }
.chart-controls .compact-label:nth-child(2) select { min-width: 108px; }
.professional-chart-shell { position: relative; min-height: 650px; background: #151517; border-top: 1px solid #292929; }
.professional-chart { width: 100%; height: clamp(650px, 76vh, 880px); }
.fund-nav-workspace { display: flex; width: 100%; height: clamp(650px, 76vh, 880px); min-height: 650px; flex-direction: column; background: #151517; color: #d6dae1; }
.fund-nav-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 11px 18px; border-bottom: 1px solid #292929; flex-wrap: wrap; }
.fund-nav-toolbar-left, .fund-nav-toolbar-right { display: flex; min-width: 0; align-items: center; gap: 10px; flex-wrap: wrap; }
.fund-nav-toolbar-right { justify-content: flex-end; margin-left: auto; }
.fund-nav-periods { display: flex; align-items: center; gap: 5px; }
.fund-nav-periods button { min-width: 42px; padding: 7px 11px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #929aa5; cursor: pointer; font-size: 13px; }
.fund-nav-periods button:hover, .fund-nav-periods button.active { border-color: #3b4553; background: #272a30; color: #fff; }
.fund-nav-interaction-hint, .fund-nav-window-label { color: #7e8793; font-size: 11px; white-space: nowrap; }
.fund-nav-view-controls { display: flex; align-items: center; gap: 4px; }
.fund-nav-view-controls button { min-width: 31px; height: 29px; padding: 0 8px; border: 1px solid #343943; border-radius: 5px; background: #202329; color: #b7bec8; cursor: pointer; font-size: 12px; line-height: 27px; }
.fund-nav-view-controls button:hover { border-color: #586273; color: #fff; }
.fund-nav-view-controls button:disabled { cursor: default; opacity: .38; }
.fund-nav-summary { color: #c5cad3; font-size: 13px; font-variant-numeric: tabular-nums; }
.fund-nav-plot { position: relative; min-height: 0; flex: 1; overflow: hidden; touch-action: none; user-select: none; }
.fund-nav-chart { width: 100%; height: 100%; min-height: 500px; outline: none; }
.fund-nav-chart:focus-visible { box-shadow: inset 0 0 0 2px #586273; }
.fund-nav-empty { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: #8c95a1; background: #151517; font-size: 13px; }
.fund-nav-disclaimer { padding: 9px 18px; border-top: 1px solid #292929; color: #7e8793; font-size: 11px; }
.professional-chart .klinecharts-pro { height: 100%; }
.professional-chart .klinecharts-pro-period-bar { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.professional-chart .klinecharts-pro-period-bar > * { flex: 0 0 auto; }
.professional-chart .klinecharts-pro-watermark { color: #33343a; font-size: clamp(18px, 2.4vw, 34px); font-weight: 750; letter-spacing: .08em; white-space: nowrap; }
.chart-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #929aa5; background: #151517; text-align: center; }
.chart-meta { display: flex; justify-content: space-between; gap: 14px; padding: 9px 14px; border-top: 1px solid #292929; background: #151517; color: #929aa5; font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-meta .success { color: #4ad295; }
.chart-meta .error { color: #ff6b73; }
.chart-panel:fullscreen { width: 100vw; height: 100vh; margin: 0; border: 0; border-radius: 0; background: #151517; }
.chart-panel:fullscreen .panel-heading { background: #1c1c1f; color: #f8f8f8; }
.chart-panel:fullscreen .panel-heading p, .chart-panel:fullscreen .compact-label { color: #929aa5; }
.chart-panel:fullscreen .professional-chart-shell { height: calc(100vh - 130px); min-height: 0; }
.chart-panel:fullscreen .professional-chart { height: 100%; }
.chart-panel:fullscreen .fund-nav-workspace { height: 100%; min-height: 0; }
.performance-heading { align-items: flex-end; flex-wrap: wrap; }
.performance-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.performance-controls .compact-label { flex-direction: column; align-items: flex-start; gap: 5px; }
.performance-controls select, .performance-controls input { min-width: 150px; padding: 8px 10px; border: 1px solid #cfd6df; border-radius: 8px; color: var(--ink); background: #fff; outline: none; }
.performance-controls #performance-benchmark { min-width: 210px; }
.performance-custom-range { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.performance-custom-range input { min-width: 136px; }
.performance-body { border-top: 1px solid var(--line); }
.performance-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 21px 10px; }
.performance-legend { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.performance-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.performance-legend b { color: var(--ink); font-weight: 650; }
.performance-legend strong { font-variant-numeric: tabular-nums; }
.performance-line { display: inline-block; width: 24px; height: 0; border-top: 2px solid; }
.performance-line.portfolio { border-color: #2f6fed; }
.performance-line.benchmark { border-color: #d97706; border-top-style: dashed; }
.performance-chart-shell { position: relative; height: clamp(390px, 48vh, 540px); min-height: 390px; background: #fff; }
.performance-chart { width: 100%; height: 100%; outline: none; }
.performance-chart:focus-visible { box-shadow: inset 0 0 0 2px rgba(47, 111, 237, .42); }
.performance-empty { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; color: var(--muted); background: #fff; text-align: center; }
.performance-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 20px 21px 13px; border-top: 1px solid var(--line); background: #fafbfc; }
.performance-section-heading h3 { margin: 0 0 4px; font-size: 16px; }
.performance-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.performance-help-hint { color: var(--muted); font-size: 11px; }
.performance-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.performance-metric { min-width: 0; min-height: 104px; padding: 15px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.performance-metric > div { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.performance-metric > strong { display: block; margin-top: 13px; overflow-wrap: anywhere; color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.performance-metric > strong.unavailable { color: #a1a8b2; }
.metric-help-button { display: inline-grid; width: 17px; height: 17px; place-items: center; padding: 0; border: 1px solid #aab3bf; border-radius: 50%; color: #778291; background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; line-height: 1; }
.metric-help-button:hover, .metric-help-button:focus-visible { border-color: var(--navy); color: var(--navy); background: var(--navy-open); outline: none; }
.performance-methodology { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 12px 21px 16px; color: var(--muted); background: #fafbfc; font-size: 11px; line-height: 1.55; }
.performance-methodology span:first-child { max-width: 72%; }
.metric-help-dialog { width: min(590px, calc(100vw - 28px)); padding: 0; overflow: visible; border: 0; border-radius: 16px; background: transparent; color: var(--ink); box-shadow: 0 24px 70px rgba(12, 25, 45, .28); }
.metric-help-dialog::backdrop { background: rgba(12, 25, 45, .42); backdrop-filter: blur(2px); }
.metric-help-note { overflow: hidden; border: 1px solid #dbe2ec; border-radius: 16px; background: #fff; }
.metric-help-note header { display: flex; align-items: flex-start; gap: 13px; padding: 20px 21px 15px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.metric-help-note header > div { flex: 1; }
.metric-help-note h2 { margin: 4px 0 0; font-size: 21px; }
.metric-help-avatar { display: grid; flex: none; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-weight: 850; }
.metric-help-note > p { margin: 0; padding: 19px 21px 14px; color: #3e4859; line-height: 1.7; }
.metric-help-formula { margin: 0 21px 16px; padding: 13px 14px; border-left: 3px solid #2f6fed; border-radius: 0 8px 8px 0; background: #f2f6fc; }
.metric-help-formula span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.metric-help-formula code { color: var(--navy); font-family: inherit; font-size: 13px; line-height: 1.6; white-space: normal; }
.metric-help-note > small { display: block; padding: 0 21px 20px; color: var(--muted); line-height: 1.55; }
.notice, .flash { border-radius: 10px; padding: 12px 15px; margin-bottom: 16px; font-size: 14px; }
.notice { background: var(--orange-open); border: 1px solid #f1c9ad; color: #75411c; }
.notice.compact { margin: 18px; }
.flash.success { background: #edf6f1; border: 1px solid #c5dfd0; color: #2f664a; }
.flash.error { background: #fbebed; border: 1px solid #e5c3c8; color: #812b38; }
.hidden { display: none !important; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 9px 13px; cursor: pointer; font-weight: 700; font-size: 13px; }
.button.primary { color: white; background: var(--navy); }
.button.secondary { color: var(--navy); background: var(--navy-open); }
.button.ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button.danger { color: var(--danger); background: #fff; border-color: #e4c5ca; }
.button.small { padding: 6px 9px; font-size: 12px; }
.button.wide { width: 100%; }
.symbol-link { border: 0; padding: 0; background: transparent; color: var(--navy); font-weight: 800; cursor: pointer; }
.symbol-link:hover { text-decoration: underline; }
.two-column { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 4px 21px 22px; }
.form-grid label, .stacked-form label { display: flex; flex-direction: column; gap: 7px; color: #485164; font-size: 13px; font-weight: 650; }
.form-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: #485164; font-size: 13px; font-weight: 650; }
.form-grid input, .form-grid select, .form-grid textarea, .stacked-form input, .compact-label select { width: 100%; padding: 10px 11px; border: 1px solid #cfd6df; border-radius: 8px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 59, 104, .1); }
.full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }
.multi-actions { gap: 10px; flex-wrap: wrap; }
.management-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: 1px; margin: 0 21px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.management-grid > form { background: #fff; }
.compact-form { padding-top: 18px; }
.schedule-grid { display: grid; gap: 12px; padding: 0 21px 4px; }
.schedule-card { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.schedule-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fafbfc; cursor: pointer; list-style: none; }
.schedule-card > summary::-webkit-details-marker { display: none; }
.schedule-card > summary::before { content: "›"; color: var(--muted); font-size: 18px; transform: rotate(0); transition: transform .15s ease; }
.schedule-card[open] > summary::before { transform: rotate(90deg); }
.schedule-card > summary strong { margin-right: auto; }
.schedule-card.archived { opacity: .72; }
.new-schedule-card > summary { color: var(--navy); background: var(--navy-open); }
.schedule-delete-form { display: flex; justify-content: flex-end; padding: 0 21px 18px; }
.archived-schedule-body { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 21px; }
.archived-schedule-body p { margin: 0; color: var(--muted); font-size: 13px; }
.form-grid label small { color: var(--muted); font-weight: 400; line-height: 1.45; }
.form-field > small { min-height: 18px; color: var(--muted); font-weight: 400; line-height: 1.45; }
.form-field > small.success { color: #2f664a; }
.form-field > small.error { color: var(--danger); }
.form-grid input[readonly] { color: var(--muted); background: #f7f8fa; }
.instrument-search-box { position: relative; }
.instrument-suggestions { position: absolute; z-index: 20; top: calc(100% + 5px); left: 0; right: 0; max-height: 290px; overflow-y: auto; border: 1px solid #cfd6df; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(23, 32, 51, .16); }
.instrument-suggestion { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px; border: 0; border-top: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.instrument-suggestion:first-child { border-top: 0; }
.instrument-suggestion:hover, .instrument-suggestion.active { background: var(--navy-open); }
.instrument-suggestion > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.instrument-suggestion strong { color: var(--navy); font-size: 13px; }
.instrument-suggestion small { overflow: hidden; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-price { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.credential-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 21px 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.credential-summary div { display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 13px 14px; background: #fafbfc; }
.credential-summary span { color: var(--muted); font-size: 12px; }
.credential-summary strong { overflow-wrap: anywhere; font-size: 13px; }
.credential-message { margin: 0 21px 16px; }
.credential-clear-form { display: none; }
.credential-section-title { margin: 6px 21px 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.endpoint-list { display: grid; gap: 8px; margin: 0 21px 18px; }
.endpoint-list div { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.endpoint-list code { color: var(--navy); font-size: 12px; font-weight: 700; }
.endpoint-list span { color: var(--muted); font-size: 12px; }
.notice a { color: var(--navy); font-weight: 700; text-decoration: underline; }
.definition-list { margin: 0; padding: 0 21px 20px; }
.definition-list div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-top: 1px solid var(--line); }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; text-align: right; font-weight: 700; }
.ledger-panel { margin-top: 18px; }
.side { font-weight: 800; }
.side.buy { color: var(--gain); }
.side.sell { color: var(--loss); }
.voided { opacity: .54; text-decoration-color: #8b94a3; }
.inline-form { display: inline; }
.ledger-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.void-reason { display: block; margin-top: 6px; max-width: 180px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 0; }
.login-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
.login-heading h1 { margin: 8px 0; font-size: 28px; }
.stacked-form { display: grid; gap: 16px; margin-top: 24px; }
body.modal-open { overflow: hidden; }
.trade-modal { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; overflow: visible; border: 0; border-radius: 18px; background: transparent; color: var(--ink); box-shadow: 0 28px 80px rgba(12, 25, 45, .28); }
.trade-modal::backdrop { background: rgba(12, 25, 45, .56); backdrop-filter: blur(3px); }
.quick-trade-card { max-height: calc(100vh - 32px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, .72); border-radius: 18px; background: #fff; }
.quick-trade-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 16px; }
.quick-trade-header h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.025em; }
.modal-close { display: grid; flex: none; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--ink); background: #f7f8fa; }
.quick-instrument-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 24px 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.quick-instrument-summary > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.quick-instrument-summary strong { color: var(--navy); font-size: 16px; }
.quick-instrument-summary span:not(.status-badge) { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quick-buy-badge { color: var(--gain); background: var(--gain-open); }
.quick-sell-badge { color: var(--loss); background: var(--loss-open); }
.quick-trade-grid { padding-bottom: 10px; }
.quick-trade-note { margin: 0 24px; padding: 10px 12px; border-radius: 8px; background: var(--navy-open); color: var(--navy); font-size: 12px; line-height: 1.55; }
.quick-trade-note.warning { background: var(--orange-open); color: #75411c; }
.quick-trade-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px 24px; }
.select-with-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.select-with-link a { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: var(--navy-open); font-size: 12px; font-weight: 700; white-space: nowrap; }
.quick-fee-field > small { color: var(--muted); font-size: 11px; font-weight: 400; }
@media (max-width: 1180px) { .metric-grid { grid-template-columns: repeat(3, 1fr); } .performance-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 780px) {
  .topbar { height: auto; min-height: 64px; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  nav { order: 3; flex: 0 0 100%; width: 100%; overflow-x: auto; }
  .page-shell { width: min(100% - 24px, 1480px); padding-top: 24px; }
  .split-heading { align-items: flex-start; flex-direction: column; }
  .source-status { justify-content: flex-start; }
  .chart-controls { width: 100%; justify-content: flex-start; }
  .professional-chart-shell { min-height: 600px; }
  .professional-chart { height: 680px; }
  .fund-nav-toolbar-left, .fund-nav-toolbar-right { width: 100%; justify-content: space-between; }
  .fund-nav-toolbar-right { margin-left: 0; }
  .fund-nav-summary { flex: 0 0 100%; text-align: right; }
  .fund-nav-interaction-hint { display: none; }
  .chart-meta { flex-direction: column; gap: 3px; }
  .performance-controls { width: 100%; justify-content: flex-start; }
  .performance-custom-range { width: 100%; }
  .performance-chart-toolbar, .performance-section-heading, .performance-methodology { align-items: flex-start; flex-direction: column; }
  .performance-chart-shell { height: 430px; min-height: 430px; }
  .performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .performance-methodology span:first-child { max-width: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .two-column { grid-template-columns: 1fr; }
  .management-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .credential-summary { grid-template-columns: 1fr; }
  .endpoint-list div { grid-template-columns: 1fr; gap: 3px; }
  .full { grid-column: auto; }
  .quick-trade-header { padding: 19px 18px 14px; }
  .quick-instrument-summary { margin: 0 18px 16px; }
  .quick-trade-note { margin: 0 18px; }
  .quick-trade-actions { padding: 16px 18px 20px; }
}
@media (max-width: 480px) { .metric-grid, .performance-metrics { grid-template-columns: 1fr; } .login-card { padding: 24px; } }
