:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --surface: #15151c;
  --surface-2: #1c1c25;
  --surface-3: #222231;
  --ink: #f3f3f7;
  --muted: #8e8e9c;
  --faint: #5a5a68;
  --line: #272730;
  --violet: #7c5cfc;
  --violet-2: #9d7bff;
  --violet-3: #b69cff;
  --up: #f6465d;
  --down: #3b82f6;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  --glow: 0 0 44px rgba(124, 92, 252, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 92, 252, 0.16), transparent 32rem),
    radial-gradient(circle at 92% 18%, rgba(157, 123, 255, 0.1), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: Pretendard, Inter, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(12, 12, 18, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  box-shadow: 0 8px 28px rgba(124, 92, 252, 0.44);
  color: #fff;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong,
.hero-value,
.metric-card strong,
.account-card span,
.rebalance-item > span,
td:nth-child(n + 3) {
  font-family: "Space Grotesk", Pretendard, sans-serif;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-list a,
.nav-item {
  position: relative;
  border-radius: 8px;
  color: var(--muted);
  padding: 12px 14px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.nav-item {
  width: 100%;
  background: transparent;
  text-align: left;
}

.nav-list a::before,
.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 99px;
  background: transparent;
}

.nav-list a.active,
.nav-list a:hover,
.nav-item.active,
.nav-item:hover {
  background: rgba(124, 92, 252, 0.12);
  color: var(--ink);
}

.nav-list a.active::before,
.nav-list a:hover::before,
.nav-item.active::before,
.nav-item:hover::before {
  background: linear-gradient(180deg, var(--violet-2), var(--violet));
}

.currency-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(157, 123, 255, 0.1), rgba(28, 28, 37, 0.8));
}

.currency-card span,
.currency-card small,
.eyebrow {
  color: var(--muted);
}

.currency-card strong {
  display: block;
  margin: 5px 0;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 28px;
}

.currency-card small {
  line-height: 1.55;
}

.mini-toggle {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.mini-toggle input,
.check-control input {
  width: auto;
  min-height: auto;
}

.compact-input {
  min-height: 36px;
  margin-top: 8px;
}

.sidebar-fx-panel {
  display: grid;
  gap: 10px;
}

.sidebar-rate-card {
  padding: 13px;
}

.sidebar-rate-card strong {
  font-size: 24px;
  line-height: 1.08;
}

.sidebar-rate-card .compact-input {
  min-height: 34px;
}

.sidebar-rate-card .mini-toggle {
  margin-top: 10px;
}

.fx-panel {
  background:
    linear-gradient(180deg, rgba(124, 92, 252, 0.08), rgba(21, 21, 28, 0.96)),
    var(--surface);
}

.fx-panel-note {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.fx-card-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px;
}

.fx-card-grid .currency-card {
  display: flex;
  min-height: 172px;
  flex-direction: column;
  justify-content: center;
}

.fx-card-grid .currency-card strong {
  font-size: 34px;
  line-height: 1.05;
}

.usdt-rate-card {
  border-color: rgba(124, 92, 252, 0.42);
  box-shadow: inset 0 0 0 1px rgba(157, 123, 255, 0.05), 0 16px 42px rgba(124, 92, 252, 0.12);
}

.fx-card-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.top-actions,
menu {
  display: flex;
  gap: 10px;
}

.top-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(28, 28, 37, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  box-shadow: 0 10px 26px rgba(124, 92, 252, 0.34);
  color: white;
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(28, 28, 37, 0.8);
  color: var(--ink);
}

a.ghost-button {
  color: var(--ink);
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 900;
}

.view-panel {
  display: none;
}

.active-view {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 40%);
  align-items: center;
  min-height: 178px;
  overflow: hidden;
  padding: 22px 24px;
  background:
    radial-gradient(92% 130% at 0% 0%, rgba(124, 92, 252, 0.26), rgba(124, 92, 252, 0.04) 44%, transparent 70%),
    linear-gradient(145deg, #181821, #111117);
  box-shadow: var(--shadow), var(--glow);
}

.compact-hero {
  min-height: 208px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 22px 22px auto;
  width: 145px;
  height: 145px;
  border-radius: 999px;
  background: rgba(157, 123, 255, 0.12);
  filter: blur(46px);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: start;
}

.hero-value {
  display: block;
  margin: 8px 0 10px;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 700;
  line-height: 0.98;
  text-decoration: none;
}

.currency-prefix {
  margin-right: 0.18em;
  color: var(--muted);
  font-family: Pretendard, Inter, "Space Grotesk", sans-serif;
  font-size: 0.42em;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.22em;
  text-decoration: none;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(28, 28, 37, 0.74);
}

.sparkline {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 112px;
  filter: drop-shadow(0 0 12px rgba(124, 92, 252, 0.18));
}

.spark-area {
  transform-origin: center bottom;
  animation: sparkMist 6.2s ease-in-out infinite;
}

.spark-wave {
  fill: none;
  stroke: #9d7bff;
  stroke-linecap: round;
  pointer-events: none;
  transform-origin: center;
}

.spark-wave-one {
  opacity: 0.13;
  stroke-width: 8;
  animation: sparkWaveOne 5.7s ease-in-out infinite;
}

.spark-wave-two {
  opacity: 0.08;
  stroke-width: 11;
  animation: sparkWaveTwo 7.4s ease-in-out infinite;
}

.spark-last-halo {
  fill: rgba(157, 123, 255, 0.2);
  stroke: rgba(157, 123, 255, 0.28);
  pointer-events: none;
  animation: sparkHaloPulse 1.9s ease-in-out infinite;
}

.spark-last-dot {
  fill: #f3f3f7;
  stroke: #9d7bff;
  stroke-width: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(157, 123, 255, 0.92));
  animation: sparkPointGlow 2.2s ease-in-out infinite;
}

.spark-value-label,
.spark-summary text {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-weight: 800;
}

.spark-value-label {
  fill: var(--ink);
}

.spark-summary rect {
  fill: rgba(21, 21, 28, 0.86);
  stroke: rgba(157, 123, 255, 0.28);
  filter: drop-shadow(0 0 22px rgba(124, 92, 252, 0.2));
}

.spark-summary-rate {
  font-size: 15px;
}

.spark-summary-profit {
  fill: var(--muted);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.spark-summary.positive-spark .spark-summary-rate {
  fill: var(--up);
}

.spark-summary.negative-spark .spark-summary-rate {
  fill: var(--down);
}

.metric-stack {
  display: grid;
  gap: 16px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: linear-gradient(180deg, rgba(28, 28, 37, 0.78), var(--surface));
  transition: border-color 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateZ(0);
}

.metric-card::after,
.account-card::after,
.market-card::after,
.investor-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  will-change: opacity;
  transition: opacity 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0 7px;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 30px;
  line-height: 1.05;
}

.hero-grid .metric-stack {
  gap: 12px;
}

.hero-grid .metric-card {
  min-height: 83px;
  padding: 13px 16px;
}

.hero-grid .metric-card strong {
  margin: 5px 0 5px;
  font-size: 28px;
}

.metric-change-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(28, 28, 37, 0.9);
  border: 1px solid currentColor;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  animation: metricBadgeIn 320ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: opacity 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.metric-change-badge.fading {
  opacity: 0;
  transform: translateY(-8px) scale(0.92);
}

.realtime-flash-up {
  border-color: rgba(246, 70, 93, 0.45);
  box-shadow: inset 0 0 24px rgba(246, 70, 93, 0.06);
}

.realtime-flash-down {
  border-color: rgba(70, 145, 255, 0.45);
  box-shadow: inset 0 0 24px rgba(70, 145, 255, 0.06);
}

.realtime-flash-up::after {
  background: linear-gradient(180deg, rgba(246, 70, 93, 0.12), rgba(246, 70, 93, 0.02));
  animation: metricFlashOverlay 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.realtime-flash-down::after {
  background: linear-gradient(180deg, rgba(70, 145, 255, 0.12), rgba(70, 145, 255, 0.02));
  animation: metricFlashOverlay 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes metricFlashOverlay {
  0% {
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes metricBadgeIn {
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.market-card {
  transition: opacity 300ms ease, transform 300ms ease;
}

.metric-card strong {
  transition: color 300ms ease;
}

@keyframes sparkPointGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(157, 123, 255, 0.48));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(157, 123, 255, 0.92));
  }
}

@keyframes sparkHaloPulse {
  0%,
  100% {
    opacity: 0.52;
    transform: scale(0.92);
  }
  50% {
    opacity: 0.86;
    transform: scale(1.16);
  }
}

@keyframes sparkMist {
  0%,
  100% {
    opacity: 0.78;
  }
  45% {
    opacity: 0.56;
  }
  70% {
    opacity: 0.72;
  }
}

@keyframes sparkWaveOne {
  0%,
  100% {
    transform: translateX(-3px) translateY(0) scaleX(1);
    opacity: 0.11;
  }
  34% {
    transform: translateX(8px) translateY(-4px) scaleX(1.04);
    opacity: 0.17;
  }
  68% {
    transform: translateX(-6px) translateY(3px) scaleX(0.98);
    opacity: 0.09;
  }
}

@keyframes sparkWaveTwo {
  0%,
  100% {
    transform: translateX(7px) translateY(1px) scaleX(0.98);
    opacity: 0.08;
  }
  41% {
    transform: translateX(-10px) translateY(4px) scaleX(1.06);
    opacity: 0.13;
  }
  77% {
    transform: translateX(4px) translateY(-5px) scaleX(1.01);
    opacity: 0.06;
  }
}

.workspace {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.lower-workspace {
  margin-top: 16px;
}

.ledger-collapse-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(28, 28, 37, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ledger-collapse-bar > div {
  display: flex;
  gap: 8px;
}

.ledger-collapse-bar .ghost-button {
  min-height: 32px;
  padding: 0 10px;
}

.collapsed-ledger {
  display: none;
}

.cashflow-panel {
  margin-top: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: 160px 150px minmax(140px, 1fr) minmax(160px, 1.4fr) auto;
  gap: 10px;
}

.cashflow-side {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cashflow-side .side-btn {
  min-width: 64px;
}

.side-btn.deposit {
  color: var(--violet-3);
}

.side-btn.deposit:hover {
  background: rgba(124, 92, 252, 0.18);
  color: #fff;
}

.side-btn.withdraw {
  color: var(--up);
}

.side-btn.withdraw:hover {
  background: rgba(246, 70, 93, 0.18);
  color: #fff;
}

.cashflow-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.cashflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.investor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(124, 92, 252, 0.18), rgba(124, 92, 252, 0.04) 45%, transparent 70%),
    transparent;
}

.investor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.investor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.investor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
}

.investor-chip .chip-initial,
.avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: rgba(124, 92, 252, 0.16);
  color: var(--violet-3);
  font-size: 12px;
}

.investor-chip .chip-name {
  min-width: 0;
}

.tab-balance {
  margin-left: 2px;
  color: currentColor;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 11px;
  opacity: 0.72;
}

.investor-chip.active {
  border-color: rgba(157, 123, 255, 0.44);
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  color: white;
}

.investor-chip.active .chip-initial {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

.add-investor-form {
  display: flex;
  gap: 8px;
  min-width: min(320px, 100%);
}

.add-investor-form input {
  border-style: dashed;
}

.dashboard-add-investor-form {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dashboard-add-investor-form input {
  min-width: 0;
  flex: 1;
  background: rgba(28, 28, 37, 0.72);
}

.dashboard-add-investor-form .icon-button {
  flex: 0 0 36px;
  border-color: rgba(124, 92, 252, 0.45);
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.24), rgba(157, 123, 255, 0.12));
  color: var(--ink);
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.14);
}

