:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  background: #08111d;
  color: #ebf2f7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
button { font: inherit; }
button { cursor: pointer; }

.ambient { position: fixed; pointer-events: none; z-index: -1; filter: blur(3px); }
.ambient-one { width: 56vw; height: 55vw; left: -22vw; top: -28vw; background: radial-gradient(circle, rgba(32, 112, 122, .22), transparent 68%); }
.ambient-two { width: 45vw; height: 45vw; right: -15vw; top: 2vw; background: radial-gradient(circle, rgba(61, 78, 125, .13), transparent 68%); }

.app-shell { max-width: 1220px; margin: 0 auto; padding: 26px 32px 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid #233247; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; color: #091b20; background: linear-gradient(145deg, #7cf4d9, #27b8aa); box-shadow: 0 12px 34px rgba(25, 194, 163, .2); }
.brand-mark span { font-size: 31px; font-weight: 800; line-height: 1; transform: translateY(-2px); }
.brand-mark.small { width: 44px; height: 44px; border-radius: 14px; }
.brand-mark.small span { font-size: 26px; }
.eyebrow, .section-kicker { margin: 0; color: #78b9b7; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.brand h1 { margin: 4px 0 0; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #2f615d; border-radius: 999px; background: #12302f; color: #91e9d3; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.offline { border-color: #6e4145; background: #39272e; color: #ffb6b9; }
.status-dot, .live-indicator span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(116, 226, 194, .12); }
.icon-button { border: 1px solid #2b3a4d; background: #111f2e; color: #d7e6ed; min-height: 36px; border-radius: 11px; }
.icon-button { width: 36px; font-size: 23px; line-height: 1; }
.icon-button:hover { border-color: #5f9c9c; background: #1b3040; }
.icon-button:disabled { opacity: .55; cursor: wait; }

main { padding-top: 30px; }
.intro-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.intro-row h2 { margin: 7px 0 0; font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -.035em; }
.symbol-chip { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 6px 8px; border: 1px solid #2e4b54; border-radius: 7px; color: #8bd4c5; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.update-time { color: #8da2b4; font-size: 12px; margin: 0 0 3px; white-space: nowrap; }
.notice { margin-bottom: 20px; padding: 12px 15px; color: #ffd6a1; background: #3b2d23; border: 1px solid #75543a; border-radius: 12px; font-size: 13px; }
.card { background: linear-gradient(160deg, rgba(22, 36, 54, .97), rgba(15, 28, 43, .97)); border: 1px solid #26384b; border-radius: 20px; box-shadow: 0 20px 48px rgba(0, 0, 0, .12); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(315px, 1fr); gap: 16px; }
.pnl-card, .target-card { min-height: 244px; padding: 25px 27px; }
.pnl-card { background: radial-gradient(circle at 90% -25%, rgba(71, 186, 164, .18), transparent 49%), linear-gradient(150deg, #172c3c, #102333 68%); border-color: #285454; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #a4bac7; font-size: 13px; font-weight: 700; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #8adcc8; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pnl-main { margin-top: 20px; color: #f4f8fa; font-size: clamp(38px, 5vw, 62px); font-weight: 760; letter-spacing: -.055em; line-height: 1.02; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pnl-main.negative, .target-value.negative { color: #ff9b9a; }
.pnl-main.positive, .target-value.positive { color: #91e6bd; }
.pnl-subline { display: flex; align-items: center; gap: 13px; margin-top: 14px; color: #8fa8b6; font-size: 12px; }
.return-badge { padding: 5px 8px; border-radius: 7px; background: #1c4141; color: #a6eed7; font-weight: 800; font-variant-numeric: tabular-nums; }
.return-badge.negative { background: #4a3037; color: #ffb5b2; }
.card-divider { height: 1px; margin: 20px 0 15px; background: #2e4d57; }
.pnl-foot { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 8px 13px; color: #8fa8b6; font-size: 12px; }
.pnl-foot strong { color: #e7f3f3; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.small-tag { color: #85aeb8; background: #203748; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.target-value { margin-top: 22px; font-size: clamp(29px, 3.1vw, 39px); line-height: 1; font-weight: 760; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.target-meta { margin-top: 9px; color: #93aab9; font-size: 12px; }
.target-meta strong { color: #d9e9ec; font-weight: 700; }
.progress-track { height: 8px; margin-top: 24px; border-radius: 99px; overflow: hidden; background: #2b3b49; }
.progress-track span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #38bcae, #a6e9c5); border-radius: inherit; transition: width .6s ease; }
.target-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: #91a9b9; font-size: 12px; }
.target-bottom strong { color: #ecf2f4; font-size: 14px; font-variant-numeric: tabular-nums; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 29px 0 15px; }
.section-heading h2, .card-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-note { color: #7f98ac; font-size: 12px; }
.position-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { display: flex; flex-direction: column; padding: 20px 22px; min-height: 137px; }
.metric-label { color: #8ea8ba; font-size: 12px; font-weight: 650; }
.metric-value { margin-top: 22px; color: #edf6f5; font-size: clamp(19px, 2.2vw, 26px); font-weight: 740; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-hint { margin-top: 5px; color: #698396; font-size: 11px; }
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; margin-top: 20px; }
.cost-card, .activity-card { padding: 22px 24px; min-height: 283px; }
.card-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.card-heading h2 { margin-top: 6px; }
.cost-list { margin-top: 15px; }
.cost-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #273849; color: #97adbd; font-size: 12px; }
.cost-list > div:last-child { border-bottom: 0; }
.cost-list strong { color: #e6f0f1; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-note { margin: 12px 0 0; color: #708b9c; font-size: 11px; line-height: 1.6; }
.event-list { list-style: none; padding: 0; margin: 15px 0 0; }
.event-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 12px 0; border-top: 1px solid #26384a; }
.event-list li:first-child { border-top: 0; }
.event-marker { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #54c8b2; }
.event-marker.close { background: #8cbeef; }
.event-marker.warning { background: #ffb771; }
.event-marker.funding { background: #d5b7ec; }
.event-text { color: #d0dce2; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.event-time { color: #7190a4; font-size: 11px; white-space: nowrap; }
.event-list .event-empty { display: block; color: #7c94a5; font-size: 12px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; color: #687f91; font-size: 11px; }

@media (max-width: 900px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .position-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid { grid-template-columns: 1fr; }
  .pnl-foot { grid-template-columns: auto auto; justify-content: start; column-gap: 12px; }
}
@media (max-width: 680px) {
  .app-shell { padding: 18px 16px 26px; }
  .topbar { padding-bottom: 20px; }
  .brand-mark.small { width: 40px; height: 40px; }
  .brand h1 { font-size: 19px; }
  .brand .eyebrow { font-size: 9px; }
  .top-actions { gap: 7px; }
  .status-pill { padding: 8px 9px; font-size: 11px; }
  main { padding-top: 22px; }
  .intro-row { align-items: start; flex-direction: column; gap: 9px; }
  .intro-row h2 { font-size: 26px; }
  .overview-grid { grid-template-columns: 1fr; gap: 12px; }
  .pnl-card, .target-card { min-height: 0; padding: 22px; }
  .pnl-main { font-size: clamp(36px, 9vw, 54px); }
  .position-grid { gap: 10px; }
  .metric-card { min-height: 116px; padding: 16px; }
  .metric-value { margin-top: 17px; font-size: clamp(17px, 4.5vw, 23px); white-space: normal; overflow-wrap: anywhere; }
  .section-heading { margin-top: 24px; }
  .section-note { font-size: 10px; }
  .cost-card, .activity-card { padding: 20px; }
  .footer { line-height: 1.5; }
}
@media (max-width: 480px) {
  .topbar { gap: 10px; }
  .brand { gap: 10px; }
  .brand .eyebrow { display: none; }
  .top-actions { flex-shrink: 0; }
}
@media (max-width: 370px) {
  .status-pill { padding: 8px 10px; }
  .status-pill span:last-child { display: none; }
  .pnl-subline { flex-wrap: wrap; }
  .symbol-chip { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
