/* Finance Control Tower + tabs spark CSS — extracted from index.html */
/* Finance Control Tower stays dark even when site light-mode flips --ink/--white */
#section-live-finance {
  --ink: #0b0d12;
  --midnight: #12151c;
  --slate: #1a1e28;
  --graphite: #2a2f3a;
  --steel: #3d4455;
  --silver: #9ca3af;
  --pearl: #e5e7eb;
  --white: #ffffff;
  background: #0b0d12 !important;
  color: #ffffff;
}
body.light-mode #section-live-finance,
body.light-mode #section-live-finance [style*="background: var(--ink)"],
body.light-mode #section-live-finance [style*="background:var(--ink)"] {
  background: #0b0d12 !important;
  color: #ffffff;
}
#section-live-finance .section-inner { color: inherit; }
#panel-finance-control-tower .ct-body { grid-template-columns: 1fr; }
#panel-finance-control-tower .ct-vitals { display: grid; grid-template-columns: 1.85fr 1fr; gap: 14px; margin-bottom: 4px; }
#panel-finance-control-tower .ct-view.active { grid-column: 1 / -1; display: block; }
#panel-finance-control-tower .ct-view.active > .ct-row-full { width: 100%; }
#panel-finance-control-tower .ct-pulse-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; position: relative; z-index: 2; min-height: 178px; }
#panel-finance-control-tower .ct-pulse-row { display: grid; grid-template-columns: 60px 8px 1fr; gap: 8px; align-items: center; padding: 8px 10px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 7px; animation: fin-pulse-in 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fin-pulse-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
#panel-finance-control-tower .ct-pulse-row.fading { opacity: 0.45; }
#panel-finance-control-tower .ct-pulse-time { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 0.3px; text-align: right; font-variant-numeric: tabular-nums; }
#panel-finance-control-tower .ct-pulse-bullet { width: 6px; height: 6px; border-radius: 50%; }
#panel-finance-control-tower .ct-pulse-bullet.t-good { background: #00e07a; box-shadow: 0 0 6px #00e07a; }
#panel-finance-control-tower .ct-pulse-bullet.t-warn { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
#panel-finance-control-tower .ct-pulse-bullet.t-alert { background: #f87171; box-shadow: 0 0 6px #f87171; }
#panel-finance-control-tower .ct-pulse-bullet.t-info { background: #c4b5fd; box-shadow: 0 0 6px #c4b5fd; }
#panel-finance-control-tower .ct-pulse-text { font-size: 12px; color: rgba(255,255,255,0.85); line-height: 1.35; }
#panel-finance-control-tower .ct-pulse-text strong { color: var(--white); font-weight: 700; }
#panel-finance-control-tower .opsconf-wrap { width: 100%; margin: 18px 0 22px; padding: 22px 24px 20px; background: rgba(255,255,255,0.018); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; }
#panel-finance-control-tower .ct-vital { background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 18px 20px; position: relative; overflow: hidden; }
#panel-finance-control-tower .ct-vital::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 0% 0%, rgba(0,196,114,0.05), transparent 60%); }
#panel-finance-control-tower .ct-vital-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; position: relative; z-index: 2; }
#panel-finance-control-tower .ct-vital-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 1.8px; color: rgba(255,255,255,0.62); font-weight: 700; text-transform: uppercase; }
#panel-finance-control-tower .ct-vital-tag-sub { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; letter-spacing: 0.2px; font-family: inherit; text-transform: none; font-weight: 400; }
#panel-finance-control-tower .ct-vital-live { display: inline-flex; align-items: center; gap: 6px; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 1.4px; color: #00e07a; font-weight: 700; text-transform: uppercase; }
#panel-finance-control-tower .ct-vital-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #00e07a; box-shadow: 0 0 8px #00e07a; animation: fin-vital-pulse 1.6s ease-in-out infinite; }
@keyframes fin-vital-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.85); } }
#panel-finance-control-tower .ct-gauge-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: center; position: relative; z-index: 2; }
#panel-finance-control-tower .ct-gauge-svgwrap { position: relative; }
#panel-finance-control-tower .ct-gauge-svg { width: 100%; height: auto; display: block; }
#panel-finance-control-tower .ct-gauge-needle { transform-origin: 160px 150px; display: none; }
#panel-finance-control-tower .ct-gauge-meta { font-family: 'JetBrains Mono', monospace; }
#panel-finance-control-tower .ct-gauge-trend { font-size: 11.5px; color: var(--white); margin-bottom: 14px; line-height: 1.5; letter-spacing: 0.2px; }
#panel-finance-control-tower .ct-gauge-trend-arrow { color: #00e07a; font-weight: 700; }
#panel-finance-control-tower .ct-gauge-breakdown-title { font-size: 9px; letter-spacing: 1.4px; color: rgba(255,255,255,0.45); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
#panel-finance-control-tower .ct-gauge-breakdown { display: flex; flex-direction: column; gap: 6px; }
#panel-finance-control-tower .ct-gbi { display: grid; grid-template-columns: 1fr 38px auto; gap: 8px; align-items: center; }
#panel-finance-control-tower .ct-gbi-label { font-size: 10.5px; color: rgba(255,255,255,0.65); letter-spacing: 0.1px; }
#panel-finance-control-tower .ct-gbi-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; position: relative; }
#panel-finance-control-tower .ct-gbi-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #00b890, #00e07a); border-radius: 999px; transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 6px rgba(0,224,122,0.25); }
#panel-finance-control-tower .ct-gbi-bar.warn > span { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 6px rgba(251,191,36,0.25); }
#panel-finance-control-tower .ct-gbi-val { font-size: 10.5px; color: var(--white); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -0.005em; }
#panel-finance-control-tower .fc-dual-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; position: relative; z-index: 2; }
#panel-finance-control-tower .fc-hero-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 12px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.018); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; cursor: pointer; }
#panel-finance-control-tower .fc-hero-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
#panel-finance-control-tower .fc-hero-card:focus-visible { outline: 2px solid rgba(59,91,219,0.6); outline-offset: 2px; }
#panel-finance-control-tower .fc-hero-card.fc-hero-active { box-shadow: 0 0 0 2px rgba(59,91,219,0.55), 0 8px 24px rgba(0,0,0,0.35); }
#panel-finance-control-tower .fc-hero-card.good { border-color: rgba(34,197,94,0.32); background: rgba(34,197,94,0.05); }
#panel-finance-control-tower .fc-hero-card.warn { border-color: rgba(234,179,8,0.32); background: rgba(234,179,8,0.05); }
#panel-finance-control-tower .fc-hero-card.alert { border-color: rgba(248,113,113,0.32); background: rgba(248,113,113,0.05); box-shadow: 0 0 0 1px rgba(248,113,113,0.12); }
#panel-finance-control-tower .fc-hero-card-tag { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 1.5px; color: rgba(255,255,255,0.55); text-transform: uppercase; font-weight: 700; margin-bottom: 4px; min-height: 28px; display: flex; align-items: center; justify-content: center; }
#panel-finance-control-tower .fc-hero-gauge-wrap { width: 100%; max-width: 280px; position: relative; }
#panel-finance-control-tower .fc-hero-gauge-svg { width: 100%; height: auto; display: block; }
#panel-finance-control-tower .fc-hero-fill { transition: stroke-dashoffset 0.08s linear; }
#panel-finance-control-tower .fc-hero-sub { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 6px; line-height: 1.35; }
#panel-finance-control-tower .fc-hero-sub .fc-hero-trend-up { color: #00e07a; font-weight: 700; }
#panel-finance-control-tower .fc-hero-sub .fc-hero-blocked { color: #f87171; font-weight: 600; }
#panel-finance-control-tower .fc-hero-caption { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.8px; color: rgba(255,255,255,0.42); margin-top: 4px; text-transform: uppercase; }
#panel-finance-control-tower .fc-hero-drill-hint { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 1.2px; color: rgba(138,160,247,0.75); margin-top: 8px; text-transform: uppercase; font-weight: 600; }
#panel-finance-control-tower .opsconf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
#panel-finance-control-tower .opsconf-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 2.6px; color: rgba(0,224,122,0.85); text-transform: uppercase; }
#panel-finance-control-tower .opsconf-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 1.6px; color: rgba(255,255,255,0.55); text-transform: uppercase; }
#panel-finance-control-tower .opsconf-sub strong { color: var(--white); font-weight: 700; }
#panel-finance-control-tower .opsconf-meter-track { width: 100%; height: 22px; background: rgba(255,255,255,0.05); border-radius: 11px; overflow: hidden; position: relative; margin-bottom: 18px; }
#panel-finance-control-tower .opsconf-meter-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; border-radius: 11px; background: linear-gradient(90deg, #991b1b 0%, #dc2626 15%, #ef4444 25%, #f59e0b 40%, #eab308 50%, #84cc16 65%, #22c55e 80%, #10b981 100%); background-size: 100vw 100%; background-position: left; overflow: hidden; box-shadow: 0 0 24px rgba(34,197,94,0.18); }
#panel-finance-control-tower .opsconf-meter-fill::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%, transparent 100%); background-size: 300% 100%; animation: fin-opsconf-shimmer 4s ease-in-out infinite; }
@keyframes fin-opsconf-shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
#panel-finance-control-tower .opsconf-scale { display: flex; border-radius: 10px; overflow: hidden; height: 56px; position: relative; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
#panel-finance-control-tower .opsconf-segment { flex: 1; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: rgba(255,255,255,0.95); position: relative; transition: transform 0.25s ease, box-shadow 0.25s ease; overflow: hidden; }
#panel-finance-control-tower .opsconf-segment:not(:last-child) { border-right: 1px solid rgba(0,0,0,0.32); }
#panel-finance-control-tower .opsconf-segment span { position: relative; z-index: 1; transition: transform 0.25s ease; }
#panel-finance-control-tower .opsconf-segment::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%); animation: fin-opsconf-segshimmer 3.5s ease-in-out infinite; pointer-events: none; }
@keyframes fin-opsconf-segshimmer { 0%, 100% { left: -100%; opacity: 0; } 50% { left: 100%; opacity: 1; } }
#panel-finance-control-tower .opsconf-segment.active { z-index: 5; transform: scaleY(1.18) translateY(-4px); box-shadow: 0 0 22px rgba(34,197,94,0.55), 0 8px 18px rgba(0,0,0,0.5); outline: 2px solid #a78bfa; outline-offset: -2px; }
#panel-finance-control-tower .opsconf-segment.active span { transform: scale(1.18); text-shadow: 0 0 14px rgba(255,255,255,0.75); }
#panel-finance-control-tower .opsconf-segment.active::before { content: 'CURRENT'; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-family: 'JetBrains Mono', monospace; font-size: 8.5px; font-weight: 800; letter-spacing: 1.6px; color: #00e07a; text-shadow: 0 0 8px rgba(0,224,122,0.55); white-space: nowrap; }
#panel-finance-control-tower .opsconf-labels { display: flex; margin-top: 12px; }
#panel-finance-control-tower .opsconf-labels span { flex: 1; text-align: center; font-size: 10px; color: rgba(255,255,255,0.6); line-height: 1.3; padding: 0 2px; }
#panel-finance-control-tower .opsconf-labels span.active { color: var(--white); font-weight: 700; }

