/* BodhiX Portfolio · Tunes colour finish.
   Reference: public tunes.bodhix.io styles.css?v=20261020-011.
   Tunes: coral #ffb59f, cyan #a8eced, lavender #c8b2ff; Manrope;
   peach/lavender artwork, mauve collection header, plum/teal lyric card.
   Finance extension: the same spectrum across compact data surfaces.
   Loaded last. No visibility, privacy, access, or data-authority overrides. */

:root, body[data-theme="capital"] {
  --bg-primary: #0c0b14;
  --bg-secondary: #15121e;
  --bg-tertiary: #191627;
  --bg-elevated: #252037;
  --bg-card: #191623;
  --text-primary: #f7f5fb;
  --text-secondary: #b4afc3;
  --text-tertiary: #a69eaf;
  --text-muted: #a69eaf;
  --cyan: #a8eced;
  --cyan-dim: #81c8ce;
  --violet: #c8b2ff;
  --amber: #ffd3b5;
  --magenta: #edada4;
  --lime: #ffb59f;
  --lime-dim: #d69387;
  --accent: #a8eced;
  --bull: #a5dcc0;
  --bear: #f2a6b9;
  --border: #3e3547;
  --border-subtle: #302a39;
  --panel-border: #3e3547;
  --app-line: #3e3547;
  --app-muted: #b4afc3;
  --accent-rgb: 168, 236, 237;
  --accent-2-rgb: 255, 181, 159;
  --accent-3-rgb: 200, 178, 255;
  --tunes-peach: #ffb59f;
  --tunes-peach-light: #ffd3b5;
  --tunes-teal: #a8eced;
  --tunes-lavender: #c8b2ff;
  --tunes-spectrum: linear-gradient(110deg, #ffd3b5 0%, #edada4 26%, #c8b2ff 61%, #a8eced 100%);
  --tunes-action: linear-gradient(110deg, #ffd3b5 0%, #e8c8d2 46%, #a8eced 100%);
  --tunes-panel-wash: linear-gradient(112deg, #3d2b37 0%, #292337 46%, #1d363c 100%);
  --chart-start: #ffb59f;
  --chart-mid: #c8b2ff;
  --chart-end: #a8eced;
  --chart-fill-start: rgba(255, 181, 159, .18);
  --chart-fill-end: rgba(168, 236, 237, .015);
}

/* Keep the application dense; give the existing title row its Tunes wash. */
body { background: #0c0b14; }
.top-bar.glass-panel { background: #0c0b14; }
.main-content { background: #15121e; border-color: #302a39; }
.workspace-sidebar { background: #15121e; border-color: #302a39; }
.workspace-search { background: #231e2e; border-color: #44394e; }
.workspace-search svg { color: var(--tunes-peach); }
.workspace-search:hover { background: #2b2536; border-color: #86717c; }
.logo__badge { color: var(--tunes-peach); }
.sidebar-heading { color: #f6e6df; }
.sidebar-eyebrow { color: #aba1b6; }
.workspace-sidebar .nav-btn { color: #bfb5cd; }
.workspace-sidebar .nav-btn:hover { background: #ffffff08; color: #f7f5fb; }
.workspace-sidebar .nav-btn.active {
  background: linear-gradient(100deg, #ffb59f16, #c8b2ff18 54%, #a8eced0b);
  color: #f6ecff;
  box-shadow: inset 2px 0 var(--tunes-peach);
}
.workspace-sidebar .nav-btn.active svg { color: var(--tunes-peach); }
.sidebar-wallet-avatar {
  background: linear-gradient(135deg, #ffb59f27, #c8b2ff20 58%, #a8eced1a);
  color: #f2c5ba;
}
.sidebar-wallet-entry:hover { background: #a8eced08; }
.sidebar-wallet-copy > small, .sidebar-wallet-empty, .sidebar-footnote { color: #a99fb7; }
.sidebar-wallet-action { border-color: #65515f; color: #e6c4ba; }
.sidebar-wallet-action:hover { border-color: #9f827c; background: #ffb59f0a; }
.sidebar-bottom { border-top-color: #453646; }
.sidebar-bottom > a:hover { color: var(--tunes-teal); background: #a8eced09; }

.workspace-intro {
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid #6b505b;
  border-right-color: #42616a;
  border-radius: 12px;
  background: linear-gradient(106deg, #674740 0%, #483344 35%, #302b40 62%, #24434a 100%);
  box-shadow: inset 0 1px #ffe0cf13;
}
.workspace-intro h1 { color: #fff4ed; }
.workspace-intro h1::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 3px;
  margin-left: 14px;
  border-radius: 3px;
  vertical-align: middle;
  background: var(--tunes-spectrum);
}
.workspace-intro .workspace-view-status { color: #d7c7d0; }
.workspace-intro p:not(.workspace-eyebrow) { color: #d3c2cc; }

/* One quiet spectrum per data strip; semantically positive/negative text survives. */
.metric-grid, .rewards-grid, .terminal-stats {
  border-color: #72545c;
  border-right-color: #45636b;
  border-top-color: #b68b81;
  background: linear-gradient(108deg, #60443f 0%, #493544 31%, #343347 59%, #264c50 100%);
}
body .metric-grid .metric-tile[data-accent],
body .terminal-stats .metric-tile[data-accent],
body #page-staking .reward-card[data-accent] {
  position: relative;
  border-right-color: #dfc3d01c;
  background: transparent;
}
body .metric-grid .metric-tile[data-accent]:hover,
body #page-staking .reward-card[data-accent]:hover {
  background: #fff7f506;
  border-color: #dfc3d01c;
}
body .metric-tile .metric-tile__label,
body #page-staking .reward-card__label { color: #ddcbd6; }
body #page-staking .reward-card__sub { color: #c4b8cb; }
body .metric-grid .metric-tile[data-accent] .metric-tile__icon {
  display: grid !important;
  place-items: center;
  position: absolute;
  top: 15px;
  right: 14px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 4px;
  color: var(--tunes-peach);
  background: #ffb59f10;
  border: 1px solid #ffb59f21;
  border-radius: 7px;
  box-shadow: none;
  font-size: 12px;
}
body .metric-grid .metric-tile[data-accent]:nth-child(2n) .metric-tile__icon {
  color: var(--tunes-teal);
  background: #a8eced0b;
  border-color: #a8eced20;
}
body .metric-grid .metric-tile[data-accent] .metric-tile__icon svg { width: 15px; height: 15px; }
body .metric-tile .metric-tile__label { padding-right: 24px; }
body .metric-grid .metric-tile[data-accent]:first-child .metric-tile__value:not(.val-bull):not(.val-bear) {
  color: #ffd3b5 !important;
}
body .metric-grid .metric-tile[data-accent]:last-child .metric-tile__value:not(.val-bull):not(.val-bear) {
  color: #b7efea !important;
}
.secondary-statistics > summary { color: #c7afb9; }
.secondary-statistics .metric-grid { background: linear-gradient(110deg, #35272f, #242532 60%, #20353b); }

/* Surfaces stay dark; the key chart gets the warm-to-cool treatment. */
.premium-card { border-color: #443749; background: #1c1725; }
.premium-card:hover { border-color: #65515f; }
.card-header { border-color: #443749; }
.card-title { color: #f1e9f3; }
#netWorthCard {
  border-color: #6c505b;
  border-right-color: #3e636b;
  background: linear-gradient(116deg, #362630 0%, #252333 51%, #1a333a 100%);
}
.net-worth-value { color: #ffd3b5; }
body #netWorthCard .nw-insight-chip { border-right-color: #bba1b82b; }
.nw-insight-chip__label { color: #c2adbf; }
#allocCard {
  background: radial-gradient(ellipse at 0 0, #ffb59f1b, transparent 57%), linear-gradient(145deg, #211a2b, #19272f);
  border-color: #66515f;
}
#allocCard .card-title { color: #f5c6b5; }
.desk-perf-col { background: #1c1c2b; border-color: #443749; }
.desk-action-item, .desk-perf-item { background: #26202e; border-color: #4a3c50; }
.desk-intel-badge { color: #edc6b8; background: #ffb59f0a; border-color: #69515b; }
.empty-state { border-color: #514356; background: #ffffff02; color: #b4afc3; }

/* Tunes' round cyan actions, extended through its peach artwork spectrum. */
body :is(.btn-accent, .auth-submit, .allocation-modern-empty-action) {
  color: #233039;
  background: var(--tunes-action);
  border: 1px solid #e6d2d3;
  box-shadow: 0 3px 14px #00000014;
}
body :is(.btn-accent, .auth-submit, .allocation-modern-empty-action):hover:not(:disabled) {
  color: #172b30;
  background: linear-gradient(110deg, #ffdfc7, #f1d7e3 46%, #bff6f4);
  border-color: #fff0e5;
  box-shadow: 0 4px 16px #00000024;
  transform: none;
}
body .payment-wallet-option .auth-submit {
  color: var(--tunes-teal);
  background: #a8eced08;
  border-color: #56707b;
}
.pill, .segment-btn, .btn-small, .chart-tool-btn, .desk-radar-pill, .alloc-style-btn {
  color: #bfb2cc;
  border-color: #57465d;
  background: #ffffff04;
}
.pill.active, .segment-btn.active, .desk-radar-pill.active, .alloc-style-btn.active {
  color: #ffe3d5;
  border-color: #9b7b84;
  background: linear-gradient(110deg, #ffb59f25, #c8b2ff18 57%, #a8eced17);
  box-shadow: none;
}
.glass-input, .settings-select, .mob-drawer__select { background: #171522; border-color: #5a4b63; }
.glass-input:focus, .settings-select:focus, body .auth-field .glass-input:focus {
  border-color: var(--tunes-teal);
  box-shadow: 0 0 0 2px #a8eced16;
}
.icon-btn:hover, .account-btn:hover { color: #f7ede8; background: #ffb59f0b; border-color: #9a777a; }
:focus-visible { outline-color: var(--tunes-teal); }

/* Allocation details and settings echo Tunes' plum-to-teal Words & Music card. */
body #allocCard .allocation-modern-row.is-selected {
  border-color: #ad8d9870;
  background: linear-gradient(110deg, #ffb59f16, #c8b2ff10 50%, #a8eced12);
}
.allocation-modern-row:hover { border-color: #a8eced12; background: #a8eced07; }
.allocation-modern-total { color: #ffdbca; }
.allocation-modern-detail {
  background: linear-gradient(120deg, #44303f, #303244 55%, #253c43);
  border-color: #776174;
}
.allocation-modern-detail-copy strong { color: #ffdbca; }
.allocation-modern-empty-mark {
  color: #ffd0ba;
  border-color: #aa81916b;
  background: linear-gradient(135deg, #ffb59f22, #c8b2ff17 54%, #a8eced16);
}
.allocation-modern-more { color: #d7c5d0; border-color: #695466; background: #ffb59f05; }
body :is(.auth-dialog, .onboarding-popup, .preview-modal, .pro-shot-preview__dialog),
.wallet-manager-dialog {
  border-color: #735365;
  background: radial-gradient(ellipse at 0 0, #ffb59f0d, transparent 50%),
    linear-gradient(145deg, #2c2234, #1b202c 65%, #182c33);
}
.wallet-manager-dialog #walletsCard { background: transparent; }
body .auth-dialog--account .auth-account-tab.is-active {
  color: #ffe0d0;
  background: linear-gradient(110deg, #ffb59f1c, #c8b2ff10 57%, #a8eced10);
  box-shadow: inset 2px 0 var(--tunes-peach);
}
.account-avatar { color: #2e2536; background: var(--tunes-action); border-color: #d8bbb8; }
.account-plan-pill { color: #eac4b6; background: #ffb59f0a; border-color: #765965; }
body .auth-dialog--account .payment-quote-card[data-state="ready"] {
  border-color: #8e7075;
  border-right-color: #59818a;
  background: linear-gradient(110deg, #47313b, #303041 52%, #234047);
}
body .auth-dialog--account #paymentQuoteAmount { color: #fff0e5; }
body .auth-dialog--account #authReplaceIntent { color: #edc1b4; background: #ffb59f0c; }
#paymentQuoteStatus { color: var(--tunes-teal); }
body #portfolioScoreCard { --score-orange: #ffb59f; --score-orange-bright: #ffd3b5; --score-orange-deep: #8c616a; }
body #portfolioScoreCard.score-main-locked .score-ring::before {
  background: conic-gradient(from -28deg, #ffb59f, #c8b2ff 44%, #a8eced 78%, #ffb59f);
}
body #portfolioScoreCard.score-main-locked { background: linear-gradient(130deg, #2f2230, #1b2931); }
.data-table th { color: #c4b3c5; border-bottom-color: #70525f; }
.data-table tbody tr:hover { background: #a8eced05; }
body #activityList .activity-row__icon { color: #edbaa8; background: #ffb59f0a; border-color: #70535e; }
body #activityList .activity-row--swap .activity-row__icon { color: #a8eced; background: #a8eced08; border-color: #46636f; }

@media (max-width: 768px) {
  .workspace-intro { padding: 14px 15px; margin-bottom: 16px; }
  .workspace-intro h1::after { width: 22px; margin-left: 12px; }
  .mob-header { background: #0c0b14; border-color: #453446; }
  .mob-nav { background: linear-gradient(110deg, #281d30, #1d2432 65%, #20383e); border-color: #58445f; }
  .mob-nav__btn.active { color: var(--tunes-peach); }
  .mobile-page-btn.active { color: #ffd6c0; background: #ffb59f13; border-color: #9b7b84; }
  body .metric-grid .metric-tile[data-accent] .metric-tile__icon { top: 12px; right: 10px; width: 21px; height: 21px; padding: 3px; }
  body .metric-grid .metric-tile[data-accent] .metric-tile__icon svg { width: 13px; height: 13px; }
  body .metric-tile .metric-tile__label { padding-right: 18px; }
  body .auth-dialog--account .auth-account-tab.is-active { box-shadow: inset 0 -2px var(--tunes-peach); }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-intro, .metric-grid, .premium-card { animation: none; }
}

/* Holdings: six visible summaries and one integrated asset toolbar. */
#holdingsKpiGrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
body #holdingsKpiGrid .metric-tile[data-accent] { min-width: 0; min-height: 96px; padding: 17px 18px; }
body #holdingsKpiGrid .metric-tile[data-accent] .metric-tile__value { font-size: 25px; }
body #holdingsKpiGrid .metric-tile__label { font-size: 10px; padding-right: 25px; }
body #holdingsKpiGrid .metric-tile[data-accent]:last-child { border-right: 0; }
body #page-holdings .holdings-assets-panel { padding: 0; overflow: hidden; }
#page-holdings .holdings-table-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 20px 20px 16px; }
#page-holdings .holdings-table-head__title { color: var(--text-primary); font: 750 15px/1.4 var(--font-sans); letter-spacing: -.025em; }
#page-holdings .holdings-results { color: var(--text-secondary); font: 500 11px/1.5 var(--font-sans); }
#page-holdings .holdings-tools { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0 20px 18px; border-bottom: 1px solid #443749; }
#page-holdings .holdings-search-field { position: relative; display: block; flex: 1 1 200px; max-width: 370px; min-width: 0; }
#page-holdings .holdings-search-field > svg { position: absolute; top: 13px; left: 13px; width: 16px; height: 16px; color: #c6a9b2; pointer-events: none; }
#page-holdings .holdings-tools .holdings-search { width: 100%; min-width: 0; height: 42px; padding: 9px 12px 9px 38px; margin: 0; border-radius: 9px; border: 1px solid #514254; background: #15111c; color: var(--text-primary); font: 500 12px/1.5 var(--font-sans); }
#page-holdings .holdings-tools .holdings-search:focus { border-color: #a8eced; }
#page-holdings .holdings-toggles-row { display: flex; flex-direction: row; align-items: center; gap: 18px; margin-left: auto; }
#page-holdings .holdings-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin: 0; font: 550 11px/1.4 var(--font-sans); white-space: nowrap; }
#page-holdings .holdings-tools .holdings-select { flex: 0 0 130px; width: 130px; min-width: 0; min-height: 42px; padding: 9px 12px; margin: 0; border-radius: 9px; border: 1px solid #514254; background: #211b2c; color: var(--text-primary); font: 600 11px/1.5 var(--font-sans); }
@media (max-width: 1500px) {
 #holdingsKpiGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 body #holdingsKpiGrid .metric-tile[data-accent]:nth-child(3n) { border-right: 0; }
 body #holdingsKpiGrid .metric-tile[data-accent]:nth-child(n+4) { border-top: 1px solid #dfc3d01c; }
}
@media (max-width: 1000px) {
 #page-holdings .holdings-tools { gap: 10px 14px; }
 #page-holdings .holdings-search-field { max-width: none; flex-basis: calc(100% - 145px); }
 #page-holdings .holdings-select { order: 1; }
 #page-holdings .holdings-toggles-row { order: 2; margin: 0; width: 100%; }
}
@media (max-width: 640px) {
 #holdingsKpiGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 body #holdingsKpiGrid .metric-tile[data-accent] { min-height: 90px; padding: 15px 14px; }
 body #holdingsKpiGrid .metric-tile[data-accent] .metric-tile__value { font-size: 23px; }
 body #holdingsKpiGrid .metric-tile[data-accent]:nth-child(3n) { border-right: 1px solid #dfc3d01c; }
 body #holdingsKpiGrid .metric-tile[data-accent]:nth-child(2n) { border-right: 0; }
 body #holdingsKpiGrid .metric-tile[data-accent]:nth-child(n+3) { border-top: 1px solid #dfc3d01c; }
 #page-holdings .holdings-table-head { padding: 16px 14px 12px; }
 #page-holdings .holdings-results { font-size: 10px; }
 #page-holdings .holdings-tools { padding: 0 14px 12px; gap: 7px 10px; }
 #page-holdings .holdings-tools .holdings-select { flex-basis: 110px; width: 110px; }
 #page-holdings .holdings-search-field { flex-basis: calc(100% - 125px); }
 #page-holdings .holdings-toggles-row { gap: 22px; }
}

#page-holdings .holdings-toggle .toggle-input { display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); }
#page-holdings .holdings-toggle .toggle-input:focus-visible + .toggle-switch { outline: 2px solid var(--cyan); outline-offset: 4px; }
@media (max-width: 640px) { body #holdingsKpiGrid .metric-tile__label { min-height: 28px; line-height: 1.4; } }

/* Retire the legacy phone rule that hid the minimum-value filter. */
#page-holdings .holdings-tools .holdings-select { display: block !important; width: 130px !important; }
@media (max-width: 640px) { #page-holdings .holdings-tools .holdings-select { width: 110px !important; } }

/* App links are shared by the desktop footer and mobile drawer. */
.mobile-connected-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #443749; }
.mobile-connected-links > a { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid #443749; border-radius: 9px; color: var(--text-secondary); background: #1c1725; font: 600 12px/1.4 var(--font-sans); text-decoration: none; }
.mobile-connected-links > a > svg, .mobile-connected-links > a > img { width: 18px; height: 18px; flex: 0 0 18px; }
.mobile-connected-links > a > span:last-child { margin-left: auto; color: var(--cyan); font-size: 11px; }
.mobile-connected-links > a:hover { background: #a8eced0a; color: var(--text-primary); }
.mobile-connected-links > a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
