:root {
  --bg: #0b1326;
  --panel: rgba(20,28,46,0.5);
  --panel-2: #131b2e;
  --line: rgba(59,73,76,0.6);
  --line-strong: rgba(69,73,80,0.7);
  --text: #dae2fd;
  --muted: #bac9cc;
  --muted-2: #849396;
  --brand: #c3f5ff;
  --brand-glow: #00e5ff;
  --brand-dim: #00daf3;
  --brand-2: #ecb2ff;
  --brand-3: #4edea3;
  --surface-container: #171f33;
  --surface-container-high: #1f2840;
  --surface-variant: #2d3449;
  --outline-variant: rgba(59,73,76,0.4);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Hanken Grotesk", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}
button, input { font: inherit; }
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#app {
  min-height: 100vh;
  position: relative;
}
#app.auth-mode {
  display: block;
}
/* Atmospheric background glow — dual orbs */
#app::before {
  content: "";
  position: fixed;
  top: -20%; left: -15%;
  width: 45%; height: 45%;
  background: rgba(0,229,255,0.025);
  filter: blur(160px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
#app::after {
  content: "";
  position: fixed;
  bottom: -20%; right: -15%;
  width: 45%; height: 45%;
  background: rgba(222,5,65,0.015);
  filter: blur(160px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 220px;
  height: 100vh;
  padding: 24px 16px;
  background: rgba(11,19,38,0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand-card {
  padding: 0;
  border: none;
  background: transparent;
  margin-bottom: 32px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-glow);
  color: #00363d;
  flex-shrink: 0;
}
.brand-mark .material-symbols-outlined { font-size: 22px; font-variation-settings: 'FILL' 1; }
.brand-title { font-size: 18px; font-weight: 700; color: var(--text); font-family: "Hanken Grotesk", sans-serif; }
.brand-sub { margin-top: 2px; color: var(--muted-2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.side-meta { display: none; }
.nav-label { margin: 0 4px 8px; color: var(--muted-2); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-family: "JetBrains Mono", monospace; }
.nav-item {
  width: 100%; min-height: 46px; margin-bottom: 2px; padding: 0 16px;
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); background: transparent;
  border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 400; text-align: left;
  transition: all .15s;
}
.nav-item:hover { color: var(--text); background: rgba(195,245,255,0.08); }
.nav-item.active {
  color: var(--brand);
  background: rgba(195,245,255,0.05);
  font-weight: 700;
  border-right: 2px solid var(--brand);
}
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
.nav-item .material-symbols-outlined { font-size: 20px; }
.save-state {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--outline-variant);
}
.save-state-caption { font-size: 10px; color: var(--muted-2); margin-bottom: 2px; }
.save-state-date { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.save-state strong { display: none; }
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  transition: all .15s;
}
.logout-btn:hover { color: var(--text); background: var(--surface-variant); }

.main {
  margin-left: 220px;
  min-height: 100vh;
  padding: 0 0 56px 0;
  position: relative;
  z-index: 1;
}
.mobile-appbar,
.mobile-bottom-nav {
  display: none;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18,28,46,.94), rgba(9,15,28,.94));
  box-shadow: 0 24px 70px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
}
.login-form { display: grid; gap: 14px; margin-top: 22px; }
.login-btn { width: 100%; }
.login-error {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255,180,171,.28);
  color: #ffb4ab;
  background: rgba(255,180,171,.08);
  font-size: 12px;
  font-weight: 700;
}
.glass-card {
  background: rgba(13,20,38,0.96);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.04);
  border-right: none;
  border-bottom: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.03) inset;
  transition: box-shadow .3s cubic-bezier(.4,0,.2,1), background .3s;
}
.glass-card:hover {
  box-shadow: 0 4px 32px rgba(0,0,0,0.45), 0 0 20px rgba(0,229,255,0.07), 0 1px 0 rgba(255,255,255,0.04) inset;
  background: rgba(15,23,42,0.98);
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; margin-bottom: 0;
  height: 64px;
  position: sticky; top: 0; z-index: 40;
  border: none; border-bottom: 1px solid var(--outline-variant); border-radius: 0;
  background: rgba(11,19,38,0.80);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
}
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title .material-symbols-outlined { color: var(--brand-glow); font-size: 22px; font-variation-settings: 'FILL' 1; }
h1 { margin: 0; font-size: 20px; font-weight: 600; font-family: "Hanken Grotesk", sans-serif; }
.topbar-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-container);
  font-size: 12px; color: var(--muted); font-family: "JetBrains Mono", monospace;
}
.topbar-chip::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.grid { display: grid; gap: 16px; }
.overview-grid { grid-template-columns: 1.25fr .95fr; align-items: start; }
.right-stack { display: grid; gap: 16px; }
.panel, .hero-card, .asset-card {
  border-top: 1px solid rgba(255,255,255,0.09);
  border-left: 1px solid rgba(255,255,255,0.04);
  border-right: none;
  border-bottom: none;
  border-radius: 12px;
  background: rgba(18,26,46,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.panel { padding: 18px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.caption { color: var(--muted); font-size: 13px; }
.toolbar-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.hero-card { padding: 30px 32px; margin-bottom: 22px; }
.hero-label { color: var(--muted-2); font-size: 11px; font-weight: 500; letter-spacing: .10em; text-transform: uppercase; font-family: "JetBrains Mono", monospace; }
.hero-number { margin-top: 12px; font-family: "Hanken Grotesk", sans-serif; font-size: 48px; font-weight: 700; color: var(--brand); }
.hero-total-line { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.day-change {
  margin-bottom: 8px;
  padding: 8px 11px;
  min-width: 142px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(7,12,23,.42);
  text-align: right;
}
.day-change span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}
.day-change strong {
  color: #cfd8e6;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.day-change.up { border-color: rgba(74,222,128,.24); background: rgba(74,222,128,.07); }
.day-change.up strong { color: #86efac; }
.day-change.down { border-color: rgba(255,180,171,.26); background: rgba(255,180,171,.07); }
.day-change.down strong { color: #ffb4ab; }
.day-change.neutral strong { color: #94a3b8; }
.progress-meta { display: flex; justify-content: space-between; margin: 22px 0 8px; color: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 12px; }
.progress-meta b { color: #8ed5ff; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-variant); overflow: hidden; border: none; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand-glow); box-shadow: 0 0 12px rgba(0,227,253,0.45); }

.section-title { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; color: var(--muted); font-size: 12px; }
.section-title div { display: flex; gap: 9px; align-items: center; color: var(--text); font-size: 15px; font-weight: 600; }
.section-title div::before { content: ""; width: 4px; height: 20px; border-radius: 4px; background: var(--brand-glow); }
.asset-card { position: relative; min-height: 82px; margin-bottom: 10px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; }
.asset-card.compact { min-height: 74px; }
.asset-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; background: rgba(148,163,184,.24); }
.asset-left { display: flex; align-items: center; gap: 16px; }
.asset-icon { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; border: 1px solid rgba(148,163,184,.18); background: rgba(8,13,24,.72); }
.asset-title { font-size: 15px; font-weight: 700; }
.asset-sub, .asset-dev { color: var(--muted); font-size: 12px; }
.asset-right { text-align: right; }
.asset-money { font-family: "JetBrains Mono", monospace; font-size: 18px; font-weight: 650; }
.badge { display: inline-block; margin-top: 7px; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid; letter-spacing: .02em; }
.badge.ok { color: var(--brand); background: rgba(189,244,255,.08); border-color: rgba(189,244,255,.25); }
.badge.bad { color: #ffb4ab; background: rgba(255,180,171,.08); border-color: rgba(255,180,171,.25); }
.badge.warn { color: var(--brand-2); background: rgba(236,178,255,.08); border-color: rgba(236,178,255,.25); }

.chart-panel { text-align: left; }
.composition-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 24px; }
.donut { width: 190px; height: 190px; margin: 0; border-radius: 50%; display: grid; place-items: center; }
.donut > div { width: 138px; height: 138px; border-radius: 50%; background: #080d18; display: grid; place-items: center; align-content: center; }
.donut span { color: var(--muted); font-size: 12px; }
.donut strong { color: #8ed5ff; font-family: "JetBrains Mono", monospace; font-size: 18px; }
.legend { display: grid; gap: 11px; align-content: center; }
.legend-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; color: #cbd5e1; font-size: 12px; }
.legend-item span { min-width: 0; display: flex; align-items: center; }
.legend-item b { font-family: "JetBrains Mono", monospace; font-weight: 750; color: #dbeafe; text-align: right; }
.legend-item i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
/* touch-action on the <svg>/<rect> alone isn't reliably honored by WebKit —
   Safari has a long-standing bug where touch-action is ignored on SVG
   elements, so the scroll gesture recognizer can claim the touch before our
   pointerdown handler ever runs. Setting it on this plain HTML wrapper too
   is the standard workaround (same reason charting libs wrap SVG in a div). */
.curve-panel { padding-bottom: 4px; touch-action: none; }
.curve-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; text-align: left; }
.curve-summary { display: grid; gap: 3px; }
.curve-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.curve-summary strong { font-family: "JetBrains Mono", monospace; color: #f1f7ff; font-size: 25px; line-height: 1.1; letter-spacing: 0; }
.curve-summary em { font-style: normal; font-size: 12px; font-weight: 800; }
.curve-summary em.up { color: #86efac; }
.curve-summary em.down { color: #ffb4ab; }
.segment-control {
  display: inline-grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}
.segment-btn {
  min-width: 0;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}
.segment-btn:hover { color: #eaf7ff; background: transparent; }
.segment-btn.active { color: #eaf7ff; background: transparent; box-shadow: none; }
.curve-chart { width: 100%; height: 184px; display: block; overflow: visible; touch-action: none; }
.curve-axis { stroke: rgba(148,163,184,.18); stroke-width: 1; }
.curve-area { fill: url(#curveArea); pointer-events: none; }
.curve-line { fill: none; stroke: url(#curveStroke); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.curve-line-faded { opacity: .3; stroke-dasharray: 3 4; }
.curve-hover-zone { fill: transparent; cursor: crosshair; touch-action: none; }
.curve-marker-line { stroke: rgba(148,163,184,.24); stroke-width: 1; stroke-dasharray: 4 5; pointer-events: none; }
.curve-marker { fill: #eaf7ff; stroke: var(--brand); stroke-width: 2; pointer-events: none; }
.curve-extreme { fill: rgba(203,213,225,.72); font-size: 10px; font-family: "JetBrains Mono", monospace; pointer-events: none; }
.curve-scrub-label { fill: #eaf7ff; font-size: 11px; font-weight: 700; font-family: "JetBrains Mono", monospace; pointer-events: none; }
.curve-range-row { display: flex; justify-content: stretch; margin-top: -12px; position: relative; height: 18px; }
.curve-segments { width: 100%; }
.curve-axis-ticks { position: relative; width: 100%; height: 18px; }
.curve-axis-ticks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  color: #94a3b8;
  white-space: nowrap;
}
.curve-axis-ticks span:first-child { transform: translateX(0); }
.curve-axis-ticks span:last-child { transform: translateX(-100%); }

.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.form-grid.five { grid-template-columns: repeat(5, minmax(0,1fr)); }
.field span { display: block; margin-bottom: 8px; color: #9aa8bc; font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  color: #dfe7f3; background: rgba(6,11,22,.72);
  border: 1px solid rgba(148,163,184,.16); border-radius: 8px;
  outline: 0; font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 600;
}
.field textarea { resize: vertical; line-height: 1.5; font-weight: 500; }
.field select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8ed5ff 50%), linear-gradient(135deg, #8ed5ff 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 11px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.field select:disabled {
  cursor: not-allowed;
  color: var(--muted-2);
  background-color: rgba(6,11,22,.42);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(148,163,184,.26); background-color: rgba(8,14,27,.86); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(56,189,248,.46); box-shadow: 0 0 0 2px rgba(56,189,248,.08); }

/* Investor profile card (目标配置页) */
.cfg-profile-card { margin-top: 20px; border-radius: 14px; padding: 20px 24px; }
.cfg-profile-hint { font-size: 11px; color: var(--muted-2); margin: 6px 0 16px; }
.cfg-profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfg-profile-textarea-field { grid-column: span 2; }
.select-wrap {
  position: relative;
  min-width: 0;
}
.select-trigger {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dfe7f3;
  background: rgba(6,11,22,.72);
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 8px;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-trigger .material-symbols-outlined {
  color: #8ed5ff;
  font-size: 19px;
}
.select-trigger:hover,
.select-wrap.open .select-trigger {
  border-color: rgba(56,189,248,.42);
  background: rgba(8,14,27,.92);
  box-shadow: 0 0 0 2px rgba(56,189,248,.06);
}
.select-trigger:disabled {
  cursor: not-allowed;
  color: var(--muted-2);
  background: rgba(6,11,22,.42);
}
.select-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(56,189,248,.24);
  border-radius: 10px;
  background-color: #0a1120;
  background-image: linear-gradient(180deg, rgba(15,23,38,1), rgba(8,13,24,1));
  box-shadow: 0 18px 48px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04);
  scrollbar-width: thin;
  scrollbar-color: rgba(56,189,248,.35) transparent;
}
.select-menu::-webkit-scrollbar { width: 6px; }
.select-menu::-webkit-scrollbar-track { background: transparent; }
.select-menu::-webkit-scrollbar-thumb {
  background: rgba(56,189,248,.35);
  border-radius: 8px;
}
.select-menu::-webkit-scrollbar-thumb:hover { background: rgba(56,189,248,.55); }
.select-wrap.open .select-menu { display: flex; flex-direction: column; }
.select-option {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfd8e6;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
}
.select-option:last-child { margin-bottom: 0; }
.select-option:hover {
  color: #eaf7ff;
  border-color: rgba(56,189,248,.18);
  background: rgba(56,189,248,.10);
}
.select-option strong {
  color: #eaf7ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}
.select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 12px;
}
/* ── Holdings page ── */
.h-hero {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 36px; border-radius: 12px; overflow: hidden;
}
.h-hero-inner-glow {
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px;
  background: rgba(0,229,255,0.07); border-radius: 50%; filter: blur(70px);
  pointer-events: none;
}
.h-hero-label { font-size: 11px; font-weight: 500; letter-spacing: .10em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.h-hero-total {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 42px; font-weight: 700; line-height: 1;
  letter-spacing: -.02em; color: var(--brand);
}
.h-hero-sub {
  margin-top: 8px; font-size: 12px; color: var(--muted-2);
  display: flex; align-items: center; gap: 4px;
}
.h-hero-sub .material-symbols-outlined { font-size: 14px; }
.h-refresh-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px;
  background: rgba(195,245,255,0.07);
  border: 1px solid rgba(195,245,255,0.14);
  color: var(--brand); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.h-refresh-btn:hover { background: rgba(195,245,255,0.12); border-color: rgba(195,245,255,0.28); }
.h-refresh-btn .material-symbols-outlined { font-size: 16px; }
.h-refresh-btn:disabled { cursor: wait; opacity: .78; }
.h-refresh-btn.loading .material-symbols-outlined { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

.app-toast {
  position: fixed;
  right: 24px;
  top: 78px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(134,239,172,.24);
  background: rgba(10,20,30,.96);
  color: #86efac;
  box-shadow: 0 16px 44px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.app-toast.show { opacity: 1; transform: translateY(0); }
.app-toast.error {
  color: #ffb4ab;
  border-color: rgba(255,180,171,.28);
}
.app-toast .material-symbols-outlined { font-size: 18px; font-variation-settings: 'FILL' 1; }

.h-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

/* Card */
.h-card { border-radius: 12px; padding: 0; overflow: hidden; }
.h-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.h-card-left { display: flex; align-items: center; gap: 12px; }
.h-card-dot { width: 3px; height: 22px; border-radius: 99px; flex-shrink: 0; }
.h-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.mkt-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 99px; letter-spacing: .02em;
}
.mkt-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.mkt-open   { color: #86efac; background: rgba(74,222,128,.10); border: 1px solid rgba(74,222,128,.25); }
.mkt-open::before { background: #86efac; box-shadow: 0 0 5px #86efac; animation: mkt-pulse 2s infinite; }
.mkt-pre    { color: #fde68a; background: rgba(253,230,138,.08); border: 1px solid rgba(253,230,138,.22); }
.mkt-pre::before  { background: #fde68a; }
.mkt-after  { color: #93c5fd; background: rgba(147,197,253,.08); border: 1px solid rgba(147,197,253,.22); }
.mkt-after::before{ background: #93c5fd; }
.mkt-closed { color: var(--muted-2); background: rgba(148,163,184,.06); border: 1px solid rgba(148,163,184,.15); }
.mkt-closed::before { background: var(--muted-2); }
@keyframes mkt-pulse {
  0%,100% { opacity: 1; } 50% { opacity: .35; }
}
.h-card-amount {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px; font-weight: 700; color: #eef5ff;
  letter-spacing: -.01em;
}
.h-card-summary {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 0;
}
.h-card-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.h-card-stats strong {
  margin-left: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 850;
}
.h-card-stats strong.up { color: #86efac; }
.h-card-stats strong.down { color: #ffb4ab; }
.h-card-stats strong.flat { color: var(--muted-2); }

/* Table */
.h-table {
  border-top: 1px solid rgba(195,245,255,0.06);
  background: rgba(5,9,20,.40);
}
.h-mobile-list { display: none; }
.h-table-head {
  display: grid;
  grid-template-columns: minmax(145px, .94fr) minmax(140px, .72fr) minmax(190px, 1.2fr) minmax(120px, .78fr);
  align-items: center;
  gap: 26px;
  padding: 5px 24px;
  color: var(--muted-2); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  opacity: 0.5;
}
.h-table-head > span:not(:first-child) { text-align: right; }
.h-table-head > span:nth-child(2) { text-align: left; }
.h-row {
  display: grid;
  grid-template-columns: minmax(145px, .94fr) minmax(140px, .72fr) minmax(190px, 1.2fr) minmax(120px, .78fr);
  align-items: center; gap: 26px;
  min-height: 66px; padding: 10px 24px;
  border-bottom: 1px solid rgba(195,245,255,0.04);
  cursor: pointer;
  outline: 0;
}
.h-row:last-child { border-bottom: 0; }
.h-row:hover { background: rgba(195,245,255,0.025); }
.h-row:focus-visible { box-shadow: inset 0 0 0 1px rgba(0,229,255,.28); background: rgba(0,229,255,.035); }
.h-row.expanded { background: rgba(0,229,255,.035); border-bottom-color: rgba(195,245,255,0.08); }

.holding-name {
  min-width: 0; display: flex; align-items: center; gap: 10px;
}
.holding-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 8px; flex-shrink: 0;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(8,13,24,.65);
}
.holding-icon .material-symbols-outlined { font-size: 18px; }
.holding-name strong {
  display: block; overflow: hidden; color: #e6edf7;
  font-size: 13px; font-weight: 700;
  text-overflow: ellipsis; white-space: nowrap;
}
.holding-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.holding-qty {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
}
.holding-qty strong {
  display: block;
  color: #e6edf7;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.holding-qty span {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.holding-input {
  width: 100%; height: 32px; padding: 0 9px;
  color: #e6edf7; background: rgba(7,12,23,.55);
  border: 1px solid rgba(148,163,184,.13); border-radius: 7px;
  outline: 0; font-family: "JetBrains Mono", monospace;
  font-size: 12px; font-weight: 700; min-width: 0;
}
.holding-input:hover { border-color: rgba(148,163,184,.26); }
.holding-input:focus { border-color: rgba(0,229,255,.4); box-shadow: 0 0 0 2px rgba(0,229,255,.07); }
.holding-num { color: var(--muted-2); font-family: "JetBrains Mono", monospace; font-size: 12px; text-align: right; }
.holding-num.strong { color: #eef5ff; font-size: 13px; font-weight: 800; }
.holding-price-cell {
  display: grid;
  justify-items: end;
  gap: 7px;
  min-width: 0;
  font-family: "JetBrains Mono", monospace;
}
.holding-price-main {
  color: #eef5ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}
.price-status-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
  border: 1px solid transparent;
}
.price-status-badge.ok { color: var(--brand); background: rgba(189,244,255,.08); border-color: rgba(189,244,255,.25); }
.price-status-badge.flat { color: var(--muted-2); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.price-status-badge.down { color: #ff8a8a; background: rgba(255,90,90,.1); border-color: rgba(255,90,90,.3); }
.holding-price-trend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  width: 100%;
  min-width: 0;
}
.holding-price-trend span {
  min-width: 62px;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.holding-price-cell.up .holding-price-trend span { color: #86efac; }
.holding-price-cell.down .holding-price-trend span { color: #ffb4ab; }
.holding-price-cell.flat .holding-price-trend span { color: var(--muted-2); }
.holding-spark {
  width: 108px;
  height: 26px;
  overflow: visible;
  flex: 0 0 108px;
}
.holding-spark polyline {
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.holding-price-cell.up .holding-spark polyline { stroke: #86efac; }
.holding-price-cell.down .holding-spark polyline { stroke: #ffb4ab; }
.holding-detail {
  padding: 14px 24px 18px 68px;
  border-bottom: 1px solid rgba(195,245,255,0.06);
  background: rgba(0,229,255,.025);
}
.holding-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.holding-detail-metrics > div {
  min-width: 0;
}
.holding-detail-metrics span,
.holding-detail-edit label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.holding-detail-metrics strong {
  display: block;
  min-width: 0;
  color: #eef5ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.holding-detail-metrics strong.up { color: #86efac; }
.holding-detail-metrics strong.down { color: #ffb4ab; }
.holding-detail-metrics strong.flat { color: var(--muted-2); }
.holding-detail-edit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.holding-detail-edit label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.holding-detail-edit label strong,
.holding-detail-edit label em,
.holding-detail-edit label input {
  min-width: 0;
}
.holding-detail-edit label > span { grid-column: 1 / -1; margin-bottom: -2px; }
.holding-detail-edit em {
  height: 32px;
  min-width: 38px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}
.holding-purpose {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.1);
}
.holding-purpose-check {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.holding-purpose-check input { accent-color: #00e5ff; width: 15px; height: 15px; cursor: pointer; }
.holding-purpose-note {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.holding-purpose-note span {
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.holding-purpose-note .holding-input { font-weight: 500; }

.h-mobile-card {
  display: none;
}
.h-mobile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 10px;
}
.h-mobile-total {
  flex-shrink: 0;
  text-align: right;
}
.h-mobile-total-label {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.h-mobile-total-value {
  color: #eef5ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 850;
}
.h-mobile-mid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: center;
  padding: 0 16px 12px;
}
.h-mobile-qty {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.h-mobile-qty span {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.h-mobile-qty strong {
  color: #eef5ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.h-mobile-card .holding-price-cell {
  justify-items: end;
  gap: 5px;
}
.h-mobile-card .holding-price-main {
  font-size: 12px;
}
.h-mobile-card .holding-price-trend {
  gap: 7px;
}
.h-mobile-card .holding-price-trend span {
  min-width: 54px;
  font-size: 11px;
}
.h-mobile-card .holding-spark {
  width: 92px;
  height: 22px;
  flex-basis: 92px;
}
.h-mobile-card .holding-detail {
  padding: 0 16px 16px;
  border-bottom: 0;
}
.h-mobile-card .holding-detail-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.h-mobile-card .holding-detail-edit {
  grid-template-columns: 1fr;
}
.h-mobile-card .holding-detail-edit label {
  grid-template-columns: minmax(0, 1fr) auto;
}
.h-mobile-card .holding-detail-edit em {
  min-width: 40px;
}

/* Cash flow list inside h-card */
.flow-list { border-top: 1px solid rgba(195,245,255,0.06); background: rgba(5,9,20,.40); }
.flow-row {
  display: grid;
  grid-template-columns: 56px 1fr 1fr minmax(0,2fr);
  align-items: center; gap: 16px;
  min-height: 44px; padding: 8px 24px;
  border-bottom: 1px solid rgba(195,245,255,0.04);
  color: var(--muted); font-size: 12px;
}
.flow-row:last-child { border-bottom: 0; }
.flow-row:hover { background: rgba(195,245,255,0.025); }
.flow-row strong { color: #eef5ff; font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; }
.flow-row time { color: var(--muted-2); font-family: "JetBrains Mono", monospace; font-size: 11px; }
.flow-type { width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.flow-type.in { color: #86efac; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.20); }
.flow-type.out { color: #ffb4ab; background: rgba(255,180,171,.08); border: 1px solid rgba(255,180,171,.22); }
.flow-empty { padding: 20px 24px; color: var(--muted-2); font-size: 12px; }
/* kept for other uses */
.config-row, .table-head { display: grid; grid-template-columns: 1.35fr 1.1fr .75fr .45fr; gap: 12px; align-items: end; margin-bottom: 10px; }
.config-row.three, .table-head.three { grid-template-columns: 1.5fr .75fr .45fr; }
.config-row.four-sub, .table-head.four-sub { grid-template-columns: 1.35fr .55fr .65fr .42fr; }
.table-head { color: #728198; font-size: 11px; font-weight: 700; margin-bottom: 8px; }
.static-field {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(6,11,22,.56);
  color: #dfe7f3;
  font-weight: 700;
}
.static-field small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
}
.static-field.unsupported {
  border-color: rgba(255,180,171,.26);
  background: rgba(255,180,171,.06);
}
.static-field.unsupported small { color: #ffb4ab; }
.config-summary {
  display: grid;
  grid-template-columns: 1.2fr .9fr .8fr .8fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.config-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.config-summary strong {
  display: block;
  color: #eef5ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
}
.goal-amount-input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: #eef5ff;
  background: rgba(7,12,23,.62);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 8px;
  outline: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
}
.goal-amount-input:hover { border-color: rgba(148,163,184,.30); }
.goal-amount-input:focus { border-color: rgba(56,189,248,.46); box-shadow: 0 0 0 2px rgba(56,189,248,.08); }
.target-total-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.target-total-row strong {
  display: inline;
}
.config-summary em,
.total-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
}
.config-summary em.ok, .total-pill.ok { color: #86efac; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.20); }
.config-summary em.warn, .total-pill.warn { color: #facc15; background: rgba(250,204,21,.08); border: 1px solid rgba(250,204,21,.20); }
.config-summary em.bad, .total-pill.bad { color: #ffb4ab; background: rgba(255,180,171,.08); border: 1px solid rgba(255,180,171,.22); }
.config-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.config-section-head h3 { margin: 0; font-size: 16px; }
.config-section-head > span:not(.total-pill) { color: var(--muted); font-size: 12px; }
.target-panel { overflow: visible; }
.target-tree-head,
.target-tree-row,
.target-add-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(140px, .8fr) 110px 130px 42px;
  align-items: center;
  gap: 12px;
}
.target-tree-head {
  min-height: 34px;
  padding: 0 10px;
  color: #728198;
  border: 1px solid rgba(148,163,184,.10);
  border-radius: 10px 10px 0 0;
  background: rgba(7,12,23,.34);
  font-size: 11px;
  font-weight: 850;
}
.target-tree-node { border-bottom: 1px solid rgba(148,163,184,.10); }
.target-tree-node:last-of-type { border-bottom: 0; }
.target-tree-row,
.target-add-row {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(148,163,184,.10);
  border-top: 0;
  background: rgba(6,11,22,.26);
}
.target-tree-row {
  border-bottom: 0;
}
.target-tree-row.parent {
  background: rgba(14,23,42,.80);
  border-left: 3px solid rgba(56,189,248,.45);
  padding-left: 7px;
}
.target-tree-row.child {
  border-top: 1px solid rgba(148,163,184,.07);
  background: rgba(5,9,18,.16);
  border-left: 3px solid transparent;
  padding-left: 7px;
}
.target-add-row {
  border-radius: 0 0 10px 10px;
  background: rgba(7,12,23,.18);
}
.target-tree-row.add { background: rgba(7,12,23,.18); }
.target-tree-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.tree-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #8ed5ff;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}
.tree-toggle:hover {
  border-color: rgba(56,189,248,.20);
  background: rgba(56,189,248,.08);
}
.tree-toggle:disabled {
  cursor: default;
  opacity: .25;
}
.tree-toggle .material-symbols-outlined { font-size: 20px; }
.inline-text-input {
  flex: 1;
  background: rgba(15,23,42,.7) !important;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 8px;
  color: #e2e9f5 !important;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.inline-text-input:focus { border-color: rgba(56,189,248,.5); box-shadow: 0 0 0 2px rgba(56,189,248,.1); }
.inline-text-input::placeholder { color: #374151; }
/* 覆盖浏览器自动填充白色背景 */
.inline-text-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px rgba(15,23,42,.9) inset !important; -webkit-text-fill-color: #e2e9f5 !important; }
.tree-spacer {
  width: 30px;
  height: 1px;
  display: block;
  position: relative;
}
.tree-spacer::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -20px;
  bottom: -18px;
  width: 1px;
  background: rgba(56,189,248,.22);
}
.tree-spacer::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  width: 14px;
  height: 1px;
  background: rgba(56,189,248,.22);
}
.target-name input,
.target-desc input,
.percent-field input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  color: #e6edf7;
  background: rgba(7,12,23,.62);
  border: 1px solid rgba(148,163,184,.14);
  border-radius: 7px;
  outline: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 750;
}
.target-tree-row.parent .target-name input {
  font-size: 14px;
  font-weight: 800;
  color: #f1f7ff;
  border-color: rgba(56,189,248,.18);
  background: rgba(7,12,23,.48);
}
.target-name small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}
.percent-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
}
.percent-field input {
  border-radius: 7px 0 0 7px;
  font-family: "JetBrains Mono", monospace;
  text-align: right;
}
.percent-field span {
  height: 34px;
  display: grid;
  place-items: center;
  color: #8ed5ff;
  border: 1px solid rgba(148,163,184,.14);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: rgba(56,189,248,.06);
  font-size: 12px;
  font-weight: 850;
}
.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  justify-self: center;
  color: #8a98ad;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}
.icon-btn .material-symbols-outlined { font-size: 18px; }
.icon-btn:hover {
  color: #eaf7ff;
  border-color: rgba(148,163,184,.18);
  background: rgba(148,163,184,.08);
}
.icon-btn.danger:hover {
  color: #ffb4ab;
  border-color: rgba(255,180,171,.28);
  background: rgba(255,180,171,.08);
}
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: .35;
}
.unit-pill {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(56,189,248,.20);
  background: rgba(56,189,248,.07);
  color: #a9ddfb;
  font-size: 13px;
  font-weight: 750;
}
/* ── Target config page ── */
.cfg-summary-card {
  border-radius: 14px; padding: 20px 24px;
  display: flex; align-items: center; gap: 24px;
}
.cfg-summary-fields { display: flex; gap: 24px; flex: 1; align-items: flex-end; flex-wrap: wrap; }
.cfg-summary-field { display: flex; flex-direction: column; gap: 7px; min-width: 140px; }
.cfg-summary-label { font-size: 11px; color: var(--muted-2); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cfg-summary-input-wrap {
  display: flex; align-items: center;
  background: rgba(7,12,23,.55); border: 1px solid rgba(148,163,184,.14); border-radius: 9px; overflow: hidden;
}
.cfg-sym { padding: 0 10px; font-size: 13px; color: var(--muted-2); font-weight: 600; background: rgba(148,163,184,.06); border-right: 1px solid rgba(148,163,184,.1); height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.cfg-summary-input { flex: 1; height: 36px; padding: 0 10px; background: transparent; border: none; outline: none; font-family: "JetBrains Mono", monospace; font-size: 15px; font-weight: 700; color: #e6edf7; min-width: 0; }
.cfg-summary-input-wrap:focus-within { border-color: rgba(0,229,255,.35); box-shadow: 0 0 0 2px rgba(0,229,255,.07); }
.cfg-summary-pct-wrap .percent-field { min-width: 100px; }
.cfg-total-row { display: flex; align-items: center; gap: 10px; height: 36px; }
.cfg-total-num { font-family: "JetBrains Mono", monospace; font-size: 18px; font-weight: 800; color: #eef5ff; }
.cfg-reset-btn {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  color: var(--muted); background: transparent;
  border: 1px solid rgba(148,163,184,.15); font-size: 12px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.cfg-reset-btn:hover { color: var(--text); border-color: rgba(148,163,184,.3); background: rgba(148,163,184,.06); }
.cfg-reset-btn .material-symbols-outlined { font-size: 16px; }

.cfg-categories { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.cfg-cat-card { border-radius: 12px; padding: 0; position: relative; z-index: 1; }
.cfg-cat-card:focus-within { z-index: 20; }
.cfg-sub-table { border-radius: 0 0 12px 12px; overflow: visible; }
.cfg-cat-header {
  display: flex; align-items: center; gap: 0;
  padding: 0; min-height: 62px; position: relative;
}
.cfg-cat-accent { width: 4px; align-self: stretch; flex-shrink: 0; border-radius: 0; }
.cfg-cat-info { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-width: 0; }
.cfg-cat-name-input {
  height: 28px; padding: 0 8px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 6px; outline: none;
  font-size: 14px; font-weight: 800; color: #f1f7ff;
  transition: border-color .15s, background .15s;
}
.cfg-cat-name-input:hover { border-color: rgba(148,163,184,.18); background: rgba(7,12,23,.4); }
.cfg-cat-name-input:focus { border-color: rgba(0,229,255,.35); background: rgba(7,12,23,.6); box-shadow: 0 0 0 2px rgba(0,229,255,.07); }
.cfg-cat-desc-input {
  height: 22px; padding: 0 8px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 5px; outline: none;
  font-size: 11px; color: var(--muted-2);
  transition: border-color .15s, background .15s;
}
.cfg-cat-desc-input:hover { border-color: rgba(148,163,184,.14); background: rgba(7,12,23,.3); }
.cfg-cat-desc-input:focus { border-color: rgba(0,229,255,.25); background: rgba(7,12,23,.5); }
.cfg-cat-pct-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px; flex-shrink: 0;
}
.cfg-cat-pct-wrap .percent-field { min-width: 90px; }
.cfg-cat-actions { display: flex; align-items: center; gap: 4px; padding-right: 14px; flex-shrink: 0; }

.cfg-sub-table { border-top: 1px solid rgba(195,245,255,0.06); background: rgba(5,9,20,.35); }
.cfg-sub-head {
  display: grid; grid-template-columns: 1fr 80px 110px 36px;
  gap: 12px; padding: 7px 20px 7px 32px;
  color: var(--muted-2); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(5,9,20,.45);
  border-bottom: 1px solid rgba(195,245,255,0.04);
}
.cfg-sub-head > span:nth-child(3) { text-align: right; }
.cfg-sub-row {
  display: grid; grid-template-columns: 1fr 80px 110px 36px;
  align-items: center; gap: 12px;
  padding: 10px 20px 10px 32px;
  border-bottom: 1px solid rgba(195,245,255,0.04);
  transition: background .12s;
}
.cfg-sub-row:hover { background: rgba(195,245,255,0.025); }
.cfg-sub-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); min-width: 0; }
.cfg-sub-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(148,163,184,.35); flex-shrink: 0; }
.cfg-sub-unit { font-size: 11px; color: var(--brand-dim); font-weight: 600; }

.cfg-sub-add-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 32px;
  background: rgba(5,9,20,.2);
}
.cfg-sub-add-input { flex: 1; min-width: 0; }
.cfg-sub-add-row .percent-field { flex-shrink: 0; min-width: 90px; }
.cfg-sub-add-row .btn { flex-shrink: 0; min-height: 32px; padding: 0 10px; font-size: 12px; }
.cfg-sub-mode-toggle {
  display: block;
  margin: 0 20px 10px 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.cfg-sub-mode-toggle:hover { color: var(--brand); }

.cfg-add-cat-card { border-radius: 12px; padding: 16px 20px; border-style: dashed; opacity: .7; grid-column: span 2; }
.cfg-add-cat-card:hover { opacity: 1; }
.cfg-add-cat-fields { display: flex; align-items: center; gap: 10px; }
.cfg-add-input { flex: 1; height: 36px; padding: 0 10px; background: rgba(7,12,23,.55); border: 1px solid rgba(148,163,184,.14); border-radius: 8px; outline: none; color: #e6edf7; font-size: 13px; font-weight: 600; min-width: 0; }
.cfg-add-input:focus { border-color: rgba(0,229,255,.35); box-shadow: 0 0 0 2px rgba(0,229,255,.07); }
.cfg-add-input::placeholder { color: rgba(148,163,184,.35); }
.cfg-add-btn {
  white-space: nowrap; flex-shrink: 0;
  min-height: 32px !important; padding: 0 14px !important;
  font-size: 12px !important; text-align: center;
}

.btn {
  min-height: 38px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  color: #dbeafe; background: rgba(18,28,46,.78);
  border: 1px solid rgba(148,163,184,.22); font-size: 13px; font-weight: 700;
}
.btn:hover { color: #eaf7ff; border-color: rgba(56,189,248,.42); background: rgba(56,189,248,.12); }
.btn.danger:hover { color: #ffb4ab; border-color: rgba(255,180,171,.34); background: rgba(255,180,171,.08); }
.btn:disabled, .btn:disabled:hover {
  cursor: not-allowed;
  opacity: .46;
  color: #94a3b8;
  border-color: rgba(148,163,184,.12);
  background: rgba(18,28,46,.42);
}

.info { border: 1px solid rgba(56,189,248,.22); border-radius: 12px; padding: 14px 16px; color: #a9ddfb; background: rgba(56,189,248,.06); font-weight: 650; }

/* Rebalance two-column layout */
/* ── Rebalance page ── */
/* ── Rebalance layout ── */
.rb-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

.rb-card { border-radius: 12px; padding: 0; overflow: hidden; }
.rb-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(195,245,255,0.06);
}
.rb-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.rb-card-sub { font-size: 11px; color: var(--muted-2); }
.rb-action-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700;
  color: var(--brand); background: rgba(195,245,255,0.08);
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid rgba(195,245,255,0.15);
  flex-shrink: 0;
}

/* Alloc table (left) */
.rb-alloc-table { background: rgba(5,9,20,.35); }
.rb-alloc-head {
  display: grid;
  grid-template-columns: 180px 100px 1fr 80px;
  gap: 12px; padding: 9px 22px;
  color: var(--muted-2); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(5,9,20,.55);
  border-bottom: 1px solid rgba(195,245,255,0.05);
}
.rb-alloc-head > span:nth-child(2) { text-align: right; }
.rb-alloc-head > span:nth-child(3) { padding-left: 28px; }
.rb-alloc-head > span:nth-child(4) { text-align: right; }
.rb-alloc-row {
  display: grid;
  grid-template-columns: 180px 100px 1fr 80px;
  align-items: center; gap: 12px;
  padding: 11px 22px;
  border-bottom: 1px solid rgba(195,245,255,0.04);
  transition: background .12s;
}
.rb-alloc-row:last-child { border-bottom: 0; }
.rb-alloc-row.major { background: rgba(13,21,38,.45); }
.rb-alloc-row.child { background: rgba(5,9,18,.20); }
.rb-alloc-row:hover { background: rgba(195,245,255,0.03); }
.rb-alloc-name {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; color: var(--text);
  min-width: 0; overflow: hidden;
}
.rb-alloc-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-alloc-row.child .rb-alloc-name { font-size: 12px; font-weight: 500; color: var(--muted); }
.alloc-icon {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 7px; border: 1px solid rgba(148,163,184,.12);
  background: rgba(8,13,24,.65); flex-shrink: 0;
}
.alloc-icon .material-symbols-outlined { font-size: 16px; }
.rb-alloc-indent { width: 24px; flex-shrink: 0; }
.rb-alloc-money {
  font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700;
  color: #c8d5e8; text-align: right;
}
.rb-alloc-row.child .rb-alloc-money { color: var(--muted-2); font-size: 11px; }

/* Deviation bar */
.dev-bar { display: flex; flex-direction: column; gap: 5px; padding-left: 28px; }
.dev-bar-track {
  position: relative; height: 5px; border-radius: 4px;
  background: rgba(148,163,184,.10);
}
.dev-bar-fill { height: 100%; border-radius: 4px; transition: width .3s ease; }
.dev-bar-fill.ok   { background: linear-gradient(90deg, rgba(0,229,255,.3), rgba(0,229,255,.6)); }
.dev-bar-fill.over { background: linear-gradient(90deg, rgba(255,180,171,.3), rgba(248,80,80,.6)); }
.dev-bar-fill.under{ background: linear-gradient(90deg, rgba(250,204,21,.25), rgba(250,204,21,.5)); }
.dev-bar-target-line {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  transform: translateX(-50%); background: rgba(255,255,255,.45); border-radius: 1px;
}
.dev-bar-nums {
  display: flex; align-items: center; gap: 4px;
  font-family: "JetBrains Mono", monospace; font-size: 10px;
}
.dev-actual { color: var(--muted); }
.dev-sep { color: rgba(255,255,255,.15); }
.dev-target { color: var(--muted-2); }
.dev-delta { font-weight: 800; margin-left: 2px; }
.dev-delta.ok    { color: var(--brand-dim); }
.dev-delta.over  { color: #ffb4ab; }
.dev-delta.under { color: #facc15; }

/* Action table (right) */
.rb-action-table { background: rgba(5,9,20,.35); }
.rb-action-head {
  display: grid;
  grid-template-columns: 1fr 68px 48px 100px;
  gap: 10px; padding: 9px 22px;
  color: var(--muted-2); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(5,9,20,.55);
  border-bottom: 1px solid rgba(195,245,255,0.05);
}
.rb-action-head > span:nth-child(2) { text-align: right; }
.rb-action-head > span:nth-child(4) { text-align: right; }
.rb-action-row {
  display: grid;
  grid-template-columns: 1fr 68px 48px 100px;
  align-items: center; gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(195,245,255,0.04);
  transition: background .12s;
}
.rb-action-row:last-child { border-bottom: 0; }
.rb-action-row.is-major { background: rgba(13,21,38,.45); }
.rb-action-row.is-sub { background: rgba(5,9,18,.20); }
.rb-action-row:hover { background: rgba(195,245,255,0.03); }
.rb-action-name {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text);
  min-width: 0; overflow: hidden;
}
.rb-action-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-action-row.is-sub .rb-action-name { font-size: 12px; color: var(--muted); font-weight: 500; }
.rb-action-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(148,163,184,.4); flex-shrink: 0; }
.rb-action-dev {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700; color: var(--muted-2);
  text-align: right;
}
.rb-action-row.bad  .rb-action-dev { color: #ffb4ab; }
.rb-action-row.warn .rb-action-dev { color: #facc15; }
.rb-action-verb {
  display: block; padding: 2px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap;
}
.rb-action-row.bad  .rb-action-verb { color: #ffb4ab; background: rgba(255,180,171,.08); border: 1px solid rgba(255,180,171,.22); }
.rb-action-row.warn .rb-action-verb { color: #d8b4fe; background: rgba(206,156,255,.08); border: 1px solid rgba(206,156,255,.24); }
.rb-action-row.ok   .rb-action-verb { color: #86efac; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.20); }
.rb-action-amount {
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700;
  color: #eef5ff; text-align: right;
}
.rb-balanced {
  display: flex; align-items: center; gap: 10px;
  padding: 28px 22px; color: #86efac; font-size: 13px; font-weight: 600;
}
.rb-balanced .material-symbols-outlined { font-size: 18px; }
/* ── AI 每日建议 ─────────────────────────────── */
.ai-advice-wrap { display: flex; flex-direction: column; gap: 0; }
.ai-advice-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 10px;
  min-height: 32px;
}
.ai-ts { font-size: 11px; color: #4a5568; font-family: "JetBrains Mono", monospace; }
.btn-ghost {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.18);
  background: transparent;
  color: #728198;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-ghost:hover { background: rgba(56,189,248,.08); color: #94c6e8; }
.btn-ghost .material-symbols-outlined { font-size: 15px; }
.ai-advice-panel { padding: 0; overflow: hidden; }
.ai-empty, .ai-loading, .ai-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 24px;
  color: #4a5568;
}
.ai-empty .material-symbols-outlined { font-size: 40px; color: #38bdf8; opacity: .6; }
.ai-error .material-symbols-outlined { font-size: 36px; color: #f87171; }
.ai-empty p, .ai-loading p, .ai-error p { font-size: 14px; margin: 0; }
.ai-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(56,189,248,.15);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: ai-spin .8s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-section {
  border-bottom: 1px solid rgba(148,163,184,.08);
}
.ai-section:last-child { border-bottom: 0; }
.ai-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(7,12,23,.3);
}
.ai-section-head .material-symbols-outlined { font-size: 16px; color: #38bdf8; }
.ai-section-body {
  padding: 12px 20px 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #c8d5e8;
}
.ai-section-body p { margin: 0 0 6px; }
.ai-section-body ul, .ai-section-body ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ai-section-body li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(15,23,42,.35);
  border-radius: 8px;
  border-left: 2px solid rgba(56,189,248,.22);
}
.ai-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(56,189,248,.14);
  border: 1px solid rgba(56,189,248,.28);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.ai-toolbar-actions { display: flex; gap: 8px; }

/* 追问对话区 */
.ai-chat {
  background: var(--panel, rgba(10,16,30,.72));
  border: 1px solid rgba(148,163,184,.10);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
}
.ai-chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  font-size: 12px; font-weight: 800; color: #94a3b8;
  letter-spacing: .05em; text-transform: uppercase;
  background: rgba(7,12,23,.3);
  border-bottom: 1px solid rgba(148,163,184,.08);
}
.ai-chat-head .material-symbols-outlined { font-size: 16px; color: #38bdf8; }
.ai-chat-history {
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 360px; overflow-y: auto;
}
.ai-chat-empty { font-size: 12px; color: #374151; text-align: center; padding: 8px 0; margin: 0; }
.ai-chat-bubble {
  display: flex; gap: 10px; align-items: flex-start;
}
.ai-chat-bubble .material-symbols-outlined { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.ai-chat-bubble.user { flex-direction: row-reverse; }
.ai-chat-bubble.user .material-symbols-outlined { color: #64748b; }
.ai-chat-bubble.assistant .material-symbols-outlined { color: #38bdf8; }
.ai-chat-text {
  font-size: 13px; line-height: 1.7; color: #c8d5e8;
  background: rgba(15,23,42,.5);
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 88%;
}
.ai-chat-bubble.user .ai-chat-text {
  background: rgba(56,189,248,.10);
  border: 1px solid rgba(56,189,248,.18);
  color: #e2e9f5;
  text-align: right;
}
.ai-chat-bubble.thinking .ai-chat-text { background: transparent; padding: 0; }
.ai-chat-input-row {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(148,163,184,.08);
  background: rgba(7,12,23,.2);
}
.ai-chat-input {
  flex: 1;
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 10px;
  color: #e2e9f5;
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
}
.ai-chat-input:focus { border-color: rgba(56,189,248,.4); }
.ai-chat-input::placeholder { color: #374151; }
.ai-chat-input:disabled { opacity: .5; cursor: not-allowed; }
.ai-chat-send {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; padding: 0;
}
.ai-chat-send .material-symbols-outlined { font-size: 18px; }
.ai-chat-send:disabled { opacity: .4; cursor: not-allowed; }
.ai-spinner.small { width: 20px; height: 20px; border-width: 2px; margin: 6px; }
.prompt-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.prompt-modal {
  background: #0d1526;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 14px;
  width: min(760px, 100%);
  max-height: 80vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.prompt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  font-size: 13px; font-weight: 700; color: #94a3b8;
  border-bottom: 1px solid rgba(148,163,184,.10);
  flex-shrink: 0;
}
.prompt-modal-body {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; line-height: 1.8;
  color: #c8d5e8;
  white-space: pre-wrap; word-break: break-word;
  margin: 0;
}
.spark { height: 220px; display: flex; align-items: end; gap: 4px; border-bottom: 1px solid var(--line); }
.spark i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--brand), rgba(192,193,255,.18)); }

/* ── Goal page ── */
.goal-overview-card,
.goal-chart-card { border-radius: 14px; padding: 22px 24px; }
.goal-chart-card { margin-top: 20px; }

.goal-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.goal-card-headtext { flex-shrink: 0; }
.goal-card-icon {
  font-size: 20px; color: var(--brand);
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.14); flex-shrink: 0;
}
.goal-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.goal-card-sub   { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* Progress card */
.goal-pct-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 52px; font-weight: 800; color: #eef5ff;
  line-height: 1; margin-bottom: 18px;
}
.goal-pct-num span { font-size: 28px; color: var(--brand); margin-left: 2px; }

.goal-bar-wrap { margin-bottom: 20px; }
.goal-bar-track {
  height: 8px; border-radius: 99px;
  background: rgba(148,163,184,0.12);
  overflow: hidden; margin-bottom: 8px;
}
.goal-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, rgba(0,229,255,0.6), rgba(0,229,255,1));
  position: relative; transition: width .6s cubic-bezier(.4,0,.2,1);
}
.goal-bar-glow {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,229,255,0.8);
  box-shadow: 0 0 10px 4px rgba(0,229,255,0.4);
}
.goal-bar-labels {
  display: flex; justify-content: space-between;
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted-2);
}

.goal-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.goal-stat-label { font-size: 11px; color: var(--muted-2); margin-bottom: 5px; }
.goal-stat-val { font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700; color: #c8d5e8; }
.goal-eta-done { color: #86efac; }
.goal-eta-warn { color: #facc15; font-size: 12px; }

/* Section dividers inside the unified overview card */
.goal-divider { height: 1px; background: rgba(148,163,184,.1); margin: 22px 0 16px; }
.goal-section-label {
  font-size: 11px; color: var(--muted-2); font-weight: 700;
  letter-spacing: .02em; margin-bottom: 14px;
}

.goal-tracking-item {}
.goal-tracking-vs { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; color: var(--muted-2); margin-left: 4px; }
.goal-tracking-pending { font-size: 12px; font-weight: 600; color: var(--muted-2); }
.goal-stat-val.ok   { color: #86efac; }
.goal-stat-val.warn { color: #facc15; }
.goal-stat-val.bad  { color: #ffb4ab; }

/* Param fields */
.goal-param-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.goal-param-field {}
.goal-param-label { display: block; font-size: 11px; color: var(--muted-2); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 7px; }
.goal-param-input-wrap {
  display: flex; align-items: center; gap: 0;
  background: rgba(7,12,23,.55);
  border: 1px solid rgba(148,163,184,.14); border-radius: 9px;
  overflow: hidden;
}
.goal-param-sym {
  padding: 0 10px; font-size: 13px; color: var(--muted-2); font-weight: 600;
  background: rgba(148,163,184,0.06); border-right: 1px solid rgba(148,163,184,.1);
  height: 38px; display: grid; place-items: center; flex-shrink: 0;
}
.goal-param-sym-right { border-right: none; border-left: 1px solid rgba(148,163,184,.1); }
.goal-param-input {
  flex: 1; height: 38px; padding: 0 12px;
  background: transparent; border: none; outline: none;
  font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700;
  color: #e6edf7; min-width: 0;
}
.goal-param-input:focus { box-shadow: none; }
.goal-param-input-wrap:focus-within {
  border-color: rgba(0,229,255,.35);
  box-shadow: 0 0 0 2px rgba(0,229,255,.07);
}
.goal-param-hint { font-size: 11px; color: var(--muted-2); opacity: .6; }

/* Chart card */
.goal-chart-card { margin-top: 0; }
.goal-chart-legend {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: var(--muted-2); font-weight: 600;
  flex-shrink: 0;
}
.goal-chart-legend span { display: flex; align-items: center; gap: 6px; }
.goal-legend-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.goal-legend-swatch.plan { background: linear-gradient(180deg, rgba(0,229,255,.7), rgba(0,229,255,.15)); }
.goal-legend-swatch.actual { background: #facc15; border-radius: 50%; width: 8px; height: 8px; }

.goal-chart-wrap { margin-top: 4px; }
.goal-chart-svg { width: 100%; height: auto; aspect-ratio: 600 / 260; overflow: visible; display: block; }
.goal-chart-goal-line { stroke: rgba(0,229,255,.35); stroke-width: 1; stroke-dasharray: 5 4; }
.goal-chart-goal-label {
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  fill: rgba(0,229,255,.75);
}
.goal-chart-plan-line {
  fill: none; stroke: #00e3fd; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.goal-chart-plan-area { stroke: none; }
.goal-chart-actual-line {
  fill: none; stroke: #facc15; stroke-width: 2;
  stroke-dasharray: 6 4; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.goal-chart-now-dot { fill: #00e3fd; stroke: #06111f; stroke-width: 2; }
.goal-chart-now-label {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  fill: #cfe9f7;
}
.goal-chart-end-label {
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
}
.goal-chart-end-label.plan { fill: #8ed5ff; }
.goal-chart-end-label.actual { fill: #facc15; }
.goal-chart-axis { stroke: rgba(148,163,184,.16); stroke-width: 1; }
.goal-chart-axis-label {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  fill: var(--muted-2);
}
.goal-eta-row { margin-top: 14px; }
.fatal { padding: 24px; color: #ffb4ab; }

/* ── PnL calendar page ── */
.pnl-cal-card { border-radius: 14px; padding: 22px 24px; }
.pnl-cal-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pnl-cal-nav-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid rgba(148,163,184,.28);
  background: rgba(148,163,184,.08); color: #eaf7ff; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pnl-cal-nav-btn:hover { border-color: rgba(0,229,255,.5); background: rgba(0,229,255,.1); color: #fff; }
.pnl-cal-nav-btn.text {
  width: auto; padding: 0 14px; font-size: 12px; font-weight: 700;
  border-color: rgba(0,229,255,.4); background: rgba(0,229,255,.1); color: #8ed5ff;
}
.pnl-cal-nav-btn.text:hover { border-color: rgba(0,229,255,.65); background: rgba(0,229,255,.16); color: #eaf7ff; }
.pnl-cal-nav-btn:disabled {
  cursor: default; border-color: rgba(148,163,184,.14);
  background: rgba(148,163,184,.04); color: var(--muted-2);
}
.pnl-cal-nav-btn:disabled:hover { border-color: rgba(148,163,184,.14); background: rgba(148,163,184,.04); color: var(--muted-2); }

.pnl-cal-status { padding: 40px 0; text-align: center; color: var(--muted-2); font-size: 13px; }
.pnl-cal-status.error { color: #ffb4ab; }

.pnl-cal-summary { display: flex; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.pnl-cal-sum-item { display: flex; flex-direction: column; gap: 5px; }
.pnl-cal-sum-item span { font-size: 11px; color: var(--muted-2); }
.pnl-cal-sum-item strong { font-family: "JetBrains Mono", monospace; font-size: 15px; font-weight: 800; color: #c8d5e8; }
.pnl-cal-sum-item strong.up { color: #86efac; }
.pnl-cal-sum-item strong.down { color: #ffb4ab; }

.pnl-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
  margin-bottom: 8px;
}
.pnl-cal-weekdays span { text-align: center; font-size: 11px; color: var(--muted-2); font-weight: 700; }

.pnl-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pnl-cal-cell {
  aspect-ratio: 1; border-radius: 8px; padding: 6px 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(148,163,184,.08);
  background: rgba(148,163,184,.03);
}
.pnl-cal-cell.empty { border: none; background: none; }
.pnl-cal-cell.nodata { color: var(--muted-2); }
.pnl-cal-cell.future { opacity: .35; }
.pnl-cal-cell.today { border-color: rgba(0,229,255,.5); box-shadow: 0 0 0 1px rgba(0,229,255,.25) inset; }
.pnl-cal-cell.up { background: rgba(134,239,172, calc(var(--intensity, 0) * 0.45 + 0.05)); border-color: rgba(134,239,172,.25); }
.pnl-cal-cell.down { background: rgba(255,180,171, calc(var(--intensity, 0) * 0.45 + 0.05)); border-color: rgba(255,180,171,.25); }
.pnl-cal-cell.flat { background: rgba(148,163,184,.08); }
.pnl-cal-daynum { font-size: 12px; color: var(--muted-2); font-weight: 700; }
.pnl-cal-pct {
  font-family: "JetBrains Mono", monospace; font-size: 16px; font-weight: 800;
  color: #eef5ff; align-self: flex-end; white-space: nowrap;
}
.pnl-cal-cell.up .pnl-cal-pct { color: #86efac; }
.pnl-cal-cell.down .pnl-cal-pct { color: #ffb4ab; }

.pnl-cal-legend {
  margin-top: 18px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted-2);
}
.pnl-cal-legend-swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-left: 12px; }
.pnl-cal-legend-swatch:first-child { margin-left: 0; }
.pnl-cal-legend-swatch.up { background: rgba(134,239,172,.5); }
.pnl-cal-legend-swatch.down { background: rgba(255,180,171,.5); }
.pnl-cal-legend-swatch.flat { background: rgba(148,163,184,.12); }

/* ── Investment reports (日报/周报/月报/年报) ── */
.report-header-card { padding: 18px 20px; }
.report-header-top { display: flex; align-items: center; justify-content: flex-end; }
.report-type-switch {
  flex-shrink: 0;
  display: inline-flex;
  grid-template-columns: none;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.report-type-switch .segment-btn {
  height: auto;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
}
.report-type-switch .segment-btn.active { background: rgba(189,244,255,.1); color: var(--brand); }

.report-period-nav {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.report-period-label {
  font-size: 19px; font-weight: 800; color: #eef5ff;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}
.report-period-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.report-nav-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 9px; border: 1px solid rgba(148,163,184,.28);
  background: rgba(148,163,184,.08); color: #eaf7ff; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.report-nav-btn:hover { border-color: rgba(0,229,255,.5); background: rgba(0,229,255,.1); color: #fff; }
.report-nav-btn.text {
  width: auto; padding: 0 14px; font-size: 12px; font-weight: 700;
  border-color: rgba(0,229,255,.4); background: rgba(0,229,255,.1); color: #8ed5ff;
}
.report-nav-btn.text:hover { border-color: rgba(0,229,255,.65); background: rgba(0,229,255,.16); color: #eaf7ff; }
.report-nav-btn:disabled {
  cursor: default; border-color: rgba(148,163,184,.14);
  background: rgba(148,163,184,.04); color: var(--muted-2);
}
.report-nav-btn:disabled:hover { border-color: rgba(148,163,184,.14); background: rgba(148,163,184,.04); color: var(--muted-2); }
.report-date-picker {
  height: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid rgba(148,163,184,.28); background: rgba(148,163,184,.08);
  color: #eaf7ff; font-family: "JetBrains Mono", monospace; font-size: 13px;
  color-scheme: dark;
}
.report-date-picker:disabled { opacity: .5; }
.report-year-picker { width: 90px; }

.report-unavailable-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.25);
  color: #ffd166; font-size: 13px;
}
.report-unavailable-banner .material-symbols-outlined { font-size: 18px; }

.report-status { padding: 40px 0; text-align: center; color: var(--muted-2); }
.report-status.error { color: #ffb4ab; }

/* Hero: the headline number a report reader should see first */
.report-hero {
  padding: 26px 28px; border-radius: 16px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
}
.report-hero.up { background: rgba(134,239,172,.05); border-color: rgba(134,239,172,.18); }
.report-hero.down { background: rgba(255,180,171,.05); border-color: rgba(255,180,171,.18); }
.report-hero-headline { font-size: 14px; font-weight: 600; color: var(--muted-2); margin-bottom: 10px; }
.report-hero-row { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.report-hero-num { font-family: "JetBrains Mono", monospace; font-size: 40px; font-weight: 800; color: #eef5ff; line-height: 1; }
.report-hero-num.up { color: #86efac; }
.report-hero-num.down { color: #ffb4ab; }
.report-hero-pct { font-family: "JetBrains Mono", monospace; font-size: 20px; font-weight: 700; color: var(--muted-2); }
.report-hero-pct.up { color: #86efac; }
.report-hero-pct.down { color: #ffb4ab; }
.report-hero-stats { display: flex; gap: 32px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.06); }
.report-stat { display: flex; flex-direction: column; gap: 6px; }
.report-stat-label { font-size: 12px; color: var(--muted-2); }
.report-stat-value { font-family: "JetBrains Mono", monospace; font-size: 16px; font-weight: 700; color: #eef5ff; }
.report-cashflow-stats { padding-top: 0; border-top: 0; margin-bottom: 16px; }

.report-section { padding: 18px 20px; }
.report-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: #eef5ff; margin-bottom: 14px;
}
.report-section-head .material-symbols-outlined { font-size: 19px; color: var(--brand); }
.report-info-icon { display: inline-flex; margin-left: auto; cursor: help; }
.report-info-icon .material-symbols-outlined { font-size: 16px; color: var(--muted-2) !important; }

.report-asset-table { display: flex; flex-direction: column; gap: 2px; }
.report-asset-head, .report-asset-row {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 8px; align-items: center; padding: 10px 4px;
}
.report-asset-head { font-size: 11px; color: var(--muted-2); border-bottom: 1px solid rgba(255,255,255,.06); }
.report-asset-head span:not(:first-child) { text-align: right; }
.report-asset-row { font-size: 13px; font-family: "JetBrains Mono", monospace; border-bottom: 1px solid rgba(255,255,255,.04); }
.report-asset-name { font-family: "Hanken Grotesk", sans-serif; font-weight: 600; color: #eef5ff; }
.report-asset-cell { text-align: right; color: var(--muted-2); }
.report-asset-cell.up { color: #86efac; }
.report-asset-cell.down { color: #ffb4ab; }

.report-contrib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-contrib-col-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.report-contrib-col-title.up { color: #86efac; }
.report-contrib-col-title.down { color: #ffb4ab; }
.report-contrib-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04);
}
.report-contrib-row span { color: #eef5ff; }
.report-contrib-row strong { font-family: "JetBrains Mono", monospace; }
.report-contrib-row strong.up { color: #86efac; }
.report-contrib-row strong.down { color: #ffb4ab; }
.report-contrib-empty { padding: 10px 0; color: var(--muted-2); font-size: 13px; }

@media (max-width: 920px) {
  .report-hero-num { font-size: 30px; }
  .report-hero-stats { gap: 20px; }
  .report-contrib-grid { grid-template-columns: 1fr; gap: 12px; }
  .report-asset-table { overflow-x: auto; }
  .report-asset-head, .report-asset-row { grid-template-columns: 1.2fr repeat(3, 90px); min-width: 420px; }
  .report-header-top { flex-direction: column; align-items: stretch; }
  .report-type-switch { width: 100%; }
  .report-period-nav { gap: 8px; }
  .report-period-label { font-size: 15px; white-space: normal; flex: 1 1 auto; text-align: center; order: -1; width: 100%; }
  .report-period-tools { width: 100%; justify-content: space-between; margin-left: 0; }
  .report-date-picker { flex: 1 1 auto; min-width: 0; }
}

/* ── Overview V3 (WealthCommand Teal) ── */
.overview-canvas { padding: 16px 18px 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.page-canvas { padding: 16px 18px 32px; }

/* Hero row */
.overview-hero { display: grid; grid-template-columns: 8fr 4fr; gap: 20px; align-items: stretch; }

.hero-total-card {
  border-radius: 12px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  position: relative;
}
.hero-inner-glow {
  position: absolute;
  right: -80px; top: -80px;
  width: 300px; height: 300px;
  background: rgba(0,229,255,0.055);
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  transition: background .7s;
}
.hero-total-card:hover .hero-inner-glow { background: rgba(0,229,255,0.09); }
.hero-total-label {
  font-size: 11px; font-weight: 500; letter-spacing: .10em;
  text-transform: uppercase; color: var(--muted-2);
  font-family: "JetBrains Mono", monospace; margin-bottom: 10px;
}
.hero-amount-row {
  display: flex; align-items: flex-end; gap: 10px;
}
.hero-total-number {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 56px; font-weight: 700; line-height: 1;
  letter-spacing: -.02em; color: var(--brand);
  cursor: pointer; user-select: none;
}
.hero-total-number:hover { opacity: .8; }
.amount-mask { letter-spacing: .15em; font-size: .7em; vertical-align: middle; }
.hero-total-change {
  margin-top: 8px; font-size: 14px; color: var(--muted);
}

/* Currency selector */
.currency-selector {
  position: relative;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.currency-trigger {
  display: flex; align-items: center; gap: 3px;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(195,245,255,0.07);
  border: 1px solid rgba(195,245,255,0.14);
  color: var(--muted); font-size: 12px; font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer; letter-spacing: .03em;
  transition: all .15s;
}
.currency-trigger:hover { color: var(--brand); border-color: rgba(195,245,255,0.28); }
.currency-trigger .material-symbols-outlined { font-size: 14px; transition: transform .15s; }
.currency-selector.open .currency-trigger .material-symbols-outlined { transform: rotate(180deg); }
.currency-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border-radius: 10px;
  background: #111929;
  border: 1px solid rgba(195,245,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 200;
  min-width: 130px;
}
.currency-selector.open .currency-menu { display: flex; }
.currency-option {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 10px; border-radius: 7px;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; width: 100%;
  transition: background .12s;
}
.currency-option:hover { background: rgba(195,245,255,0.08); color: var(--brand); }
.currency-option.active { color: var(--brand); }
.currency-option strong {
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700;
}
.currency-option span { color: inherit; opacity: .7; font-size: 11px; }
.hero-total-change.up { color: var(--brand-3); }
.hero-total-change.down { color: #ffb4ab; }
.hero-progress-section { margin-top: auto; padding-top: 20px; }
.hero-progress-meta {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
}
.hero-progress-meta strong {
  font-family: "JetBrains Mono", monospace; font-size: 20px;
  font-weight: 500; color: var(--brand);
}
.progress-v3 {
  height: 10px; border-radius: 99px;
  background: rgba(45,52,73,0.5); overflow: visible;
  position: relative;
}
.progress-v3-bar {
  position: relative;
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,229,255,0.35), #00e5ff 60%, var(--brand-dim));
}
.progress-v3-pulse {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  border-radius: inherit;
  animation: lumi-pulse 2.2s ease-in-out infinite;
}
.progress-v3-dot {
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 10px rgba(0,229,255,0.9), 0 0 4px rgba(255,255,255,0.8);
}
@keyframes lumi-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}

.hero-curve-card {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.hero-curve-card .panel { margin-bottom: 0; border-radius: 12px; border: none; height: 100%; }

/* Asset list section */
.overview-main { display: grid; grid-template-columns: 8fr 4fr; gap: 20px; align-items: stretch; }

.overview-alloc-card { border-radius: 12px; padding: 22px 24px; }

.asset-list-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.asset-list-accent { width: 4px; height: 22px; border-radius: 4px; background: var(--brand-glow); flex-shrink: 0; }
.asset-list-header h3 { margin: 0; font-size: 18px; font-weight: 600; font-family: "Hanken Grotesk", sans-serif; flex: 1; }

.donut-section-title {
  margin: 0 0 18px; font-size: 16px; font-weight: 600;
  font-family: "Hanken Grotesk", sans-serif; color: var(--text);
}

.asset-list { display: grid; gap: 10px; }

.asset-list-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(45,52,73,0.20);
  border: 1px solid transparent;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.asset-list-card:hover {
  border-color: rgba(195,245,255,0.12);
  background: rgba(45,52,73,0.35);
}
.asset-list-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-container);
  transition: transform .2s;
}
.asset-list-card:hover .asset-list-icon { transform: scale(1.08); }
.asset-list-icon .material-symbols-outlined { font-size: 24px; font-variation-settings: 'FILL' 1; }
.asset-list-name { flex: 1; min-width: 0; }
.asset-list-title { font-size: 15px; font-weight: 600; color: var(--text); }
.asset-list-sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; font-family: "JetBrains Mono", monospace; }
.asset-list-right { text-align: right; flex-shrink: 0; }
.asset-list-amount {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 20px; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
/* Badge variants for asset list */
.badge-ok { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: rgba(195,245,255,.07); border: 1px solid rgba(195,245,255,.22); }
.badge-over { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #ffb4ab; background: rgba(255,180,171,.07); border: 1px solid rgba(255,180,171,.22); }
.badge-under { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-2); background: rgba(236,178,255,.07); border: 1px solid rgba(236,178,255,.22); }

/* Donut column */
.overview-donut-card {
  border-radius: 12px;
  padding: 22px 24px;
  display: flex; flex-direction: column; align-items: stretch;
}
.donut-center-wrap {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
}
.donut-v3 {
  width: 200px; height: 200px; border-radius: 50%;
  display: grid; place-items: center; margin: 0 auto 20px;
}
.donut-v3 > div {
  width: 148px; height: 148px; border-radius: 50%;
  background: #0b1326; display: grid; place-items: center; align-content: center;
}
.donut-v3 > div span { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; display: block; text-align: center; font-family: "JetBrains Mono", monospace; }
.donut-v3 > div strong { color: var(--brand); font-family: "Hanken Grotesk", sans-serif; font-size: 20px; font-weight: 700; display: block; text-align: center; }
.donut-legend-v3 { width: 100%; display: grid; gap: 10px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; }
.donut-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-name { flex: 1; font-size: 13px; color: var(--muted); }
.donut-legend-pct { font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 500; color: var(--text); }

/* ── Overview bottom row ── */
.overview-bottom-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bottom-panel {
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}
.bottom-panel-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.ai-ts-badge {
  margin-left: auto;
  font-size: 11px; color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .02em;
}
.bottom-panel-header .material-symbols-outlined { font-size: 18px; color: var(--brand-glow); }
.bottom-panel-title {
  font-size: 15px; font-weight: 600;
  font-family: "Hanken Grotesk", sans-serif;
}
.bottom-panel-action {
  margin-left: auto;
  font-size: 11px; color: var(--muted-2);
  display: flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.bottom-panel-action:hover { color: var(--brand); }
.bottom-panel-action .material-symbols-outlined { font-size: 13px; }

/* Rank list */
.rank-list { display: grid; gap: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  background: rgba(45,52,73,0.25);
  transition: background .2s;
}
.rank-item:hover { background: rgba(45,52,73,0.45); }
.rank-badge {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  background: rgba(45,52,73,0.5);
}
.rank-info { flex: 1; min-width: 0; }
.rank-label {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-sub { font-size: 11px; color: var(--muted-2); margin-top: 1px; font-family: "JetBrains Mono", monospace; }
.rank-amount {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px; font-weight: 600; color: var(--text);
  text-align: right; flex-shrink: 0;
}
.rank-pct { font-size: 11px; color: var(--muted-2); text-align: right; font-family: "JetBrains Mono", monospace; }

/* Sentiment gauge */
.sentiment-track {
  height: 8px; border-radius: 99px; margin: 20px 0 8px;
  background: linear-gradient(90deg, #f87171 0%, #fb923c 20%, #facc15 40%, #a3e635 60%, #34d399 80%, #22d3ee 100%);
  position: relative;
}
.sentiment-marker {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: white; box-shadow: 0 0 8px rgba(0,229,255,0.7);
  border: 2px solid var(--brand-glow);
}
.sentiment-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 20px;
}
.sentiment-score {
  text-align: center; margin-bottom: 4px;
}
.sentiment-score strong {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 42px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand-glow), var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sentiment-score span { display: block; font-size: 12px; color: var(--brand-glow); margin-top: -4px; }
.sentiment-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 12px; }

/* AI insight cards */
.insight-list { display: grid; gap: 10px; flex: 1; align-content: start; }
.insight-card {
  padding: 12px 14px; border-radius: 8px;
  background: rgba(45,52,73,0.25);
  border-left: 3px solid var(--brand-glow);
}
.insight-card.warn { border-left-color: #ffb4ab; }
.insight-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 5px;
}
.insight-body { font-size: 12px; color: var(--muted); line-height: 1.65; }
.insight-footer {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 10px; color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
}

@media (max-width: 920px) {
  :root {
    --mobile-appbar-h: 56px;
    --mobile-nav-h: 64px;
  }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 0; }
  .topbar { display: none; }
  html, body {
    overscroll-behavior-y: none;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* old Edge/IE */
  }
  html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
  }
  .mobile-shell {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background: #0e131e;
    color: #dee2f2;
    overscroll-behavior-y: none;
  }
  .mobile-appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    height: calc(var(--mobile-appbar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    background: rgba(11,19,38,.86);
    border-bottom: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .mobile-appbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  .mobile-appbar-brand .material-symbols-outlined {
    font-size: 24px;
    color: var(--brand-glow);
    font-variation-settings: 'FILL' 1;
  }
  .mobile-appbar-title {
    color: var(--text);
    font-size: 18px;
    line-height: 1.05;
    font-weight: 800;
    font-family: "Hanken Grotesk", sans-serif;
  }
  .mobile-appbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }
  .mobile-appbar-actions .currency-selector {
    margin-bottom: 0;
  }
  .mobile-appbar-actions .currency-menu {
    left: auto;
    right: 0;
  }
  .mobile-appbar-actions .m-currency-btn .currency-trigger {
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(18,26,46,.86);
    border: 1px solid var(--outline-variant);
    color: var(--muted);
  }
  .mobile-appbar-actions .m-currency-btn .currency-trigger:hover {
    color: var(--muted);
    border-color: var(--outline-variant);
  }
  .mobile-icon-btn,
  .mobile-avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--outline-variant);
    border-radius: 999px;
    background: rgba(18,26,46,.86);
    color: var(--muted);
  }
  .mobile-icon-btn .material-symbols-outlined,
  .mobile-avatar .material-symbols-outlined {
    font-size: 20px;
  }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: rgba(11,19,38,.90);
    border-top: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .mobile-content {
    padding: calc(var(--mobile-appbar-h) + env(safe-area-inset-top) + 8px) 0 calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 8px);
  }
  .mobile-content .overview-canvas,
  .mobile-content .page-canvas {
    padding: 0 12px 24px;
  }
  .mobile-content .overview-hero,
  .mobile-content .overview-main,
  .mobile-content .overview-bottom-row,
  .mobile-content .goal-param-fields,
  .mobile-content .cfg-profile-fields,
  .mobile-content .cfg-categories,
  .mobile-content .rb-layout {
    grid-template-columns: 1fr;
  }
  .mobile-content .cfg-add-cat-card {
    grid-column: span 1;
  }
  /* Category ticker table degrades to stacked mini-cards instead of the
     desktop's fixed-pixel-column grid (1fr 80px 110px 36px), which has no
     room to breathe at phone widths. */
  .mobile-content .cfg-sub-head {
    display: none;
  }
  .mobile-content .cfg-sub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 14px;
  }
  .mobile-content .cfg-sub-row .cfg-sub-name {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }
  .mobile-content .cfg-sub-row .icon-btn.danger {
    order: 2;
    flex-shrink: 0;
  }
  .mobile-content .cfg-sub-row .cfg-sub-unit {
    order: 3;
    flex: 0 0 auto;
  }
  .mobile-content .cfg-sub-row .percent-field {
    order: 4;
    flex: 1 1 auto;
    min-width: 0;
  }
  .mobile-content .cfg-sub-add-row {
    flex-wrap: wrap;
  }
  .mobile-content .cfg-sub-add-row .cfg-sub-add-input {
    flex: 1 1 100%;
  }
  .mobile-content .cfg-sub-add-row .percent-field {
    flex: 1 1 auto;
  }
  .mobile-content .cfg-cat-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .mobile-content .cfg-cat-info {
    flex-basis: 100%;
    padding-bottom: 4px;
  }
  .mobile-content .cfg-cat-pct-wrap {
    padding-left: 16px;
  }
  .mobile-content .cfg-add-cat-fields {
    flex-wrap: wrap;
  }
  .mobile-content .cfg-add-cat-fields .cfg-add-input,
  .mobile-content .cfg-add-cat-fields .percent-field {
    flex: 1 1 100%;
  }
  .mobile-content .cfg-add-cat-fields .cfg-add-btn {
    flex: 1 1 100%;
  }
  .mobile-content .cfg-profile-textarea-field {
    grid-column: span 1;
  }
  .mobile-content .pnl-cal-cell {
    padding: 4px 5px;
    border-radius: 6px;
  }
  .mobile-content .pnl-cal-daynum {
    font-size: 9px;
  }
  .mobile-content .pnl-cal-pct {
    font-size: 9px;
  }
  .mobile-content .pnl-cal-grid,
  .mobile-content .pnl-cal-weekdays {
    gap: 3px;
  }
  .mobile-content .h-sections {
    grid-template-columns: 1fr;
  }
  .mobile-content .overview-hero,
  .mobile-content .rb-layout {
    gap: 12px;
  }
  .mobile-content .overview-hero > *,
  .mobile-content .rb-layout > * {
    min-width: 0;
  }
  .mobile-content .h-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .mobile-content .hero-progress-section {
    display: none;
  }
  .mobile-content .h-mobile-list {
    padding: 8px;
    gap: 8px;
  }
  .mobile-content .h-mobile-card {
    border-radius: 10px;
  }
  .mobile-content .h-mobile-top {
    padding: 12px 12px 8px;
  }
  .mobile-content .h-mobile-mid {
    padding: 0 12px 10px;
    gap: 10px;
  }
  .mobile-content .h-mobile-total-value {
    font-size: 14px;
  }
  .mobile-content .h-mobile-qty strong {
    font-size: 12px;
  }
  .mobile-content .h-mobile-card .holding-spark {
    width: 84px;
    height: 20px;
    flex-basis: 84px;
  }
  .mobile-content .h-mobile-card .holding-detail {
    padding: 0 12px 12px;
  }
  .mobile-content .h-mobile-card .holding-detail-metrics span,
  .mobile-content .h-mobile-card .holding-detail-edit label > span {
    font-size: 9px;
  }
  .mobile-content .h-mobile-card .holding-detail-metrics strong {
    font-size: 12px;
  }
  .mobile-content .h-mobile-card .holding-input {
    height: 30px;
    font-size: 12px;
  }
  .mobile-content .glass-card,
  .mobile-content .panel,
  .mobile-content .hero-card,
  .mobile-content .asset-card {
    border-radius: 12px;
  }
  .mobile-content .overview-hero {
    gap: 10px;
  }
  .mobile-content .hero-total-card,
  .mobile-content .goal-overview-card,
  .mobile-content .goal-chart-card,
  .mobile-content .pnl-cal-card,
  .mobile-content .rb-card,
  .mobile-content .cfg-summary-card,
  .mobile-content .cfg-add-cat-card,
  .mobile-content .ai-advice-panel,
  .mobile-content .ai-chat,
  .mobile-content .bottom-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
  /* rb-alloc-row uses a fixed 180px/100px/1fr/80px desktop grid that doesn't
     fit a phone screen — the dev-bar and status badge were getting clipped
     by .rb-card's overflow:hidden with no way to scroll to them. Restack
     into two rows instead: name+money on top, deviation bar+badge below. */
  .mobile-content .rb-alloc-head { display: none; }
  .mobile-content .rb-alloc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name money" "bar badge";
    align-items: center;
    column-gap: 12px;
    row-gap: 12px;
    padding: 16px;
    border-bottom-color: rgba(195,245,255,0.08);
  }
  .mobile-content .rb-alloc-row.major { padding-top: 18px; padding-bottom: 18px; }
  .mobile-content .rb-alloc-row.child { padding-left: 28px; }
  .mobile-content .rb-alloc-name { grid-area: name; }
  .mobile-content .rb-alloc-money { grid-area: money; }
  .mobile-content .dev-bar { grid-area: bar; padding-left: 0; gap: 8px; }
  .mobile-content .dev-bar-track { height: 6px; }
  .mobile-content .rb-alloc-row > .badge { grid-area: badge; justify-self: end; margin-top: 0; }
  .mobile-content .hero-total-number,
  .mobile-content .h-hero-total {
    font-size: 32px;
  }
  .mobile-content .hero-total-label,
  .mobile-content .h-hero-label,
  .mobile-content .goal-stat-label,
  .mobile-content .cfg-summary-label {
    font-size: 10px;
  }
  .mobile-content .goal-pct-num {
    font-size: 28px;
  }
  .mobile-content .goal-stat-val {
    font-size: 14px;
  }
  .mobile-content .asset-list-card,
  .mobile-content .rank-item,
  .mobile-content .ai-chat-bubble,
  .mobile-content .insight-card,
  .mobile-content .flow-row {
    border-radius: 10px;
  }
  .mobile-content .asset-list-card {
    padding: 12px 14px;
    gap: 12px;
  }
  .mobile-content .asset-list-title,
  .mobile-content .rank-label,
  .mobile-content .bottom-panel-title {
    font-size: 14px;
  }
  .mobile-content .asset-list-sub,
  .mobile-content .rank-sub,
  .mobile-content .insight-body {
    font-size: 11px;
  }
  .mobile-content .overview-bottom-row {
    gap: 12px;
  }
  .mobile-content .goal-card-head,
  .mobile-content .bottom-panel-header {
    margin-bottom: 10px;
  }
  .mobile-content .goal-bar-wrap {
    margin-top: 8px;
  }
  .mobile-content .cfg-summary-fields,
  .mobile-content .cfg-add-cat-fields,
  .mobile-content .ai-chat-input-row {
    gap: 10px;
  }
  .mobile-content .cfg-summary-input,
  .mobile-content .cfg-add-input,
  .mobile-content .goal-amount-input,
  .mobile-content .ai-chat-input {
    height: 36px;
    font-size: 14px;
  }
  .mobile-content .ai-advice-wrap {
    gap: 12px;
  }
  .mobile-content .ai-advice-toolbar {
    margin-bottom: 8px;
  }
  .mobile-content .h-card-head {
    padding: 12px 14px 10px;
  }
  .mobile-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(3,8,18,.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    z-index: 85;
  }
  .mobile-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-sheet {
    display: block;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 8px);
    z-index: 90;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: rgba(11,19,38,.98);
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .mobile-sheet.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-sheet-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .mobile-sheet-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    font-family: "Hanken Grotesk", sans-serif;
  }
  .mobile-sheet-sub {
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 11px;
  }
  .mobile-sheet-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--outline-variant);
    border-radius: 10px;
    background: rgba(18,26,46,.86);
    color: var(--muted);
  }
  .mobile-sheet-list {
    display: grid;
    gap: 8px;
  }
  .mobile-sheet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(148,163,184,.12);
    border-radius: 10px;
    background: rgba(18,26,46,.72);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
  }
  .mobile-sheet-item.danger { color: #ffb4ab; }
  .mobile-nav-item {
    display: flex;
    min-height: 46px;
    margin-bottom: 0;
    padding: 4px 4px 3px;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--muted-2);
    font-size: 10px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
  }
  .mobile-nav-item span {
    white-space: nowrap;
    font-size: 10px;
    line-height: 1;
    color: inherit;
  }
  .mobile-nav-item .material-symbols-outlined {
    font-size: 18px;
    color: inherit;
  }
  .mobile-nav-item.active {
    border-right: 0;
    background: rgba(195,245,255,.08);
    box-shadow: inset 0 0 0 1px rgba(195,245,255,.16);
    color: var(--brand);
  }
  .mobile-content .topbar {
    display: none;
  }
  .hero-total-line { align-items: flex-start; flex-direction: column; gap: 10px; }
  .day-change { width: 100%; text-align: left; }
  .curve-head { flex-direction: column; }
  .segment-control { width: 100%; }
  .curve-segments { width: 100%; }
  .composition-row { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; grid-template-columns: 1fr; }
  .holdings-top, .holding-section-head { flex-direction: column; align-items: stretch; }
  .h-card-head {
    padding: 12px 14px 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .h-card-left { gap: 10px; flex-wrap: wrap; }
  .h-card-summary { justify-items: start; text-align: left; }
  .h-card-amount { font-size: 17px; }
  .h-card-stats { justify-content: flex-start; flex-wrap: wrap; row-gap: 4px; white-space: normal; }
  .flow-list { overflow-x: auto; }
  .flow-row { min-width: 650px; }
  .h-desktop-table { display: none; }
  .h-mobile-list { display: grid; gap: 8px; padding: 8px; border-top: 1px solid rgba(195,245,255,0.06); background: rgba(5,9,20,.40); }
  .h-mobile-card {
    display: block;
    border: 1px solid rgba(148,163,184,.11);
    border-radius: 10px;
    background: rgba(8,13,24,.42);
    overflow: hidden;
  }
  .h-mobile-card.expanded {
    border-color: rgba(0,229,255,.18);
    background: rgba(0,229,255,.035);
  }
  .h-mobile-card .holding-name {
    gap: 8px;
  }
  .h-mobile-card .holding-name strong {
    font-size: 14px;
  }
  .h-mobile-card .holding-name small {
    max-width: 180px;
  }
  .holding-detail {
    padding: 12px 14px 14px;
  }
  .holding-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .holding-detail-edit { grid-template-columns: 1fr; }
  .holding-purpose { flex-direction: column; align-items: stretch; gap: 10px; }
  .holding-purpose-note { flex-direction: column; align-items: stretch; gap: 6px; }
  .holding-detail-metrics strong {
    font-size: 12px;
  }
  .holding-detail-edit label > span {
    font-size: 9px;
  }
  .holding-input {
    height: 30px;
    font-size: 12px;
  }
  .holding-table { overflow-x: auto; }
  .holding-row { min-width: 760px; }
  .config-summary { grid-template-columns: 1fr; align-items: stretch; }
  .target-panel { overflow-x: auto; }
  .target-tree-head, .target-tree-row, .target-add-row { min-width: 760px; }
  .overview-grid, .overview-bottom-row, .form-grid.two, .form-grid.three, .form-grid.four, .form-grid.five, .config-row, .table-head, .config-row.four-sub, .table-head.four-sub { grid-template-columns: 1fr; }
  .rebalance-grid { grid-template-columns: 1fr; }
  .alloc-tree { overflow-x: auto; }
  .alloc-head, .alloc-row { min-width: 520px; }

  /* Mobile-only Overview page — dedicated card stack */
  .mobile-bottom-nav {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.28);
  }
}

.m-overview { display: grid; gap: 16px; padding: 0 12px 24px; }

.m-overview > .curve-panel { margin-bottom: 0; }

.m-goal-card {
  border-radius: 16px;
  padding: 18px;
  background: rgba(27,31,43,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(132,147,150,.15);
}
.m-goal-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; gap: 10px; }
.m-goal-title { font-family: "Hanken Grotesk", sans-serif; font-weight: 700; font-size: 16px; color: var(--text); }
.m-goal-target { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.m-goal-pct { font-family: "Hanken Grotesk", sans-serif; font-weight: 700; font-size: 22px; color: var(--brand); flex-shrink: 0; }

.m-section { display: grid; gap: 10px; }
.m-section-head { display: flex; justify-content: space-between; align-items: center; }
.m-section-head h2 { display: flex; align-items: center; gap: 8px; font-family: "Hanken Grotesk", sans-serif; font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.m-section-accent { width: 4px; height: 18px; background: var(--brand-glow); border-radius: 99px; display: inline-block; }
.m-section-action { display: flex; align-items: center; gap: 3px; color: var(--brand); font-size: 12px; font-weight: 600; background: none; border: none; }
.m-section-action .material-symbols-outlined { font-size: 14px; }

.m-asset-list { display: grid; gap: 10px; }
.m-asset-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(27,31,43,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(132,147,150,.15);
}
.m-asset-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; }
.m-asset-icon .material-symbols-outlined { font-size: 22px; }
.m-asset-info { flex: 1; min-width: 0; }
.m-asset-name { font-size: 15px; font-weight: 600; color: var(--text); }
.m-asset-sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.m-asset-right { text-align: right; flex-shrink: 0; }
.m-asset-amount { font-family: "JetBrains Mono", monospace; font-size: 14px; color: var(--text); }
.m-chip { margin-top: 4px; }

.m-sentiment-card {
  border-radius: 16px;
  padding: 18px;
  background: rgba(27,31,43,.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(132,147,150,.15);
}
.m-sentiment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-family: "Hanken Grotesk", sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
.m-sentiment-head .material-symbols-outlined { color: var(--brand-glow); }
.m-sentiment-body .sentiment-score { text-align: center; margin-bottom: 14px; }

/* Pull-to-refresh (standalone PWA only — normal browser tabs already have a native one) */
.ptr-indicator {
  position: fixed;
  left: 50%;
  top: calc(var(--mobile-appbar-h, 56px) + env(safe-area-inset-top) + 6px);
  transform: translate(-50%, -48px);
  opacity: 0;
  z-index: 75;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(18,26,46,.92);
  border: 1px solid var(--outline-variant);
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
  pointer-events: none;
}
.ptr-indicator .material-symbols-outlined { font-size: 20px; }
.ptr-indicator.spinning { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin {
  to { transform: translate(-50%, 0) rotate(360deg); }
}
