.funds-chart { margin: 8px 0 14px; }
.funds-spark { width: 100%; height: 88px; display: block; }
.funds-move { align-items: flex-start; }
.funds-move .btn { min-height: 44px; }
.funds-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 0;
}
.funds-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.funds-head .funds-swatch { flex: 0 0 8px; align-self: stretch; }
.funds-head .funds-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.funds-head .funds-amt,
.funds-amt,
.pos-head .funds-amt,
.kpi .val {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.funds-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}
.funds-card > .btn { align-self: flex-start; }
.funds-note { overflow-wrap: anywhere; }
.funds-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.funds-actions .btn { min-height: 44px; }
.funds-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0 0 8px;
  color: var(--muted, #9aa3ae);
  font-size: 0.9rem;
}
.funds-sync.is-progress::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4a574;
  flex: 0 0 8px;
}
.funds-sync-detail { margin: 0 0 8px; font-size: 0.85rem; }
.funds-sync-alert { margin: 0 0 8px; }
.funds-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}
.funds-toolbar .btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
.funds-card .funds-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.funds-card .funds-actions .btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 8px;
  font-size: 0.92rem;
}
@media (min-width: 480px) {
  .funds-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .funds-filters { flex-wrap: wrap; }
  .funds-filters select, .funds-filters input { min-width: 0; flex: 1 1 140px; }
  .funds-head { align-items: flex-start; }
  .funds-head .funds-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

.nav-ico { width: 14px; height: 14px; display: block; flex: 0 0 14px; }
.nav-ico svg, .btn svg, .funds-actions svg { width: 14px; height: 14px; display: block; }
.funds-actions .btn, .btn.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.pos-card, .funds-card, .share-row, .pos-group, .dash-funds { min-width: 0; max-width: 100%; }
.pos-card {
  border: 1px solid var(--border, #2c3542);
  border-radius: 12px;
  padding: 12px;
  background: var(--card, #262d36);
  max-width: 960px;
}
.pos-total { font-size: 1.35rem; font-weight: 700; }
.pos-head, .share-top, .pos-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pos-title { font-weight: 650; }
.pos-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.pos-name, .share-name, .pos-alias {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pos-ico, .funds-ico, .icon-preview {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  color: #f4f1ea;
}
.pos-ico svg, .funds-ico svg, .icon-preview svg { width: 18px; height: 18px; }
.pos-pending {
  color: var(--muted, #9aa3ae);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.share-track {
  height: 6px;
  border-radius: 3px;
  background: #2c3542;
  overflow: hidden;
}
.share-track > span { display: block; height: 100%; border-radius: 3px; max-width: 100%; }
.icon-grid, .color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 8px;
}
.icon-choice, .color-choice {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 10px;
  border: 0;
  background: #2a3340;
  color: #e7edf4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-choice svg { width: 22px; height: 22px; }
.icon-choice.is-on, .color-choice.is-on { outline: 2px solid #d7dde6; outline-offset: 1px; }
.color-choice { border-radius: 999px; }
.icon-preview { margin-top: 8px; }
@media (max-width: 699px) {
  .pos-groups { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .icon-grid { grid-template-columns: repeat(8, minmax(44px, 1fr)); }
}
#funds-list, .funds-chart { max-width: 1280px; }
.share-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-width: 920px;
}
.share-tabs .share-tab {
  width: 100%;
  min-height: 40px;
  padding: 8px 8px;
  font-size: 0.9rem;
}
.share-tab.is-on {
  background: #3d5278;
  color: #f4f1ea;
  outline: 2px solid #d7dde6;
  outline-offset: 0;
}
.share-view { max-width: 920px; }
.donut-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.donut-svg { width: 168px; height: 168px; flex: 0 0 168px; }
.share-legend { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.share-legend-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.share-swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 12px; }
#funds-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
#funds-list .funds-section { grid-column: 1 / -1; }
@media (min-width: 700px) {
  #funds-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #funds-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .share-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.review-scope-grid { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 1200px; }
.forward-card, #review-forecast, #review-completeness { max-width: 1200px; }
@media (min-width: 900px) {
  .review-scope-grid { grid-template-columns: 1fr 1fr; }
}
.kpi-grid { max-width: 1200px; }
.kpi-val, .forecast-line strong, .cat-legend-row .amt, .review-pct { white-space: nowrap; }
.chart-card, .dash-visual-grid, .forward-card { max-width: 1200px; }
.cat-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-top: 8px; }
.cat-legend-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cat-legend-row .n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-swatch { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 3px; }
@media (max-width: 419px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.review-money-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  max-width: 640px;
}
@media (min-width: 720px) {
  .review-money-grid { grid-template-columns: 1fr auto 1fr auto; }
}
.break-table { width: 100%; border-collapse: collapse; }
.break-table th, .break-table td {
  padding: 4px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.break-table th:first-child, .break-table td:first-child { text-align: left; }
.break-table tr.tap { cursor: pointer; }