.dashboard-add-investor-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.investor-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.edit-investor-name-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.edit-investor-name-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 180px;
}

.edit-investor-name-form span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edit-investor-name-form input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(28, 28, 37, 0.78);
  color: var(--ink);
  font-weight: 800;
}

.edit-investor-name-form .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

.hero-menu {
  position: relative;
}

.hero-menu .icon-button {
  border-color: rgba(157, 123, 255, 0.24);
  background: rgba(28, 28, 37, 0.72);
  color: var(--muted);
}

.hero-menu .icon-button:hover {
  border-color: rgba(157, 123, 255, 0.5);
  color: var(--ink);
}

.hero-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.menu-item {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-item.danger {
  color: var(--up);
}

.danger-button {
  min-height: 36px;
  border: 1px solid rgba(246, 70, 93, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(246, 70, 93, 0.1);
  color: var(--up);
  font-weight: 800;
}

.delete-confirm {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.delete-confirm.show {
  display: flex;
}

.delete-confirm button {
  min-height: 28px;
  padding: 0 9px;
  background: var(--surface-3);
  color: var(--ink);
  font-weight: 800;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-3 {
  grid-column: span 3;
}

.span-12 {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-head {
  margin-bottom: 12px;
}

.crypto-rate-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(124, 92, 252, 0.38);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(124, 92, 252, 0.12);
  color: var(--violet-3);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.compact table {
  min-width: 560px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3),
.compact th:nth-child(4),
.compact td:nth-child(4) {
  text-align: left;
}

th {
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

td {
  color: #dadae5;
  font-size: 14px;
}

tbody tr:hover {
  background: rgba(124, 92, 252, 0.06);
}

.asset-name {
  display: grid;
  gap: 3px;
}

.asset-name strong {
  color: var(--ink);
}

.asset-name small {
  color: var(--muted);
}

.subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: Pretendard, Inter, sans-serif;
  font-size: 11px;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(124, 92, 252, 0.1);
  color: var(--violet-3);
  font-size: 12px;
  font-weight: 800;
}

.owner-label {
  color: var(--ink);
  font-weight: 700;
}

.positive {
  color: var(--up) !important;
}

.negative {
  color: var(--down) !important;
}

.neutral-text {
  color: var(--muted) !important;
}

.donut-area {
  display: grid;
  grid-template-columns: minmax(128px, 178px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2.5vw, 24px);
}

.donut {
  position: relative;
  width: clamp(128px, 14vw, 178px);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: center;
  isolation: isolate;
  box-shadow: 0 0 26px rgba(124, 92, 252, 0.17);
}

.donut::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 2;
}

.allocation-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.allocation-track,
.allocation-segment {
  fill: none;
}

.allocation-track {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 31;
}

.allocation-segment {
  stroke-width: 31;
  stroke-linecap: butt;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    stroke-width 180ms ease,
    filter 180ms ease;
}

.donut:hover .allocation-segment {
  opacity: 0.42;
}

.donut .allocation-segment:hover {
  opacity: 1;
  stroke-width: 36;
  filter: drop-shadow(0 0 12px rgba(157, 123, 255, 0.36));
}

.donut-center {
  position: absolute;
  inset: 27%;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 3px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(157, 123, 255, 0.11), transparent 58%),
    var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  pointer-events: none;
}

.donut-center span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donut-center strong {
  color: var(--ink);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: clamp(13px, 1.3vw, 18px);
}

.donut.is-empty .allocation-track {
  stroke: rgba(124, 92, 252, 0.24);
}

.legend,
.rebalance-list,
.account-list,
.market-list,
.investor-comparison {
  display: grid;
  gap: 10px;
}

.index-grid {
  position: relative;
  display: block;
  margin: 0 -4px;
  padding: 2px 12px 10px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, black 14px, black calc(100% - 14px), transparent 100%);
}

.index-track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: indexMarquee 54s linear infinite;
}

.index-grid:hover .index-track {
  animation-play-state: paused;
}

.index-clone {
  display: contents;
}

.index-card {
  position: relative;
  flex: 0 0 clamp(220px, 24vw, 300px);
  min-height: 92px;
  overflow: hidden;
  border-color: rgba(124, 92, 252, 0.26);
  scroll-snap-align: start;
  transition: border-color 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 180ms ease;
}

.stock-index-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.stock-logo-frame {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(157, 123, 255, 0.44);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(124, 92, 252, 0.34), rgba(28, 28, 37, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 18px rgba(124, 92, 252, 0.18);
  overflow: hidden;
  flex: 0 0 auto;
}

.stock-logo-frame img {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.stock-logo-frame b {
  position: absolute;
  color: var(--violet-3);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.stock-logo-text b {
  color: var(--ink);
  font-size: 8px;
  letter-spacing: 0;
}

.stock-logo-frame img:not([src]),
.stock-logo-frame img[src=""] {
  display: none;
}

.stock-logo-frame img:not([src]) + b,
.stock-logo-frame img[src=""] + b {
  position: relative;
}

@keyframes indexMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 6px));
  }
}

