:root {
  color: #e8eef6;
  background: #0b111b;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft Yahei", sans-serif;
}

body {
  color: #e8eef6;
  background:
    radial-gradient(circle at 82% -12%, rgba(91, 141, 211, .13), transparent 32rem),
    #0b111b;
  background-attachment: fixed;
}

aside {
  width: 232px;
  padding: 30px 22px;
  background: rgba(13, 20, 31, .97);
  border-right: 1px solid #243043;
  box-shadow: 18px 0 40px rgba(0, 0, 0, .14);
}

.brand {
  color: #f2f6fb;
  font-size: 27px;
  letter-spacing: .02em;
}

.brand > span {
  line-height: 1.05;
}

.brand small {
  color: #7f94b1;
  letter-spacing: .18em;
}

.navlabel {
  margin-top: 38px;
  color: #6f829c;
  font-size: 13px;
  letter-spacing: .12em;
}

aside nav button,
aside nav a {
  color: #a8b6c9;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

aside nav button:hover,
aside nav a:hover {
  color: #eef4fb;
  background: #141f2d;
}

aside nav button.active,
aside nav button[aria-current="page"],
aside nav a.active,
aside nav a[aria-current="page"] {
  color: #eef6ff;
  background: #1b293b;
  border-color: #32455e;
  box-shadow: inset 3px 0 #78aef2;
}

.asidebottom {
  color: #7f91a8;
  line-height: 1.75;
}

.asidebottom hr {
  border-color: #253246;
}

main {
  margin-left: 232px;
  padding: 0 clamp(24px, 3vw, 54px);
  max-width: 1680px;
}

main > header {
  height: 72px;
  color: #b8c5d5;
  border-color: #253145;
}

.demo {
  color: #aebbd0;
  background: #141d2a;
  border-color: #2c3a4e;
  border-radius: 999px;
}

.title {
  margin: 28px 0 22px;
}

.title h1 {
  color: #f1f5fa;
  font-weight: 640;
  letter-spacing: -.03em;
}

.eyebrow {
  color: #8198b8;
  letter-spacing: .16em;
}

.muted,
.panel p,
.portfolio-panel p {
  color: #96a5b8;
}

.primary {
  color: #08111e;
  background: #84b6f4;
  border: 1px solid #9bc6fb;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(69, 126, 198, .18);
}

.primary:hover {
  color: #06101d;
  background: #a1cafb;
  box-shadow: 0 10px 28px rgba(69, 126, 198, .25);
}

.metrics article,
.panel,
.economic-chart-card,
.market-pulse {
  color: #e8eef6;
  background: linear-gradient(145deg, #151e2b, #111a25);
  border: 1px solid #29374a;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.metrics article::before,
.panel::before,
.market-pulse::after {
  display: none;
}

.metrics span,
.metrics small,
small {
  color: #8e9fb4;
}

.metrics h2,
.riskmetrics h2 {
  color: #edf3f9;
  font-family: Inter, "Segoe UI", "Microsoft Yahei", sans-serif;
  font-variant-numeric: tabular-nums;
}

.badge {
  color: #aebdd0;
  background: #172130;
  border-color: #334258;
  border-radius: 999px;
}

.commandstrip,
.portfolio-tools,
.portfolio-navigation {
  color: #a8b6c8;
  background: #121c29;
  border: 1px solid #29374a;
  border-radius: 12px;
}

.commandstrip {
  padding: 12px 15px;
}

.commandstrip span:first-child {
  color: #b8c8dc;
}

.portfolio-tools button,
.portfolio-tools select,
.portfolio-panel button {
  color: #dce6f1;
  background: #1a2635;
  border-color: #34465d;
  border-radius: 9px;
}

.portfolio-tools .selected,
.portfolio-navigation button.active {
  color: #07121f;
  background: #91bff4;
  border-color: #a8d0fc;
}

.portfolio-navigation button {
  border-radius: 8px;
}

.portfolio-alerts {
  color: #cbd7e5;
  background: #142131;
  border: 1px solid #29394e;
  border-radius: 10px;
}

.overview-shortcuts button,
.textbutton,
.modelnotes a,
.portfolio-panel summary {
  color: #8fbdf4;
}

.overview-shortcuts button {
  background: #142235;
  border-color: #304c6d;
  border-radius: 9px;
}

input,
select,
.portfolio-form input,
.portfolio-form select {
  color: #e7eef6;
  background: #0f1824;
  border-color: #35465d;
  border-radius: 9px;
}

input:focus,
select:focus,
button:focus-visible {
  outline-color: #8fbdf4;
}

th {
  color: #8fa0b5;
  background: #172130;
}

td,
.chartfoot,
.watchitem,
.risknote {
  border-color: #283649;
}

.riskhero {
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 28%, rgba(118, 170, 235, .16), transparent 22rem),
    linear-gradient(145deg, #162335, #101a27);
  border: 1px solid #314258;
  border-left: 1px solid #314258;
  border-radius: 16px;
}

.riskhero em,
.sliderlabel strong,
.risknote b {
  color: #8fbdf4;
}

.heroresult {
  border-color: #324258;
}

.heroresult > strong {
  color: #a5cafa;
}

.segtrack,
.bartrack,
.wealth-bar > div:last-child {
  background: #223044;
  border-color: #344860;
  border-radius: 999px;
}

.riskresult {
  background: #101a27;
  border-color: #2f4056;
  border-radius: 12px;
}

.market-group,
.market-group.futures-pulse,
.market-group.macro-economic {
  --section-border: #304055;
  --section-surface: #131d2a;
  --section-accent: #87b5eb;
  border-left-width: 1px !important;
  border-radius: 14px;
  overflow: hidden;
}

.market-group > summary {
  border-radius: 0;
}

.market-group > summary small,
.market-group > summary strong,
.market-group > summary > span:last-child,
.macro-open-label {
  color: #a9bdd5;
}

.market-group-content,
.global-market .index-card,
.economic-chart-card,
.rates-table thead th {
  background: #111a25;
  border-color: #2a384b;
}

.global-tabs button[aria-selected="true"] {
  color: #eef5fc;
  background: #25354a;
  border-color: #4b6482;
  border-radius: 8px;
}

.market-status button,
.oil-card > button {
  color: #d7e4f1;
  background: #1b293a;
  border-color: #3d526b;
  border-radius: 8px;
}

.candlestick-panel {
  padding: 24px 26px;
  border-left: 1px solid #304055;
}

.candlestick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.candlestick-head h2 {
  margin: 0;
  color: #edf3f9;
  font-size: 22px;
}

.candlestick-head p:last-child {
  margin: 8px 0 0;
  color: #91a3b8;
  font-size: 14px;
}

.candlestick-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.candlestick-controls label {
  color: #91a3b8;
  font-size: 13px;
}

.candlestick-controls select {
  width: auto;
  min-width: 150px;
  margin-left: 8px;
  padding: 8px 34px 8px 10px;
}

.candlestick-periods {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: #0f1824;
  border: 1px solid #2f4056;
  border-radius: 10px;
}

.candlestick-periods button {
  padding: 7px 11px;
  color: #9aabc0;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
}

.candlestick-periods button.selected {
  color: #eef5fc;
  background: #26364b;
}

.candlestick-summary {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #2a384b;
  border: 1px solid #2a384b;
  border-radius: 12px;
}

.candlestick-summary > div {
  padding: 14px 16px;
  background: #121c29;
}

.candlestick-summary span,
.candlestick-summary strong {
  display: block;
}

.candlestick-summary span {
  color: #8496ac;
  font-size: 12px;
}

.candlestick-summary strong {
  margin-top: 7px;
  color: #e8eef6;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.candlestick-chart {
  min-height: 330px;
  overflow-x: auto;
  border: 1px solid #29384b;
  border-radius: 12px;
  background: #0f1722;
}

.candlestick-chart svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.candlestick-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  color: #8192a7;
  font-size: 14px;
}

.candlestick-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  color: #8192a7;
  font-size: 13px;
  line-height: 1.6;
}

.candlestick-foot i {
  display: inline-block;
  width: 16px;
  height: 2px;
  margin: 0 5px 3px 10px;
  vertical-align: middle;
}

.candlestick-foot i:first-child { margin-left: 0; }
.candlestick-foot .ma5 { background: #8fbdf4; }
.candlestick-foot .ma20 { background: #e6c778; }

.advisors {
  overflow: hidden;
  background: #151f2d;
  border: 1px solid #33455e;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
}

.advisor-roster {
  background: #111a27;
  border-color: #2d3e54;
}

.party-member,
.party-member.selected,
.advisor-actions button {
  border-radius: 10px;
  box-shadow: none;
}

.party-member.selected {
  background: #223149;
}

.advisor-actions button:first-child {
  color: #10192a;
  background: #b9d4ff;
}

footer {
  color: #73859e;
}

@media (max-width: 1100px) {
  aside { width: 196px; }
  main { margin-left: 196px; }
}

@media (max-width: 760px) {
  body { background: #0b111b; }
  aside { width: auto; padding: 18px 16px; border-right: 0; border-bottom: 1px solid #243043; }
  main { margin-left: 0; padding: 0 14px; }
  aside nav { gap: 6px !important; }
  .title { margin-top: 20px; }
  .metrics article, .panel { border-radius: 12px; }
  .riskhero { border-radius: 13px; }
  .candlestick-panel { padding: 20px 16px; }
  .candlestick-head { display: block; }
  .candlestick-controls { justify-content: flex-start; margin-top: 16px; }
  .candlestick-summary { grid-template-columns: 1fr 1fr; }
  .candlestick-foot { display: grid; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
