#etfDashboardView, #etfDashboardPanel { min-width: 0; max-width: 100%; }
#etfDashboardPanel { --etf-surface: #fff; --etf-ink: #24313d; --etf-muted: #667482; --etf-rule: #dce4e8; --etf-accent: #147c77; color: var(--etf-ink); letter-spacing: 0; }
#etfDashboardPanel *, .etf-detail * { box-sizing: border-box; }
.etf-header, .etf-section-heading, .etf-toolbar, .etf-range, .etf-history-totals { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.etf-header { margin-bottom: 14px; }
.etf-error h2 { margin: 0; font-size: 23px; }
.etf-header .market-section-description { color: var(--blue-dark); }
#etfDashboardPanel .etf-header input[type="date"] { font-size: 16px; font-weight: 800; padding: 9px 12px; border-radius: 8px; background: var(--card); color: var(--text); }
#etfDashboardPanel .etf-header label { font-size: 14px; font-weight: 800; gap: 10px; }
#etfDashboardPanel .etf-header .date-today-button { font-size: 20px; }
.etf-header p span { margin-left: 10px; }
.etf-quality { font-size: 12px; color: var(--etf-accent); }
.etf-notice { background: #fff7e1; border-left: 3px solid #ac8422; color: #775700; padding: 8px 12px; font-size: 12px; margin-top: 12px; line-height: 1.5; }
.etf-data-note, .etf-footer { color: var(--etf-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.etf-toolbar { padding: 14px 0; }
#etfDashboardPanel button, #etfDashboardPanel input, #etfDashboardPanel select { font: inherit; font-size: 12px; color: inherit; letter-spacing: 0; }
#etfDashboardPanel select, #etfDashboardPanel input[type="date"], #etfDashboardPanel input[type="search"] { background: var(--etf-surface); border: 1px solid var(--etf-rule); padding: 7px 9px; border-radius: 4px; min-height: 34px; max-width: 100%; }
#etfDashboardPanel label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--etf-muted); }
.etf-segment { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--etf-rule); }
#etfDashboardPanel .etf-segment button { border: 0; border-bottom: 2px solid transparent; padding: 9px 11px; background: transparent; border-radius: 0; white-space: nowrap; cursor: pointer; }
#etfDashboardPanel .etf-segment button[aria-pressed="true"] { color: var(--etf-accent); border-bottom-color: var(--etf-accent); font-weight: 700; }
#etfDashboardPanel .etf-icon { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--etf-rule); background: var(--etf-surface); border-radius: 4px; padding: 0; font-size: 22px; }
#etfDashboardPanel button:focus-visible, #etfDashboardPanel input:focus-visible, #etfDashboardPanel select:focus-visible, .etf-table-wrap:focus-visible { outline: 2px solid var(--etf-accent); outline-offset: 2px; }
.etf-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--etf-rule); background: var(--etf-surface); }
.etf-metrics > div { padding: 17px 16px; border-right: 1px solid var(--etf-rule); min-width: 0; }
.etf-metrics > div:last-child { border: 0; }
.etf-metrics dt, .etf-metrics small { font-size: 11px; color: var(--etf-muted); }
.etf-metrics dd { margin: 9px 0 6px; font-size: 25px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#etfDashboardPanel .etf-positive { color: #c44051; }
#etfDashboardPanel .etf-negative { color: #128475; }
.etf-history, .etf-rank { margin-top: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--etf-rule); }
.etf-section-heading { margin-bottom: 12px; }
.etf-section-heading h3 { font-size: 15px; margin: 0 auto 0 0; }
.etf-section-heading [data-etf-count] { color: var(--etf-muted); font-size: 12px; margin-right: auto; }
.etf-range { gap: 10px; margin: 8px 0; }
.etf-chart-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 11px; padding-top: 8px; }
.etf-benchmark { color: #a48225; }
.etf-chart { height: 270px; width: 100%; min-width: 0; }
.etf-chart canvas { width: 100%; height: 270px; display: block; }
.etf-chart-readout { display: block; min-height: 32px; font-size: 11px; color: var(--etf-muted); line-height: 1.6; }
#etfDashboardPanel .etf-cursor { width: 100%; accent-color: var(--etf-accent); }
.etf-history-totals { font-size: 12px; color: var(--etf-muted); margin-top: 8px; }
.etf-table-wrap { overflow-x: auto; width: 100%; }
.etf-table { border-collapse: collapse; width: 100%; min-width: 1010px; font-size: 12px; font-variant-numeric: tabular-nums; }
.etf-table th, .etf-table td { border-bottom: 1px solid var(--etf-rule); padding: 10px 9px; white-space: nowrap; text-align: right; }
.etf-table th { background: var(--etf-surface); font-weight: 500; color: var(--etf-muted); }
.etf-table th:first-child, .etf-table td:first-child { text-align: left; }
.etf-table td:first-child { min-width: 185px; }
.etf-table small { display: block; color: var(--etf-muted); font-size: 11px; margin-top: 5px; }
#etfDashboardPanel .etf-table button { padding: 0; border: 0; background: transparent; cursor: pointer; }
#etfDashboardPanel .etf-table .etf-fund-link { color: var(--etf-accent); font-weight: 600; }
.etf-amount { position: relative; min-width: 110px; }
.etf-amount-bar { position: absolute; right: 0; top: 5px; bottom: 5px; background: rgba(40, 126, 224, .28); pointer-events: none; }
.etf-amount span:last-child { position: relative; }
.etf-table tbody tr:hover { background: rgba(20, 124, 119, .04); }
.etf-empty { height: 100px; text-align: center !important; color: var(--etf-muted); }
.etf-footer { padding-top: 14px; }
body:has(#etfDashboardView.active) .utility-tools-launcher { position: static; display: inline-flex; margin: 12px 12px 76px; vertical-align: top; transform: none; }
.etf-detail { width: min(780px, calc(100vw - 28px)); max-height: 86vh; padding: 22px; border: 1px solid var(--etf-rule); border-radius: 6px; color: var(--etf-ink); background: var(--etf-surface); }
.etf-detail::backdrop { background: rgba(0, 0, 0, .4); }
.etf-close { float: right; }
.etf-detail h3 { font-size: 17px; padding-right: 40px; }
.etf-detail p { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.etf-error { padding: 25px 0; }
.etf-error button { margin-right: 12px; padding: 8px 12px; }
#etfDashboardPanel[aria-busy="true"] { opacity: .65; }
[data-color-mode="dark"] #etfDashboardPanel { --etf-surface: #17212a; --etf-ink: #e4e9ef; --etf-muted: #aab6c2; --etf-rule: #34414b; --etf-accent: #68c4b5; }
[data-color-mode="dark"] .etf-notice { background: #332e1b; color: #e1cc89; }
[data-color-mode="dark"] .etf-amount-bar { background: rgba(63, 145, 255, .48); }
[data-color-mode="dark"] #etfDashboardPanel .etf-positive { color: #f2838d; }
[data-color-mode="dark"] #etfDashboardPanel .etf-negative { color: #68c4b5; }
@media (max-width: 780px) {
  .etf-header h2 { font-size: 20px; }
  .etf-header p span { display: block; margin-left: 0; }
  .etf-toolbar { gap: 10px; }
  .etf-toolbar > .etf-segment { width: 100%; }
  .etf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etf-metrics > div { padding: 13px 10px; border-bottom: 1px solid var(--etf-rule); }
  .etf-metrics > div:nth-child(2) { border-right: 0; }
  .etf-metrics dd { font-size: 21px; }
  .etf-range > .etf-segment { width: 100%; }
  .etf-range label { flex: 1; min-width: 0; }
  #etfDashboardPanel input[type="date"] { min-width: 0; width: 100%; padding-inline: 4px; }
  .etf-section-heading input[type="search"] { flex-basis: 100%; width: 100%; }
  .etf-detail { padding: 14px; }
  .etf-table { min-width: 1010px; }
}
