/* CFO Scorecard */
#cfo { background: #eef2f9; }
.cfo { position: absolute; inset: 0; padding: 16px 22px 18px; display: grid; grid-template-rows: 54px 178px 352px 1fr; gap: 14px; }
.cfo-head { display: flex; justify-content: space-between; align-items: center; }
.cfo-title { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -.4px; }
.cfo-title span { font-weight: 500; color: var(--muted); font-size: 22px; }
.cfo-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.cfo-sub b { color: var(--cobalt); font-family: "JetBrains Mono", monospace; }
.cfo-legend { display: flex; gap: 10px; align-items: center; }
.lg { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lg.rep::before { content: ""; width: 22px; border-top: 2px dashed #8e9bb5; }
.lg.adj::before { content: ""; width: 22px; border-top: 3px solid var(--cobalt); }
.lg.pill { background: #fff; padding: 6px 12px; border-radius: 999px; box-shadow: 0 1px 0 #dfe5f0; color: var(--ink); }
.lg.pill.draft { background: #fff6dc; color: #8a5a00; }
.lg.pill.ok { background: #e3f7ee; color: #0b7a4e; }

.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.kpi { position: relative; overflow: hidden; border-radius: 16px; padding: 14px 18px 12px; color: #fff; background: linear-gradient(155deg, #0b1f4d 0%, #00338d 100%); box-shadow: 0 10px 24px rgba(11,31,77,.18); display: flex; flex-direction: column; }
.kpi:nth-child(2) { background: linear-gradient(155deg, #0b1f4d 0%, #1e49e2 120%); }
.kpi .kl { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; opacity: .75; }
.kpi .kv { font-family: "JetBrains Mono", monospace; font-size: 37px; font-weight: 800; letter-spacing: -1.5px; margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .kd { font-size: 13.5px; font-weight: 700; margin-top: 3px; }
.kpi .kd.pos { color: #6ff0b4; } .kpi .kd.neg { color: #ff9ea1; } .kpi .kd.neu { color: #bcd0ff; }
.kpi .ks { font-size: 12px; opacity: .6; margin-top: 2px; }
.kpi .kadj { margin-top: auto; font-size: 12.5px; line-height: 1.3; min-height: 17px; color: rgba(255,255,255,.85); position: relative; z-index: 1; }
.kpi .kadj i { font-style: normal; font-weight: 800; font-family: "JetBrains Mono", monospace; padding: 1px 6px; border-radius: 5px; margin-right: 4px; }
.kpi .kadj i.up { background: rgba(111,240,180,.2); color: #6ff0b4; }
.kpi .kadj i.dn { background: rgba(255,158,161,.2); color: #ffb3b5; }
.kpi .kadj i.warn { background: rgba(255,209,102,.2); color: #ffd166; }
.kpi .spark { position: absolute; right: 12px; top: 14px; width: 110px; height: 34px; opacity: .9; }
.kpi.flash { animation: kflash 1.6s ease-out; }
@keyframes kflash { 0% { box-shadow: 0 0 0 0 rgba(111,240,180,.0), 0 10px 24px rgba(11,31,77,.18); transform: scale(1); } 15% { box-shadow: 0 0 0 6px rgba(111,240,180,.7), 0 10px 24px rgba(11,31,77,.18); transform: scale(1.03); } 100% { box-shadow: 0 0 0 0 rgba(111,240,180,0), 0 10px 24px rgba(11,31,77,.18); transform: scale(1); } }

.card2 { background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: 0 1px 0 #dfe5f0, 0 6px 18px rgba(14,26,51,.05); overflow: hidden; position: relative; }
.c2h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 10px; }
.c2h b { font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--navy); white-space: nowrap; }
.c2h span { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row2 { display: grid; grid-template-columns: 1.25fr 1.1fr .75fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: .8fr 1fr 1.25fr 1.15fr .85fr; gap: 14px; min-height: 0; }

#liqSvg { width: 100%; height: 252px; }
#liqSvg .gl { stroke: #e6ebf4; stroke-width: 1; }
#liqSvg .gt { font: 600 11px "Inter", sans-serif; fill: #8995ad; }
#liqSvg .rep { fill: none; stroke: #8e9bb5; stroke-width: 2; stroke-dasharray: 6 6; }
#liqSvg .adj { fill: none; stroke: var(--cobalt); stroke-width: 3.5; }
#liqSvg .pin { fill: #12a36b; stroke: #fff; stroke-width: 3; }
#liqSvg .pint { font: 700 14px "Inter", sans-serif; fill: #0b7a4e; }
.c2f { font-size: 13px; color: var(--muted); margin-top: 4px; }
.c2f b { color: var(--ink); }

#varBars { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.vb { display: grid; grid-template-columns: 112px 1fr 70px; align-items: center; gap: 10px; position: relative; height: 26px; }
.vn { font-size: 15px; font-weight: 600; color: var(--ink); }
.vt { position: relative; height: 16px; background: #f3f6fb; border-radius: 4px; }
.vt .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: #c6cfe0; }
.vt .bar { position: absolute; top: 2px; height: 12px; border-radius: 3px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.vt .bar.good { background: #12a36b; } .vt .bar.bad { background: #e5484d; } .vt .bar.flagged { background: repeating-linear-gradient(45deg, #e5484d, #e5484d 6px, #ff7a7e 6px, #ff7a7e 12px); }
.vv { font: 700 15px "JetBrains Mono", monospace; text-align: right; }
.vv.good { color: #0b7a4e; } .vv.bad { color: #c4282d; }
.vb .flag { position: absolute; top: 4px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #c4282d; background: #fff1f1; padding: 1px 6px; border-radius: 4px; pointer-events: none; }

.closeprog .ringwrap { position: relative; width: 150px; height: 150px; margin: 2px auto 8px; }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring .trk { fill: none; stroke: #e6ebf4; stroke-width: 12; }
.ring .val { fill: none; stroke: var(--green); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 0 400; transition: stroke-dasharray .8s; }
.ringtxt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ringtxt b { font: 800 36px "JetBrains Mono", monospace; color: var(--navy); }
.ringtxt span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.cp-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 4px 0; border-top: 1px solid #eef1f7; }
.cp-rows span { color: var(--muted); white-space: nowrap; } .cp-rows b { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-rows small { color: var(--muted); font-weight: 500; }

.wcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wci { background: #f5f7fc; border-radius: 12px; padding: 10px 12px; }
.wci span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.wci b { font: 800 30px "JetBrains Mono", monospace; color: var(--navy); }
.wci small { display: block; font-size: 11.5px; color: var(--muted); min-height: 14px; }
.wcbar { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; border-top: 1px solid #eef1f7; padding-top: 8px; }

.ab { display: grid; grid-template-columns: 80px 1fr 64px; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; }
.ab span { color: var(--muted); font-weight: 600; } .ab b { font-family: "JetBrains Mono", monospace; text-align: right; }
.ab i { height: 12px; border-radius: 3px; background: linear-gradient(90deg, #00338d, #2f6bff); min-width: 2px; }
#apRisk { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.rk { font-size: 13px; padding: 7px 10px; border-radius: 8px; animation: msgIn .5s both; }
.rk b { font-family: "JetBrains Mono", monospace; }
.rk.hold { background: #fff6dc; color: #7a4f00; } .rk.rec { background: #e8f0ff; color: #0b2f86; } .rk.fix { background: #f1ecff; color: #4b2aa0; } .rk.none { background: #f5f7fc; color: var(--muted); }

#fxTbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
#fxTbl th { text-align: left; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; padding: 4px 4px; border-bottom: 1px solid #e6ebf4; }
#fxTbl td { padding: 6px 4px; border-bottom: 1px solid #f0f3f8; white-space: nowrap; }
#fxTbl td small { display: block; color: var(--muted); font-size: 11px; }
#fxTbl .n { text-align: right; font-family: "JetBrains Mono", monospace; }
#fxTbl .pos { color: #0b7a4e; } #fxTbl .neg { color: #c4282d; }
#fxTbl tr.fixed td { background: #effaf4; }
#fxTbl tr.tot td { font-weight: 700; border-bottom: 0; }
#fxTbl tr.tot td:nth-child(2) { white-space: normal; font-size: 11.5px; }
.fxs { font-size: 13px; color: var(--muted); margin-top: 8px; } .fxs b { color: var(--ink); font-family: "JetBrains Mono", monospace; }

#issList { display: flex; flex-direction: column; gap: 6px; }
.il { display: grid; grid-template-columns: 106px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; padding: 7px 10px; border-radius: 10px; background: #f5f7fc; animation: msgIn .5s both; }
.il .ia { font: 800 15px "JetBrains Mono", monospace; color: var(--navy); grid-row: span 2; align-self: center; }
.il .it { font-weight: 700; font-size: 14px; }
.il .ii { font-size: 12px; color: var(--muted); grid-column: 2; }
.il .is { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: #fff6dc; color: #8a5a00; white-space: nowrap; }
.il .is.ok { background: #e3f7ee; color: #0b7a4e; }
.il.sum { display: flex; justify-content: space-between; background: var(--navy); color: #fff; font-size: 14px; }
.il.sum b { font-family: "JetBrains Mono", monospace; }
.empty { color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }

.cr { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid #eef1f7; gap: 8px; }
.cr span { color: var(--muted); } .cr b { font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.cr b.neg { color: #c4282d; } .cr b.pos { color: #0b7a4e; } .cr b.warn { color: #8a5a00; }
.rc { font-style: normal; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 6px; color: #fff; background: #8e9bb5; letter-spacing: .5px; }
.rc.elevated { background: #e5484d; } .rc.moderate { background: #f2a900; } .rc.low { background: #12a36b; }
