
.dashboard-legend-swatch {
  margin-top: 0.25rem;
  display: inline-flex;
  height: 0.75rem;
  width: 0.75rem;
  flex-shrink: 0;
  border-radius: 9999px;
}

.dashboard-legend-meta {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-legend-title {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--theme-primary);
}

.dashboard-legend-caption {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(var(--color-secondary-rgb) / var(--tw-text-opacity, 1));
}

.dashboard-legend-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.dashboard-legend-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--theme-primary);
}

.dashboard-legend-share {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--theme-primary-muted);
}

/* ── Composition: outer grid (card + investor side-by-side) ── */

.dashboard-composition-row-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .dashboard-composition-row-layout {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  }
}

.dashboard-composition-row-layout-full {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .dashboard-composition-row-layout-full {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1536px) {
  .dashboard-composition-row-layout-full {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ── Composition: single card with donut + list ── */

.dashboard-composition-card {
  display: flex;
  flex-direction: column;
}

.dashboard-composition-card-empty {
  min-height: 0;
}

.dashboard-composition-card-body {
  display: grid;
  gap: 0px;
}

.dashboard-composition-card-body-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.dashboard-composition-empty-cta {
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .dashboard-composition-card-body {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

.dashboard-composition-chart-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

@media (min-width: 1280px) {
  .dashboard-composition-chart-area {
    border-right-width: 1px;
  }
}

.dashboard-composition-chart-area {
  border-color: var(--color-hover-muted, #f1f5f9);
}

.dashboard-composition-chart-area .dashboard-donut-chart {
  height: 16rem;
  width: 16rem;
}

.dashboard-donut-center-value-sm {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--theme-primary);
}

.dashboard-donut-below {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dashboard-donut-below-label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--theme-primary-muted);
}

.dashboard-donut-below-value {
  margin-top: 0.125rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--theme-primary);
}

.category-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
  border-left-width: 3px;
  padding-left: 0.625rem;
  padding-right: 0.625rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  color: var(--color-text-primary, #334155);
  border-left-color: var(--color-surface-300, #cbd5e1);
  background: transparent;
}

.category-tag.category-tone-primary {
  border-left-color: var(--theme-primary);
  color: var(--theme-primary);
}

.category-tag.category-tone-sky {
  border-left-color: var(--color-tone-sky, #39a0e2);
  color: var(--color-tone-sky-dark, #2b7cb8);
}
.category-tag.category-tone-purple {
  border-left-color: var(--color-tone-purple, #7c3aed);
  color: var(--color-tone-purple-dark, #6d28d9);
}

.category-tag.category-tone-amber {
  border-left-color: var(--color-tone-amber, #f59b42);
  color: var(--color-tone-amber-dark, #b97024);
}

.category-tag.category-tone-gold {
  border-left-color: var(--color-tone-gold, #d4a017);
  color: var(--color-tone-gold-dark, #a07b10);
}

.category-tag.category-tone-emerald {
  border-left-color: var(--color-success, #047857);
  color: var(--color-success, #047857);
}

.category-tag.category-tone-mint {
  border-left-color: var(--color-tone-mint, #3fbf9b);
  color: var(--color-tone-mint-dark, #2a8f73);
}

/* ── Composition list (inside the card) ── */

.dashboard-composition-list {
  display: flex;
  flex-direction: column;
}

.dashboard-composition-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom-width: 1px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-color: var(--color-hover-muted, #f1f5f9);
}

.dashboard-composition-row:last-child {
  border-bottom-width: 0px;
}

.dashboard-composition-swatch {
  display: inline-flex;
  height: 2rem;
  width: 0.25rem;
  flex-shrink: 0;
  border-radius: 9999px;
}

.dashboard-composition-name {
  display: flex;
  min-width: 0px;
  flex-direction: column;
}

.dashboard-composition-name strong {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.dashboard-composition-name span {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--theme-primary-muted);
}

.dashboard-composition-data {
  margin-left: auto;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1280px) {
  .dashboard-composition-data {
    gap: 1.25rem;
  }
}

.dashboard-composition-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 5rem;
}

.dashboard-composition-col:last-child {
  min-width: 4rem;
}

.dashboard-composition-col-label {
  /* tokenizado (10px→--fs-xs 12px): legibilidade mínima, sem px hardcoded */
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--theme-primary-muted);
}

.dashboard-composition-col strong {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.dashboard-composition-yield {
  color: var(--color-success, #059669) !important;
}

.dashboard-composition-amount {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.dashboard-composition-link {
  flex-shrink: 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--theme-primary);
}

.dashboard-composition-link:hover {
  color: var(--theme-accent);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  /* Pilula de status NÃO pode quebrar em 2 linhas (ex.: "Aguardando depósito"
     desalinhava o card de movimentações). Mantém o badge sempre em uma linha. */
  white-space: nowrap;
  border-radius: 9999px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
}