.index-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  transition: background 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.index-card:hover {
  transform: translateY(-1px);
}

.index-card.positive-glow {
  border-color: rgba(246, 70, 93, 0.38);
  box-shadow: 0 0 22px rgba(246, 70, 93, 0.12);
}

.index-card.positive-glow::after {
  background: radial-gradient(circle at 100% 0%, rgba(246, 70, 93, 0.42), transparent 48%);
}

.index-card.negative-glow {
  border-color: rgba(70, 145, 255, 0.38);
  box-shadow: 0 0 22px rgba(70, 145, 255, 0.12);
}

.index-card.negative-glow::after {
  background: radial-gradient(circle at 100% 0%, rgba(70, 145, 255, 0.38), transparent 48%);
}

.index-card.neutral-glow {
  border-color: rgba(157, 123, 255, 0.28);
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.1);
}

.index-card.neutral-glow::after {
  background: radial-gradient(circle at 100% 0%, rgba(157, 123, 255, 0.32), transparent 48%);
}

.empty-hint {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

.muted {
  color: var(--muted);
}

.legend-row,
.rebalance-item,
.account-card,
.market-card,
.investor-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legend-row {
  color: var(--muted);
  font-size: 13px;
}

.legend-row span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.legend-row strong {
  color: var(--ink);
  font-family: "Space Grotesk", Pretendard, sans-serif;
}

.allocation-ratio {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 112px;
  font-variant-numeric: tabular-nums;
}

#allocation {
  padding: 16px 14px;
}

