:root {
      --rf-page: var(--rf-bg);
      --rf-page-deep: var(--rf-bg);
      --rf-page-ink: var(--rf-black);
      --rf-site-background-color: var(--rf-bg);
      --rf-site-background: var(--rf-bg);
      --rf-holdings-background: transparent;
      --rf-chrome: transparent;
      --rf-chrome-subtle: transparent;
      --rf-chrome-strong: transparent;
      --rf-chrome-border: var(--rf-border-soft);
    }

    html,
    body { height: 100%; }
	    body { background: var(--rf-site-background); }

	    .holdings-terminal {
	      width: 100%;
	      max-width: 100vw;
	      min-height: 100vh;
	      overflow-x: hidden;
	      background: transparent;
	      color: #fff;
	      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	    }
	
	    .holdings-shell {
	      max-width: none;
	      width: 100%;
	      margin: 0;
	      padding: 1.45rem 2rem 2rem;
	    }

    .holdings-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1.25rem;
      margin-bottom: 1.85rem;
    }

    .holdings-title {
      font-size: clamp(1.55rem, 2vw, 1.95rem);
      font-weight: 650;
      letter-spacing: -0.035em;
    }

    .holdings-subtitle {
      margin-top: 0.45rem;
      color: var(--dash-muted);
      font-size: 0.92rem;
    }

    .holdings-actions {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .holdings-action-btn {
      display: inline-flex;
      min-height: 2.48rem;
      align-items: center;
      justify-content: center;
      gap: 0.55rem;
      border: 1px solid var(--dash-line);
      border-radius: 0.32rem;
      padding: 0 1rem;
      color: #fff;
      font-size: 0.84rem;
      text-decoration: none;
      transition: border-color 160ms ease, background-color 160ms ease;
    }

    .holdings-action-btn:hover { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.035); }

    .holdings-action-btn--primary {
      border-color: transparent;
      background: var(--dash-purple);
      color: #fff;
    }

    .holdings-action-btn--primary:hover { background: var(--rf-accent-soft); }

    .holdings-action-btn:disabled,
    .holdings-action-btn[aria-disabled="true"] {
      cursor: not-allowed;
      border-color: rgba(148, 163, 184, 0.16);
      background: rgba(148, 163, 184, 0.08);
      color: rgba(226, 232, 240, 0.52);
    }

    .holdings-action-btn:disabled:hover,
    .holdings-action-btn[aria-disabled="true"]:hover {
      border-color: rgba(148, 163, 184, 0.16);
      background: rgba(148, 163, 184, 0.08);
    }

    .connect-lock-icon {
      position: relative;
      width: 0.82rem;
      height: 0.62rem;
      border: 1.5px solid currentColor;
      border-radius: 0.14rem;
      opacity: 0.9;
    }

    .connect-lock-icon::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 0.46rem;
      width: 0.48rem;
      height: 0.42rem;
      border: 1.5px solid currentColor;
      border-bottom: 0;
      border-radius: 0.5rem 0.5rem 0 0;
      transform: translateX(-50%);
    }

    .portfolio-selector {
      position: relative;
      min-width: min(18rem, 100%);
    }

    .portfolio-selector__button {
      display: inline-flex;
      width: 100%;
      min-height: 2.48rem;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      border: 1px solid var(--dash-line);
      border-radius: 0.32rem;
      background: rgba(255, 255, 255, 0.035);
      padding: 0 0.85rem;
      color: #fff;
      font-size: 0.84rem;
      font-weight: 650;
    }

    .portfolio-selector__menu {
      position: absolute;
      top: calc(100% + 0.45rem);
      right: 0;
      z-index: 40;
      display: none;
      width: min(22rem, calc(100vw - 2rem));
      border: 1px solid var(--dash-line);
      background: #050914;
      box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    }

    .portfolio-selector.is-open .portfolio-selector__menu { display: block; }

    .portfolio-menu-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0.7rem;
      align-items: center;
      width: 100%;
      border-bottom: 1px solid var(--dash-line);
      padding: 0.74rem 0.85rem;
      color: #fff;
      text-align: left;
    }

    .portfolio-menu-row.is-active { background: rgba(124, 77, 255, 0.12); }

    .portfolio-menu-row__meta {
      margin-top: 0.18rem;
      color: var(--dash-muted);
      font-size: 0.72rem;
    }

    .portfolio-menu-actions {
      display: grid;
      gap: 0.45rem;
      padding: 0.75rem;
    }

    .portfolio-sidebar-card {
      border-bottom: 1px solid var(--dash-line);
      margin-bottom: 1rem;
      padding-bottom: 1rem;
    }

    .portfolio-sidebar-card__name {
      color: #fff;
      font-size: 1.02rem;
      font-weight: 680;
    }

    .portfolio-sidebar-card__value {
      margin-top: 0.34rem;
      color: #fff;
      font-size: 1.38rem;
      font-weight: 720;
      letter-spacing: -0.02em;
    }

    .holdings-bottom-actions {
      grid-column: 1 / -1;
      border-top: 1px solid var(--dash-line);
      margin-top: 1.2rem;
      padding-top: 1rem;
    }

    .auth-required-modal[aria-hidden="true"] { display: none; }
    .auth-required-modal {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: grid;
      place-items: center;
      color: #fff;
    }
    .auth-required-modal__backdrop {
      position: absolute;
      inset: 0;
      border: 0;
      background: rgba(2, 6, 18, 0.78);
      backdrop-filter: blur(14px);
      z-index: 0;
    }
    .auth-required-modal__panel {
      position: relative;
      z-index: 2;
      width: min(28rem, calc(100vw - 2rem));
      border: 1px solid var(--dash-line);
      background: #050914;
      padding: 1.25rem;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
    }

    .sync-progress-fill {
      width: var(--sync-progress, 0%);
    }

    .legend-dot--0 { background: #7c4dff; }
    .legend-dot--1 { background: #22d3ee; }
    .legend-dot--2 { background: #f59e0b; }
    .legend-dot--3 { background: #2f80ff; }
    .legend-dot--4 { background: var(--rf-text-muted, #64748b); }

	    .holdings-layout {
	      display: grid;
	      grid-template-columns: 19rem minmax(0, 1fr);
	      gap: 1.55rem;
	      align-items: start;
	    }
	
	    .holdings-sidebar {
	      border-right: 1px solid var(--dash-line);
	      padding-right: 1.35rem;
	      min-width: 0;
	    }

    .holdings-sidebar-title {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      margin-bottom: 1rem;
      font-size: 0.82rem;
      font-weight: 650;
      text-transform: uppercase;
    }

    .holdings-count-pill {
      display: inline-grid;
      min-width: 1.4rem;
      height: 1.3rem;
      place-items: center;
      border-radius: 0.4rem;
      background: rgba(124, 77, 255, 0.35);
      color: #fff;
      font-size: 0.72rem;
    }

	    .connection-row {
	      display: grid;
	      grid-template-columns: minmax(0, 1fr) minmax(5.8rem, auto);
	      gap: 0.65rem;
	      align-items: start;
	      border-bottom: 1px solid var(--dash-line);
	      padding: 0.82rem 0;
	      min-width: 0;
        cursor: pointer;
        transition: background-color 160ms ease, border-color 160ms ease, padding-inline 160ms ease;
	    }

      .connection-row:hover,
      .connection-row.is-selected {
        border-color: rgba(124, 77, 255, 0.42);
        background: rgba(124, 77, 255, 0.07);
        padding-inline: 0.45rem;
      }

      .holdings-clear-filter {
        margin-left: auto;
        color: var(--dash-purple);
        font-size: 0.72rem;
        font-weight: 650;
        text-transform: none;
      }

    .connection-row__name,
    .holding-row__name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #providerRows {
      max-height: 23.6rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: none;
    }

    #providerRows::-webkit-scrollbar { display: none; }

    .connection-main {
      display: grid;
      grid-template-columns: 1.25rem minmax(0, 1fr);
      gap: 0.72rem;
      align-items: start;
      min-width: 0;
    }

    .connection-mark {
      display: inline-flex;
      width: 1.15rem;
      height: 1.15rem;
      align-items: center;
      justify-content: center;
      margin-top: 0.04rem;
      flex: 0 0 auto;
    }

    .connection-mark img,
    .connection-mark svg {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .connection-mark--brand {
      width: 1.05rem;
      height: 1.32rem;
    }

	    .connection-value {
	      color: #fff;
	      font-size: 0.82rem;
	      font-weight: 560;
	      white-space: nowrap;
	    }

    .connection-status {
      margin-top: 0.18rem;
      color: var(--dash-green);
      font-size: 0.74rem;
      line-height: 1.1;
    }

    .connection-row__meta {
      margin-top: 0.12rem;
      line-height: 1.1;
    }

    .connection-action {
      min-height: 1.8rem;
      border: 1px solid var(--dash-line);
      border-radius: 0.25rem;
      padding: 0.3rem 0.52rem;
      color: rgba(226, 232, 240, 0.78);
      font-size: 0.68rem;
    }

    .connection-add {
      display: flex;
      justify-content: center;
      gap: 0.55rem;
      padding: 1rem 0 0;
      color: var(--dash-purple);
      font-size: 0.86rem;
    }

    .connection-add.holdings-action-btn {
      min-height: 3.35rem;
      margin-top: 1rem;
      padding: 0 1rem;
      color: #fff;
      font-weight: 650;
    }

	    .holdings-content { min-width: 0; }

    .holdings-kpi-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      margin-bottom: 1.35rem;
    }

    .holdings-kpi {
      min-height: 6.45rem;
      border-right: 1px solid var(--dash-line);
      padding: 0.78rem 1.15rem;
    }

    .holdings-kpi:last-child { border-right: 0; }

    .holdings-kpi__value {
      margin-top: 0.42rem;
      color: #fff;
      font-size: 1.16rem;
      font-weight: 680;
      line-height: 1.05;
      white-space: nowrap;
    }

    .holdings-kpi__currency {
      font-size: 0.78rem;
      font-weight: 520;
      letter-spacing: 0.02em;
    }

	    .holdings-chart-grid {
	      --holdings-chart-row-height: 23rem;
	      display: grid;
	      grid-template-columns: minmax(0, 1.7fr) minmax(18.5rem, 0.8fr);
	      gap: 1.45rem;
	      align-items: stretch;
	      border-bottom: 1px solid var(--dash-line);
	      padding-bottom: 1.65rem;
	      min-width: 0;
	    }

    .holdings-chart-panel,
    .holdings-allocation-panel {
      display: flex;
      min-height: var(--holdings-chart-row-height);
      min-width: 0;
      flex-direction: column;
      border-top: 1px solid var(--dash-line);
      padding-top: 1rem;
    }

    .holdings-chart-panel {
      position: relative;
    }

    .holdings-chart-panel .dashboard-panel__head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 0.9rem;
      min-width: 0;
    }

    .holdings-chart-panel .dashboard-panel__title {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .holdings-chart-period {
      z-index: 2;
    }

    .dashboard-chart-controls {
      position: relative;
      z-index: 4;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-wrap: wrap;
      justify-content: flex-end;
      min-width: 0;
    }

    .dashboard-chart-mode {
      display: inline-flex;
      align-items: center;
      gap: 0.18rem;
      padding: 0.18rem;
      border: 1px solid var(--dash-line);
      border-radius: 0.62rem;
      background: rgba(5, 8, 22, 0.82);
    }

    .dashboard-chart-mode__button {
      border: 0;
      border-radius: 0.46rem;
      padding: 0.38rem 0.58rem;
      color: var(--dash-muted);
      font-size: 0.74rem;
      line-height: 1;
      transform: translateY(0);
      transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
    }

    .dashboard-chart-mode__button.is-active {
      background: rgba(124, 77, 255, 0.2);
      color: #fff;
      transform: translateY(-1px);
    }

    .holdings-chart {
      flex: 1;
      height: auto;
      min-height: 0;
      margin-top: -0.15rem;
      padding-top: 0;
    }

    @media (max-width: 760px) {
      .holdings-chart-panel .dashboard-panel__head {
        grid-template-columns: 1fr;
        align-items: start;
      }

      .dashboard-chart-controls {
        width: 100%;
        justify-content: flex-start;
      }
    }

	    .holdings-allocation-panel {
	      border-left: 1px solid var(--dash-line);
	      padding-left: 1.35rem;
	      min-width: 0;
	      overflow: clip;
	      container-type: inline-size;
	    }

	    .holdings-allocation-panel .allocation-body {
	      position: relative;
	      flex: 1;
	      grid-template-columns: minmax(10.5rem, 14rem) minmax(10rem, 1fr);
	      align-items: center;
	      align-content: center;
	      gap: clamp(1rem, 2vw, 1.8rem);
	      min-height: 0;
	      max-width: 100%;
	      overflow: visible;
	      padding: 0.55rem 0 0.35rem;
	      justify-items: stretch;
	    }

	    .holdings-allocation-panel .donut {
	      width: clamp(11.25rem, 18vw, 14rem);
	      max-width: calc(100% - 1rem);
        justify-self: center;
	    }

      .holdings-allocation-panel .allocation-legend {
        display: grid;
        width: 100%;
        align-content: center;
        gap: 0.62rem;
        min-width: 0;
      }

	    .holdings-allocation-panel .allocation-tooltip {
	      position: absolute;
	      top: 0.75rem;
	      right: 0.75rem;
	      min-width: min(13rem, calc(100% - 1.5rem));
	      max-width: min(15rem, calc(100% - 1.5rem));
	      display: grid;
	      gap: 0.5rem;
	      padding: 0.7rem 0.75rem;
	      border: 1px solid rgba(255, 255, 255, 0.08);
	      background: rgba(4, 8, 22, 0.94);
	      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
	      opacity: 0;
	      pointer-events: none;
	      transform: translateY(4px);
	      z-index: 5;
	      transition: opacity 160ms ease, transform 160ms ease;
	    }

	    .holdings-allocation-panel:hover .allocation-tooltip,
	    .holdings-allocation-panel:focus-within .allocation-tooltip {
	      opacity: 1;
	      transform: translateY(0);
	    }

	    .holdings-allocation-panel .legend-row {
	      display: grid;
	      grid-template-columns: 0.58rem minmax(0, 1fr) auto;
	      gap: 0.52rem;
	      align-items: center;
	      width: 100%;
	      color: rgba(226, 232, 240, 0.84);
	      font-size: 0.82rem;
	      line-height: 1.1;
	    }

      .holdings-allocation-panel .allocation-legend .legend-row {
        border-bottom: 1px solid rgba(148, 163, 184, 0.11);
        padding-bottom: 0.55rem;
      }

      .holdings-allocation-panel .allocation-legend .legend-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
      }

	    .holdings-allocation-panel .legend-label {
	      min-width: 0;
	      overflow: hidden;
	      color: rgba(226, 232, 240, 0.78);
	      text-overflow: ellipsis;
	      white-space: nowrap;
	    }

	    .holdings-allocation-panel .legend-percent {
	      color: #fff;
	      font-weight: 640;
	      white-space: nowrap;
	    }

    .holdings-transactions {
      grid-column: 1 / -1;
      padding-top: 1.55rem;
    }

    .holdings-transactions-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
    }

    .transaction-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 0.8rem;
      margin-bottom: 0.8rem;
    }

    .holdings-subtabs {
      display: flex;
      align-items: center;
      gap: clamp(2rem, 5vw, 4rem);
      border-bottom: 1px solid var(--dash-line);
      margin: 0.25rem 0 1rem;
    }

    .holdings-subtab {
      position: relative;
      padding: 0.85rem 0 0.9rem;
      color: var(--dash-muted);
      font-size: 0.95rem;
      font-weight: 620;
      transition: color 150ms ease;
    }

    .holdings-subtab.is-active {
      color: #fff;
    }

    .holdings-subtab.is-active::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: var(--dash-purple);
      box-shadow: 0 0 14px rgba(124, 77, 255, 0.45);
    }

    .holdings-tab-panel[hidden] {
      display: none;
    }

    .transaction-filter {
      min-width: 11.8rem;
      height: 2.25rem;
      border: 1px solid var(--dash-line);
      border-radius: 0.3rem;
      background: rgba(255, 255, 255, 0.01);
      color: var(--dash-muted);
      padding: 0 0.9rem;
      font-size: 0.78rem;
    }

    .transaction-filter-apply {
      height: 2.25rem;
      border: 1px solid rgba(124, 77, 255, 0.5);
      border-radius: 0.3rem;
      background: rgba(124, 77, 255, 0.18);
      color: #fff;
      padding: 0 1rem;
      font-size: 0.78rem;
      font-weight: 600;
    }

    .holdings-table-head,
    .holding-row,
    .position-row {
      display: grid;
      grid-template-columns: 1.1fr 1.45fr 0.95fr 1.25fr 0.9fr 1.1fr 1.05fr 0.65fr;
      gap: 0.9rem;
      align-items: center;
    }

    .positions-table-head,
    .position-row {
      display: grid;
      grid-template-columns:
        minmax(14rem, 1.7fr)
        minmax(8.5rem, 0.9fr)
        minmax(5.4rem, 0.48fr)
        minmax(6.2rem, 0.58fr)
        minmax(7.2rem, 0.72fr)
        minmax(9.8rem, 0.95fr);
      column-gap: clamp(0.7rem, 1.2vw, 1.25rem);
      align-items: center;
    }

    .positions-table-scroll {
      box-sizing: border-box;
      width: 100%;
      padding-right: clamp(1rem, 1.8vw, 1.75rem);
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
    }

    .positions-table-scroll::-webkit-scrollbar { display: none; }

    .holdings-table-head,
    .positions-table-head {
      border-bottom: 1px solid var(--dash-line);
      padding: 0.85rem 0;
      color: var(--dash-muted);
      font-size: 0.72rem;
      text-transform: uppercase;
    }

    .holding-row,
    .position-row {
      min-height: 3.42rem;
      border-bottom: 1px solid var(--dash-line);
      padding: 0.65rem 0;
      color: #fff;
      font-size: 0.86rem;
      font-variant-numeric: tabular-nums;
    }

    .positions-table-head > *,
    .position-row > * {
      min-width: 0;
    }

    .position-row.is-paged-out { display: none; }

    .position-row {
      cursor: pointer;
      width: 100%;
      border: 0;
      background: transparent;
      font: inherit;
      transition: background-color 160ms ease;
    }

    .position-row:hover { background: rgba(255, 255, 255, 0.025); }

    .positions-table-head > :nth-child(n+3),
    .position-row > :nth-child(n+3) {
      text-align: right;
    }

    .positions-table-head > :last-child,
    .position-row > :last-child {
      text-align: right;
    }

    .positions-table-head > :nth-child(5),
    .positions-table-head > :nth-child(6),
    .position-row > :nth-child(5),
    .position-row > :nth-child(6) {
      justify-self: end;
    }

    .positions-table-head > :nth-child(5) {
      min-width: 0;
      text-align: right;
    }

    .positions-table-head > :nth-child(6) {
      min-width: 0;
      text-align: right;
    }

    .position-value-stack {
      display: grid;
      justify-items: end;
      gap: 0.24rem;
      min-width: 0;
      width: 100%;
      text-align: right;
    }

    .position-value-main {
      display: inline-flex;
      align-items: baseline;
      justify-content: flex-end;
      gap: 0.35rem;
      min-width: 0;
      width: 100%;
      text-align: right;
    }

    .position-value-main .amount {
      color: #fff;
      font-weight: 560;
      white-space: nowrap;
    }

    .position-value-main .currency {
      color: rgba(203, 213, 225, 0.7);
      font-size: 0.72rem;
      font-weight: 520;
      white-space: nowrap;
    }

    .position-value-pnl {
      display: inline-flex;
      align-items: baseline;
      gap: 0.32rem;
      justify-content: flex-end;
      font-size: 0.72rem;
      line-height: 1.1;
      white-space: nowrap;
    }

    .position-value-pnl--positive { color: var(--app-green); }
    .position-value-pnl--negative { color: var(--app-red); }
    .position-value-pnl--flat { color: rgba(203, 213, 225, 0.76); }

    .position-value-return {
      color: currentColor;
      opacity: 0.68;
      font-size: 0.66rem;
      font-weight: 520;
    }

    .position-price {
      min-width: 0;
      width: 100%;
      text-align: right;
      justify-self: end;
    }

    .position-price .block:first-child {
      white-space: nowrap;
      font-weight: 560;
    }

    .position-price-date {
      margin-top: 0.16rem;
      color: rgba(203, 213, 225, 0.66);
      font-size: 0.71rem;
      line-height: 1.1;
      white-space: nowrap;
    }

    .holdings-watchlist-head,
    .holdings-watchlist-row {
      display: grid;
      grid-template-columns: minmax(0, 1.6fr) 0.9fr 0.8fr;
      gap: 0.75rem;
      align-items: center;
    }

    .holdings-watchlist-head {
      border-bottom: 1px solid var(--dash-line);
      padding: 0.85rem 0;
      color: var(--dash-muted);
      font-size: 0.72rem;
      text-transform: uppercase;
    }

    .holdings-watchlist-head > :nth-child(n+2),
    .holdings-watchlist-row > :nth-child(n+2) {
      text-align: right;
    }

    .holdings-watchlist-row {
      min-height: 3.35rem;
      border-bottom: 1px solid var(--dash-line);
      padding: 0.7rem 0;
      color: #fff;
      font-size: 0.84rem;
      text-decoration: none;
      transition: background-color 140ms ease, border-color 140ms ease;
    }

    a.holdings-watchlist-row:hover,
    a.holdings-watchlist-row:focus-visible {
      border-color: rgba(148, 163, 184, 0.32);
      background: rgba(148, 163, 184, 0.055);
      outline: none;
    }

    .holdings-watchlist-identity {
      display: grid;
      grid-template-columns: 1.1rem minmax(0, 1fr);
      gap: 0.65rem;
      align-items: center;
      min-width: 0;
    }

    .holdings-watchlist-empty {
      padding: 2rem 0;
      color: var(--dash-muted);
      font-size: 0.84rem;
    }

    .position-instrument {
      display: grid;
      grid-template-columns: 1.25rem minmax(0, 1fr);
      gap: 0.65rem;
      align-items: center;
      min-width: 0;
    }

    .position-flag {
      display: inline-flex;
      width: 1.1rem;
      height: 1.1rem;
      align-items: center;
      justify-content: center;
    }

    .position-flag svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .position-history-panel {
      position: fixed;
      inset: 0;
      z-index: 10050;
      isolation: isolate;
      pointer-events: none;
    }

    .position-history-panel[aria-hidden="true"] { display: none; }

    .position-history-panel__backdrop {
      position: absolute;
      inset: 0;
      z-index: 0;
      background: rgba(0, 0, 0, 0.5);
      pointer-events: auto;
    }

    .position-history-panel__body {
      position: absolute;
      top: 0;
      right: 0;
      z-index: 1;
      width: min(31rem, 100vw);
      height: 100%;
      overflow-y: auto;
      border-left: 1px solid var(--dash-line);
      background: #040816;
      padding: 1.35rem;
      pointer-events: auto;
      box-shadow: -1.5rem 0 4rem rgba(0, 0, 0, 0.28);
    }

    .position-history-x {
      position: fixed;
      top: max(1rem, env(safe-area-inset-top));
      right: max(0.85rem, env(safe-area-inset-right));
      z-index: 10060;
      display: inline-flex;
      width: 2.2rem;
      height: 2.2rem;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--dash-line);
      border-radius: 999px;
      background: rgba(4, 8, 22, 0.92);
      color: #fff;
      font-size: 1.35rem;
      line-height: 1;
    }

    @media (min-width: 861px) {
      .position-history-x {
        top: 1rem;
      }
    }

    .position-history-item {
      display: grid;
      gap: 0.55rem;
      border-bottom: 1px solid var(--dash-line);
      padding: 0.9rem 0;
      font-size: 0.84rem;
    }

    .position-history-item__grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.5rem 1rem;
      color: rgba(226, 232, 240, 0.86);
    }

    .holding-row__meta,
    .position-price-date,
    .holding-mobile-meta {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: rgba(203, 213, 225, 0.68);
      font-size: 0.74rem;
    }

    .holding-mobile-meta { display: none; }
    .holding-source,
    .holding-market,
    .holding-quantity,
    .holding-currency { color: rgba(226, 232, 240, 0.82); }
	    .holding-value { color: #fff; font-weight: 560; white-space: nowrap; }
	    .holding-menu { color: var(--dash-muted); text-align: right; }
	    .holding-row.is-paged-out,
	    .holding-row.is-filtered-out,
      .holdings-watchlist-row.is-paged-out { display: none; }

    .holdings-chart-empty {
      display: grid;
      place-items: center;
      min-height: 21rem;
      color: var(--dash-muted);
      font-size: 0.95rem;
      text-align: center;
      border-top: 1px solid var(--dash-line);
    }

    .portfolio-chart {
      position: relative;
      touch-action: pan-y;
      user-select: none;
      -webkit-user-select: none;
    }

    .portfolio-chart [data-chart-svg] {
      touch-action: pan-y;
      transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
    }

    .portfolio-chart .chart-hover-zone {
      pointer-events: all;
      touch-action: pan-y;
    }

    .portfolio-chart.is-loading [data-chart-svg] {
      opacity: 0;
    }

    .portfolio-chart.is-switching [data-chart-svg] {
      opacity: 0.42;
      filter: blur(1.5px);
      transform: translateY(0.2rem);
    }

    .portfolio-chart.is-switching .holdings-chart-loading {
      display: flex;
      opacity: 0.72;
    }

    .portfolio-chart.is-animating .chart-line {
      animation: holdingsChartLineDraw 0.48s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .portfolio-chart.is-animating .chart-area {
      animation: holdingsChartAreaIn 0.48s ease both;
    }

    .portfolio-chart.is-animating .chart-dot {
      transform-box: fill-box;
      transform-origin: center;
      animation: holdingsChartDotPop 0.44s cubic-bezier(0.18, 1.45, 0.32, 1);
    }

    .portfolio-chart.is-animating [data-chart-y-labels],
    .portfolio-chart.is-animating [data-chart-x-labels] {
      animation: holdingsChartLabelsIn 0.28s ease both;
    }

    .holdings-chart-loading {
      position: absolute;
      inset: 1.2rem 1rem 1rem;
      display: none;
      align-items: end;
      gap: 0.7rem;
      padding: 2rem 1.4rem;
      pointer-events: none;
    }

    .portfolio-chart.is-loading .holdings-chart-loading {
      display: flex;
    }

    .holdings-chart-loading span {
      flex: 1;
      min-width: 0;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(124, 60, 255, 0.16), rgba(45, 212, 191, 0.24), rgba(124, 60, 255, 0.16));
      background-size: 220% 100%;
      animation: holdingsChartSkeleton 1.2s ease-in-out infinite;
    }

    .holdings-chart-loading span:nth-child(1) { height: 36%; }
    .holdings-chart-loading span:nth-child(2) { height: 54%; animation-delay: 0.08s; }
    .holdings-chart-loading span:nth-child(3) { height: 42%; animation-delay: 0.16s; }
    .holdings-chart-loading span:nth-child(4) { height: 68%; animation-delay: 0.24s; }

    @keyframes holdingsChartSkeleton {
      0% { background-position: 0% 50%; opacity: 0.52; }
      50% { background-position: 100% 50%; opacity: 1; }
      100% { background-position: 0% 50%; opacity: 0.52; }
    }

    @keyframes holdingsChartLineDraw {
      from {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
      }
      to {
        stroke-dasharray: 1;
        stroke-dashoffset: 0;
      }
    }

    @keyframes holdingsChartAreaIn {
      from {
        opacity: 0;
        transform: translateY(0.45rem);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes holdingsChartDotPop {
      0% {
        opacity: 0;
        transform: scale(0.35);
      }
      70% {
        opacity: 1;
        transform: scale(1.25);
      }
      100% {
        opacity: 1;
        transform: scale(1);
      }
    }

    @keyframes holdingsChartLabelsIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .portfolio-chart.is-animating .chart-line,
      .portfolio-chart.is-animating .chart-area,
      .portfolio-chart.is-animating .chart-dot,
      .portfolio-chart.is-animating [data-chart-y-labels],
      .portfolio-chart.is-animating [data-chart-x-labels],
      .holdings-chart-loading span {
        animation: none;
      }
    }

	    .holdings-pagination {
	      display: flex;
	      align-items: center;
	      justify-content: flex-end;
	      gap: 0.7rem;
	      padding-top: 0.85rem;
	      color: var(--dash-muted);
	      font-size: 0.76rem;
	    }

	    .holdings-page-btn {
	      min-width: 2.2rem;
	      height: 2rem;
	      border: 1px solid var(--dash-line);
	      color: #fff;
	      transition: border-color 160ms ease, color 160ms ease;
	    }

	    .holdings-page-btn:disabled {
	      cursor: not-allowed;
	      color: rgba(138, 143, 163, 0.45);
	    }

	    .holdings-page-btn:not(:disabled):hover {
	      border-color: rgba(255, 255, 255, 0.22);
	      color: var(--dash-purple);
	    }

    .patrimoine-modal[aria-hidden="true"] { display: none; }
    .patrimoine-modal {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: grid;
      place-items: center;
      color: var(--app-text);
    }
    .patrimoine-modal__backdrop {
      position: absolute;
      inset: 0;
      border: 0;
      background: rgba(2, 6, 18, 0.84);
      backdrop-filter: blur(18px);
      z-index: 0;
    }
    .patrimoine-modal__panel {
      position: relative;
      z-index: 2;
      display: flex;
      width: min(72rem, calc(100vw - 2rem));
      height: min(86dvh, 48rem);
      max-height: min(86vh, 48rem);
      flex-direction: column;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background:
        radial-gradient(circle at 8% 0%, rgba(124, 77, 255, 0.12), transparent 28rem),
        linear-gradient(135deg, rgba(7, 12, 27, 0.98), rgba(4, 8, 22, 0.98));
      box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
    }
    .patrimoine-modal__header {
      display: flex;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding: 1.05rem 4.75rem 1rem;
      text-align: center;
    }
    .patrimoine-modal__eyebrow { display: none; }
    .patrimoine-modal__title {
      margin: 0;
      color: #ffffff;
      font-size: clamp(1.25rem, 2.4vw, 2rem);
      font-weight: 800;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }
    .patrimoine-modal__close {
      position: absolute;
      top: 0.95rem;
      right: 1rem;
      display: grid;
      height: 2.35rem;
      width: 2.35rem;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.1);
      color: rgba(255, 255, 255, 0.72);
      font-size: 1.25rem;
      line-height: 1;
      transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
    }
    .patrimoine-modal__close:hover {
      border-color: rgba(255, 255, 255, 0.22);
      background: rgba(255, 255, 255, 0.04);
      color: #ffffff;
    }
    .patrimoine-modal__body {
      display: flex;
      flex-direction: column;
      min-height: 0;
      flex: 1;
      overflow: hidden;
      padding: 0;
    }
    .workflow-progress {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 1.15rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding: 1.25rem clamp(1.2rem, 4vw, 4.5rem) 1rem;
    }
    .workflow-progress-count {
      display: none;
    }
    .workflow-progress-step {
      position: relative;
      display: grid;
      justify-items: center;
      gap: 0.6rem;
      color: rgba(138, 143, 163, 0.9);
      font-size: 0.82rem;
      font-weight: 650;
      text-align: center;
    }
    .workflow-progress-step::before {
      content: "";
      position: absolute;
      top: 1rem;
      right: calc(50% + 1.5rem);
      left: calc(-50% + 1.5rem);
      height: 2px;
      background: rgba(255, 255, 255, 0.08);
    }
    .workflow-progress-step:first-child::before,
    .workflow-progress-count + .workflow-progress-step::before { display: none; }
    .workflow-progress-step__index {
      position: relative;
      z-index: 1;
      display: grid;
      height: 2.05rem;
      width: 2.05rem;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      background: #0a1020;
      color: rgba(255, 255, 255, 0.8);
      box-shadow: 0 0 0 0 rgba(124, 77, 255, 0);
    }
    .workflow-progress-step.is-complete::before,
    .workflow-progress-step.is-active::before {
      background: linear-gradient(90deg, rgba(124, 77, 255, 0.2), rgba(124, 77, 255, 0.75));
    }
    .workflow-progress-step.is-complete .workflow-progress-step__index,
    .workflow-progress-step.is-active .workflow-progress-step__index {
      border-color: rgba(124, 77, 255, 0.9);
      background: #7c4dff;
      color: #ffffff;
      box-shadow: 0 0 22px rgba(124, 77, 255, 0.28);
    }
    .workflow-progress-step.is-active {
      color: #ffffff;
    }
    .connect-workflow-shell {
      display: grid;
      min-height: 0;
      flex: 1;
      grid-template-columns: minmax(0, 0.92fr) minmax(18rem, 0.72fr);
    }
    .connect-workflow-main {
      display: flex;
      min-width: 0;
      min-height: 0;
      flex-direction: column;
      border-right: 1px solid rgba(255, 255, 255, 0.06);
      padding: clamp(1.25rem, 3vw, 2.15rem);
    }
    .connect-workflow-aside {
      position: relative;
      display: flex;
      min-width: 0;
      flex-direction: column;
      justify-content: flex-end;
      overflow: hidden;
      padding: clamp(1.25rem, 3vw, 2.15rem);
      background:
        radial-gradient(circle at 50% 18%, rgba(124, 77, 255, 0.1), transparent 18rem),
        rgba(255, 255, 255, 0.01);
    }
    .connect-workflow-aside::before {
      content: "";
      position: absolute;
      inset: 2rem;
      border: 1px solid rgba(255, 255, 255, 0.025);
      opacity: 0.55;
    }
    .connect-workflow-security {
      position: relative;
      max-width: 21rem;
      align-self: center;
      color: rgba(167, 139, 250, 0.88);
      font-size: 0.98rem;
      font-weight: 650;
      line-height: 1.45;
      text-align: center;
    }
    .patrimoine-workflow {
      display: flex;
      min-height: 0;
      flex: 1;
      flex-direction: column;
    }
    .workflow-step {
      display: none;
      min-height: 0;
      overflow: hidden;
      border: 0;
      background: transparent;
    }
    .workflow-step[open] {
      display: flex;
      flex: 1;
      flex-direction: column;
    }
    .workflow-step[data-locked="true"] .workflow-toggle {
      cursor: not-allowed;
      opacity: 0.52;
    }
    .workflow-step:not([open]) .workflow-chevron { transform: rotate(0deg); }
    .workflow-step[open] .workflow-chevron { transform: rotate(180deg); }
    .workflow-step summary { list-style: none; }
    .workflow-step summary::-webkit-details-marker,
    #connectWorkflow summary::-webkit-details-marker { display: none; }
    .workflow-toggle {
      display: flex;
      width: 100%;
      cursor: default;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0 0 1rem;
      text-align: left;
      pointer-events: none;
    }
    .workflow-toggle .text-sm {
      font-size: clamp(1.25rem, 2vw, 1.75rem);
      line-height: 1.12;
      font-weight: 800;
    }
    .workflow-toggle .text-xs {
      max-width: 32rem;
      font-size: 0.92rem;
      line-height: 1.45;
      color: rgba(203, 213, 225, 0.78);
    }
    .workflow-chevron {
      display: none;
    }
    .workflow-body {
      display: flex;
      height: clamp(18rem, calc(86dvh - 16rem), 28rem);
      min-height: 0;
      flex: 0 1 auto;
      flex-direction: column;
      overflow: hidden;
      padding: 0 0 1rem;
    }
    .provider-search-grid {
      display: grid;
      gap: 0.65rem;
    }
    .provider-list {
      display: grid;
      min-height: 0;
      flex: 1;
      align-content: start;
      gap: 0.45rem;
      overflow-y: auto;
      padding-right: 0.25rem;
    }
    .provider-card {
      display: grid;
      min-height: 4.15rem;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 0.75rem;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(255, 255, 255, 0.035);
      padding: 0.75rem;
      text-align: left;
      transition: border-color 150ms ease, background-color 150ms ease;
    }
    .provider-card:hover {
      border-color: rgba(124, 77, 255, 0.5);
      background: rgba(124, 77, 255, 0.08);
    }
    .provider-card[data-selected="true"] {
      border-color: rgba(124, 77, 255, 0.75);
      background: rgba(124, 77, 255, 0.14);
    }
    .provider-card__name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: #ffffff;
      font-size: 0.9rem;
      font-weight: 600;
    }
    .provider-card__meta {
      margin-top: 0.2rem;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: rgba(203, 213, 225, 0.78);
      font-size: 0.78rem;
    }
    .provider-card__action {
      color: rgba(203, 213, 225, 0.78);
      font-size: 0.65rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
    }
    .modal-step-action {
      z-index: 5;
      margin: auto 0 0;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      background: transparent;
      padding: 0.9rem 0 0.35rem;
    }
    .workflow-primary-btn,
    .workflow-secondary-btn {
      min-height: 2.5rem;
      padding: 0.55rem 1rem;
      font-size: 0.875rem;
    }
    .workflow-primary-btn {
      border: 1px solid rgba(124, 77, 255, 0.82);
      background: #7c4dff;
      color: #ffffff;
      font-weight: 500;
    }
    .workflow-primary-btn:disabled {
      cursor: not-allowed;
      border-color: rgba(124, 77, 255, 0.36);
      background: rgba(124, 77, 255, 0.16);
      color: rgba(236, 231, 255, 0.72);
    }
    .workflow-secondary-btn {
      border: 1px solid rgba(148, 163, 184, 0.22);
      color: #ffffff;
    }
    #continueToLogin {
      width: 100%;
    }

    @media (max-width: 760px) {
      .patrimoine-modal {
        align-items: end;
      }
      .patrimoine-modal__panel {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
      }
      .patrimoine-modal__header {
        padding: 0.85rem 3.75rem 0.85rem;
      }
      .patrimoine-modal__title {
        font-size: 0.88rem;
        letter-spacing: 0;
        text-transform: none;
      }
      .patrimoine-modal__close {
        top: 0.6rem;
        right: auto;
        left: 0.55rem;
        border: 0;
        background: transparent;
        font-size: 0;
      }
      .patrimoine-modal__close::before {
        content: "‹";
        font-size: 1.85rem;
        color: #ffffff;
      }
      .workflow-progress {
        grid-template-columns: 3.8rem repeat(4, minmax(0, 1fr));
        align-items: center;
        gap: 0.52rem;
        overflow: visible;
        padding: 1rem 1rem 0.75rem;
      }
      .workflow-progress::-webkit-scrollbar { display: none; }
      .workflow-progress-count {
        display: block;
        color: rgba(203, 213, 225, 0.86);
        font-size: 0.77rem;
        line-height: 1;
      }
      .workflow-progress-step {
        gap: 0;
      }
      .workflow-progress-step span:not(.workflow-progress-step__index) {
        display: none;
      }
      .workflow-progress-step::before {
        top: 0.34rem;
        right: calc(50% + 0.5rem);
        left: calc(-50% + 0.5rem);
      }
      .workflow-progress-step__index {
        width: 0.7rem;
        height: 0.7rem;
        color: transparent;
        font-size: 0;
      }
      .connect-workflow-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        overflow: hidden;
      }
      .connect-workflow-main {
        border-right: 0;
        overflow: hidden;
        padding: 0.9rem 1rem 1rem;
      }
      .connect-workflow-aside {
        display: none;
      }
      .connect-workflow-security {
        max-width: none;
        font-size: 0.86rem;
      }
      .workflow-toggle {
        padding-bottom: 0.85rem;
      }
      .workflow-toggle .text-sm {
        font-size: 1.28rem;
        line-height: 1.17;
      }
      .workflow-toggle .text-xs {
        font-size: 0.82rem;
      }
      .workflow-body {
        height: calc(100dvh - 11.5rem);
      }
      .provider-search-grid {
        gap: 0.5rem;
      }
      .provider-list {
        order: 3;
        min-height: 0;
        flex: 1 1 auto;
        gap: 0;
        overflow-y: auto;
        padding-right: 0;
        padding-bottom: 0.75rem;
      }
      .provider-card {
        min-height: 3.95rem;
        border-width: 0 0 1px;
        background: transparent;
        padding: 0.58rem 0;
      }
      .provider-card[data-selected="true"],
      .provider-card:hover {
        background: transparent;
      }
      .provider-card__action {
        font-size: 0;
        letter-spacing: 0;
      }
      .provider-card__action::before {
        content: "›";
        color: rgba(255, 255, 255, 0.85);
        font-size: 1.25rem;
      }
      .modal-step-action {
        position: static;
        order: 2;
        flex: 0 0 auto;
        margin: 0.75rem 0 0;
        border-top: 0;
        background: transparent;
        padding: 0;
      }
      .workflow-primary-btn,
      .workflow-secondary-btn {
        width: 100%;
      }
    }

	    @media (max-width: 1180px) {
	      .holdings-layout { grid-template-columns: 1fr; }
      .holdings-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--dash-line);
        padding-right: 0;
        padding-bottom: 1.35rem;
      }
	      #providerRows {
	        display: grid;
	        grid-template-columns: repeat(2, minmax(0, 1fr));
	        gap: 0 1.25rem;
	        max-height: 23.6rem;
	      }
	      .holdings-chart-grid {
	        --holdings-chart-row-height: 20.5rem;
	        grid-template-columns: 1fr;
	      }
	      .holdings-allocation-panel {
	        border-left: 0;
          min-height: 15.75rem;
	        padding-left: 0;
	      }
	      .holdings-allocation-panel .allocation-body {
	        grid-template-columns: minmax(10rem, 12rem) minmax(0, 18rem);
	        justify-content: center;
	        gap: 1.25rem;
	      }
	      .holdings-allocation-panel .donut {
	        width: min(12rem, 34vw);
	      }
	    }

	    @media (max-width: 860px) {
	      .holdings-shell { padding: 1.2rem 1rem calc(9rem + env(safe-area-inset-bottom)); }
	      .holdings-chart-grid { --holdings-chart-row-height: 19.5rem; }
      .holdings-title {
        font-size: var(--rf-font-page-title-mobile);
        line-height: var(--rf-leading-page-title);
        letter-spacing: -0.02em;
      }
      .holdings-subtitle {
        font-size: var(--rf-font-body);
        line-height: 1.55;
      }
      .holdings-head,
      .holdings-actions { flex-direction: column; align-items: stretch; }
      .holdings-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .holdings-kpi:nth-child(2n) { border-right: 0; }
      .holdings-kpi:nth-child(n + 3) { border-top: 1px solid var(--dash-line); }
      #providerRows { grid-template-columns: 1fr; }
      .holdings-table-head { display: none; }
      .holding-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem 1rem;
      }
      .holding-row .holding-source,
      .holding-row .holding-market,
      .holding-row .holding-quantity,
      .holding-row .holding-currency,
      .holding-row .holding-menu { display: none; }
	      .holding-mobile-meta { display: block; grid-column: 1 / -1; }
	    }

    @media (max-width: 760px) {
      .holdings-transactions-head {
        align-items: flex-start;
        gap: 0.75rem;
      }

      .holdings-transactions-head .rf-invest-link {
        max-width: 12rem;
        text-align: right;
        line-height: 1.25;
      }

      .positions-table-head { display: none; }
      .holdings-watchlist-head { display: none; }

      .positions-table-scroll {
        overflow: visible;
      }

      .position-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.18rem 0.85rem;
        min-height: 0;
        padding: 0.82rem 0;
        font-size: 0.92rem;
        min-width: 0;
      }

      .position-instrument {
        grid-column: 1;
        grid-row: 1 / span 2;
        grid-template-columns: 1.05rem minmax(0, 1fr);
        gap: 0.55rem;
      }

      .position-flag {
        width: 0.92rem;
        height: 0.92rem;
      }

      .position-instrument .holding-row__name {
        max-width: clamp(9rem, 42vw, 16rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.94rem;
      }

      .position-instrument .holding-row__meta {
        max-width: clamp(9rem, 42vw, 16rem);
      }

      .holding-source,
      .holding-quantity,
      .position-cost,
      .position-price,
      .holding-currency {
        display: none;
      }

      .position-value-stack {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        justify-self: end;
        line-height: 1.15;
      }

      .position-value-main {
        justify-content: flex-end;
      }

      .position-value-pnl {
        text-align: right;
      }

      .position-history-panel {
        z-index: 10050;
      }

      .position-history-panel__backdrop {
        background: rgba(0, 0, 0, 0.62);
      }

      .position-history-panel__body {
        top: max(0.75rem, env(safe-area-inset-top));
        right: 0.65rem;
        bottom: 0.75rem;
        width: calc(100vw - 1.3rem);
        height: auto;
        border: 1px solid var(--dash-line);
        border-radius: 0.7rem;
        padding: 1rem;
      }

      .position-history-panel__body > .flex {
        position: sticky;
        top: -1rem;
        z-index: 2;
        margin: -1rem -1rem 0;
        padding: 1rem;
        background: #040816;
      }

      .position-history-item__grid {
        grid-template-columns: 1fr 1fr;
      }

      .holdings-watchlist-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.28rem 0.85rem;
      }

      .holdings-watchlist-row > :nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        justify-self: end;
        white-space: nowrap;
      }

      .holdings-watchlist-row > :nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 0.78rem;
        white-space: nowrap;
      }
    }

	    @media (max-width: 520px) {
	      .holdings-shell { padding-inline: 0.85rem; }
	      .holdings-kpi-grid { grid-template-columns: 1fr; }
	      .holdings-kpi {
	        border-right: 0;
	        border-top: 1px solid var(--dash-line);
	      }
	      .holdings-kpi:first-child { border-top: 0; }
	      .holdings-allocation-panel .allocation-body {
	        grid-template-columns: 1fr;
	        gap: 1.1rem;
	        min-height: auto;
	        padding-inline: 0.25rem;
	      }
	      .holdings-allocation-panel .donut {
	        width: min(12.25rem, 76vw);
	      }
        .holdings-allocation-panel .allocation-legend {
          max-width: min(100%, 20rem);
          justify-self: center;
        }
	      .transaction-filter { min-width: 100%; }

      .holdings-transactions-head {
        align-items: flex-start;
        gap: 0.75rem;
      }

      .holdings-transactions-head .rf-invest-link {
        max-width: 12rem;
        text-align: right;
        line-height: 1.25;
      }

      .positions-table-head { display: none; }

      .position-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.18rem 0.85rem;
        min-height: 0;
        padding: 0.82rem 0;
        font-size: 0.92rem;
      }

      .position-instrument {
        grid-column: 1;
        grid-row: 1 / span 2;
        grid-template-columns: 1.05rem minmax(0, 1fr);
        gap: 0.55rem;
      }

      .position-flag {
        width: 0.92rem;
        height: 0.92rem;
      }

      .position-instrument .holding-row__name {
        max-width: 9.7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.94rem;
      }

      .position-instrument .holding-row__meta {
        max-width: 9.7rem;
      }

      .holding-source,
      .holding-quantity,
      .position-cost,
      .holding-currency {
        display: none;
      }

      .position-market-value {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        justify-self: end;
        font-size: 0.95rem;
        line-height: 1.15;
        white-space: nowrap;
      }

      .position-pnl {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 0.82rem;
        line-height: 1.15;
        white-space: nowrap;
      }

      .position-history-panel {
        z-index: 10050;
      }

      .position-history-panel__backdrop {
        background: rgba(0, 0, 0, 0.62);
      }

      .position-history-panel__body {
        top: max(0.75rem, env(safe-area-inset-top));
        right: 0.65rem;
        bottom: 0.75rem;
        width: calc(100vw - 1.3rem);
        height: auto;
        border: 1px solid var(--dash-line);
        border-radius: 0.7rem;
        padding: 1rem;
      }

      .position-history-panel__body > .flex {
        position: sticky;
        top: -1rem;
        z-index: 2;
        margin: -1rem -1rem 0;
        padding: 1rem;
        background: #040816;
      }

      .position-history-panel__body .holdings-action-btn {
        min-width: 2.35rem;
        width: 2.35rem;
        height: 2.35rem;
        padding: 0;
        overflow: hidden;
        color: transparent;
      }

      .position-history-panel__body .holdings-action-btn::before {
        content: "×";
        color: #fff;
        font-size: 1.35rem;
        line-height: 1;
      }

      .position-history-item__grid {
        grid-template-columns: 1fr 1fr;
      }
	    }

    @media (max-width: 1023px) {
      main.holdings-shell {
        padding-bottom: calc(9rem + env(safe-area-inset-bottom)) !important;
      }

      .holdings-bottom-actions {
        margin-bottom: 0;
      }
    }

    @media (min-width: 761px) and (max-width: 1023px) {
      .positions-table-head,
      .position-row {
        grid-template-columns:
          minmax(12rem, 1.45fr)
          minmax(6.5rem, 0.68fr)
          minmax(4rem, 0.38fr)
          minmax(5.1rem, 0.48fr)
          minmax(6.25rem, 0.58fr)
          minmax(8.4rem, 0.76fr);
        column-gap: 0.55rem;
      }

      .position-value-main {
        gap: 0.26rem;
      }
    }

    @media (min-width: 1280px) {
      .provider-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 760px) {
      .holdings-terminal {
        background:
          radial-gradient(circle at 86% 7%, rgba(124, 77, 255, 0.11), transparent 16rem),
          radial-gradient(circle at 8% 42%, rgba(45, 212, 191, 0.055), transparent 16rem),
          var(--rf-bg);
      }

      .holdings-shell {
        padding: 0.82rem 1.1rem calc(6.4rem + env(safe-area-inset-bottom));
      }

      .holdings-head {
        display: block;
        margin: 0 0 0.95rem;
      }

      .holdings-head > div:first-child {
        display: none;
      }

      .holdings-actions,
      .portfolio-selector {
        width: 100%;
      }

      .portfolio-selector__button {
        min-height: 2.58rem;
        border-color: rgba(255, 255, 255, 0.11);
        border-radius: 0.38rem;
        background: rgba(255, 255, 255, 0.045);
        padding-inline: 0.88rem;
        font-size: 0.86rem;
      }

      .portfolio-selector__menu {
        right: auto;
        left: 0;
        width: 100%;
      }

      .holdings-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
      }

      .holdings-sidebar,
      .holdings-content,
      .holdings-chart-grid {
        display: contents;
      }

      .portfolio-sidebar-card,
      .holdings-bottom-actions {
        display: none;
      }

      .holdings-kpi-grid {
        order: 1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 0.75rem;
        border: 0;
        margin: 0 0 0.34rem;
      }

      .holdings-kpi {
        min-height: 0;
        border: 0;
        padding: 0;
      }

      .holdings-kpi:nth-child(n + 3) {
        display: none;
      }

      .holdings-kpi:first-child .dashboard-stat__label {
        color: rgba(226, 232, 240, 0.76);
        font-size: 0.76rem;
        font-weight: 520;
        letter-spacing: 0;
        text-transform: none;
      }

      .holdings-kpi:first-child .holdings-kpi__value {
        margin-top: 0.42rem;
        font-size: clamp(1.34rem, 6.2vw, 1.82rem);
        font-weight: 650;
        letter-spacing: -0.03em;
      }

      .holdings-kpi:first-child .holdings-kpi__currency {
        margin-left: 0.28rem;
        font-size: 0.76rem;
      }

      .holdings-kpi:first-child .mt-2,
      .holdings-kpi:nth-child(2) [data-period-gain-label] {
        display: none;
      }

      .holdings-kpi:nth-child(2) {
        justify-self: end;
        padding-bottom: 0.12rem;
        text-align: right;
      }

      .holdings-kpi:nth-child(2) [data-period-gain-value] {
        margin-top: 0;
        font-size: 0.9rem;
        font-weight: 650;
      }

      .holdings-kpi:nth-child(2) [data-period-gain-value] .holdings-kpi__currency {
        font-size: 0.66rem;
      }

      .holdings-kpi:nth-child(2) [data-period-gain-percent] {
        margin: 0.2rem 0 0;
        font-size: 0.78rem;
        font-weight: 650;
        line-height: 1;
      }

      .holdings-chart-panel {
        order: 2;
        display: flex;
        min-height: 0;
        border-top: 0;
        padding-top: 0;
      }

      .holdings-chart-panel .dashboard-panel__title {
        display: none;
      }

      .holdings-chart-panel .dashboard-panel__head {
        order: 2;
        display: block;
        margin-top: 0.45rem;
      }

      .holdings-chart-panel .dashboard-chart-controls,
      .holdings-chart-period {
        width: 100%;
      }

      .holdings-chart-panel .dashboard-chart-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
      }

      .holdings-chart-panel .dashboard-chart-mode {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        border-radius: 0.42rem;
        padding: 0.16rem;
      }

      .holdings-chart-panel .dashboard-chart-mode__button {
        min-height: 2rem;
        border-radius: 0.34rem;
        padding: 0;
        font-size: 0.72rem;
        font-weight: 560;
      }

      .holdings-chart-panel .dashboard-period {
        display: none;
      }

      .holdings-chart-panel .dashboard-period-menu {
        position: static;
        display: flex;
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        gap: 0.25rem;
        border: 0;
        background: transparent;
        padding: 0;
      }

      .holdings-chart-panel .dashboard-period-option {
        display: inline-flex;
        flex: 1 1 0;
        min-width: 0;
        min-height: 2rem;
        align-items: center;
        justify-content: center;
        border-radius: 0.38rem;
        padding: 0;
        color: rgba(226, 232, 240, 0.74);
        font-size: 0.72rem;
        font-weight: 560;
        text-align: center;
      }

      .holdings-chart-panel .dashboard-period-option.is-active {
        background: rgba(124, 77, 255, 0.42);
        color: #fff;
      }

      .holdings-chart {
        order: 1;
        height: clamp(14.2rem, 56vw, 16.8rem);
        min-height: clamp(14.2rem, 56vw, 16.8rem);
        margin-top: 0.15rem;
      }

      .holdings-chart [data-chart-svg] {
        height: 100%;
      }

      .holdings-chart-loading {
        inset: 0.7rem 0.2rem 0.4rem;
      }

      .holdings-allocation-panel {
        order: 3;
        min-height: 0;
        border-top: 1px solid var(--dash-line);
        border-left: 0;
        margin-top: 1.45rem;
        padding: 1.22rem 0 1.35rem;
      }

      .holdings-allocation-panel .dashboard-panel__head {
        margin-bottom: 0.75rem;
      }

      .holdings-allocation-panel .dashboard-panel__title,
      .holdings-transactions-head .dashboard-panel__title {
        color: #fff;
        font-size: 0.98rem;
        font-weight: 650;
        letter-spacing: -0.02em;
        line-height: 1.18;
        text-transform: none;
      }

      .holdings-allocation-panel .allocation-body {
        display: grid;
        grid-template-columns: minmax(7.8rem, 46%) minmax(0, 1fr);
        gap: 0.9rem;
        align-items: center;
        padding: 0;
      }

      .holdings-allocation-panel .donut {
        width: min(11rem, 42vw);
        max-width: 100%;
      }

      .holdings-allocation-panel .allocation-legend {
        gap: 0.52rem;
      }

      .holdings-allocation-panel .legend-row {
        grid-template-columns: 0.5rem minmax(0, 1fr) auto;
        gap: 0.46rem;
        border-bottom: 0;
        padding-bottom: 0;
        font-size: 0.74rem;
      }

      .holdings-sidebar-title {
        order: 4;
        margin: 0;
        border-top: 1px solid var(--dash-line);
        padding-top: 1.25rem;
        font-size: 0.98rem;
        font-weight: 650;
        letter-spacing: -0.02em;
        text-transform: none;
      }

      .holdings-count-pill {
        min-width: 1.28rem;
        height: 1.22rem;
        border-radius: 0.38rem;
        font-size: 0.68rem;
      }

      #providerRows {
        order: 5;
        display: block;
        max-height: none;
        overflow: visible;
      }

      .connection-row {
        position: relative;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.65rem;
        min-height: 0;
        padding: 0.72rem 0;
      }

      .connection-row:hover,
      .connection-row.is-selected {
        background: transparent;
        padding-inline: 0;
      }

      .connection-main {
        grid-template-columns: 2.15rem minmax(0, 1fr);
        gap: 0.72rem;
        align-items: center;
      }

      .connection-mark {
        width: 2rem;
        height: 2rem;
        border-radius: 0.28rem;
        background: transparent;
      }

      .connection-mark--brand {
        width: 2rem;
        height: 2rem;
        background: transparent;
      }

      .connection-mark--brand img {
        width: 1.15rem;
        height: 1.45rem;
        object-fit: contain;
      }

      .connection-row__name {
        font-size: 0.82rem;
        font-weight: 640;
      }

      .connection-row__meta {
        margin-top: 0.16rem;
        font-size: 0.72rem;
      }

      .connection-value {
        font-size: 0.78rem;
      }

      .connection-status {
        position: static;
        display: inline-flex;
        align-items: center;
        gap: 0.28rem;
        margin-top: 0.18rem;
        color: var(--dash-green);
        font-size: 0.68rem;
        line-height: 1;
      }

      .connection-status::before {
        content: none;
      }

      .connection-action,
      .connection-add {
        display: none;
      }

      .holdings-transactions {
        order: 6;
        border-top: 1px solid var(--dash-line);
        padding-top: 1.15rem;
      }

      .holdings-transactions-head {
        margin-bottom: 0.55rem;
      }

      .holdings-transactions-head .dashboard-panel__title {
        font-size: 0.98rem;
      }

      .holdings-subtabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        border-bottom: 1px solid var(--dash-line);
        margin: 0 0 0.75rem;
      }

      .holdings-subtab {
        min-height: 2.5rem;
        padding: 0;
        font-size: 0.78rem;
        text-align: left;
      }

      .transaction-filters,
      .holdings-table-head {
        display: none;
      }

      .holding-row {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        gap: 0.12rem 0.48rem;
        min-height: 0;
        padding: 0.54rem 0;
        font-size: 0.78rem;
      }

      .holding-row > :nth-child(1) {
        grid-column: 1;
        grid-row: 2;
        color: rgba(226, 232, 240, 0.76);
        font-size: 0.72rem;
        white-space: nowrap;
      }

      .holding-row > :nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        margin-left: 0;
        font-size: 0.72rem;
        white-space: nowrap;
      }

      .holding-row > :nth-child(4) {
        grid-column: 1 / 4;
        grid-row: 1;
        min-width: 0;
        padding-top: 0;
      }

      .holding-row > :nth-child(4) .holding-row__name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .holding-row > :nth-child(4) .holding-row__meta {
        display: none;
      }

      .holding-row > :nth-child(2) {
        display: none;
      }

      .holding-row > :nth-child(7) {
        grid-column: 4;
        grid-row: 1;
        align-self: start;
        justify-self: end;
        white-space: nowrap;
      }

      .holding-row > :nth-child(2),
      .holding-row > :nth-child(5),
      .holding-row > :nth-child(6),
      .holding-row > :nth-child(8),
      .holding-mobile-meta {
        display: none;
      }

      .holdings-pagination {
        justify-content: flex-end;
        gap: 0.55rem;
        padding-top: 0.72rem;
      }

      .holdings-page-btn {
        min-width: 1.9rem;
        height: 1.78rem;
      }

      .position-row {
        gap: 0.1rem 0.7rem;
        padding: 0.54rem 0;
        font-size: 0.78rem;
      }

      .position-instrument {
        gap: 0.48rem;
      }

      .position-instrument .holding-row__name {
        font-size: 0.82rem;
      }

      .position-instrument .holding-row__meta,
      .position-value-pnl,
      .position-price-date {
        font-size: 0.68rem;
      }

      .holdings-watchlist-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 0.08rem 0.7rem;
        min-height: 0;
        padding: 0.48rem 0;
        font-size: 0.78rem;
      }

      .holdings-watchlist-identity {
        grid-column: 1;
        grid-row: 1 / span 2;
        gap: 0.48rem;
      }

      .holdings-watchlist-row > :nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
        justify-self: end;
      }

      .holdings-watchlist-row > :nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 0.68rem;
      }

      .holdings-allocation-panel .allocation-tooltip {
        display: none;
      }
    }

    @container (min-width: 23rem) {
      .holdings-allocation-panel .allocation-body {
        grid-template-columns: minmax(10.5rem, 14rem) minmax(9rem, 1fr);
        justify-items: stretch;
      }

      .holdings-allocation-panel .allocation-legend {
        display: grid;
      }

      .holdings-allocation-panel .allocation-tooltip {
        display: none;
      }
    }

    @container (max-width: 22.99rem) and (min-width: 18rem) {
      .holdings-allocation-panel .allocation-body {
        grid-template-columns: 1fr;
        justify-items: center;
      }

      .holdings-allocation-panel .allocation-legend {
        display: none;
      }

      .holdings-allocation-panel .allocation-tooltip {
        display: grid;
        right: 0.5rem;
        max-width: min(18rem, calc(100% - 1rem));
      }
    }

    @container (max-width: 17.99rem) {
      .holdings-allocation-panel .allocation-body {
        grid-template-columns: 1fr;
        justify-items: center;
      }

      .holdings-allocation-panel .allocation-legend {
        display: grid;
        width: min(100%, 18rem);
        justify-self: center;
      }

      .holdings-allocation-panel .allocation-tooltip {
        display: none;
      }
    }
