/* Finance modules 02–10 — shared Ops-parity chrome (KPI orbs, headlines, disclaimers) */

@keyframes finModOrbPing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.34); }
}

@keyframes finModScopePulse {
  0%, 100% { text-shadow: 0 0 8px rgba(251, 191, 36, 0.35); opacity: 0.88; }
  50% { text-shadow: 0 0 22px rgba(251, 191, 36, 0.95), 0 0 40px rgba(251, 191, 36, 0.45); opacity: 1; }
}

/* ── Disclaimer ── */
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-disclaimer {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--white);
  text-transform: uppercase;
  margin-top: 28px;
  opacity: 0.6;
  grid-column: 1 / -1;
}

/* ── Headline alert strip (Ops qirecon parity) ── */
#section-live-finance .fin-mod-headline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.02) 80%, transparent);
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-left: 3px solid #f87171;
  border-radius: 8px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

#section-live-finance .fin-mod-headline-icon {
  font-size: 18px;
  line-height: 1.3;
  color: #f87171;
  filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.6));
  flex-shrink: 0;
}

#section-live-finance .fin-mod-headline strong { color: #f87171; font-weight: 700; }
#section-live-finance .fin-mod-headline em { color: var(--white); font-style: normal; font-weight: 600; }

#section-live-finance .fin-mod-headline-cutoff {
  font-family: 'JetBrains Mono', monospace;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: rgba(251, 191, 36, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ── Scope label above KPI row ── */
#section-live-finance .fin-mod-scope {
  font-family: 'Courier Prime', monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fbbf24;
  -webkit-text-fill-color: #fbbf24;
  line-height: 1;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.40);
  margin-bottom: 15px;
  text-align: right;
  animation: finModScopePulse 1.8s ease-in-out infinite;
}

#panel-finance-nav .fin-mod-scope { color: #a78bfa; -webkit-text-fill-color: #a78bfa; text-shadow: 0 0 18px rgba(167, 139, 250, 0.40); }
#panel-finance-mgmtco .fin-mod-scope { color: #c4b5fd; -webkit-text-fill-color: #c4b5fd; text-shadow: 0 0 18px rgba(196, 181, 253, 0.40); }
#panel-finance-fundacct .fin-mod-scope { color: #fbbf24; -webkit-text-fill-color: #fbbf24; text-shadow: 0 0 18px rgba(251, 191, 36, 0.40); }
#panel-finance-treasury .fin-mod-scope { color: #34d399; -webkit-text-fill-color: #34d399; text-shadow: 0 0 18px rgba(52, 211, 153, 0.40); }
#panel-finance-tax .fin-mod-scope { color: #f472b6; -webkit-text-fill-color: #f472b6; text-shadow: 0 0 18px rgba(244, 114, 182, 0.40); }
#panel-finance-k1 .fin-mod-scope { color: #818cf8; -webkit-text-fill-color: #818cf8; text-shadow: 0 0 18px rgba(129, 140, 248, 0.40); }
#panel-finance-expense .fin-mod-scope { color: #22d3ee; -webkit-text-fill-color: #22d3ee; text-shadow: 0 0 18px rgba(34, 211, 238, 0.40); }
#panel-finance-close .fin-mod-scope { color: #2dd4bf; -webkit-text-fill-color: #2dd4bf; text-shadow: 0 0 18px rgba(45, 212, 191, 0.40); }

/* ── KPI tiles + glowing orbs ── */
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpis.fin-mod-kpis,
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpis[data-fin-kpis] {
  gap: 12px;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  cursor: pointer;
  min-height: 140px;
  align-items: center;
  text-align: center;
  --orb: 110, 118, 135;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi.alert { --orb: 248, 113, 113; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi.warn  { --orb: 245, 158, 11; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi.good  { --orb: 52, 211, 153; }

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi::before {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgb(var(--orb));
  opacity: 1;
  box-shadow:
    0 0 0 2.5px #0a0b0f,
    0 0 0 6px rgba(var(--orb), 0.95),
    0 0 13px 3px rgba(var(--orb), 0.55);
  animation: finModOrbPing 1.6s ease-in-out infinite;
  z-index: 4;
  pointer-events: none;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:nth-of-type(2)::before { animation-delay: 0.30s; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:nth-of-type(3)::before { animation-delay: 0.60s; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:nth-of-type(4)::before { animation-delay: 0.90s; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:nth-of-type(5)::before { animation-delay: 1.20s; }
#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:nth-of-type(6)::before { animation-delay: 1.50s; }

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-kpi-label {
  color: #c4b5fd !important;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  min-height: 28px;
  margin-bottom: 8px;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-kpi-value {
  font-size: 42px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  margin-bottom: 2px;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-spark.fin-spark {
  width: 100%;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  display: block;
  margin: 10px 0 8px;
  flex: 0 0 30px;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi .ct-kpi-change {
  font-size: 12.5px;
  margin-top: auto;
}

#section-live-finance .ops-panel:not(#panel-finance-control-tower) .ct-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
