:root {
  --terminal-bg: #000000;
  --terminal-surface: #050505;
  --terminal-surface-raised: #0d0d0d;
  --terminal-surface-soft: #020202;
  --terminal-line: rgba(196, 194, 174, 0.16);
  --terminal-line-strong: rgba(226, 213, 101, 0.3);
  --terminal-text: #e9e8df;
  --terminal-muted: #929189;
  --terminal-dim: #5e5f5b;
  --terminal-cyan: #e5d85f;
  --terminal-violet: #9b89d2;
  --terminal-red: #ff4f60;
  --terminal-green: #36bd72;
  --terminal-amber: #dfcf66;
  --terminal-gold: #e5d85f;
  --terminal-radius: 5px;

  --bg: var(--terminal-bg);
  --panel: var(--terminal-surface);
  --panel-strong: var(--terminal-surface-raised);
  --line: var(--terminal-line);
  --text: var(--terminal-text);
  --muted: var(--terminal-muted);
  --cyan: var(--terminal-cyan);
  --violet: var(--terminal-violet);
  --amber: var(--terminal-amber);
  --positive: var(--terminal-red);
  --negative: var(--terminal-green);
  --radius: var(--terminal-radius);
}

body.page-dashboard,
body.page-superuser,
body.page-performance {
  color: var(--terminal-text);
  background: var(--terminal-bg);
  font-family: "Stork Chinese Kai", "Stork Chinese Kai Fallback", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body.page-superuser,
body.page-performance {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 38px 38px;
}
body.page-superuser .ambient,
body.page-performance .ambient {
  display: none;
}
body.page-superuser .review-panel,
body.page-superuser .status-grid,
body.page-performance .panel,
body.page-performance .cohort-toolbar,
body.page-performance .summary-grid article {
  border-color: var(--terminal-line);
  border-radius: var(--terminal-radius);
  background: var(--terminal-surface);
  box-shadow: none;
  backdrop-filter: none;
}
body.page-superuser button,
body.page-performance button,
body.page-performance input {
  border-radius: 5px;
}
body.page-superuser button:focus-visible,
body.page-superuser a:focus-visible,
body.page-performance button:focus-visible,
body.page-performance a:focus-visible,
body.page-performance input:focus-visible {
  outline: 2px solid var(--terminal-cyan);
  outline-offset: 2px;
}

/* Dashboard: keep the approved terminal composition while normalising states. */
body.page-dashboard .terminal-sidebar,
body.page-dashboard .topbar,
body.page-dashboard .results,
body.page-dashboard .market-card {
  box-shadow: none;
}

body.page-dashboard .terminal-sidebar {
  scrollbar-width: thin;
  scrollbar-color: #26313e transparent;
}

body.page-dashboard .terminal-nav-item[hidden] {
  display: none;
}

body.page-dashboard .market-workspace-panel[hidden],
body.page-dashboard .strategy-workspace-panel[hidden],
body.page-dashboard .custom-screener[hidden] {
  display: none !important;
}

body.page-dashboard .app-dialog,
body.page-dashboard .stock-chart-dialog,
body.page-dashboard .history-date-dialog {
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.5);
}

body.page-dashboard .market-ranking {
  min-height: 430px;
  margin-bottom: 18px;
}

/* Keep the ranking table close to the compact terminal footer. */
body.page-dashboard .terminal-content {
  padding-bottom: 12px;
}

body.page-dashboard .terminal-content > footer {
  padding-bottom: 8px;
}

body.page-dashboard .order-book-meta {
  display: none;
}

body.page-dashboard .market-eyebrow {
  color: var(--terminal-red);
  border-color: rgba(255, 100, 118, 0.24);
  background: rgba(255, 100, 118, 0.055);
}

body.page-dashboard .market-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--terminal-muted);
  font: 12px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .market-pagination button,
body.page-dashboard .custom-screener-actions button {
  height: 32px;
  border: 1px solid var(--terminal-line);
  border-radius: 5px;
  padding: 0 11px;
  color: #aeb9c5;
  background: #0a1017;
  cursor: pointer;
}

body.page-dashboard .market-pagination button:hover,
body.page-dashboard .custom-screener-actions button:hover {
  color: var(--terminal-cyan);
  border-color: rgba(229, 216, 95, 0.35);
}

body.page-dashboard .market-pagination button:disabled {
  cursor: default;
  opacity: 0.35;
}

body.page-dashboard .market-pagination.compact { margin-right: auto; }
body.page-dashboard .market-table { min-width: 1280px; }
body.page-dashboard .market-close-mode .market-table { min-width: 1012px; }
body.page-dashboard .market-table thead > tr > th:nth-child(2),
body.page-dashboard .market-table #marketStockRows > .market-virtual-row > td:nth-child(2) {
  width: auto;
  min-width: 0;
}
body.page-dashboard .market-table th:nth-child(n + 3),
body.page-dashboard .market-table td:nth-child(n + 3) { text-align: right; }
body.page-dashboard .market-stock-code {
  display: block;
  margin-top: 3px;
  color: #607083;
  font: 11px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}
body.page-dashboard .market-freshness {
  display: block;
  margin-top: 5px;
  color: #6f806e;
  font: 10px/1.3 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}