#allocation .donut-area {
  grid-template-columns: minmax(158px, 166px) minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  gap: 18px;
}

#allocation .donut {
  width: clamp(158px, 12.7vw, 166px);
}

#allocation .legend {
  width: 100%;
  min-width: 0;
  justify-self: start;
}

#allocation .legend-row {
  justify-content: flex-start;
  min-height: 26px;
  gap: 4px;
  font-size: 12.5px;
}

#allocation .legend-row span:first-child {
  flex: 0 0 50px;
  gap: 4px;
}

#allocation .swatch {
  width: 10px;
  height: 10px;
}

#allocation .allocation-ratio {
  min-width: 86px;
  gap: 2px;
}

#allocation .allocation-ratio > span {
  font-size: 12.5px;
}

#allocation .allocation-trend {
  min-width: 33px;
  height: 17px;
  padding: 0 2px;
  font-size: 7px;
}

.allocation-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  white-space: nowrap;
}

.allocation-trend.positive {
  background: rgba(246, 70, 93, 0.1);
  box-shadow: 0 0 12px rgba(246, 70, 93, 0.1);
}

.allocation-trend.negative {
  background: rgba(70, 145, 255, 0.1);
  box-shadow: 0 0 12px rgba(70, 145, 255, 0.1);
}

.allocation-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.donut-wrap {
  position: relative;
  width: 212px;
  height: 212px;
  flex: 0 0 auto;
}

