/* Financial Picture view (portal + CRM). Series colours validated (dataviz validator) on light and
   dark surfaces: blue / orange / aqua + neutral grey for "Ungrouped". Identity is never colour alone:
   every slice has a labelled legend row with amount and %, and the bucket cards repeat the label. */
:root { --fp1: #2a78d6; --fp2: #eb6834; --fp3: #1baf7a; --fpu: #9a9890; --fp-gap: var(--sw-surface, #fff); }
[data-theme="dark"] { --fp1: #3987e5; --fp2: #d95926; --fp3: #199e70; --fpu: #6f6e68; }
.fpc-1 { fill: var(--fp1); background: var(--fp1); } .fpc-2 { fill: var(--fp2); background: var(--fp2); }
.fpc-3 { fill: var(--fp3); background: var(--fp3); } .fpc-u { fill: var(--fpu); background: var(--fpu); }
.fp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .fp-grid { grid-template-columns: 1fr; } }
.fp-card { background: var(--sw-surface); border: 1px solid var(--sw-border); border-radius: var(--sw-radius-lg, 14px); padding: 22px; }
.fp-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fp-card-head h3 { margin: 0; font: 600 1.05rem var(--sw-font-display); color: var(--sw-text); }
.fp-muted { color: var(--sw-text-3); font-size: .9rem; } .fp-muted b { color: var(--sw-text); }
.fp-mix { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.fp-donut { width: 200px; height: 200px; flex: none; }
.fp-slice { stroke: var(--fp-gap); stroke-width: 2; cursor: pointer; transition: opacity .15s; }
.fp-slice.is-dim { opacity: .3; } .fp-slice:hover { opacity: .85; }
.fp-empty-ring { fill: none; stroke: var(--sw-border); }
.fp-center-k { text-anchor: middle; font: 500 13px var(--sw-font-ui); fill: var(--sw-text-3); }
.fp-center-v { text-anchor: middle; font: 600 20px var(--sw-font-display); fill: var(--sw-text); }
.fp-legend { display: grid; gap: 6px; flex: 1; min-width: 210px; }
.fp-leg { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; width: 100%;
  padding: 9px 12px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; color: var(--sw-text); cursor: pointer; min-height: 44px; }
.fp-leg:hover { background: var(--sw-surface-2); } .fp-leg.is-on { border-color: var(--sw-accent); background: var(--sw-accent-soft); }
.fp-leg.is-dim { opacity: .55; } .fp-leg:focus-visible { outline: none; box-shadow: var(--sw-focus); }
.fp-leg-l { overflow-wrap: anywhere; font-size: .95rem; } .fp-leg-v { font-weight: 600; white-space: nowrap; }
.fp-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.fp-tip { font-size: .85rem; color: var(--sw-text-3); margin: 12px 0 0; }
.fp-mean { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--sw-border); }
.fp-mean p { margin: 6px 0 16px; color: var(--sw-text-2); line-height: 1.6; } .fp-mean b { color: var(--sw-text); }
.fp-eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sw-text-3); font-weight: 600; }
.fp-book { margin-top: 2px; }
.fp-warn { background: var(--sw-warn-soft); color: var(--sw-warn); border-radius: 10px; padding: 10px 14px; font-size: .9rem; margin-bottom: 14px; display: grid; gap: 4px; }
.fp-buckets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .fp-buckets { grid-template-columns: 1fr; } }
.fp-bucket { border: 1px solid var(--sw-border); border-radius: 12px; padding: 14px; scroll-margin: 90px; transition: border-color .15s, opacity .15s; }
.fp-bucket.is-on { border-color: var(--sw-accent); box-shadow: 0 0 0 2px var(--sw-accent-soft); } .fp-bucket.is-dim { opacity: .6; }
.fp-bucket-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.fp-bucket-t { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.fp-acct { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--sw-border); }
.fp-acct-n { font-weight: 500; overflow-wrap: anywhere; } .fp-acct-v { font-weight: 600; white-space: nowrap; }
.fp-acct-m { font-size: .85rem; color: var(--sw-text-3); } .fp-acct-why { font-size: .8rem; color: var(--sw-text-3); font-style: italic; margin-top: 2px; }
.fp-none { font-size: .9rem; color: var(--sw-text-3); padding: 6px 0; }
.fp-cf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .fp-cf { grid-template-columns: 1fr; } }
.fp-stat { border: 1px solid var(--sw-border); border-radius: 12px; padding: 14px; }
.fp-stat-k { font-size: .85rem; color: var(--sw-text-3); } .fp-stat-v { font: 600 1.4rem var(--sw-font-display); color: var(--sw-text); }
.fp-bars { display: grid; gap: 10px; margin-top: 16px; }
.fp-bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: .9rem; }
.fp-bar-track { height: 12px; background: var(--sw-surface-2); border-radius: 6px; overflow: hidden; }
.fp-bar { height: 100%; border-radius: 6px; } .fp-bar-v { font-weight: 600; white-space: nowrap; } .fp-bar-l { color: var(--sw-text-2); }
.fp-donut:focus, .fp-donut *:focus, .fp-slice:focus { outline: none; }