body.page-dashboard .market-freshness.delayed { color: #d5a650; }
body.page-dashboard .market-quote-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: #55616f;
  vertical-align: 1px;
}
body.page-dashboard .market-quote-dot.quote-live { background: #45d7cd; }
body.page-dashboard .market-quote-dot.quote-lunch,
body.page-dashboard .market-quote-dot.quote-closed,
body.page-dashboard .market-quote-dot.quote-previous_close { background: #e5d85f; }
body.page-dashboard .market-quote-dot.quote-delayed,
body.page-dashboard .market-quote-dot.quote-partial,
body.page-dashboard .market-quote-dot.quote-stale { background: #e0a04f; }
body.page-dashboard .market-quote-dot.quote-missing { background: #ff6476; }

body.page-dashboard .custom-screener {
  margin-bottom: 9px;
  border-radius: var(--terminal-radius);
  padding: 13px 14px;
}

body.page-dashboard .section-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-dashboard .custom-screen-toggle {
  height: 32px;
  border: 1px solid rgba(229, 216, 95, 0.3);
  border-radius: 5px;
  padding: 0 12px;
  color: var(--terminal-cyan);
  background: rgba(229, 216, 95, 0.055);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

body.page-dashboard .custom-screen-toggle:hover,
body.page-dashboard .custom-screen-toggle[aria-expanded="true"] {
  border-color: rgba(229, 216, 95, 0.52);
  background: rgba(229, 216, 95, 0.1);
}

body.page-dashboard .custom-screener-head,
body.page-dashboard .custom-screener-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-dashboard .custom-screener-head div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

body.page-dashboard .custom-screener-head span {
  color: var(--terminal-cyan);
  font: 700 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.1em;
}

body.page-dashboard .custom-screener-head strong { font-size: 15px; }
body.page-dashboard .custom-screener-head p,
body.page-dashboard .custom-screener-actions > span {
  margin: 0;
  color: #657385;
  font-size: 11px;
}

body.page-dashboard .custom-screener-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
  margin: 11px 0;
}

body.page-dashboard .custom-screener fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--terminal-line);
  border-radius: 5px;
  padding: 8px;
  color: #596779;
}

body.page-dashboard .custom-screener legend {
  padding: 0 4px;
  color: #798797;
  font-size: 14px;
}

body.page-dashboard .custom-screener input {
  min-width: 0;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid rgba(139, 158, 178, 0.14);
  border-radius: 4px;
  outline: 0;
  padding: 0 9px;
  color: #dfe6ec;
  background: #080d13;
  font: 17px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .custom-screener input:focus {
  border-color: rgba(229, 216, 95, 0.45);
}

body.page-dashboard .custom-screener-actions { justify-content: flex-end; }
body.page-dashboard #customScreenSubmit {
  color: #061412;
  border-color: var(--terminal-cyan);
  background: var(--terminal-cyan);
  font-weight: 700;
}

body.page-dashboard #customScreenSubmit:disabled { cursor: wait; opacity: 0.55; }

@media (max-width: 1120px) {
  body.page-dashboard .custom-screener-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}

@media (max-width: 680px) {
  body.page-dashboard .section-title-row { align-items: flex-start; }
  body.page-dashboard .section-head-actions { align-items: flex-end; flex-direction: column-reverse; }
  body.page-dashboard .custom-screener-head { align-items: flex-start; flex-direction: column; }
  body.page-dashboard .custom-screener-grid { grid-template-columns: 1fr; }
  body.page-dashboard .custom-screener-actions { flex-wrap: wrap; }
  body.page-dashboard .market-pagination.compact { width: 100%; }
}
body.page-superuser .console-shell,
body.page-performance .page-shell {
  width: min(1680px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 24px;
}
body.page-superuser .console-header,
body.page-performance .topbar {
  min-height: 58px;
  border: 1px solid var(--terminal-line);
  border-top: 0;
  border-radius: 0 0 var(--terminal-radius) var(--terminal-radius);
  padding: 0 14px;
  background: rgba(13, 19, 28, 0.96);
  box-shadow: none;
}
body.page-superuser .brand,
body.page-performance .brand {
  gap: 9px;
}
body.page-superuser .brand-mark,
body.page-performance .brand-mark {
  width: 32px;
  height: 32px;
  border-color: rgba(229, 216, 95, 0.25);
  border-radius: 5px;
  color: var(--terminal-cyan);
  background: rgba(229, 216, 95, 0.055);
}
body.page-superuser .brand-mark svg,
body.page-performance .brand-mark svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
}
body.page-superuser .brand strong,
body.page-performance .brand strong {
  font-size: 13px;
  letter-spacing: 0.13em;
}
body.page-superuser .brand small,
body.page-performance .brand small {
  margin-top: 2px;
  color: var(--terminal-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}
body.page-superuser .secondary-button,
body.page-superuser .ghost-button,
body.page-superuser .publish-button,
body.page-performance .topbar nav a,
body.page-performance .toolbar-actions button,
body.page-performance .date-navigation button {
  min-height: 32px;
  height: 32px;
  border-radius: 5px;
  font-size: 11px;
}
body.page-superuser .review-state {
  border-radius: 4px;
}

/* Review console. */
body.page-superuser .intro-panel {
  align-items: center;
  margin: 12px 0 8px;
  border: 1px solid var(--terminal-line);
  border-radius: var(--terminal-radius);
  padding: 18px 20px;
  background: var(--terminal-surface);
}

body.page-superuser .intro-panel h1 {
  margin: 7px 0 6px;
  font-size: 29px;
  letter-spacing: -0.035em;
}

body.page-superuser .intro-panel > div:first-child > p:last-child {
  max-width: 900px;
  font-size: 12px;
  line-height: 1.65;
}

body.page-superuser .status-grid article {
  min-height: 78px;
  padding: 13px 16px;
}

body.page-superuser .status-grid strong {
  margin: 6px 0 4px;
  font-size: 17px;
}

body.page-superuser .workflow-strip {
  gap: 13px;
  padding: 12px 0;
}

body.page-superuser .workflow-strip i {
  width: 32px;
}

body.page-superuser .review-toolbar {
  padding: 13px 15px;
}

body.page-superuser .review-toolbar h2,
body.page-superuser .stock-workspace-head h2 {
  font-size: 17px;
}

body.page-superuser .workspace {
  grid-template-columns: 220px minmax(0, 1fr);
}

body.page-superuser .strategy-menu {
  padding: 9px;
  background: var(--terminal-surface-soft);
}

body.page-superuser .strategy-tab {
  margin-bottom: 6px;
  border-radius: 5px;
  padding: 11px;
}

body.page-superuser .stock-workspace-head {
  padding: 13px 15px;
}

body.page-superuser th {
  padding: 10px 11px;
  background: #101720;
}

body.page-superuser td {
  padding: 11px;
}

body.page-superuser .row-actions button {
  border-radius: 4px;
}

/* Performance tracking console. */
body.page-performance {
  min-width: 1000px;
}

body.page-performance .page-shell {
  padding-top: 0;
}

body.page-performance .topbar nav {
  gap: 3px;
  margin-left: 28px;
}

body.page-performance .topbar nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
}

body.page-performance .topbar nav a:hover,
body.page-performance .topbar nav a.active {
  color: var(--terminal-cyan);
  background: rgba(229, 216, 95, 0.07);
}
body.page-superuser .return-home-button,
body.page-performance .topbar .return-home-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 88px;
  gap: 6px;
  width: 88px;
  min-height: 32px;
  height: 32px;
  border: 1px solid var(--terminal-line-strong);
  border-radius: 5px;
  padding: 0 9px;
  color: #aebbc7;
  background: var(--terminal-surface-raised);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
body.page-superuser .return-home-button:hover,
body.page-performance .topbar .return-home-button:hover {
  border-color: rgba(229, 216, 95, 0.48);
  color: var(--terminal-cyan);
  background: rgba(229, 216, 95, 0.07);
}
body.page-superuser .return-home-button svg,
body.page-performance .topbar .return-home-button svg {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-performance .operator-label {
  color: var(--terminal-muted);
  font-size: 12px;
}

body.page-performance .hero {
  min-height: 116px;
  margin-top: 10px;
  border-color: var(--terminal-line);
  border-radius: var(--terminal-radius);
  padding: 17px 20px;
  background: var(--terminal-surface);
}

body.page-performance .hero h1 {
  font-size: 25px;
  letter-spacing: -0.025em;
}

body.page-performance .hero > div > p:last-child {
  max-width: 1000px;
  margin-top: 7px;
  color: var(--terminal-muted);
  font-size: 12px;
  line-height: 1.65;
}

body.page-performance .freshness-card {
  min-width: 210px;
  border-color: var(--terminal-line);
  border-radius: 5px;
  padding: 11px 15px;
  background: var(--terminal-surface-soft);
}

body.page-performance .freshness-card strong {
  margin: 4px 0 2px;
  font-size: 21px;
}

body.page-performance .selector-panel,
body.page-performance .strategy-selector,
body.page-performance .detail-panel,
body.page-performance .cohort-toolbar,
body.page-performance .summary-grid {
  margin-top: 8px;
}

body.page-performance .panel > header {
  min-height: 54px;
  padding: 0 14px;
}

body.page-performance .panel h2 {
  font-size: 16px;
}

body.page-performance .date-selector-tools {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

body.page-performance .date-tabs {
  gap: 7px;
  padding: 9px;
}

body.page-performance .date-tab {
  min-height: 70px;
  border-color: var(--terminal-line);
  border-radius: 5px;
  padding: 10px 12px;
  background: var(--terminal-surface-soft);
}

body.page-performance .date-tab:hover {
  transform: none;
}

body.page-performance .date-tab.selected {
  border-color: rgba(229, 216, 95, 0.68);
  background: rgba(229, 216, 95, 0.07);
  box-shadow: inset 0 -2px 0 var(--terminal-cyan);
}

body.page-performance .date-tab strong {
  margin-top: 6px;
  font-size: 16px;
}

body.page-performance .strategy-cards {
  gap: 7px;
  padding: 9px;
}

body.page-performance .strategy-card {
  min-height: 68px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  border-color: var(--terminal-line);
  border-radius: 5px;
  padding: 10px 13px;
  background: var(--terminal-surface-soft);
}

body.page-performance .strategy-card:hover {
  transform: none;
}

body.page-performance .strategy-card.selected {
  border-color: rgba(158, 137, 239, 0.68);
  background: rgba(158, 137, 239, 0.07);
  box-shadow: inset 3px 0 0 var(--terminal-violet);
}

body.page-performance .strategy-copy strong {
  font-size: 16px;
}

body.page-performance .cohort-toolbar {
  grid-template-columns: minmax(320px, 1fr) minmax(240px, 360px) auto;
  padding: 12px 14px;
}

body.page-performance .cohort-context h2 {
  font-size: 17px;
}

body.page-performance .search-control input {
  height: 34px;
  border-color: var(--terminal-line);
  border-radius: 5px;
  background: var(--terminal-surface-soft);
}

body.page-performance .toolbar-actions button {
  padding: 0 12px;
}

body.page-performance .summary-grid {
  gap: 8px;
}

body.page-performance .summary-grid article {
  min-height: 78px;
  padding: 12px 15px;
  overflow: hidden;
}

body.page-performance .summary-grid article::after {
  display: none;
}

body.page-performance .summary-grid strong {
  margin: 6px 0 2px;
  font-size: 21px;
}

body.page-performance .timeline-note {
  padding: 8px 14px;
  font-size: 11px;
}

body.page-performance .table-wrap {
  max-height: 590px;
}

body.page-performance thead,
body.page-performance th:first-child {
  background: #101720;
}

body.page-performance th {
  padding: 10px;
}

body.page-performance .stock-row > td:first-child {
  background: #0d131c;
}

body.page-performance .performance-stock-entry,
body.page-performance .stage-cell {
  min-height: 78px;
}

body.page-performance .detail-grid > div,
body.page-performance .history-date-dialog,
body.page-performance .history-date-option,
body.page-performance .history-close-button,
body.page-performance .history-date-pagination button {
  border-radius: 5px;
}

body.page-performance .history-date-modal {
  background: rgba(2, 5, 9, 0.84);
  backdrop-filter: blur(6px);
}

body.page-performance .history-date-dialog {
  border-color: var(--terminal-line-strong);
  background: var(--terminal-surface);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

body.page-performance .history-date-dialog > header,
body.page-performance .history-date-summary,
body.page-performance .history-date-pagination {
  background: var(--terminal-surface-raised);
}

body.page-performance .history-date-option {
  border-color: var(--terminal-line);
  background: var(--terminal-surface-soft);
}

@media (max-width: 1120px) {

  body.page-superuser .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body.page-superuser .console-shell {
    width: min(100% - 16px, 1680px);
  }
  body.page-superuser .console-header {
    min-height: 54px;
    padding: 8px 10px;
  }

  body.page-superuser .intro-panel {
    align-items: flex-start;
    margin-top: 8px;
    padding: 15px;
  }

  body.page-superuser .workspace {
    display: block;
  }
}

/* Modern Qianlong visual language: black canvas, gold hierarchy, restrained status colour. */
body.page-dashboard,
body.page-superuser,
body.page-performance {
  color: var(--terminal-text);
  background: #000;
  background-image: none;
}

body.page-dashboard ::selection,
body.page-superuser ::selection,
body.page-performance ::selection {
  color: #050505;
  background: var(--terminal-gold);
}

body.page-dashboard .glass,
body.page-dashboard .terminal-sidebar,
body.page-dashboard .topbar,
body.page-dashboard .market-card,
body.page-dashboard .results,
body.page-dashboard .strategy-card,
body.page-dashboard .custom-screener,
body.page-dashboard .app-dialog,
body.page-dashboard .stock-chart-dialog,
body.page-dashboard .stock-intelligence-dock,
body.page-dashboard .intelligence-card,
body.page-dashboard .daily-inspector,
body.page-superuser .status-grid,
body.page-superuser .review-panel,
body.page-superuser .strategy-menu,
body.page-performance .panel,
body.page-performance .cohort-toolbar,
body.page-performance .summary-grid article {
  border-color: var(--terminal-line);
  background: var(--terminal-surface);
  background-image: none;
  box-shadow: none;
  backdrop-filter: none;
}

body.page-dashboard .terminal-sidebar {
  background: #020202;
}

body.page-dashboard .terminal-sidebar .brand,
body.page-dashboard .topbar,
body.page-superuser .console-header,
body.page-performance .topbar {
  border-color: var(--terminal-line);
  background: #050505;
  backdrop-filter: none;
}

body.page-dashboard .terminal-sidebar .brand-mark,
body.page-superuser .brand-mark,
body.page-performance .brand-mark {
  border-color: rgba(229, 216, 95, 0.28);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.07);
}

body.page-dashboard .terminal-sidebar .brand-mark svg,
body.page-superuser .brand-mark svg,
body.page-performance .brand-mark svg {
  stroke: currentColor;
}

body.page-dashboard .terminal-nav-item {
  color: #8b8b84;
}

body.page-dashboard .terminal-nav-item:hover {
  color: #eeeade;
  background: #10100d;
}

body.page-dashboard .terminal-nav-item.active {
  border-color: rgba(229, 216, 95, 0.24);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.07);
  box-shadow: inset 3px 0 0 var(--terminal-gold);
}

body.page-dashboard .terminal-nav-item.active small {
  color: #a89f59;
}

body.page-dashboard .industry-drawer[hidden] {
  display: none;
}

body.page-dashboard .industry-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 192px;
  z-index: 45;
  display: flex;
  width: 336px;
  flex-direction: column;
  border-right: 1px solid var(--terminal-line-strong);
  background: #050505;
  box-shadow: 18px 0 44px rgba(0, 0, 0, 0.48);
}

body.page-dashboard .industry-drawer > header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--terminal-line);
  padding: 0 16px 0 18px;
}

body.page-dashboard .industry-drawer > header span {
  color: var(--terminal-gold);
  font: 700 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.18em;
}

body.page-dashboard .industry-drawer > header h2 {
  margin: 5px 0 0;
  color: #eeeade;
  font-size: 18px;
}

body.page-dashboard #industryDrawerClose {
  width: 30px;
  height: 30px;
  border: 1px solid var(--terminal-line);
  border-radius: 4px;
  color: #9c9a90;
  background: #0b0b0a;
  cursor: pointer;
}

body.page-dashboard #industryDrawerClose:hover {
  border-color: rgba(229, 216, 95, 0.42);
  color: var(--terminal-gold);
}

body.page-dashboard .industry-search {
  padding: 14px 14px 9px;
}

body.page-dashboard .industry-search input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--terminal-line);
  border-radius: 4px;
  padding: 0 11px;
  color: var(--terminal-text);
  background: #090908;
  outline: 0;
}

body.page-dashboard .industry-search input:focus {
  border-color: rgba(229, 216, 95, 0.5);
}

body.page-dashboard .industry-breadcrumb {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 0 14px 8px;
  color: #66645d;
  white-space: nowrap;
  scrollbar-width: none;
}

body.page-dashboard .industry-breadcrumb[hidden] {
  display: none;
}

body.page-dashboard .industry-breadcrumb button {
  border: 0;
  padding: 2px 0;
  color: #9c998c;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

body.page-dashboard .industry-breadcrumb button:last-child,
body.page-dashboard .industry-breadcrumb button:hover {
  color: var(--terminal-gold);
}

body.page-dashboard .industry-apply-current {
  min-height: 34px;
  margin: 0 14px 9px;
  border: 1px solid rgba(229, 216, 95, 0.28);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.06);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

body.page-dashboard .industry-apply-current:hover {
  border-color: rgba(229, 216, 95, 0.55);
  background: rgba(229, 216, 95, 0.1);
}

body.page-dashboard .industry-summary {
  margin: 0;
  padding: 0 16px 10px;
  color: var(--terminal-muted);
  font-size: 11px;
}

body.page-dashboard .industry-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--terminal-line);
  padding: 6px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: #3b3927 transparent;
}

body.page-dashboard .industry-list button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-left: 3px solid transparent;
  padding: 0 16px 0 15px;
  color: #aaa89f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body.page-dashboard .industry-list button:hover {
  color: #eeeade;
  background: #0e0e0c;
}

body.page-dashboard .industry-list button.active {
  border-left-color: var(--terminal-gold);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.07);
}

body.page-dashboard .industry-list button span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .industry-list button span strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}

body.page-dashboard .industry-list button span small {
  overflow: hidden;
  color: #626159;
  font-size: 10px;
  text-overflow: ellipsis;
}

body.page-dashboard .industry-list button b {
  flex: 0 0 auto;
  color: #737168;
  font: 600 11px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .market-industry-filter-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

body.page-dashboard .market-industry-filter-button:hover,
body.page-dashboard .market-industry-filter-button:focus-visible,
body.page-dashboard .market-industry-filter-button.active {
  color: var(--terminal-gold);
}

body.page-dashboard #marketIndustryFilterIndicator {
  display: inline-grid;
  min-width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 999px;
  color: #69675d;
  font: 700 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .market-industry-filter-button.active #marketIndustryFilterIndicator {
  color: #050504;
  background: var(--terminal-gold);
}

body.page-dashboard .market-industry-filter-popover[hidden] {
  display: none;
}

body.page-dashboard .market-industry-filter-popover {
  position: fixed;
  z-index: 90;
  display: grid;
  max-height: min(410px, calc(100vh - 24px));
  grid-template-rows: auto auto auto minmax(120px, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(229, 216, 95, 0.32);
  border-radius: 6px;
  color: var(--terminal-text);
  background: #070706;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.72);
}

body.page-dashboard .market-industry-filter-popover > header,
body.page-dashboard .market-industry-filter-popover > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--terminal-line);
  padding: 10px 11px;
}

body.page-dashboard .market-industry-filter-popover > header div {
  display: grid;
  gap: 3px;
}

body.page-dashboard .market-industry-filter-popover > header strong {
  color: #eeeade;
  font-size: 13px;
}

body.page-dashboard .market-industry-filter-popover > header small {
  color: #6f6d64;
  font-size: 10px;
}

body.page-dashboard #marketIndustryFilterClose {
  width: 26px;
  height: 26px;
  border: 1px solid var(--terminal-line);
  border-radius: 3px;
  color: #8e8b81;
  background: #0c0c0b;
  cursor: pointer;
}

body.page-dashboard .market-industry-filter-search {
  padding: 9px 10px 6px;
}

body.page-dashboard .market-industry-filter-search input {
  width: 100%;
  height: 31px;
  border: 1px solid var(--terminal-line);
  border-radius: 3px;
  padding: 0 9px;
  color: var(--terminal-text);
  background: #0b0b0a;
  outline: 0;
  font-size: 12px;
}