#fcDrillOverlay .ct-drill-body .ct-detail { display: none; }
#fcDrillOverlay .ct-drill-body .ct-detail.active { display: grid; grid-template-columns: 1fr; gap: 14px; animation: fcDrillIn 0.22s ease; }
@keyframes fcDrillIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#fcDrillOverlay .fc-drill-bar,
#fcHeroDrillOverlay .fc-drill-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid rgba(59,91,219,0.22); background: linear-gradient(180deg, rgba(59,91,219,0.10) 0%, rgba(12,14,20,0.98) 100%); border-radius: 18px 18px 0 0; }
#fcDrillOverlay .fc-drill-bar-main,
#fcHeroDrillOverlay .fc-drill-bar-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#fcDrillOverlay .fc-drill-eyebrow,
#fcHeroDrillOverlay .fc-drill-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: #8aa0f7; }
#fcDrillOverlay .fc-drill-title,
#fcHeroDrillOverlay .fc-drill-title { font-family: inherit; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; text-transform: none; color: #ffffff; line-height: 1.2; }
#fcDrillOverlay .fc-drill-bar-actions,
#fcHeroDrillOverlay .fc-drill-bar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#fcDrillOverlay .fc-drill-ask-laser,
#fcHeroDrillOverlay .fc-drill-ask-laser { padding: 8px 16px; background: linear-gradient(135deg, #4f6fd8 0%, #3b5bdb 100%); color: #ffffff; border: 1px solid rgba(138,160,247,0.45); border-radius: 8px; font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 4px 16px rgba(59,91,219,0.35); white-space: nowrap; }
#fcDrillOverlay .fc-drill-ask-laser:hover,
#fcHeroDrillOverlay .fc-drill-ask-laser:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(59,91,219,0.5); background: linear-gradient(135deg, #5a7ae0 0%, #4468e0 100%); }
#fcDrillOverlay .fc-drill-ask-laser::before,
#fcHeroDrillOverlay .fc-drill-ask-laser::before { content: 'AI · '; font-family: 'JetBrains Mono', monospace; font-size: 10px; opacity: 0.85; }
#fcDrillOverlay .fc-drill-close,
#fcHeroDrillOverlay .fc-drill-close { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 20px; line-height: 1; color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); cursor: pointer; }
#fcDrillOverlay .fc-drill-close:hover,
#fcHeroDrillOverlay .fc-drill-close:hover { background: rgba(255,255,255,0.10); color: #ffffff; }
#fcHeroDrillOverlay .fc-hero-breakdown { display: none; padding: 4px 0 8px; }
#fcHeroDrillOverlay .fc-hero-breakdown.active { display: block; }
#fcHeroDrillOverlay .ct-gauge-breakdown { display: flex; flex-direction: column; gap: 10px; }
#fcHeroDrillOverlay .ct-gbi { display: grid; grid-template-columns: 1fr 120px auto; gap: 12px; align-items: center; }
#fcHeroDrillOverlay .ct-gbi-label { font-size: 13px; color: rgba(255,255,255,0.78); }
#fcHeroDrillOverlay .ct-gbi-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
#fcHeroDrillOverlay .ct-gbi-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #00b890, #22c55e); border-radius: 999px; transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1); }
#fcHeroDrillOverlay .ct-gbi-bar.warn > span { background: linear-gradient(90deg, #f59e0b, #eab308); }
#fcHeroDrillOverlay .ct-gbi-val { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 800; color: #ffffff; min-width: 28px; text-align: right; }
#fcHeroDrillOverlay .fc-hero-inputs-card { padding-bottom: 8px; }
#fcDrillOverlay .ct-card-header .ask-laser-btn { display: none; }
#fcDrillOverlay .ct-detail.active > .ct-row-full,
#fcDrillOverlay .ct-detail.active > .ct-card,
#fcDrillOverlay .fc-drill-full { grid-column: 1 / -1; }
#fcDrillOverlay .ct-detail.active .ct-table { font-size: 12px; }
#fcDrillOverlay .ct-kpi-modal-content { max-height: min(88vh, 920px); overflow-y: auto; }
#fcDrillOverlay .fc-drill-intro { grid-column: 1 / -1; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.72); padding: 12px 14px; border-radius: 8px; background: rgba(59,91,219,0.08); border: 1px solid rgba(59,91,219,0.20); margin-bottom: 2px; }
#fcHeroDrillOverlay .fc-drill-intro { font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.72); padding: 12px 14px; border-radius: 8px; background: rgba(59,91,219,0.08); border: 1px solid rgba(59,91,219,0.20); margin-bottom: 2px; }
#fcDrillOverlay .ct-drill-body,
#fcHeroDrillOverlay .ct-drill-body { padding: 22px 24px 26px; }
#fcHeroDrillOverlay .ct-kpi-modal-content { max-height: min(88vh, 720px); overflow-y: auto; }
#section-live-finance .ask-laser-btn { padding: 6px 12px; background: linear-gradient(135deg, #4f6fd8 0%, #3b5bdb 100%); color: #ffffff; border: 1px solid rgba(138,160,247,0.40); border-radius: 6px; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 2px 10px rgba(59,91,219,0.28); white-space: nowrap; }
#section-live-finance .ask-laser-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(59,91,219,0.42); }

                <style id="fin-tabs-spark-css">
                /* Live KPI sparklines for Finance tabs 02-10 (parity with Operations rd-spark) */
                #section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; }
                #section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-kpi-value { margin-bottom: 2px; }
                #section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-spark.fin-spark {
                    width: 100%; height: 20px; min-height: 20px; max-height: 20px;
                    display: block; margin: 4px 0 5px; flex: 0 0 20px;
                }
                #section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-kpi-change { margin-top: auto; }
                