.donut-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 120px;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  pointer-events: none;
}

.donut-center .eyebrow {
  margin: 0;
  font-size: 10px;
}

.donut-center-pct {
  margin-top: 4px;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.donut-center-amt {
  margin-top: 3px;
  color: var(--muted);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 11px;
}

.allocation-area .legend {
  flex: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

#allocation .allocation-area .legend {
  flex: 0 0 126px;
  width: 126px;
}

.leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 28px;
  border-radius: 8px;
  padding: 6px 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.leg-label,
.leg-value {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.leg-label {
  gap: 6px;
  min-width: 42px;
  color: var(--muted);
  font-size: 12px;
}

.leg-value {
  color: var(--ink);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.leg-row:hover,
.leg-row.hl {
  background: var(--surface-2);
}

.donut-seg {
  cursor: pointer;
  transition: stroke-width 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.allocation-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.allocation-divider {
  margin: 14px 0;
  border-top: 1px solid var(--line);
}

.allocation-subhead {
  margin-bottom: 12px;
}

.investor-bar-row {
  margin-bottom: 14px;
}

.investor-bar-row:last-child {
  margin-bottom: 0;
}

.investor-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 12px;
}

.investor-bar-head .muted {
  color: var(--muted);
}

.investor-bar-track {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-2);
}

.ibar-seg {
  min-width: 1px;
  transition: opacity 0.15s ease;
}

.holdings-filter-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(124, 92, 252, 0.12);
  color: var(--ink);
  font-size: 13px;
}

.investor-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 14px;
}

.investor-col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.investor-columns .panel {
  padding: 16px;
}

.investor-columns h2 {
  margin: 4px 0 12px;
  font-size: 18px;
}

.investor-donut-area {
  justify-content: flex-start;
  gap: 14px;
}

.investor-donut-wrap {
  width: clamp(150px, 14vw, 176px);
  height: clamp(150px, 14vw, 176px);
}

.investor-donut-center {
  max-width: 98px;
}

.investor-donut-center .donut-center-pct {
  font-size: clamp(18px, 1.7vw, 22px);
}