body.page-dashboard .market-industry-filter-search input:focus {
  border-color: rgba(229, 216, 95, 0.5);
}

body.page-dashboard .market-industry-filter-actions {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--terminal-line);
  padding: 0 10px 6px;
}

body.page-dashboard .market-industry-filter-actions button,
body.page-dashboard .market-industry-filter-popover > footer button {
  border: 1px solid var(--terminal-line);
  border-radius: 3px;
  padding: 5px 8px;
  color: #aaa79c;
  background: #0b0b0a;
  font-size: 11px;
  cursor: pointer;
}

body.page-dashboard .market-industry-filter-actions span {
  margin-left: auto;
  color: #77746b;
  font-size: 10px;
}

body.page-dashboard .market-industry-filter-list {
  min-height: 0;
  overflow-y: auto;
  padding: 5px 0;
  scrollbar-width: thin;
  scrollbar-color: #3b3927 transparent;
}

body.page-dashboard .market-industry-filter-list label {
  display: grid;
  min-height: 31px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 11px;
  color: #b7b4aa;
  cursor: pointer;
}

body.page-dashboard .market-industry-filter-list label:hover {
  color: #f0ecdf;
  background: #10100e;
}

body.page-dashboard .market-industry-filter-list input {
  width: 13px;
  height: 13px;
  accent-color: #d6ca51;
}

body.page-dashboard .market-industry-filter-list span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .market-industry-filter-list b {
  color: #6f6d64;
  font: 600 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .market-industry-filter-empty {
  margin: 34px 10px;
  color: #6f6d64;
  font-size: 11px;
  text-align: center;
}

body.page-dashboard .market-industry-filter-popover > footer {
  border-top: 1px solid var(--terminal-line);
  border-bottom: 0;
}

body.page-dashboard #marketIndustryFilterReset {
  color: #827f75;
}

body.page-dashboard #marketIndustryFilterApply {
  border-color: rgba(229, 216, 95, 0.36);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.08);
}

body.page-dashboard #marketIndustryFilterApply:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

body.page-dashboard .terminal-sidebar-note {
  border-color: rgba(229, 216, 95, 0.2);
  background: rgba(229, 216, 95, 0.04);
}

body.page-dashboard .topbar-title span,
body.page-dashboard .overline,
body.page-dashboard .section-kicker,
body.page-dashboard .custom-screener-head span,
body.page-superuser .eyebrow,
body.page-superuser .review-toolbar p,
body.page-superuser .stock-workspace-head p,
body.page-performance .eyebrow,
body.page-performance .section-kicker {
  color: var(--terminal-gold);
}

body.page-dashboard .overline span{
  background: var(--terminal-gold);
}

body.page-dashboard .hero h1,
body.page-superuser .intro-panel h1,
body.page-performance .hero h1 {
  color: var(--terminal-gold);
}

body.page-dashboard .date-display,
body.page-dashboard .market-stats strong,
body.page-dashboard .active-strategy h2,
body.page-dashboard .section-title-row h2,
body.page-superuser .review-toolbar h2,
body.page-performance .panel-head h2 {
  color: #e8e6d8;
}

body.page-dashboard .market-card,
body.page-dashboard .results,
body.page-dashboard .strategy-card,
body.page-dashboard .custom-screener {
  border-radius: var(--terminal-radius);
}

body.page-dashboard .market-card-head,
body.page-dashboard .results-head,
body.page-dashboard .app-dialog-head,
body.page-dashboard .stock-chart-head,
body.page-dashboard .intelligence-card-head,
body.page-dashboard .daily-inspector-hero,
body.page-dashboard .daily-inspector-section h3,
body.page-dashboard .capital-flow-head,
body.page-superuser thead,
body.page-performance thead,
body.page-performance th:first-child {
  background: #10100e;
}

body.page-dashboard .market-table th,
body.page-dashboard .stock-table th,
body.page-superuser th,
body.page-performance th {
  color: #b7ac5f;
  background: #10100e;
}

body.page-dashboard td,
body.page-superuser td,
body.page-performance td {
  border-color: rgba(196, 194, 174, 0.1);
}

body.page-dashboard tbody tr:hover,
body.page-superuser tbody tr:hover,
body.page-performance tbody tr:hover {
  background: rgba(229, 216, 95, 0.035);
}

.stock-chart-link {
  appearance: none;
  margin: 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stock-chart-link:hover strong,
.stock-chart-link:hover .stock-name {
  color: var(--terminal-gold);
}

.stock-chart-link:focus-visible {
  outline: 1px solid var(--terminal-gold);
  outline-offset: 4px;
}

body.page-dashboard .rank.top,
body.page-dashboard .stock-open-button:hover .stock-name,
body.page-dashboard .copy-button:hover,
body.page-superuser .text-button,
body.page-performance .history-date-option:hover {
  color: var(--terminal-gold);
}

body.page-dashboard .stock-initial,
body.page-superuser .stock-name b {
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.065);
}

body.page-dashboard .strategy-card[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--card-accent) 34%, var(--terminal-gold));
  background: color-mix(in srgb, var(--card-accent) 4%, #070707);
}

body.page-dashboard .strategy-card[aria-selected="true"]::after {
  background: var(--terminal-gold);
}

body.page-dashboard .strategy-access-badge,
body.page-dashboard .strategy-card.public .leader,
body.page-dashboard .quality.pass {
  color: var(--terminal-cyan);
}

body.page-dashboard .market-pagination button,
body.page-dashboard .custom-screen-toggle,
body.page-dashboard .custom-screener-actions button,
body.page-dashboard .refresh-list-button,
body.page-dashboard .export-txt-button,
body.page-dashboard .chart-tool,
body.page-dashboard .stock-chart-periods,
body.page-dashboard .stock-chart-range-select-label,
body.page-dashboard .stock-chart-ma-presets button,
body.page-dashboard .stock-chart-custom-mas button,
body.page-dashboard .stock-chart-ma-form button,
body.page-superuser button,
body.page-performance button,
body.page-performance .topbar nav a {
  border-color: var(--terminal-line);
  color: #b9b7ac;
  background: #090908;
}

body.page-dashboard .market-pagination button:hover,
body.page-dashboard .custom-screen-toggle:hover,
body.page-dashboard .custom-screen-toggle[aria-expanded="true"],
body.page-dashboard .refresh-list-button:hover,
body.page-dashboard .export-txt-button:hover,
body.page-dashboard .chart-tool:hover,
body.page-superuser button:hover,
body.page-performance button:hover,
body.page-performance .topbar nav a:hover {
  border-color: rgba(229, 216, 95, 0.38);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.055);
}

body.page-dashboard .stock-chart-periods button.active,
body.page-dashboard .stock-chart-ma-presets button.active,
body.page-dashboard .chart-tool.active,
body.page-performance .date-navigation button.active,
body.page-performance .history-date-option.active,
body.page-superuser .strategy-tab.active {
  border-color: rgba(229, 216, 95, 0.38);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.075);
  box-shadow: inset 0 -2px 0 var(--terminal-gold);
}

body.page-dashboard .auth-button,
body.page-dashboard .status-pill,
body.page-superuser .secondary-button,
body.page-superuser .ghost-button,
body.page-performance .topbar nav a {
  border-color: var(--terminal-line);
  background: #090908;
}

/* Keep the account control on one line so a long masked phone number cannot
   push below the compact topbar and overlap the index strip. */
body.page-dashboard .topbar-actions {
  flex: 0 0 auto;
  min-width: 0;
}

body.page-dashboard .auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  min-width: 0;
  max-width: min(180px, 42vw);
  height: 32px;
  padding: 0 9px;
  border-radius: 5px;
  white-space: nowrap;
  line-height: 1;
}

body.page-dashboard .auth-button svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-dashboard .market-ai-entry {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(229, 216, 95, 0.38);
  border-radius: 5px;
  color: var(--terminal-gold);
  background: #111109;
  font-size: 13px;
  white-space: nowrap;
}

body.page-dashboard .auth-button span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-superuser .publish-button {
  border-color: rgba(229, 216, 95, 0.46);
  color: #090908;
  background: var(--terminal-gold);
}

body.page-superuser .publish-button:hover {
  color: #000;
  background: #f0e476;
}

body.page-dashboard input,
body.page-dashboard textarea,
body.page-dashboard select,
body.page-superuser input,
body.page-performance input {
  border-color: var(--terminal-line);
  color: var(--terminal-text);
  background: #030303;
}

body.page-dashboard input:focus,
body.page-dashboard textarea:focus,
body.page-dashboard select:focus,
body.page-superuser input:focus,
body.page-performance input:focus {
  border-color: rgba(229, 216, 95, 0.48);
  box-shadow: 0 0 0 2px rgba(229, 216, 95, 0.07);
}

body.page-dashboard .stock-chart-dialog,
body.page-dashboard .stock-chart-content,
body.page-dashboard .stock-chart-main-pane,
body.page-dashboard .stock-chart-canvas-wrap,
body.page-dashboard .stock-chart-research-disclaimer,
body.page-dashboard .stock-chart-navigator {
  background: #020202;
}
body.page-dashboard .stock-chart-dialog {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

body.page-dashboard .stock-chart-command-row,
body.page-dashboard .stock-chart-ma-toolbar,
body.page-dashboard .stock-chart-footer,
body.page-dashboard .stock-intelligence-dock,
body.page-dashboard .intelligence-card,
body.page-dashboard .daily-inspector,
body.page-dashboard .daily-inspector-hero,
body.page-dashboard .daily-inspector-section h3,
body.page-dashboard .capital-flow-head {
  border-color: var(--terminal-line);
  background: #090908;
}

body.page-dashboard .chip-distribution-chart > p {
  color: var(--terminal-muted);
  background: rgba(5, 5, 5, 0.84);
}

body.page-dashboard .chip-distribution-coverage {
  border-color: var(--terminal-line);
  color: var(--terminal-muted);
}

body.page-dashboard .chip-distribution-date-controls button,
body.page-dashboard .chip-distribution-date-controls input {
  border-color: var(--terminal-line);
  color: var(--terminal-text);
  background: #050505;
}

body.page-dashboard .chip-distribution-date-controls button:hover:not(:disabled) {
  color: var(--terminal-gold);
  border-color: rgba(229, 216, 95, 0.42);
}

body.page-dashboard .stock-chart-symbol,
body.page-dashboard .forecast-horizon,
body.page-dashboard .model-status {
  border-color: rgba(229, 216, 95, 0.3);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.055);
}

body.page-dashboard .stock-chart-tooltip,
body.page-dashboard .history-date-dialog,
body.page-performance .history-date-dialog {
  border-color: var(--terminal-line-strong);
  color: var(--terminal-text);
  background: rgba(5, 5, 5, 0.97);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.68);
}
body.page-performance .summary-grid article::after {
  background: var(--terminal-gold);
}
body.page-superuser .review-state.ready {
  color: var(--terminal-cyan);
  background-color: rgba(229, 216, 95, 0.07);
}
body.page-superuser .review-state,
body.page-superuser .strategy-tab em,
body.page-performance .timeline-note strong {
  color: var(--terminal-cyan);
}

body.page-dashboard .positive,
body.page-superuser .positive,
body.page-performance .positive {
  color: var(--terminal-red);
}

body.page-dashboard .negative,
body.page-superuser .negative,
body.page-performance .negative {
  color: var(--terminal-green);
}
body.page-superuser button:focus-visible,
body.page-superuser a:focus-visible,
body.page-performance button:focus-visible,
body.page-performance a:focus-visible,
body.page-performance input:focus-visible,
body.page-dashboard button:focus-visible,
body.page-dashboard a:focus-visible,
body.page-dashboard input:focus-visible,
body.page-dashboard textarea:focus-visible,
body.page-dashboard select:focus-visible {
  outline-color: var(--terminal-gold);
}

/* Qianlong classic terminal: flat black canvas and gold-only interface accents. */
body.page-dashboard .classic-command-bar {
  position: sticky;
  top: 64px;
  z-index: 29;
  display: flex;
  min-height: 34px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(229, 216, 95, 0.24);
  background: #000;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 216, 95, 0.32) #000;
}

body.page-dashboard .classic-command-bar button {
  min-width: max-content;
  border: 0;
  border-right: 1px solid rgba(196, 194, 174, 0.15);
  padding: 0 15px;
  color: #b8b6aa;
  background: #050505;
  font-size: 15px;
  cursor: pointer;
}

body.page-dashboard .classic-command-bar .notification-unread-badge {
  position: static;
  display: inline-grid;
  margin-left: 6px;
  vertical-align: middle;
}

body.page-dashboard .classic-command-bar button:hover,
body.page-dashboard .classic-command-bar button.active {
  color: var(--terminal-gold);
  background: #15140d;
  box-shadow: inset 0 -2px 0 var(--terminal-gold);
}

