.holdings-toolbar-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.holdings-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.holdings-toolbar-item {
  display: grid;
  gap: 6px;
}

.holdings-toolbar-item-wide {
  min-width: 240px;
}

.holdings-toolbar-item-date {
  min-width: 170px;
}

.holdings-toolbar-item-chart {
  min-width: 180px;
}

.holdings-toolbar-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.holdings-toolbar-select {
  min-width: 180px;
  background: rgba(244, 248, 252, 0.92);
}

.holdings-toolbar-select-compact {
  min-width: 170px;
}

.holdings-toolbar-note {
  margin: 0;
}

.holdings-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.holdings-badges-strong .badge {
  font-size: 0.95rem;
  font-weight: 700;
}

.holdings-data-quality {
  margin: 10px 0 18px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background: rgba(247, 250, 252, 0.75);
}

.holdings-data-quality summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.holdings-data-quality-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.holdings-data-quality-list p {
  margin: 0;
}

.holdings-allocation-head {
  margin: 18px 0 14px;
}

.holdings-allocation-head h3 {
  margin-bottom: 6px;
}

.holdings-allocation-empty {
  margin: 0 0 18px;
}

.holdings-allocation-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 0 0 18px;
}

.holdings-allocation-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 248, 247, 0.96) 100%);
}

.holdings-allocation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.holdings-allocation-chart-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.holdings-pie-shell {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.holdings-pie-chart {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.holdings-pie-backdrop {
  fill: rgba(148, 163, 184, 0.12);
}

.holdings-pie-slice {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
}

.holdings-allocation-total {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.holdings-allocation-legend {
  display: grid;
  gap: 10px;
  align-content: start;
}

.holdings-allocation-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 118, 110, 0.08);
}

.holdings-allocation-legend-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.holdings-allocation-legend-button:hover {
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(236, 247, 245, 0.92);
}

.holdings-allocation-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 4px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.holdings-allocation-legend-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.holdings-allocation-legend-copy strong {
  overflow-wrap: anywhere;
}

.holdings-allocation-share {
  white-space: nowrap;
}

.holdings-chart-toolbar {
  margin-bottom: 16px;
}

.holdings-chart-controls {
  gap: 10px 12px;
  flex-wrap: wrap;
}

.holdings-chart-note {
  margin: 10px 0 0;
}

.holdings-table th,
.holdings-table td,
.holdings-change-table th,
.holdings-change-table td {
  white-space: nowrap;
}

.holdings-table .stack-cell,
.holdings-change-table .stack-cell {
  gap: 4px;
}

@media (max-width: 920px) {
  .holdings-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .holdings-allocation-chart-wrap {
    grid-template-columns: 1fr;
  }

  .holdings-allocation-card-head {
    flex-direction: column;
  }

  .holdings-toolbar-item-wide,
  .holdings-toolbar-item-date,
  .holdings-toolbar-item-chart,
  .holdings-toolbar-select,
  .holdings-toolbar-select-compact {
    min-width: 0;
    width: 100%;
  }
}