.investor-donut-center .donut-center-amt {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.investor-allocation-legend {
  flex: 1 1 120px;
  gap: 2px;
}

.investor-allocation-legend .leg-row {
  min-height: 28px;
  padding: 6px 4px;
  font-size: 12px;
}

.investor-kpi-line,
.breakdown-row,
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.investor-kpi-line {
  color: var(--muted);
  font-size: 13px;
}

.investor-kpi-line strong {
  color: var(--ink);
}

.investor-kpi-value {
  margin: 7px 0 4px;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.breakdown-row {
  border-bottom: 1px solid rgba(39, 39, 48, 0.72);
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.breakdown-row:last-child {
  border-bottom: 0;
}

.activity-row {
  border-bottom: 1px solid rgba(39, 39, 48, 0.72);
  padding: 9px 0;
  color: var(--muted);
  font-size: 13px;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.activity-row strong {
  color: var(--ink);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  white-space: nowrap;
}

.activity-badge {
  display: inline-grid;
  min-width: 34px;
  min-height: 20px;
  place-items: center;
  border-radius: 5px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.activity-badge.cash {
  background: rgba(124, 92, 252, 0.16);
  color: var(--violet-3);
}

.activity-badge.buy {
  background: rgba(246, 70, 93, 0.12);
  color: var(--up);
}

.activity-badge.sell {
  background: rgba(70, 145, 255, 0.12);
  color: var(--down);
}

.quick-trade-divider {
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.quick-trade {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-trade-tabs {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 4px;
}

.tab-btn {
  flex: 1;
  min-height: 34px;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--violet);
  color: #fff;
}

.quick-trade-panel,
.quick-trade-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quick-trade select,
.quick-trade input {
  width: 100%;
  min-width: 0;
}

.quick-trade-side {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.side-btn {
  flex: 1;
  min-height: 34px;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.side-btn.active.buy {
  background: var(--up);
  color: #fff;
}

.side-btn.active.sell {
  background: var(--down);
  color: #fff;
}

.quick-trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-trade-fx-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.quick-trade-fixed-cell {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-right: 1px solid var(--line);
  background: rgba(124, 92, 252, 0.12);
  color: var(--violet-3);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.quick-trade-fx-row input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fx-wrap {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.fx-label {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-right: 1px solid var(--line);
  background: rgba(124, 92, 252, 0.18);
  color: var(--violet-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.fx-wrap input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.new-asset-submit {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 13px;
  font-weight: 800;
  cursor: not-allowed;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.new-asset-submit.enabled {
  color: var(--ink);
  cursor: pointer;
}

.new-asset-submit.enabled:hover {
  border-color: var(--up);
  background: var(--up);
  color: #fff;
}

.quick-trade-preview {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.quick-trade-preview strong {
  color: var(--violet-3);
}

.quick-trade-hint {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.quick-trade-hint a {
  color: var(--violet-3);
  font-weight: 800;
  text-decoration: none;
}

.holdings-filter-banner.active {
  display: flex;
}

.holdings-filter-banner .ghost-button {
  min-height: 30px;
  padding: 0 10px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.rebalance-item,
.account-card,
.market-card,
.investor-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.rebalance-item strong,
.account-card strong,
.market-card strong,
.investor-card strong {
  display: block;
}

.metric-title {
  position: relative;
  display: inline-block !important;
  max-width: 100%;
  min-height: 22px;
  vertical-align: middle;
}

.metric-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-badge-slot {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  z-index: 3;
  display: block;
  width: 94px;
  height: 22px;
  transform: translateY(-50%);
  pointer-events: none;
}

.rebalance-item small,
.account-card small,
.market-card small,
.investor-card small {
  display: block;
  color: var(--muted);
}

.market-card {
  align-items: flex-start;
}

.market-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crypto-logo-frame {
  width: 30px;
  height: 30px;
}

.crypto-logo-frame img {
  width: 16px;
  height: 16px;
}

.crypto-change-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex-shrink: 0;
}

.crypto-change-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 104px;
  padding: 4px 9px;
  border: 1px solid rgba(124, 92, 252, 0.22);
  border-radius: 999px;
  background: rgba(28, 28, 37, 0.72);
  font-size: 12px;
  line-height: 1;
}

.crypto-change-chip b {
  color: var(--muted);
  font-family: Pretendard, Inter, sans-serif;
  font-size: 11px;
}

.market-card span,
.investor-card span {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.investor-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.trend-area,
.chart-box {
  min-height: 220px;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact-empty {
  min-height: 110px;
}

.trend-svg,
.dividend-svg {
  width: 100%;
  height: 210px;
  overflow: visible;
}

.trend-svg {
  height: 220px;
}

.trend-svg.compact-trend {
  height: 110px;
}

.chart-hint {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.sim-control-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 18px;
}

.sim-group-card,
.target-dividend-card,
.sim-result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--surface);
}

.sim-result-card {
  margin-bottom: 14px;
  padding: 22px;
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(124, 92, 252, 0.3), rgba(124, 92, 252, 0.05) 45%, transparent 70%),
    var(--surface);
}

.sim-result-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sim-result-main strong {
  display: block;
  margin-top: 4px;
  color: var(--up);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 32px;
  line-height: 1;
}

.sim-result-main span {
  color: var(--muted);
}

.sim-result-main b,
.sim-result-sub strong {
  color: var(--ink);
  font-family: "Space Grotesk", Pretendard, sans-serif;
}

.sim-result-sub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
}

.sim-result-sub div {
  min-width: 0;
}

.sim-result-sub strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.sim-result-sub small,
.target-caption {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
}

.target-dividend-card {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.8fr) auto 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  border-color: rgba(124, 92, 252, 0.42);
  background: var(--surface);
}

.target-dividend-card > div:first-child {
  align-self: center;
}

.target-dividend-card h3 {
  margin-top: 4px;
}

.target-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: span 2;
  gap: 12px;
}

.target-result-card {
  border: 1px solid rgba(124, 92, 252, 0.5);
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--surface-2);
}

.target-result-card span {
  color: var(--muted);
  font-size: 12px;
}

.target-result-card strong {
  display: block;
  margin-top: 4px;
  color: var(--violet-2);
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 17px;
}

.target-results .target-message {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 11px;
}

.target-arrow {
  align-self: center;
  color: var(--faint);
  font-size: 18px;
}

.sim-group-card {
  margin: 0 0 14px;
  padding: 18px;
}

.sim-group-card legend {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sim-group-card legend span {
  color: var(--violet-2);
}

.sim-field-grid {
  display: grid;
  gap: 12px;
}

.sim-group-card:first-child .sim-field-grid {
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
}

.sim-group-card:nth-child(2) .sim-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sim-group-card:nth-child(3) .sim-field-grid {
  grid-template-columns: 1fr 1fr 1.3fr;
  align-items: end;
}

.switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 180ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease;
}

.switch-input:checked + .switch-track {
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
}

.switch-input:checked + .switch-track::after {
  transform: translateX(18px);
}

.dividend-chart-block {
  margin-top: 2px;
  margin-bottom: 8px;
}

.sim-side-panel,
.investor-distribution {
  display: grid;
  align-content: start;
  gap: 10px;
}

.scenario-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.scenario-block strong {
  display: block;
  margin-top: 6px;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 22px;
}

.chart-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.distribution-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  display: grid;
  gap: 4px;
}

.distribution-row span,
.panel-note {
  color: var(--muted);
}

.panel-note {
  margin: 12px 0;
  font-size: 12px;
}

.panel-note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.small-select {
  width: auto;
  min-width: 180px;
}

/* ── Calendar Summary ── */
.calendar-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.cal-summary-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--surface-2);
}

.cal-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.cal-summary-card strong {
  display: block;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 22px;
  line-height: 1.1;
}

.cal-summary-total {
  border-color: rgba(124, 92, 252, 0.36);
  background:
    radial-gradient(circle at 10% 20%, rgba(124, 92, 252, 0.12), transparent 60%),
    var(--surface-2);
}

.cal-summary-total strong {
  color: var(--violet-3);
}

/* ── Calendar Grid ── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.month-card {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface-2);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.month-card:hover {
  border-color: rgba(124, 92, 252, 0.3);
}

.month-card.month-current {
  border-color: rgba(124, 92, 252, 0.5);
  box-shadow: 0 0 24px rgba(124, 92, 252, 0.1), inset 0 0 32px rgba(124, 92, 252, 0.04);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 252, 0.08), transparent 60%),
    var(--surface-2);
}

.month-card.month-empty {
  opacity: 0.55;
}

.month-card.month-empty:hover {
  opacity: 0.75;
}

/* ── Month Header ── */
.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.month-header h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
}

.month-now-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.month-total {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.month-empty .month-total {
  color: var(--faint);
}

/* ── Month Bar ── */
.month-bar-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 10px;
  overflow: hidden;
}

.month-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--violet);
  transition: width 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.month-bar-peak {
  background: linear-gradient(90deg, var(--violet), var(--violet-2));
  box-shadow: 0 0 8px rgba(124, 92, 252, 0.4);
}

/* ── Month Items ── */
.month-items {
  display: grid;
  gap: 6px;
}

.calendar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 180ms ease;
}

.calendar-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cal-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-item-info strong {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.cal-item-ratio {
  font-size: 10px;
  color: var(--faint);
  font-weight: 600;
}

.cal-item-amount {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--violet-3);
}

.cal-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.cal-empty span {
  font-size: 11px;
  color: var(--faint);
}

/* ── Calendar Frequency Badge ── */
.cal-item-freq {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(124, 92, 252, 0.15);
  color: var(--violet-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Holdings View ── */
.holdings-controls {
  display: flex;
  gap: 8px;
}

.holdings-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.hv-summary-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.hv-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hv-summary-item strong {
  display: block;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 20px;
  line-height: 1.15;
}

.hv-summary-item small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  margin-top: 2px;
}

.holdings-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hv-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface-2);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.hv-card:hover {
  border-color: rgba(124, 92, 252, 0.3);
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.08);
}

.hv-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hv-card-title strong {
  display: block;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.hv-card-title small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.hv-card-badges {
  display: flex;
  gap: 5px;
  align-items: center;
}

.hv-owner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.hv-card-value {
  margin-bottom: 12px;
}

.hv-card-value span {
  display: block;
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.hv-card-value small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.hv-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hv-card-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hv-card-metrics span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
}

.hv-card-metrics strong {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.hv-card-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.hv-card-dividend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.18);
  font-size: 11px;
  color: var(--violet-3);
  font-weight: 600;
}

.hv-div-freq {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(124, 92, 252, 0.2);
  font-size: 10px;
  font-weight: 800;
}

.hv-card-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  margin-top: 10px;
  overflow: hidden;
}

.hv-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--violet);
  min-width: 2px;
  transition: width 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.compact-toggle {
  min-height: 44px;
  white-space: nowrap;
}