body.page-dashboard .classic-menu-popover[hidden] {
  display: none;
}

body.page-dashboard .classic-menu-popover {
  position: fixed;
  z-index: 80;
  max-height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(229, 216, 95, 0.42);
  border-radius: 2px;
  color: var(--terminal-text);
  background: #000;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.9);
}

body.page-dashboard .classic-menu-popover > header,
body.page-dashboard .classic-menu-popover > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090909;
}

body.page-dashboard .classic-menu-popover > header {
  min-height: 49px;
  border-bottom: 1px solid rgba(229, 216, 95, 0.2);
  padding: 7px 8px 7px 13px;
}

body.page-dashboard .classic-menu-popover > header div {
  display: grid;
  gap: 3px;
}

body.page-dashboard .classic-menu-popover > header span {
  color: #817a45;
  font: 700 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.16em;
}

body.page-dashboard .classic-menu-popover > header strong {
  color: var(--terminal-gold);
  font-size: 17px;
  font-weight: 650;
}

body.page-dashboard #classicMenuClose {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(229, 216, 95, 0.2);
  border-radius: 2px;
  color: #aaa895;
  background: #030303;
  font-size: 21px;
  cursor: pointer;
}

body.page-dashboard #classicMenuClose:hover {
  color: var(--terminal-gold);
  background: #17160d;
}

body.page-dashboard .classic-menu-items {
  display: grid;
  max-height: min(440px, calc(100vh - 215px));
  overflow-y: auto;
  padding: 5px;
  background: rgba(196, 194, 174, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 216, 95, 0.34) #050505;
}

body.page-dashboard .classic-menu-group {
  min-height: 26px;
  border-top: 1px solid rgba(229, 216, 95, 0.16);
  border-bottom: 1px solid rgba(229, 216, 95, 0.12);
  padding: 8px 12px 6px;
  color: #8e864b;
  background: #0b0b08;
  font: 700 10px/1.25 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.page-dashboard .classic-menu-group:first-child {
  border-top: 0;
}

body.page-dashboard .classic-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 68px;
  align-items: center;
  min-height: 39px;
  border: 0;
  border-bottom: 1px solid rgba(196, 194, 174, 0.1);
  padding: 0 9px 0 12px;
  color: #a7a59a;
  background: #050505;
  text-align: left;
  cursor: pointer;
}

body.page-dashboard .classic-menu-item:last-child {
  border-bottom: 0;
}

body.page-dashboard .classic-menu-item strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .classic-menu-item > span {
  min-width: 50px;
  padding: 0 8px;
  color: #78766c;
  font: 700 11px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  text-align: right;
}

body.page-dashboard .classic-menu-item small {
  color: #66655e;
  font-size: 11px;
  text-align: right;
}

body.page-dashboard .classic-menu-item.available {
  color: #e1dfd3;
}

body.page-dashboard .classic-menu-item.available small {
  color: var(--terminal-gold);
}

body.page-dashboard .classic-menu-item:hover,
body.page-dashboard .classic-menu-item.selected,
body.page-dashboard .classic-menu-item:focus-visible {
  color: var(--terminal-gold);
  background: #17160d;
  box-shadow: inset 3px 0 0 var(--terminal-gold);
}

body.page-dashboard .classic-menu-popover > footer {
  min-height: 40px;
  gap: 12px;
  border-top: 1px solid rgba(229, 216, 95, 0.18);
  padding: 7px 10px 7px 13px;
  color: #85837a;
  font-size: 11px;
  line-height: 1.45;
}

body.page-dashboard .classic-menu-popover > footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .classic-menu-popover kbd {
  flex: 0 0 auto;
  border: 1px solid rgba(229, 216, 95, 0.22);
  border-radius: 2px;
  padding: 3px 5px;
  color: var(--terminal-gold);
  background: #020202;
  font: 700 10px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .classic-feature-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(229, 216, 95, 0.38);
  border-radius: 4px;
  padding: 0;
  color: var(--terminal-text);
  background: #000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.86);
}

body.page-dashboard .classic-feature-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

body.page-dashboard .classic-ranking-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(800px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(229, 216, 95, 0.38);
  border-radius: 4px;
  padding: 0;
  color: var(--terminal-text);
  background: #000;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.88);
}

body.page-dashboard .classic-ranking-dialog::backdrop {
  background: rgba(0, 0, 0, 0.84);
}

body.page-dashboard .classic-ranking-head,
body.page-dashboard .classic-ranking-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090909;
}

body.page-dashboard .classic-ranking-head {
  min-height: 74px;
  border-bottom: 1px solid rgba(229, 216, 95, 0.22);
  padding: 10px 16px 10px 20px;
}

body.page-dashboard .classic-ranking-head > div {
  display: grid;
  gap: 4px;
}

body.page-dashboard .classic-ranking-head span {
  color: #8e864b;
  font: 700 11px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.18em;
}

body.page-dashboard .classic-ranking-head h2 {
  margin: 0;
  color: var(--terminal-gold);
  font-size: 22px;
  font-weight: 650;
}

body.page-dashboard .classic-ranking-head p {
  margin: 0;
  color: #858b91;
  font: 500 12px/1.3 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .classic-ranking-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(229, 216, 95, 0.25);
  border-radius: 3px;
  color: #c8c4aa;
  background: #030303;
  font-size: 24px;
  cursor: pointer;
}

body.page-dashboard .classic-ranking-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid rgba(196, 194, 174, 0.14);
  padding: 8px 14px;
  background: #050505;
}

body.page-dashboard .classic-ranking-metrics,
body.page-dashboard .classic-ranking-controls,
body.page-dashboard .classic-ranking-footer > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.page-dashboard .classic-ranking-toolbar button,
body.page-dashboard .classic-ranking-footer button {
  min-height: 32px;
  border: 1px solid rgba(196, 194, 174, 0.2);
  border-radius: 3px;
  padding: 0 12px;
  color: #aaa99f;
  background: #030303;
  font-size: 12px;
  cursor: pointer;
}

body.page-dashboard .classic-ranking-toolbar button:hover,
body.page-dashboard .classic-ranking-toolbar button.active,
body.page-dashboard .classic-ranking-footer button:hover {
  border-color: rgba(229, 216, 95, 0.5);
  color: var(--terminal-gold);
  background: #17160d;
}

body.page-dashboard .classic-ranking-toolbar button:disabled {
  border-color: rgba(196, 194, 174, 0.1);
  color: #54534d;
  background: #050505;
  cursor: not-allowed;
}

body.page-dashboard .classic-ranking-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  border-bottom: 1px solid rgba(229, 216, 95, 0.16);
  padding: 8px 18px;
  color: #818078;
  background: #080806;
  font-size: 12px;
}

body.page-dashboard .classic-ranking-summary strong {
  flex: 0 0 auto;
  color: #c7c3aa;
  font-weight: 600;
}

body.page-dashboard .classic-ranking-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .classic-ranking-table-wrap {
  height: calc(100% - 222px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 216, 95, 0.34) #050505;
}

body.page-dashboard .classic-ranking-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

body.page-dashboard .classic-ranking-table th,
body.page-dashboard .classic-ranking-table td {
  height: 48px;
  border-bottom: 1px solid rgba(196, 194, 174, 0.12);
  padding: 7px 12px;
  text-align: right;
}

body.page-dashboard .classic-ranking-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 38px;
  color: #b8ae58;
  background: #10100e;
  font-size: 12px;
  font-weight: 650;
}

body.page-dashboard .classic-ranking-table th:nth-child(1),
body.page-dashboard .classic-ranking-table td:nth-child(1) {
  width: 64px;
  color: var(--terminal-gold);
  text-align: center;
}

body.page-dashboard .classic-ranking-table th:nth-child(2),
body.page-dashboard .classic-ranking-table td:nth-child(2) {
  width: 210px;
  text-align: left;
}

body.page-dashboard .classic-ranking-table th:nth-child(3),
body.page-dashboard .classic-ranking-table td:nth-child(3) {
  width: 260px;
}

body.page-dashboard .classic-ranking-table th:last-child,
body.page-dashboard .classic-ranking-table td:last-child {
  text-align: left;
}

body.page-dashboard .classic-ranking-table tbody tr {
  color: #d7dce2;
  background: #05090c;
  cursor: pointer;
}

body.page-dashboard .classic-ranking-table tbody tr:nth-child(even) {
  background: #080d12;
}

body.page-dashboard .classic-ranking-table tbody tr:hover,
body.page-dashboard .classic-ranking-table tbody tr:focus-visible {
  outline: 0;
  color: #fffde8;
  background: #171a17;
  box-shadow: inset 3px 0 0 var(--terminal-gold);
}

body.page-dashboard .classic-ranking-table td strong,
body.page-dashboard .classic-ranking-table td small {
  display: block;
}

body.page-dashboard .classic-ranking-table td strong {
  font-size: 14px;
}

body.page-dashboard .classic-ranking-table td small {
  margin-top: 3px;
  overflow: hidden;
  color: #728094;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-dashboard .classic-ranking-table .positive {
  color: var(--terminal-up);
}

body.page-dashboard .classic-ranking-table .negative {
  color: var(--terminal-down);
}

body.page-dashboard .classic-ranking-empty {
  height: 180px !important;
  color: #85837a !important;
  text-align: center !important;
}

body.page-dashboard .classic-ranking-footer {
  min-height: 52px;
  border-top: 1px solid rgba(229, 216, 95, 0.2);
  padding: 8px 14px;
}

body.page-dashboard .classic-ranking-footer strong {
  min-width: 86px;
  color: #a5a38f;
  font: 600 12px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  text-align: center;
}

body.page-dashboard .classic-feature-head,
body.page-dashboard .classic-feature-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: rgba(229, 216, 95, 0.2);
  background: #090909;
}

body.page-dashboard .classic-feature-head {
  min-height: 66px;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  padding: 10px 16px 10px 20px;
}

body.page-dashboard .classic-feature-head span {
  color: #8e864b;
  font: 700 11px/1.2 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.18em;
}

body.page-dashboard .classic-feature-head h2 {
  margin: 5px 0 0;
  color: var(--terminal-gold);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

body.page-dashboard .classic-feature-head button,
body.page-dashboard .classic-feature-footer button {
  border: 1px solid rgba(229, 216, 95, 0.25);
  border-radius: 3px;
  color: #c8c4aa;
  background: #030303;
  cursor: pointer;
}

body.page-dashboard .classic-feature-head button {
  width: 34px;
  height: 34px;
  font-size: 24px;
}

body.page-dashboard .classic-feature-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  min-height: 510px;
}

body.page-dashboard .classic-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1px;
  overflow-y: auto;
  padding: 18px;
  background: rgba(196, 194, 174, 0.12);
}

body.page-dashboard .classic-feature-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 49px;
  border: 0;
  padding: 0 13px;
  color: #a4a299;
  background: #050505;
  text-align: left;
  cursor: pointer;
}

body.page-dashboard .classic-feature-option > span {
  color: #786f3b;
  font: 700 13px/1 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .classic-feature-option strong {
  font-size: 15px;
  font-weight: 560;
}

body.page-dashboard .classic-feature-option small {
  color: #696861;
  font-size: 11px;
}

body.page-dashboard .classic-feature-option.available {
  color: #dedbcb;
}

body.page-dashboard .classic-feature-option.available small {
  color: var(--terminal-gold);
}

body.page-dashboard .classic-feature-option:hover,
body.page-dashboard .classic-feature-option.selected {
  color: var(--terminal-gold);
  background: #17160d;
  box-shadow: inset 3px 0 0 var(--terminal-gold);
}

body.page-dashboard .classic-feature-preview {
  border-left: 1px solid rgba(229, 216, 95, 0.2);
  padding: 46px 30px;
  background: #020202;
}

body.page-dashboard .classic-feature-preview > span {
  display: inline-flex;
  border: 1px solid rgba(229, 216, 95, 0.26);
  border-radius: 2px;
  padding: 5px 8px;
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.055);
  font-size: 11px;
  letter-spacing: 0.12em;
}

body.page-dashboard .classic-feature-preview h3 {
  margin: 24px 0 11px;
  color: #e9e6d6;
  font-size: 26px;
  font-weight: 620;
}

body.page-dashboard .classic-feature-preview p {
  margin: 0;
  color: #8f8d85;
  font-size: 14px;
  line-height: 1.9;
}

body.page-dashboard .classic-feature-help {
  margin-top: 28px;
  border-top: 1px solid rgba(229, 216, 95, 0.16);
  padding-top: 20px;
}

