/* Patrimonio */
.nw-panel { display: grid; gap: 14px; min-width: 0; }
.nw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nw-head .panel-title { margin: 0; font-size: 17px; }
.nw-head .link { flex: none; }

.nw-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.nw-controls .seg button { height: 34px; padding: 0 12px; font-size: 13.5px; }
.nw-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; color: var(--muted); cursor: pointer; }
.nw-check input { width: 18px; height: 18px; }

.nw-body { display: grid; gap: 14px; min-width: 0; transition: opacity 0.15s; }
.nw-body.is-loading { opacity: 0.55; }

.nw-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.nw-label { flex-basis: 100%; font-size: 13.5px; color: var(--muted); }
.nw-amount { font-family: var(--font-display); font-size: clamp(28px, 7vw, 38px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.nw-amount.neg { color: var(--neg); }
.nw-change { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.nw-change.pos { color: var(--pos); }
.nw-change.neg { color: var(--neg); }

.nw-chart { min-width: 0; }
.zero-line { stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1.25; }

.nw-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.nw-legend li { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; font-size: 14px; }
.nw-legend i { flex: none; width: 10px; height: 10px; border-radius: 4px; }
.nw-legend-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-legend-name .pill { margin-left: 8px; }
.nw-legend b { flex: none; margin-left: 4px; font-weight: 650; font-variant-numeric: tabular-nums; }

.nw-note { margin: 0; font-size: 13px; color: var(--muted); }
.nw-error { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--muted); font-size: 14px; }
.nw-error p { margin: 0; }

/* Ocultar importes: ejes y avisos con importes tampoco se ven */
.hide-amounts .nw-chart .axis-amt { visibility: hidden; }
.hide-amounts .nw-chart svg { pointer-events: none; }

@media (max-width: 560px) {
  .nw-controls { flex-direction: column; align-items: stretch; }
  .nw-controls .seg { display: flex; width: 100%; }
  .nw-controls .seg button { flex: 1 1 0; justify-content: center; padding: 0 6px; }
  .nw-legend li { flex: 1 1 100%; }
  .nw-legend-name { flex: 1; }
}
.nw-change { overflow-wrap: anywhere; min-width: 0; }
