.pie-shell { padding: 0 14px 12px; overflow-y: auto; }
.pie-shell::-webkit-scrollbar { width: 6px; }
.pie-shell::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.pie-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 8px; }
.pie-depot { font-weight: 600; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Umschalter Bestand | Sparrate – aktiver Knopf deutlich hervorgehoben */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; border-radius: 11px;
  background: rgba(0,0,0,.3); border: 1px solid var(--border); }
.seg-btn { border: 0; background: none; color: var(--muted); padding: 7px 0; border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: 12.5px; transition: background .15s, color .15s, box-shadow .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: #0e1016; box-shadow: 0 2px 12px rgba(124,140,255,.45); }

.pie-total { text-align: center; padding: 14px 0 4px; min-height: 76px; }
.pie-total .label { text-transform: uppercase; letter-spacing: .6px; font-size: 10.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-total .big { margin-top: 2px; }

.ring-wrap { display: flex; justify-content: center; padding: 6px 0 12px; }
#ring { width: 210px; height: 210px; overflow: visible; }
#ring circle.seg-arc { fill: none; cursor: pointer; transition: stroke-width .15s, opacity .15s; }
#ring.hovering circle.seg-arc { opacity: .35; }
#ring.hovering circle.seg-arc.on { opacity: 1; stroke-width: 30; }

.legend { display: flex; flex-direction: column; gap: 2px; }
.lg { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 8px; cursor: default; transition: background .12s; }
.lg:hover, .lg.on { background: var(--panel-hover); }
.lg .dot2 { width: 10px; height: 10px; border-radius: 3px; }
.lg .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg .vl { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.lg .pc { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; min-width: 46px; text-align: right; }