body.page-dashboard .classic-feature-dialog.shortcut-mode .classic-feature-body {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

body.page-dashboard .classic-feature-dialog.shortcut-mode .classic-feature-grid {
  display: none;
}

body.page-dashboard .classic-feature-dialog.shortcut-mode .classic-feature-preview {
  border-left: 0;
  padding: 24px;
}

body.page-dashboard .classic-feature-dialog.shortcut-mode .classic-feature-preview h3 {
  margin-top: 14px;
}

body.page-dashboard .classic-feature-dialog.shortcut-mode .classic-feature-help {
  margin-top: 18px;
  padding-top: 16px;
}

body.page-dashboard .shortcut-help-note {
  border: 1px solid rgba(229, 216, 95, 0.22);
  padding: 10px 12px;
  color: #c7c3ab;
  background: rgba(229, 216, 95, 0.05);
  font-size: 13px;
  line-height: 1.7;
}

body.page-dashboard .shortcut-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

body.page-dashboard .shortcut-help-grid section {
  border: 1px solid rgba(196, 194, 174, 0.16);
  padding: 12px;
  background: #050505;
}

body.page-dashboard .shortcut-help-grid h4 {
  margin: 0 0 9px;
  color: var(--terminal-gold);
  font-size: 14px;
}

body.page-dashboard .shortcut-help-grid p {
  color: #96948a;
  font-size: 12px;
  line-height: 1.75;
}

body.page-dashboard .shortcut-help-list {
  margin: 0;
}

body.page-dashboard .shortcut-help-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(196, 194, 174, 0.1);
  padding: 7px 0;
}

body.page-dashboard .shortcut-help-list > div:first-child {
  border-top: 0;
  padding-top: 0;
}

body.page-dashboard .shortcut-help-list dt,
body.page-dashboard .shortcut-help-list dd {
  margin: 0;
}

body.page-dashboard .shortcut-help-list dd {
  color: #a3a198;
  font-size: 12px;
  line-height: 1.55;
}

body.page-dashboard .classic-feature-help kbd {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 1px 4px 1px 0;
  border: 1px solid rgba(229, 216, 95, 0.3);
  border-bottom-color: rgba(229, 216, 95, 0.55);
  border-radius: 2px;
  padding: 2px 7px;
  color: #e8df6a;
  background: #111007;
  font: 700 11px/1.2 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
}

body.page-dashboard .classic-feature-footer {
  min-height: 48px;
  border-top-style: solid;
  border-top-width: 1px;
  padding: 8px 16px 8px 20px;
  color: #706e66;
  font-size: 11px;
}

body.page-dashboard .classic-feature-footer button {
  height: 30px;
  padding: 0 12px;
  color: var(--terminal-gold);
}

body.page-dashboard .pulse,
body.page-superuser .pulse,
body.page-performance .pulse,
body.page-dashboard .sidebar-status-dot {
  background: var(--terminal-gold);
  box-shadow: 0 0 0 4px rgba(229, 216, 95, 0.08);
}