.holdings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hv-list-head,
.hv-row {
  display: grid;
  grid-template-columns:
    minmax(120px, 0.72fr)
    minmax(142px, 1fr)
    minmax(128px, 0.88fr)
    minmax(82px, 0.54fr)
    minmax(146px, 0.94fr)
    minmax(78px, 0.48fr)
    minmax(146px, 0.94fr)
    minmax(118px, 0.72fr);
  align-items: center;
  gap: 12px;
}

.hv-list-head {
  padding: 0 18px 4px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hv-row {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.055), transparent 32%),
    var(--surface-2);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.hv-row:hover {
  border-color: rgba(157, 123, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(124, 92, 252, 0.095), transparent 34%),
    var(--surface-2);
  box-shadow: 0 0 22px rgba(124, 92, 252, 0.08);
}

.hv-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hv-cell strong,
.hv-cell b {
  font-family: "Space Grotesk", Pretendard, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}

.hv-cell small {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hv-owner-type {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.hv-owner-type small {
  font-size: 11px;
  font-weight: 700;
}

.hv-ticker-cell .hv-card-title strong,
.hv-money-cell strong,
.hv-profit-cell strong {
  font-size: 15px;
}

.hv-weight-cell .hv-card-bar {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 2px;
}

.hv-weight-cell .hv-card-bar-fill {
  display: block;
}

.hv-profit-cell .hv-breakeven {
  color: var(--warning);
  font-weight: 800;
}

/* 손익을 주가손익 / 환차손익으로 갈라 보여주는 줄 */
.hv-profit-cell .hv-profit-split {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-weight: 700;
  opacity: 0.85;
}

.hv-native-price {
  color: var(--faint) !important;
}

.hv-dividend-cell {
  gap: 4px;
}

.hv-dividend-cell .hv-div-freq {
  width: fit-content;
}

.hv-empty-cell {
  color: var(--faint);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(157, 123, 255, 0.34);
  border-radius: 8px;
  padding: 12px 14px;
  background: #1c1c25;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.dialog-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(3, 3, 6, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--surface-2);
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 2px solid rgba(157, 123, 255, 0.36);
  outline-offset: 1px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trade-advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-2);
}

.trade-advanced[open] {
  padding-bottom: 14px;
}

.trade-advanced summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.trade-advanced summary::-webkit-details-marker {
  display: none;
}

.trade-advanced summary::before {
  content: "▸";
  margin-right: 6px;
  color: var(--violet-3);
}

.trade-advanced[open] summary::before {
  content: "▾";
}

.trade-advanced summary small {
  margin-left: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.trade-advanced > label,
.trade-advanced > .form-grid {
  margin-top: 12px;
}

.trade-preview {
  border: 1px solid rgba(157, 123, 255, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(124, 92, 252, 0.1);
  color: var(--violet-3);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

menu {
  justify-content: flex-end;
  margin: 4px 0 0;
  padding: 0;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .hero-grid,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .fx-card-grid {
    grid-template-columns: 1fr;
  }

  .fx-panel-note {
    max-width: none;
    text-align: left;
  }

  .crypto-panel .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card {
    min-height: 0;
  }

  .sparkline {
    min-height: 96px;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-3,
  .span-7,
  .span-8 {
    grid-column: 1 / -1;
  }

  .sim-control-groups,
  .dividend-layout,
  .sim-result-sub,
  .target-dividend-card,
  .target-results,
  .calendar-grid,
  .calendar-summary,
  .investor-columns {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-summary,
  .holdings-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hv-list-head {
    display: none;
  }

  .hv-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .holdings-controls {
    flex-direction: column;
  }

  .sim-group-card:first-child .sim-field-grid,
  .sim-group-card:nth-child(2) .sim-field-grid,
  .sim-group-card:nth-child(3) .sim-field-grid {
    grid-template-columns: 1fr;
  }

  .panel-note-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .investor-toolbar {
    display: grid;
    align-items: stretch;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hv-row {
    grid-template-columns: 1fr;
  }

  .hv-owner-type {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .donut-area {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .donut {
    width: min(220px, 72vw);
  }

  .topbar {
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions button {
    flex: 1;
  }

  .status-pill {
    width: 100%;
    justify-content: center;
  }

  .metric-stack,
  .mini-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .investor-donut-area {
    align-items: center;
    flex-direction: column;
  }

  h1 {
    font-size: 24px;
  }

  .hero-card {
    min-height: auto;
    padding: 20px;
  }

  .delete-confirm {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .index-grid {
    margin-right: -18px;
    padding-right: 18px;
  }
}

@media (max-width: 520px) {
  .index-card {
    flex-basis: min(82vw, 300px);
  }
}

.inv-holdings-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.inv-holdings-table th {
  text-align: left;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px 9px;
  white-space: nowrap;
}

.inv-holdings-table th small {
  font-size: 9px;
  margin-left: 3px;
  opacity: 0.75;
}

.inv-holdings-table th.ih-num,
.inv-holdings-table td.ih-num {
  text-align: right;
}

.inv-holdings-table td {
  padding: 9px 6px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}

.inv-holdings-table td.ih-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.inv-holdings-table tbody tr:first-child td {
  border-top: 0;
}

.inv-holdings-table td small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.inv-holdings-table .ih-name strong {
  font-weight: 600;
}

.inv-holdings-table td.up,
.inv-holdings-table td small.up {
  color: var(--up);
}

.inv-holdings-table td.down,
.inv-holdings-table td small.down {
  color: var(--down);
}

.register-held-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(124, 92, 252, 0.12);
  border: 1px solid rgba(124, 92, 252, 0.28);
  margin: 4px 0 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink);
}

.register-held-toggle input {
  margin-top: 1px;
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
  flex-shrink: 0;
}

.register-held-toggle small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.inv-holdings-table th.ih-edit,
.inv-holdings-table td.ih-edit {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.ih-edit-btn {
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ih-edit-btn:hover {
  color: var(--ink);
  border-color: var(--violet);
}

.danger-text-button {
  background: transparent;
  color: var(--up);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-right: auto;
}

.danger-text-button:hover {
  border-color: var(--up);
}

.holding-trades-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.holding-trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.holding-trade-row strong {
  margin-right: 8px;
}

.holding-trade-row small {
  color: var(--muted);
  font-size: 12px;
}

.holding-trade-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
