/* Review refinements */

.sidebar {
  padding-top: 34px;
}

.sidebar nav {
  width: 100%;
}

.sidebar .nav-label {
  margin-top: 0;
}

.sidebar .explore-label {
  margin-top: 31px;
}

.nav-icon {
  width: 21px;
  flex: 0 0 21px;
  text-align: center;
  font-size: 21px;
  line-height: 1;
  color: currentColor;
}

.asset-name-clean {
  gap: 0;
}

.asset-name-clean strong {
  font-size: 14px;
}

.wealth-heading {
  align-items: flex-start;
}

.wealth-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calculation-note {
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #8b92a4;
  font-size: 12px;
  line-height: 1.7;
}

.holdings-heading {
  align-items: center;
}

.holdings-heading > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.performance-columns table {
  min-width: 1040px;
}

.full-columns table {
  min-width: 1880px;
}

.full-columns th,
.full-columns td {
  padding-inline: 15px;
}

.valuation-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.valuation-cell > i {
  display: block;
  width: 54px;
  height: 5px;
  border-radius: 6px;
  overflow: hidden;
  background: #ececf4;
}

.valuation-cell > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #776bd6;
}

.allocation-section {
  margin-top: 25px;
}

.allocation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 16px;
}

.allocation-toolbar h2 {
  font-size: 19px;
}

.allocation-toolbar p {
  margin-top: 5px;
  color: #8991a4;
  font-size: 13px;
}

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

.allocation-total {
  margin: -3px 0 4px;
  color: #30384d;
  font-size: 24px;
  font-weight: 750;
}

.allocation-total small {
  color: #949bad;
  font-size: 12px;
  font-weight: 500;
}

.allocation-breakdown {
  display: grid;
  gap: 2px;
}

.allocation-breakdown > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.allocation-breakdown > div:last-child {
  border-bottom: 0;
}

.allocation-breakdown span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #727a90;
}

.allocation-breakdown strong {
  color: #40495f;
  font-weight: 650;
}

.allocation-breakdown small {
  grid-column: 1 / -1;
  color: #a0a6b6;
  padding-left: 14px;
}

.cashflow-split {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.cashflow-filter {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 4px 0 19px;
  color: #8d94a6;
  font-size: 12px;
}

.cashflow-filter .segmented {
  max-width: 100%;
  overflow-x: auto;
}

.cashflow-chart {
  height: 245px;
  display: flex;
  gap: 7px;
  align-items: stretch;
  padding: 14px 3px 0;
  border-bottom: 1px solid var(--line);
}

.flow-month {
  flex: 1;
  min-width: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  border-radius: 7px 7px 0 0;
  padding: 7px 3px 9px;
}

.flow-month:hover,
.flow-month.active {
  background: #f5f3ff;
}

.flow-value {
  color: #8790a4;
  font-size: 11px;
}

.flow-bar {
  width: 58%;
  min-width: 16px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 5px 5px 2px 2px;
  overflow: hidden;
}

.flow-bar i {
  display: block;
  min-height: 0;
}

.flow-month small {
  color: #9198aa;
  font-size: 11px;
}

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin-top: 15px;
  color: #858da0;
  font-size: 12px;
}

.flow-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.transfer-note {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #e6e3f7;
  border-radius: 8px;
  background: #f6f4ff;
  color: #6f678f;
  font-size: 12px;
  line-height: 1.6;
}

.dividend-card {
  margin-top: 22px;
}

.dividend-card .card-heading strong {
  color: #5e6578;
  font-size: 13px;
}

.dividend-table {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.dividend-head,
.dividend-table button {
  display: grid;
  grid-template-columns: 1fr 1.5fr .7fr;
  align-items: center;
  gap: 18px;
}

.dividend-head {
  padding: 11px 16px;
  background: #fafbfe;
  color: #989eae;
  font-size: 11px;
  letter-spacing: .8px;
}

.dividend-head span:last-child,
.dividend-table button > strong:last-child {
  text-align: right;
}

.dividend-table button {
  width: 100%;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  color: #7c8497;
  font-size: 13px;
}

.dividend-table button:hover {
  background: #fbfaff;
}

.dividend-table button strong {
  color: #4a5368;
}

@media (max-width: 1200px) {
  .allocation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .allocation-grid > :first-child {
    grid-column: 1 / -1;
  }

  .wealth-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .wealth-heading,
  .allocation-toolbar,
  .holdings-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .wealth-controls,
  .wealth-controls .segmented,
  .allocation-toolbar .segmented,
  .holdings-heading .segmented {
    width: 100%;
  }

  .wealth-controls .segmented button,
  .allocation-toolbar .segmented button,
  .holdings-heading .segmented button {
    flex: 1;
  }

  .allocation-grid {
    grid-template-columns: 1fr;
  }

  .allocation-grid > :first-child {
    grid-column: auto;
  }

  .cashflow-chart {
    overflow-x: auto;
    gap: 4px;
  }

  .flow-month {
    min-width: 42px;
  }

  .cashflow-filter {
    align-items: flex-start;
    flex-direction: column;
  }

  .cashflow-filter .segmented {
    width: 100%;
  }

  .dividend-head,
  .dividend-table button {
    grid-template-columns: .8fr 1.3fr .8fr;
    gap: 8px;
  }
}

@media (max-width: 1000px) {
  .nav-icon {
    width: auto;
    flex-basis: auto;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .sidebar nav {
    align-items: center;
  }

  .sidebar nav a {
    padding-inline: 12px;
  }

  .dividend-head,
  .dividend-table button {
    font-size: 11px;
    padding-inline: 10px;
  }
}

.compact-refresh {
  padding: 7px 11px;
  font-size: 12px;
}

.source-state {
  min-height: calc(100vh - 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #3c455a;
}

.source-state h1 {
  margin-bottom: 8px;
}

.source-state p {
  color: #8c94a7;
  line-height: 1.7;
}

.source-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e6e4f6;
  border-top-color: #6d63d8;
  border-radius: 50%;
  animation: source-spin .8s linear infinite;
}

.source-error {
  text-align: center;
}

.source-error > div {
  width: min(560px, 100%);
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.source-error .button {
  margin-top: 12px;
}

@keyframes source-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .compact-refresh {
    padding-inline: 9px;
  }

  #sync-label {
    display: none;
  }
}