body.page-dashboard .auth-intro,
body.page-dashboard .notification-row.unread,
body.page-dashboard .ai-chat-dock-placeholder > span,
body.page-dashboard .intelligence-card-icon,
body.page-dashboard .model-status.online,
body.page-dashboard .ai-chat-expand,
body.page-dashboard .ai-chat-composer button,
body.page-dashboard .ai-chat-drawer .ai-chat-card {
  border-color: rgba(229, 216, 95, 0.24);
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.045);
}
body.page-dashboard .ai-chat-drawer {
  z-index: 100;
  width: calc(100% / 3);
  min-width: 280px;
  background: #080e16;
  box-shadow: -26px 0 60px rgba(0, 0, 0, 0.62);
}
body.page-dashboard .global-stock-search { background: rgba(0, 0, 0, 0.82); }
body.page-dashboard .global-stock-search-dialog { border-color: rgba(229, 216, 95, 0.28); background: #050505; }
body.page-dashboard .global-stock-search-head h2 { color: #f2efe0; }
body.page-dashboard .global-stock-search-head p { color: #8a8776; }
body.page-dashboard .global-stock-search-head kbd,
body.page-dashboard .global-stock-search-footer kbd { background: #0f0f0d; border-color: rgba(229, 216, 95, 0.22); color: #b8b394; }
body.page-dashboard .global-stock-search-input { background: #080808; border-color: rgba(229, 216, 95, 0.18); color: #e8e4d4; }
body.page-dashboard .global-stock-search-input:focus { border-color: rgba(229, 216, 95, 0.5); box-shadow: 0 0 0 3px rgba(229, 216, 95, 0.07); }
body.page-dashboard .global-stock-search-result:hover,
body.page-dashboard .global-stock-search-result.active { background: rgba(229, 216, 95, 0.08); }
body.page-dashboard .global-stock-search-result .name { color: #f2efe0; }
body.page-dashboard .global-stock-search-footer { color: #7a7762; border-color: rgba(229, 216, 95, 0.1); }

body.page-dashboard .auth-intro > span,
body.page-dashboard .auth-account-avatar,
body.page-dashboard .notification-row.unread::before {
  color: var(--terminal-gold);
  background: rgba(229, 216, 95, 0.08);
  box-shadow: none;
}

body.page-dashboard .primary-button,
body.page-dashboard .secondary-button {
  border-color: rgba(229, 216, 95, 0.5);
  color: #050505;
  background: var(--terminal-gold);
}

body.page-dashboard .toast {
  border-color: rgba(229, 216, 95, 0.28);
  color: #e5e1cf;
  background: #090908;
}
body.page-superuser .review-state.ready {
  color: var(--terminal-gold);
  background-color: rgba(229, 216, 95, 0.07);
}

@media (max-width: 760px) {
  body.page-dashboard .classic-command-bar {
    top: 56px;
  }

  body.page-dashboard .classic-command-bar button {
    padding: 0 12px;
  }

  body.page-dashboard .classic-feature-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  body.page-dashboard .classic-ranking-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  body.page-dashboard .classic-ranking-toolbar,
  body.page-dashboard .classic-ranking-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  body.page-dashboard .classic-ranking-metrics {
    width: 100%;
    overflow-x: auto;
  }

  body.page-dashboard .classic-ranking-summary span {
    max-width: 100%;
    white-space: normal;
  }

  body.page-dashboard .classic-ranking-table-wrap {
    height: calc(100% - 280px);
  }

  body.page-dashboard .classic-ranking-table {
    min-width: 760px;
  }

  body.page-dashboard .classic-feature-body {
    display: block;
    min-height: 0;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }

  body.page-dashboard .classic-feature-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 10px;
  }

  body.page-dashboard .classic-feature-preview {
    border-top: 1px solid rgba(229, 216, 95, 0.2);
    border-left: 0;
    padding: 24px 18px;
  }

  body.page-dashboard .shortcut-help-grid {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .shortcut-help-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 1180px) {
  body.page-dashboard .industry-drawer {
    left: 70px;
  }
}

@media (max-width: 760px) {
  body.page-dashboard .industry-drawer {
    top: 66px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    border: 1px solid var(--terminal-line-strong);
  }
}

/* One restrained type step for the dense desktop terminal. */
body.page-dashboard,
body.page-superuser,
body.page-performance {
  font-size: 17px;
}

body.page-dashboard .terminal-nav-item strong { font-size: 15px; }
body.page-dashboard .terminal-nav-item small { font-size: 12px; }
body.page-dashboard .topbar-title strong { font-size: 17px; }
body.page-dashboard .market-table thead th { font-size: 15px; }
body.page-dashboard .market-table tbody td { font-size: 16px; }
body.page-dashboard .market-table .rank { font-size: 16px; }

/* Improve readability of the strategy research result table without changing its layout. */
body.page-dashboard #tableWrap .strategy-stock-table thead th { font-size: 15px; }
body.page-dashboard #tableWrap .strategy-stock-table tbody td { font-size: 16px; }
body.page-dashboard #tableWrap .strategy-stock-table .rank,
body.page-dashboard #tableWrap .strategy-stock-table .numeric,
body.page-dashboard #tableWrap .strategy-stock-table .score { font-size: 16px; }
body.page-dashboard #tableWrap .strategy-stock-table .stock-name { font-size: 18px; line-height: 1.15; }
body.page-dashboard #tableWrap .strategy-stock-table .market-stock-code { font-size: 12px; line-height: 1.1; }
body.page-dashboard #tableWrap .strategy-stock-table th:nth-child(2),
body.page-dashboard #tableWrap .strategy-stock-table td:nth-child(2) { width: 230px; }
body.page-dashboard #tableWrap .strategy-stock-table .stock-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px 22px;
  gap: 4px;
}
body.page-dashboard #tableWrap .strategy-stock-table .stock-open-button {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
body.page-dashboard #tableWrap .strategy-stock-table .stock-open-button > span {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
body.page-dashboard #tableWrap .strategy-stock-table .market-stock-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-dashboard #tableWrap .strategy-stock-table .stock-name { white-space: nowrap; }
body.page-dashboard .stock-chart-dialog { font-size: 17px; }
body.page-superuser .review-shell,
body.page-performance .performance-shell { font-size: 17px; }

/* Keep chart typography identical across minute, daily, weekly, and monthly periods. */
body.page-dashboard .stock-chart-dialog .stock-chart-symbol { font-size: 22px; }
body.page-dashboard .stock-chart-dialog .stock-chart-title-line h2 { font-size: 28px; }
body.page-dashboard .stock-chart-dialog .stock-chart-identity p { font-size: 16px; }
body.page-dashboard .stock-chart-dialog .adjustment-badge { display: none; }
body.page-dashboard .stock-chart-dialog .stock-chart-quote { display: none; }
body.page-dashboard .stock-chart-dialog .stock-chart-periods button,
body.page-dashboard .stock-chart-dialog .chart-tool { font-size: 20px; }
body.page-dashboard .stock-chart-dialog .stock-chart-range-select-label,
body.page-dashboard .stock-chart-dialog .stock-chart-ma-toolbar,
body.page-dashboard .stock-chart-dialog .stock-chart-indicator-toolbar { font-size: 19px; }
body.page-dashboard .stock-chart-dialog .stock-chart-loading strong,
body.page-dashboard .stock-chart-dialog .stock-chart-error strong { font-size: 25px; }
body.page-dashboard .stock-chart-dialog .stock-chart-loading p,
body.page-dashboard .stock-chart-dialog .stock-chart-error p { font-size: 21px; }
body.page-dashboard .stock-chart-dialog .stock-chart-research-disclaimer,
body.page-dashboard .stock-chart-dialog .stock-chart-footer { font-size: 19px; }
body.page-dashboard .stock-chart-dialog .stock-chart-legend { font-size: 21px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-presets button,
body.page-dashboard .stock-chart-dialog .stock-chart-custom-mas button,
body.page-dashboard .stock-chart-dialog .stock-chart-ma-form button,
body.page-dashboard .stock-chart-dialog .stock-chart-indicator-toolbar small,
body.page-dashboard .stock-chart-dialog .stock-chart-template-status,
body.page-dashboard .stock-chart-dialog .stock-chart-template-status button { font-size: 18px; }
body.page-dashboard .stock-chart-dialog .custom-ma-remove { width: 20px; height: 20px; font-size: 17px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-form input,
body.page-dashboard .stock-chart-dialog .stock-chart-indicator-toolbar button,
body.page-dashboard .stock-chart-dialog .stock-chart-template-select-label select,
body.page-dashboard .stock-chart-dialog .stock-chart-template-status strong { font-size: 19px; }
body.page-dashboard .stock-chart-dialog .stock-chart-tooltip { min-width: 0; font-size: 16px; }
/* The quote inspector keeps the same compact hierarchy in every chart period. */
body.page-dashboard .stock-chart-dialog .daily-inspector-status { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .daily-metric-grid dt { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .capital-flow-ranges button,
body.page-dashboard .stock-chart-dialog .capital-flow-summary span { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .daily-inspector-price-row strong { font-size: 28px; }
body.page-dashboard .stock-chart-dialog .daily-inspector-price-row span { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 { font-size: 13px; padding: 3px 6px; }
body.page-dashboard .stock-chart-dialog .daily-metric-grid dd { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .daily-inspector-hero { padding: 4px 6px 5px; min-height: 42px; }
body.page-dashboard .stock-current-quote .daily-inspector-price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; margin-top: 0; min-height: 36px; }
body.page-dashboard .stock-current-quote .daily-inspector-price-row strong { grid-row: span 2; }
body.page-dashboard .stock-current-quote .daily-inspector-price-row span { text-align: right; white-space: nowrap; }
body.page-dashboard .stock-chart-dialog .daily-metric-grid > div { padding: 3px 5px; }
body.page-dashboard .stock-chart-dialog .capital-flow-summary strong { font-size: 17px; }
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 > span,
body.page-dashboard .stock-chart-dialog .chip-distribution-summary dt { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .chip-distribution-chart > p,
body.page-dashboard .stock-chart-dialog .daily-inspector-disclaimer { font-size: 15px; }
body.page-dashboard .stock-chart-dialog .daily-flow-grid dd,
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls button,
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls input { font-size: 16px; }
body.page-dashboard .stock-chart-dialog .chip-distribution-summary dd { font-size: 17px; }
body.page-dashboard .stock-chart-dialog .chip-distribution-coverage,
body.page-dashboard .stock-chart-dialog .capital-flow-legend span,
body.page-dashboard .stock-chart-dialog .capital-flow-coverage { font-size: 15px; }
body.page-dashboard .stock-chart-dialog .daily-metric-grid > div {
  display: grid;
  grid-template-columns: minmax(58px, 1fr) auto;
  align-items: baseline;
  gap: 4px;
}
body.page-dashboard .stock-chart-dialog .daily-metric-grid dt,
body.page-dashboard .stock-chart-dialog .daily-metric-grid dd {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.page-dashboard .stock-chart-dialog .daily-metric-grid {
  grid-template-columns: minmax(0, 1fr);
}
body.page-dashboard .stock-chart-dialog .daily-metric-grid > div {
  min-height: 30px;
  padding: 5px 7px;
}
body.page-dashboard .stock-chart-dialog .daily-metric-grid dt {
  max-width: none;
}
body.page-dashboard .stock-chart-dialog .daily-metric-grid dd {
  min-width: 0;
  text-align: right;
}
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 > span {
  float: none;
  overflow: hidden;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls {
  grid-template-areas:
    "date date"
    "previous next";
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 6px 7px 2px;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls label {
  grid-area: date;
}
body.page-dashboard .stock-chart-dialog #chipPreviousDate {
  grid-area: previous;
}
body.page-dashboard .stock-chart-dialog #chipNextDate {
  grid-area: next;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls button,
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls input {
  height: 28px;
  white-space: nowrap;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls button {
  padding: 0 2px;
  font-size: 12px;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-date-controls input {
  padding: 0 2px;
  font-size: 13px;
  letter-spacing: -0.03em;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-summary {
  gap: 4px;
  padding: 8px 7px 6px;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-summary dt {
  font-size: 13px;
}
body.page-dashboard .stock-chart-dialog .chip-distribution-summary dd {
  font-size: 15px;
}
body.page-dashboard .stock-chart-dialog .chip-concentration-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 5px 7px 3px;
  border-top: 1px solid rgba(143, 174, 202, 0.12);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body.page-dashboard .stock-chart-dialog .chip-concentration-summary dt {
  color: #9aa5b3;
  font-size: 12px;
  white-space: nowrap;
}
body.page-dashboard .stock-chart-dialog .chip-concentration-summary dd {
  margin: 3px 0 0;
  color: #e5d85f;
  font-size: 15px;
  font-weight: 700;
}
body.page-dashboard .stock-chart-dialog .chip-concentration-note {
  margin: 0;
  padding: 2px 7px 6px;
  color: #8b949e;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
body.page-dashboard .stock-chart-dialog .capital-flow-head {
  align-items: flex-start;
  flex-direction: column;
}
body.page-dashboard .stock-chart-dialog .capital-flow-ranges {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.page-dashboard .stock-chart-dialog .capital-flow-ranges button {
  padding: 0 3px;
  font-size: 14px;
}
body.page-dashboard .stock-chart-dialog .capital-flow-summary span {
  font-size: 13px;
}
body.page-dashboard .stock-chart-dialog .capital-flow-summary strong {
  font-size: 14px;
}
body.page-dashboard .stock-chart-dialog .daily-inspector {
  overflow-x: hidden;
}
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 {
  flex-wrap: wrap;
}
body.page-dashboard .stock-chart-dialog .daily-inspector-section h3 > span {
  flex: 1 1 100%;
  text-align: left;
}
body.page-dashboard .stock-chart-dialog .capital-flow-donuts {
  grid-template-columns: minmax(0, 1fr);
}

/* Keep the intelligence dock readable without competing with quote hierarchy. */
body.page-dashboard .stock-chart-dialog .intelligence-card {
  grid-template-rows: 54px minmax(0, 1fr) 48px;
}
body.page-dashboard .stock-chart-dialog .next-day-plan-card {
  grid-template-rows: 54px minmax(0, 1fr) 34px;
}
body.page-dashboard .stock-chart-dialog .intelligence-card-title h3 { font-size: 18px; }
body.page-dashboard .stock-chart-dialog .intelligence-card-title p { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .intelligence-card-icon {
  width: 31px;
  height: 31px;
}
body.page-dashboard .stock-chart-dialog .intelligence-card-icon svg { width: 18px; }
body.page-dashboard .stock-chart-dialog .model-status,
body.page-dashboard .stock-chart-dialog .forecast-horizon { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .ai-chat-expand,
body.page-dashboard .stock-chart-dialog .forecast-generate {
  height: 30px;
  font-size: 14px;
}
body.page-dashboard .stock-chart-dialog .ai-chat-avatar { font-size: 13px; }
body.page-dashboard .stock-chart-dialog .ai-chat-message p,
body.page-dashboard .stock-chart-dialog .ai-chat-composer textarea { font-size: 15px; }
body.page-dashboard .stock-chart-dialog .ai-chat-composer button { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .forecast-decision span,
body.page-dashboard .stock-chart-dialog .forecast-decision small,
body.page-dashboard .stock-chart-dialog .forecast-metrics dt,
body.page-dashboard .stock-chart-dialog .forecast-rule { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .forecast-decision strong { font-size: 26px; }
body.page-dashboard .stock-chart-dialog .forecast-metrics dd { font-size: 16px; }
body.page-dashboard .stock-chart-dialog .ai-chat-dock-placeholder strong { font-size: 16px; }
body.page-dashboard .stock-chart-dialog .ai-chat-dock-placeholder small { font-size: 14px; }
body.page-dashboard .stock-chart-dialog .ai-chat-drawer .ai-chat-message p { font-size: 16px; }

body.page-dashboard .stock-chart-dialog .stock-chart-head { min-height: 80px; padding: 12px 16px; }
body.page-dashboard .stock-chart-dialog .stock-chart-symbol { height: 54px; }
body.page-dashboard .stock-chart-dialog .stock-chart-periods button,
body.page-dashboard .stock-chart-dialog .stock-chart-range-select-label { height: 46px; }
body.page-dashboard .stock-chart-dialog .stock-chart-range-select-label select { height: 44px; }
body.page-dashboard .stock-chart-dialog .stock-chart-close { width: 46px; height: 46px; }
body.page-dashboard .stock-chart-dialog .stock-chart-command-row { display: none; }
body.page-dashboard .stock-chart-dialog .stock-chart-legend { display: none; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-toolbar { min-height: 38px; padding: 1px 10px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-toolbar .chart-tool { height: 32px; padding: 0 9px; font-size: 16px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-toolbar .chart-tool-square { width: 32px; padding: 0; font-size: 24px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-presets button,
body.page-dashboard .stock-chart-dialog .stock-chart-custom-mas button,
body.page-dashboard .stock-chart-dialog .stock-chart-ma-form button,
body.page-dashboard .stock-chart-dialog .stock-chart-ma-form input,
body.page-dashboard .stock-chart-dialog .stock-chart-indicator-toolbar button,
body.page-dashboard .stock-chart-dialog .stock-chart-template-select-label select { height: 36px; }
body.page-dashboard .stock-chart-dialog .stock-chart-ma-form input { width: 80px; }
body.page-dashboard .stock-chart-dialog .stock-chart-indicator-toolbar { min-height: 26px; padding: 0 10px; }
/* Let the plot shrink while reserving readable space for every quote column. */
body.page-dashboard .stock-chart-dialog .stock-chart-workspace {
  grid-template-columns: minmax(0, 1fr) clamp(260px, 20vw, 360px);
  min-width: 0;
}

/* Selected-candle readout for the native JS chart, aligned with the plot. */
body.page-dashboard .stock-chart-reading-layout {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  flex: 0 0 auto;
  min-width: 0;
}
body.page-dashboard .stock-chart-plot-column { min-width: 0; }
body.page-dashboard .stock-chart-plot-column .stock-chart-ma-toolbar,
body.page-dashboard .stock-chart-plot-column .stock-chart-indicator-toolbar {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}
body.page-dashboard .stock-chart-plot-column .stock-chart-ma-toolbar > *,
body.page-dashboard .stock-chart-plot-column .stock-chart-indicator-toolbar > * { flex-shrink: 0; }
body.page-dashboard .stock-chart-plot-column .stock-chart-canvas-wrap,
body.page-dashboard .stock-chart-plot-column .stock-chart-navigator { min-width: 0; }
body.page-dashboard .stock-chart-reading-panel {
  box-sizing: border-box;
  min-width: 0;
  padding: 4px 0;
  border-right: 1px solid var(--terminal-line);
  background: #090908;
}
body.page-dashboard .stock-chart-reading-panel dl { margin: 0; }
body.page-dashboard .stock-chart-reading-panel dl > div {
  padding: 9px 10px;
  border-bottom: 1px solid var(--terminal-line);
}
body.page-dashboard .stock-chart-reading-panel dt {
  color: #9da8b5;
  font-size: 15px;
  line-height: 1.5;
}
body.page-dashboard .stock-chart-reading-panel dd {
  margin: 3px 0 0;
  color: #e5d85f;
  font: 600 17px/1.45 "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}
body.page-dashboard .stock-chart-reading-panel #chartReadingDate {
  color: #d6d4c9;
  font-size: 15px;
}
body.page-dashboard .stock-chart-reading-panel .positive { color: #ff3f55; }
body.page-dashboard .stock-chart-reading-panel .negative { color: #16df6a; }
/* Native chart additions: optional truthful Level-2 panel and compact controls. */
.stock-chart-f10-button,.stock-chart-main-force-toggle{border:1px solid rgba(246,217,77,.35);background:#080a0c;color:#d8dce1;border-radius:7px;padding:7px 10px;cursor:pointer}
.stock-chart-f10-button:hover,.stock-chart-main-force-toggle[aria-pressed="true"]{color:#f6d94d;border-color:#f6d94d}
.order-book-grid{display:flex;flex-direction:column;gap:5px;padding:8px 10px 8px}.order-book-side{display:flex;flex-direction:column;gap:1px}.order-book-side>strong{display:block;color:#eef2f5;font-size:20px;line-height:26px;margin-bottom:3px;letter-spacing:.08em}.order-book-row{display:grid;grid-template-columns:44px minmax(0,1fr) 78px;gap:8px;line-height:25px;font-size:17px;align-items:center}.order-book-row span{color:#d8dce1}.order-book-row b{color:#39dc75;font-weight:700;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.order-book-side:first-child .order-book-row b{color:#ff5367}.order-book-row small{color:#f6d94d;font-size:16px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.order-book-side:first-child{padding-bottom:8px;border-bottom:2px solid rgba(255,63,85,.75)}.order-book-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px 10px 10px;border-bottom:1px solid rgba(196,194,174,.16)}.order-book-meta span{display:flex;justify-content:space-between;gap:4px;min-width:0;color:#8794a8;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-book-meta b{min-width:0;color:#d8dce1;font-weight:600;overflow:hidden;text-overflow:ellipsis}.order-book-meta b.change,.order-book-meta b.percent{color:#ff5367}.f10-highlight{box-shadow:0 0 0 2px rgba(246,217,77,.7);transition:box-shadow .2s}

.f10-report-modal{position:fixed;inset:0;z-index:120;display:grid;place-items:center;background:rgba(0,0,0,.72);padding:24px;isolation:isolate}
.f10-report-modal[hidden]{display:none}
.f10-report-modal .stock-chart-backdrop{z-index:0}
.f10-report-dialog{position:relative;z-index:1;width:min(1100px,96vw);max-height:min(88vh,820px);overflow:auto;background:#07090b;border:1px solid rgba(246,217,77,.45);border-radius:14px;box-shadow:0 20px 70px #000;color:#d8dce1}
.f10-report-head{display:flex;justify-content:space-between;align-items:flex-start;padding:22px 26px 16px;border-bottom:1px solid rgba(246,217,77,.25)}
.f10-report-head span{font-size:13px;letter-spacing:.2em;color:#f6d94d}.f10-report-head h2{margin:6px 0;font-size:28px;color:#eef2f5}.f10-report-head p{margin:0;color:#8794a8}.f10-report-head button{width:38px;height:38px;border:1px solid rgba(216,220,225,.35);border-radius:8px;background:#0d1115;color:#d8dce1;font-size:27px;line-height:1;cursor:pointer}.f10-report-head button:hover{color:#f6d94d;border-color:#f6d94d}
.f10-report-tabs{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid rgba(246,217,77,.2)}.f10-report-tabs button{height:48px;border:0;background:transparent;color:#8794a8;font-size:17px;cursor:pointer}.f10-report-tabs button.active{color:#f6d94d;background:rgba(246,217,77,.08);box-shadow:inset 0 -2px #f6d94d}
.f10-report-body{padding:24px 26px 30px}.f10-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.f10-summary-grid div{padding:16px;background:rgba(17,24,31,.75);border:1px solid rgba(196,194,174,.16);border-radius:8px}.f10-summary-grid dt{color:#8794a8}.f10-summary-grid dd{margin:8px 0 0;font-size:22px;font-weight:700;color:#eef2f5}.f10-table-wrap{overflow:auto}.f10-table{width:100%;border-collapse:collapse;min-width:680px}.f10-table th,.f10-table td{padding:12px 14px;border-bottom:1px solid rgba(196,194,174,.16);text-align:right;white-space:nowrap}.f10-table th:first-child,.f10-table td:first-child{text-align:left}.f10-table th{color:#f6d94d;background:rgba(246,217,77,.06)}.f10-table td{color:#d8dce1}.f10-event-list{list-style:none;margin:0;padding:0}.f10-event-list li{display:flex;gap:18px;padding:12px 0;border-bottom:1px solid rgba(196,194,174,.16)}.f10-event-list time{color:#f6d94d;min-width:90px}.f10-empty{color:#8794a8;padding:32px 0}
.f10-trend-title{margin:28px 0 12px;color:#eef2f5;font-size:20px}.f10-trends{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.f10-trend-card{padding:14px;background:rgba(17,24,31,.65);border:1px solid rgba(196,194,174,.16);border-radius:8px}.f10-trend-card h4{margin:0 0 8px;color:#f6d94d;font-size:16px}.f10-trend-svg{display:block;width:100%;height:auto}.f10-trend-svg line{stroke:rgba(196,194,174,.2);stroke-width:1}.f10-trend-svg text{fill:#8794a8;font-size:12px}
@media(max-width:700px){.f10-report-modal{padding:10px}.f10-report-head{padding:18px}.f10-report-body{padding:18px}.f10-summary-grid,.f10-trends{grid-template-columns:repeat(2,1fr)}}

/* Desktop F10 workspace: financial comparison and trends side by side. */
.f10-table th,.f10-table td{width:auto;height:auto;letter-spacing:normal}.f10-trend-card footer{padding:0;text-align:left}
.f10-report-modal{padding:12px;background:rgba(0,0,0,.82)}
.f10-report-dialog{box-sizing:border-box;width:min(1900px,calc(100vw - 24px));height:calc(100dvh - 24px);max-height:none;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(145deg,#080b0f 0%,#050607 100%);border-color:rgba(246,217,77,.55);box-shadow:0 28px 100px rgba(0,0,0,.9)}
.f10-report-head{padding:14px 22px 12px;background:linear-gradient(90deg,rgba(246,217,77,.08),transparent 55%)}.f10-report-head h2{font-size:28px;letter-spacing:.04em}.f10-report-head p{font-size:15px}.f10-report-tabs button{height:40px;font-weight:600}
.f10-report-body{flex:1;min-height:0;overflow:auto;display:block;padding:14px 18px}
.f10-report-body.f10-quarterly-view{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(390px,1fr);gap:16px;align-items:start}
.f10-quarter-panel,.f10-trend-panel{min-width:0}.f10-quarter-panel h3,.f10-trend-panel h3{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:18px;color:#edf1f7}.f10-quarter-panel h3 small,.f10-trend-panel h3 small{font-size:13px;color:#8f9bad;font-weight:400}
.f10-quarter-compare{min-width:720px;table-layout:fixed;background:#0b1119;border:1px solid #263240}.f10-quarter-compare thead th:first-child[rowspan]{width:122px}.f10-quarter-compare th,.f10-quarter-compare td{padding:7px 5px;font-size:calc(clamp(12px,.8vw,15px) + 2px)}.f10-quarter-compare thead th{font-size:14px;text-align:center;background:#16202c;color:#bccbdf}.f10-quarter-compare .f10-quarter-group{color:#f6d94d;border-left:2px solid #33465b;padding:10px 4px}.f10-quarter-compare tbody th{position:sticky;left:0;z-index:1;background:#111b27;color:#dfe7f3;font-size:14px}.f10-quarter-compare small{display:block;margin-top:4px;font-size:12px;font-weight:400;line-height:1.25;white-space:normal;color:#8d9aad}.f10-quarter-compare strong{font-family:"Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular",Consolas,monospace;font-variant-numeric:tabular-nums;font-weight:600}.f10-quarter-compare .f10-group-start{border-left:2px solid #33465b}.f10-quarter-compare .f10-latest-period{background:rgba(63,130,204,.09)}.f10-quarter-compare thead .f10-latest-period{color:#87c9ff}.f10-quarter-compare tbody tr:nth-child(even){background:rgba(170,193,224,.03)}.f10-quarter-compare tbody tr:hover{background:rgba(90,153,224,.12)}
.f10-report-modal .f10-value,.f10-trend-dialog .f10-value{color:#80d8ec}.f10-report-modal .f10-up,.f10-trend-dialog .f10-up{color:#ff7485}.f10-report-modal .f10-down,.f10-trend-dialog .f10-down{color:#50d6a0}.f10-report-modal .f10-muted,.f10-trend-dialog .f10-muted{color:#8e9bad}.f10-table-note{margin:10px 0 0;color:#9aa7ba;font-size:13px;line-height:1.75}
.f10-trends{gap:10px}.f10-trend-card{min-width:0;padding:12px;background:linear-gradient(145deg,#14202e,#0b1017);border-color:#2b4059;box-shadow:inset 0 1px rgba(255,255,255,.04)}.f10-trend-card header{display:flex;justify-content:space-between;align-items:center;gap:6px}.f10-trend-card h4{margin:0;color:#dce6f4;font-size:15px}.f10-trend-expand{padding:4px 8px;border:1px solid #456386;border-radius:5px;background:#1a2a3d;color:#c5dfff;cursor:pointer;white-space:nowrap;font-size:13px}.f10-trend-expand:hover,.f10-trend-expand:focus-visible{background:#2a4666;outline:2px solid #79baff;outline-offset:2px}.f10-trend-latest{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:10px 0 3px}.f10-trend-latest b{font:600 22px "Stork Chinese Kai", "Stork Chinese Kai Fallback", "SFMono-Regular",Consolas,monospace;color:#edf4ff;font-variant-numeric:tabular-nums}.f10-trend-latest span{font-size:12px}.f10-trend-svg{width:100%;height:auto;aspect-ratio:340 / 190;max-height:210px}.f10-trend-svg line{stroke:#334258;stroke-dasharray:3 5}.f10-trend-svg text{font-size:13px;fill:#a0b0c6}.f10-trend-card footer{margin-top:4px;color:#8c9bb0;font-size:12px}
.f10-trend-dialog{box-sizing:border-box;width:min(1280px,94vw);max-height:92dvh;padding:0;border:1px solid #55779e;border-radius:14px;background:#090f18;color:#dce6f4;box-shadow:0 32px 100px #000}.f10-trend-dialog::backdrop{background:rgba(0,0,0,.85)}.f10-trend-dialog-body{padding:18px;display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}.f10-trend-dialog .f10-trend-svg{aspect-ratio:900 / 380;max-height:none}.f10-trend-dialog .f10-point-value{fill:#edf4ff;font-size:16px}.f10-trend-dialog .f10-table{min-width:0}.f10-trend-dialog .f10-table th,.f10-trend-dialog .f10-table td{padding:10px 8px;font-size:14px;font-variant-numeric:tabular-nums}.f10-trend-dialog .f10-table-wrap{max-height:65dvh;overflow:auto}
@media(max-width:1200px){.f10-report-body.f10-quarterly-view{grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr)}.f10-trends{grid-template-columns:1fr}.f10-trend-card{padding:8px}.f10-trend-svg{max-height:110px}.f10-trend-panel{max-height:100%;overflow:auto}}
@media(max-width:900px){.f10-report-dialog{height:calc(100dvh - 16px)}.f10-report-body.f10-quarterly-view{display:block}.f10-trend-panel{margin-top:18px;max-height:none}.f10-trends{grid-template-columns:repeat(2,minmax(0,1fr))}.f10-trend-dialog-body{grid-template-columns:1fr}.f10-trend-dialog .f10-table-wrap{max-height:none}}
@media(min-width:901px) and (max-height:820px){
  .f10-report-head{padding:8px 18px}.f10-report-head h2{font-size:24px;margin:3px 0}.f10-report-tabs button{height:34px}
  .f10-report-body{padding:10px 18px}.f10-quarter-panel h3,.f10-trend-panel h3{margin-bottom:8px;font-size:16px}
  .f10-quarter-compare th,.f10-quarter-compare td{padding:5px;line-height:1.15}.f10-quarter-compare small{margin-top:2px;line-height:1.1}.f10-quarter-compare .f10-quarter-group{padding:8px 4px}.f10-table-note{font-size:12px;line-height:1.4;margin-top:6px}
  .f10-trend-card{padding:8px}.f10-trend-svg{max-height:112px}.f10-trend-latest{margin-top:6px}.f10-trend-latest b{font-size:20px}.f10-trend-card footer{font-size:11px}

}


/* The custom filter uses the same personal-preview dialog language as strategy editing. */
body.page-dashboard .custom-screen-dialog {
  overflow-y: auto;
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  background: #050505;
}

body.page-dashboard .custom-screen-dialog .app-dialog-head {
  padding: 23px 25px;
  background: #10100e;
}

body.page-dashboard .custom-screen-dialog .app-dialog-head p {
  color: var(--terminal-gold);
}

body.page-dashboard .custom-screen-dialog .app-dialog-head h2 {
  color: #e8e6d8;
  font-size: 24px;
}

body.page-dashboard .custom-screen-modal-form {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 22px 25px 25px;
  background: transparent;
}

body.page-dashboard .custom-screen-modal-form .strategy-editor-note {
  margin-bottom: 16px;
}

body.page-dashboard .custom-screen-modal-form .custom-screener-grid {
  margin: 0;
  gap: 10px;
}

body.page-dashboard .custom-screen-modal-form fieldset {
  min-height: 72px;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(4, 14, 25, 0.4);
}

body.page-dashboard .custom-screen-modal-form legend {
  color: #d9e3ea;
  font-size: 14px;
}

body.page-dashboard .custom-screen-modal-form input {
  height: 38px;
  border-radius: 8px;
  background: #070f18;
  font-size: 17px;
}

body.page-dashboard .custom-screen-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

body.page-dashboard .custom-screen-modal-actions > span {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
}

body.page-dashboard .custom-screen-modal-actions .market-pagination {
  display: none;
}

body.page-dashboard .custom-screen-modal-actions .primary-button,
body.page-dashboard .custom-screen-modal-actions .secondary-button {
  height: 42px;
  margin: 0;
  border-radius: 9px;
  border-color: rgba(229, 216, 95, 0.5);
  color: #050505;
  background: var(--terminal-gold);
  font-size: 12px;
  font-weight: 800;
}

body.page-dashboard .custom-screen-modal-actions .primary-button:hover:not(:disabled),
body.page-dashboard .custom-screen-modal-actions .secondary-button:hover:not(:disabled) {
  filter: brightness(1.06);
}

@media (max-width: 680px) {
  body.page-dashboard .custom-screen-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  body.page-dashboard .custom-screen-modal-form {
    padding: 18px 16px 20px;
  }

  body.page-dashboard .custom-screen-modal-actions {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .custom-screen-modal-actions > span {
    grid-column: auto;
  }
}


/* Compact real-time tick tape shown between Level-2 quotes and chip distribution. */
.tick-tape-section{padding-bottom:8px}.tick-tape-meta{display:flex;justify-content:space-between;gap:8px;padding:3px 10px 6px;color:#8794a8;font-size:12px}.tick-tape-meta b{color:#d8dce1;font-weight:600}.tick-tape-pagination{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 10px 6px;color:#8794a8;font-size:12px}.tick-tape-pagination button{min-width:48px;border:1px solid rgba(196,194,174,.18);border-radius:3px;padding:3px 6px;color:#c8c8bd;background:#0b0b0a;font-size:12px;cursor:pointer}.tick-tape-pagination button:hover:not(:disabled){border-color:rgba(229,216,95,.55);color:#f6d94d}.tick-tape-pagination button:disabled{cursor:default;opacity:.38}.tick-tape-pagination span{flex:1;text-align:center;font-variant-numeric:tabular-nums}.tick-tape-list{max-height:168px;overflow:auto;padding:0 10px 6px}.tick-tape-row{display:grid;grid-template-columns:58px 1fr 64px 30px;gap:6px;align-items:center;line-height:22px;border-bottom:1px solid rgba(196,194,174,.08);font-size:14px}.tick-tape-row time{color:#8794a8;font-variant-numeric:tabular-nums}.tick-tape-row b{text-align:right;color:#d8dce1;font-variant-numeric:tabular-nums}.tick-tape-row span{text-align:right;color:#f6d94d;font-variant-numeric:tabular-nums}.tick-tape-row small{text-align:right;font-size:12px;color:#8794a8}.tick-buy b,.tick-buy small{color:#39dc75}.tick-sell b,.tick-sell small{color:#ff5367}.tick-tape-empty{margin:0;padding:8px 10px;color:#8794a8;font-size:13px}

/* Desktop window sizing: scroll dense content inside its own panel. */
body.page-dashboard .terminal-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-width: 0;
}
body.page-dashboard .topbar {
  flex: 0 0 auto;
  min-height: 46px;
  gap: 8px;
  padding: 0 8px;
}
body.page-dashboard .classic-command-bar {
  position: static;
  flex: 1 1 auto;
  min-width: 0;
}
body.page-dashboard .topbar-actions { flex: 0 0 auto; }
body.page-dashboard .native-index-strip { flex: 0 0 auto; }
body.page-dashboard .terminal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 10px clamp(8px, 1vw, 22px) 0;
  overflow: auto;
}
body.page-dashboard .market-ranking,
body.page-dashboard #strategy-results {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 120px;
  margin-bottom: 0;
}
body.page-dashboard .market-table-wrap,
body.page-dashboard #tableWrap {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
body.page-dashboard #tableWrap thead { position: sticky; top: 0; z-index: 3; }
body.page-dashboard .strategy-section,
body.page-dashboard .terminal-content > footer { flex: 0 0 auto; }
body.page-dashboard .terminal-content > footer { padding: 8px 2px; }
body.page-dashboard .strategy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

body.page-dashboard .stock-chart-modal { padding: 8px; height: 100dvh; }
body.page-dashboard .stock-chart-dialog .stock-chart-head { flex: 0 0 auto; gap: 12px; }
body.page-dashboard .stock-chart-head-actions { min-width: 0; gap: 10px; }
body.page-dashboard #stockChartSequence,
body.page-dashboard #stockChartWheelHint { display: none; }
body.page-dashboard .stock-chart-period-controls { min-width: 0; }
body.page-dashboard .stock-chart-periods { min-width: 0; }
body.page-dashboard .stock-chart-periods button,
body.page-dashboard .stock-chart-range-select-label,
body.page-dashboard .stock-chart-f10-button { flex: 0 0 auto; }
/* Fit the plot and its lower panels to the available chart workspace. */
body.page-dashboard .stock-chart-main-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow-y: hidden;
  scrollbar-gutter: auto;
}
body.page-dashboard .stock-chart-reading-layout {
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: clamp(104px, 10vw, 140px) minmax(0, 1fr);
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}
body.page-dashboard .stock-chart-reading-panel { overflow-y: auto; }
body.page-dashboard .stock-chart-reading-panel dl > div { padding: clamp(4px, 0.8vh, 9px) 8px; }
body.page-dashboard .stock-chart-plot-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.page-dashboard .stock-chart-plot-column > .stock-chart-ma-toolbar,
body.page-dashboard .stock-chart-plot-column > .stock-chart-indicator-toolbar,
body.page-dashboard .stock-chart-plot-column > .stock-chart-template-status { flex: 0 0 auto; }
body.page-dashboard .stock-chart-canvas-scroll { flex: 1 1 0; min-height: 0; overflow: hidden; }
body.page-dashboard .stock-chart-plot-column .stock-chart-canvas-wrap { min-width: 0; height: 100%; }
body.page-dashboard .stock-chart-plot-column .stock-chart-navigator { min-width: 0; flex: 0 0 44px; height: 44px; }
body.page-dashboard .stock-chart-main-pane > .stock-chart-footer,
body.page-dashboard .stock-chart-main-pane > .stock-chart-research-disclaimer { display: none; }
body.page-dashboard .stock-chart-dialog .order-book-row {
  grid-template-columns: 36px minmax(0, 1fr) max-content;
  gap: 8px;
}
body.page-dashboard .stock-chart-dialog .order-book-row small { min-width: 78px; }
body.page-dashboard .tick-tape-row { grid-template-columns: 58px minmax(0, 1fr) max-content 26px; }
body.page-dashboard .tick-tape-row span { min-width: 44px; }
.order-book-strength-ratio {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.order-book-strength-ratio > span { flex: 0 0 auto; white-space: nowrap; }
.order-book-strength-buy { color: #39dc75; }
.order-book-strength-sell { color: #ff5367; }
.order-book-strength-bar {
  display: flex;
  flex: 1 1 0;
  min-width: 20px;
  height: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: #24292f;
}
.order-book-strength-bar > span { width: 0; height: 100%; flex: 0 0 auto; transition: width .25s ease; }
.order-book-strength-buy-fill { background: #39dc75; }
.order-book-strength-sell-fill { background: #ff5367; }
.order-book-strength-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 8px;
  padding: 0 10px 8px;
  color: #b8c1ce;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.order-book-strength-totals > span { white-space: nowrap; }
.order-book-strength-totals b { color: #f6d94d; font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .order-book-strength-bar > span { transition: none; }
}
body.page-dashboard .stock-intelligence-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.page-dashboard .stock-chart-footer { flex-wrap: wrap; gap: 6px; }

body.page-dashboard .app-modal { padding: 12px; }
body.page-dashboard .app-dialog { max-width: 100%; max-height: calc(100dvh - 24px); }
body.page-dashboard .strategy-editor-dialog,
body.page-dashboard .custom-screen-dialog { display: flex; flex-direction: column; overflow: hidden; }
body.page-dashboard .strategy-editor-dialog > .app-dialog-head,
body.page-dashboard .custom-screen-dialog > .app-dialog-head { flex: 0 0 auto; }
body.page-dashboard .strategy-editor-form,
body.page-dashboard .custom-screen-modal-form { overflow-y: auto; min-height: 0; scroll-padding-bottom: 100px; }
body.page-dashboard .strategy-editor-actions,
body.page-dashboard .custom-screen-modal-actions {
  position: sticky;
  bottom: -1px;
  z-index: 1;
  padding: 8px 0;
  background: #050505;
}

@media (max-width: 1180px) {
  body.page-dashboard .strategy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-dashboard .stock-chart-dialog .stock-chart-head { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  body.page-dashboard .stock-chart-head-actions { width: 100%; }
  body.page-dashboard .stock-chart-period-controls { flex: 1 1 auto; justify-content: flex-end; }
  body.page-dashboard .stock-chart-dialog .stock-chart-symbol { height: 36px; font-size: 18px; }
  body.page-dashboard .stock-chart-dialog .stock-chart-title-line h2 { font-size: 23px; }
  body.page-dashboard .stock-chart-dialog .stock-chart-periods button { height: 36px; font-size: 16px; }
  body.page-dashboard .stock-chart-dialog .stock-chart-range-select-label,
  body.page-dashboard .stock-chart-dialog .stock-chart-close { height: 36px; }
  body.page-dashboard .stock-chart-dialog .stock-chart-range-select-label select { height: 34px; }
  body.page-dashboard .native-index-strip .native-index-ticker { gap: 5px 8px; padding: 10px; grid-template-columns: minmax(0, 1fr) auto; }
  body.page-dashboard .native-index-ticker > span { grid-column: 2; text-align: right; }
}
@media (max-width: 900px) {
  body.page-dashboard .stock-chart-dialog .stock-chart-workspace { grid-template-columns: minmax(0, 1fr) 260px; }
  body.page-dashboard .stock-intelligence-dock { grid-template-columns: minmax(0, 1fr); height: auto; flex-basis: auto; }
  body.page-dashboard .stock-intelligence-dock > * { grid-column: 1; min-height: 230px; }
}
@media (max-width: 760px) {
  body.page-dashboard .strategy-grid { grid-template-columns: minmax(0, 1fr); }
  body.page-dashboard .stock-chart-period-controls { position: static; }
  body.page-dashboard .stock-chart-dialog .stock-chart-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: 100% auto; overflow-y: auto; }
  body.page-dashboard .stock-chart-main-pane { height: 100%; overflow: hidden; }
  body.page-dashboard .stock-chart-reading-layout { height: auto; }
  body.page-dashboard .stock-chart-dialog .daily-inspector { height: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--terminal-line); }
}
@media (max-height: 760px) {
  body.page-dashboard .strategy-editor-dialog .app-dialog-head,
  body.page-dashboard .custom-screen-dialog .app-dialog-head { padding: 12px 18px; }
  body.page-dashboard .strategy-editor-form,
  body.page-dashboard .custom-screen-modal-form { padding: 12px 18px; }
}

/* Compact, text-led F10. All layout overrides stay inside this workspace. */
.f10-classic .f10-report-dialog {
  width: min(1320px, calc(100vw - 24px)); height: calc(100dvh - 24px);
  background: #080909; color: #d8ce85; border: 1px solid #655d32; border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.f10-classic .f10-report-head { padding: 12px 20px; background: #0d0e0d; border-bottom: 1px solid #353222; }
.f10-classic .f10-report-head h2 { font-size: 21px; margin: 3px 0; letter-spacing: 0; color: #e5da93; }
.f10-classic .f10-report-head p, .f10-classic .f10-report-head > div > span { font-size: 12px; color: #999783; }
.f10-classic .f10-head-actions { display: flex; gap: 8px; align-items: center; }
.f10-classic .f10-head-actions button { width: auto; height: 32px; padding: 0 10px; font-size: 13px; border-radius: 3px; color: #d8ce85; }
.f10-classic .f10-report-tabs { gap: 0; padding: 0 20px; border-bottom: 1px solid #353222; }
.f10-classic .f10-report-tabs button { height: 36px; padding: 0 22px; border: 0; border-radius: 0; background: none; color: #aaa58b; font-size: 14px; }
.f10-classic .f10-report-tabs button.active { color: #f0df83; background: #242317; box-shadow: inset 0 -2px #d6c76b; }
.f10-classic .f10-report-body, .f10-classic .f10-report-body.f10-quarterly-view { display: block; padding: 12px 20px 20px; }
.f10-classic .f10-document-section { margin: 0 0 18px; }
.f10-classic .f10-document-section h3 { display: flex; align-items: baseline; gap: 16px; margin: 0 0 8px; padding: 6px 0 8px; border-bottom: 1px solid #353222; font-size: 15px; color: #efdc79; }
.f10-classic h3 small { font-size: 12px; color: #969482; font-weight: 400; }
.f10-classic .f10-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.f10-classic .f10-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted #26271f; font-size: 14px; }
.f10-classic .f10-facts dt { color: #aaa58b; }
.f10-classic .f10-facts dd { margin: 0; color: #dfd28a; font-variant-numeric: tabular-nums; text-align: right; }
.f10-classic .f10-compact-table { width: 100%; min-width: 540px; table-layout: fixed; background: none; }
.f10-classic .f10-compact-table th, .f10-classic .f10-compact-table td { height: 34px; padding: 5px 12px; border-bottom: 1px solid #24251e; font-size: 14px; font-weight: 400; color: #dfd28a; background: none; font-variant-numeric: tabular-nums; }
.f10-classic .f10-compact-table th:first-child { width: 220px; padding-left: 0; text-align: left; }
.f10-classic .f10-compact-table thead th { color: #a9a28a; font-size: 12px; }
.f10-classic .f10-compact-table tbody th small { font-size: 11px; color: #908d77; }
.f10-classic .f10-compact-table tbody tr:hover { background: #1b1c13; }
.f10-classic .f10-periods, .f10-classic .f10-trend-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; font-size: 13px; }
.f10-classic .f10-periods button, .f10-classic .f10-trend-links button { border: 1px solid #49462e; border-radius: 3px; padding: 5px 12px; background: transparent; color: #c9c086; cursor: pointer; font: inherit; }
.f10-classic .f10-periods button[aria-pressed="true"] { background: #292818; border-color: #a99d50; color: #f0df83; }
.f10-classic .f10-periods button:disabled { opacity: .35; cursor: default; }
.f10-classic .f10-more { margin: 12px 0; }
.f10-classic .f10-more summary { cursor: pointer; padding: 8px 0; color: #bdb689; font-size: 13px; }
.f10-classic .f10-event-list li { gap: 18px; padding: 12px 0; font-size: 14px; line-height: 1.65; border-color: #28291f; }
.f10-classic .f10-event-list time { color: #a9a28a; min-width: 92px; font-size: 12px; }
.f10-classic .f10-event-list b { color: #ecda80; margin-right: 10px; }
.f10-classic .f10-empty { padding: 18px 0; color: #97927b; font-size: 14px; }
.f10-classic button:focus-visible, .f10-classic summary:focus-visible { outline: 2px solid #d6c76b; outline-offset: 2px; }
@media (max-width: 700px) {
  .f10-classic .f10-report-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .f10-classic .f10-report-head { padding: 10px 12px; }
  .f10-classic .f10-report-head h2 { font-size: 16px; }
  .f10-classic .f10-report-tabs { padding: 0 8px; }
  .f10-classic .f10-report-tabs button { flex: 1; padding: 0 10px; }
  .f10-classic .f10-report-body { padding: 10px 12px; }
  .f10-classic .f10-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .f10-classic .f10-facts > div { display: block; font-size: 13px; }
  .f10-classic .f10-facts dd { margin-top: 4px; text-align: left; }
  .f10-classic .f10-document-section h3 { flex-wrap: wrap; gap: 4px 12px; }
  .f10-classic .f10-compact-table th:first-child { width: 190px; }

}
