:root {
  color-scheme: dark;
  --navy: #071931; --paper: #0c213c; --line: #294059; --ink: #f4f3eb;
  --muted: #afbecc; --teal: #54daba; --mint: #b0f1df;
  --serif: Georgia, 'Noto Serif SC', 'Songti SC', SimSun, serif;
  font: 16px/1.55 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--navy); color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, p, figure, dl, dd { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
a { color: var(--teal); }
.wordmark { display: flex; align-items: center; gap: .7rem; font: 1.65rem/1 var(--serif); letter-spacing: -.045em; }
.monogram { display: grid; place-items: center; width: 1.85rem; aspect-ratio: 1; border: 1px solid var(--teal); color: var(--teal); font: italic 1.45rem/1 Georgia, serif; }
.login-page { min-height: 100svh; display: grid; place-items: center; padding: clamp(1rem,5vw,5rem); }
.login-frame { width: min(100%, 1100px); display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); }
.cover { padding: clamp(2rem,4.3vw,4.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 3.4rem; background: var(--paper); border-right: 1px solid var(--line); }
.cover-heading h1 { font: 400 clamp(3.1rem,5.8vw,5.5rem)/.99 var(--serif); letter-spacing: -.055em; }
.cover-heading h1 em { color: var(--mint); font-weight: 400; }
.cover-heading p { margin-top: 1.05rem; color: var(--muted); letter-spacing: .17em; font-size: .9rem; }
.cover-chart { display: block; width: 100%; overflow: visible; }
.cover-figure figcaption { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; font-size: .75rem; color: var(--muted); }
.key-line { height: 2px; width: 21px; background: var(--teal); }
.grid-lines { fill: none; stroke: var(--line); stroke-width: 1; }
.area { fill: var(--teal); opacity: .065; }
.trend-line { fill: none; stroke: var(--teal); stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; animation: draw 1.2s ease-out both; }
.end-point { fill: var(--mint); }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.signin { display: grid; place-items: center; padding: clamp(2rem,4.6vw,4.8rem); }
.form-inner { width: 100%; max-width: 360px; }
.form-inner h2, .report-title h1 { font: 600 clamp(1.9rem,3vw,2.65rem)/1.25 var(--serif); }
.form-intro { margin: .75rem 0 2rem; color: var(--muted); font-size: .92rem; }
.signin label { display: block; margin: 1.25rem 0 .45rem; font-weight: 600; font-size: .88rem; }
.signin input { width: 100%; padding: .8rem .95rem; min-height: 48px; color: var(--ink); background: var(--navy); border: 1px solid #54677c; border-radius: 3px; }
.signin input::placeholder { color: #96a8bb; }
.primary { width: 100%; margin-top: 1.8rem; min-height: 48px; background: var(--teal); color: #062922; border: 0; border-radius: 3px; font-weight: 700; padding: .7rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.primary:hover { background: var(--mint); }
.primary span { font-size: 1.3rem; }
.form-error { display: none; margin-top: .85rem; font-size: .85rem; color: #ffc6a9; }
.form-error:target { display: block; }
.sheet { max-width: 1290px; margin: 0 auto; padding: 0 clamp(1.1rem,4.5vw,4.5rem) 3rem; }
.topbar, .report-title, .panel-title, .userbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar { min-height: 76px; border-bottom: 1px solid var(--line); }
.userbar { font-size: .85rem; color: var(--muted); }
.logout { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: .45rem .8rem; min-height: 40px; }
.logout:hover { border-color: var(--teal); }
.report-title { padding: 2.15rem 0 1.55rem; }
.sample { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .82rem; }
.sample i, .swatch { display: inline-block; width: .52rem; height: .52rem; border-radius: 50%; background: var(--teal); }
.metrics { display: grid; grid-template-columns: 1.14fr 1.05fr 1fr; border-block: 1px solid var(--line); padding: 1.25rem 0; }
.metrics > div { padding: .22rem clamp(1rem,2.5vw,2.4rem); border-left: 1px solid var(--line); }
.metrics > div:first-child { border: 0; padding-left: 0; }
.metrics h2 { font-size: .85rem; font-weight: 500; color: var(--muted); }
.metrics b { font: 400 clamp(1.5rem,3.15vw,3.15rem)/1.4 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.045em; white-space: nowrap; }
.major { color: var(--ink); }
.gain { color: var(--teal); }
.panels { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.1rem; margin-block: 1.35rem; }
.panel, .accounts { border: 1px solid var(--line); background: var(--paper); padding: clamp(1rem,2vw,1.65rem); }
.panel-title { margin-bottom: 1.05rem; }
.panel-title h2 { font: 600 1.16rem/1.4 var(--serif); }
.panel-title small { color: var(--muted); font-size: .77rem; }
.balance-chart { display: block; width: 100%; }
.axis { fill: var(--muted); font: 12px 'Segoe UI', sans-serif; }
.composition { display: flex; align-items: center; justify-content: space-evenly; gap: 1rem; min-height: 76%; }
.donut { width: clamp(108px,11vw,152px); position: relative; flex-shrink: 0; }
.donut svg { display: block; width: 100%; }
.ring-base, .ring-top { fill: none; stroke-width: 14; }
.ring-base { stroke: var(--mint); } .ring-top { stroke: #1cae91; }
.ring-center { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; }
.ring-center b { font: 2rem/1 var(--serif); } .ring-center small { color: var(--muted); font-size: .7rem; }
.legend { display: grid; gap: 1rem; } .legend dt { font-size: .85rem; color: var(--muted); }
.legend dd { margin-left: 1rem; font: 1.35rem/1.3 var(--serif); } .swatch { margin-right: .45rem; }
.swatch.topstep { background: #1cae91; } .swatch.lucid { background: var(--mint); }
.accounts table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.accounts thead { color: var(--muted); }
.accounts th, .accounts td { text-align: left; font-weight: 400; padding: .75rem .5rem; border-top: 1px solid var(--line); }
.accounts th:first-child, .accounts td:first-child { padding-left: 0; }
.accounts .num { text-align: right; font-variant-numeric: tabular-nums; }
.accounts .amount { color: var(--mint); }
.not-found { margin: 15vh auto; max-width: 30rem; padding: 1.5rem; }
@media (max-width: 740px) {
  .login-page { padding: 1rem; }
  .login-frame { max-width: 490px; grid-template-columns: 1fr; }
  .cover { border: 0; border-bottom: 1px solid var(--line); gap: 1.5rem; padding: 1.45rem 1.6rem; }
  .cover-heading h1 { font-size: clamp(2.2rem,8vw,3rem); }
  .cover-heading h1 br { display: none; } .cover-heading h1 em::before { content: ' '; }
  .cover-heading p { margin-top: .4rem; } .cover-figure { display: none; }
  .signin { padding: 1.7rem 1.6rem 2rem; } .form-inner { max-width: none; }
  .form-intro { margin-bottom: 1.2rem; }
  .panels { grid-template-columns: 1fr; } .panel { min-width: 0; } .composition { min-height: auto; justify-content: center; gap: 3rem; } .donut { width: 125px; }
  .axis { font-size: 17px; }
  .metrics { grid-template-columns: 1fr 1fr; row-gap: .8rem; }
  .metrics > div { padding-inline: .85rem; } .metrics > div:last-child { grid-column: 1/-1; padding: .8rem 0 0; border: 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
  .metrics > div:last-child b { font-size: 1.25rem; }
  .topbar { min-height: 64px; } .topbar .wordmark { font-size: 1.35rem; } .userbar { gap: .55rem; }
  .report-title { padding: 1.45rem 0; } .report-title h1 { font-size: 1.9rem; } .sheet { padding-bottom: 1.25rem; }
  .accounts thead { position: absolute; clip-path: inset(50%); }
  .accounts table, .accounts tbody { display: block; }
  .accounts tr { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); padding: .8rem 0; gap: .5rem .8rem; }
  .accounts tbody th, .accounts tbody td { display: block; border: 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
  .accounts td::before, .accounts tbody th::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; margin-bottom: .1rem; }
  .accounts td[data-label="账号类型"] { grid-column: 1/-1; }
}
@media (prefers-reduced-motion: reduce) { .trend-line { animation: none; } }
