# 🏛️ Enterprise UHI Actuarial Command Center (v1.2.1 Stable)
A sovereign, AI-powered actuarial platform designed for the **Egyptian Universal Health Insurance (UHI) Authority**. This system provides real-time solvency projections, stress testing, and executive reasoning in full compliance with **Law No. 2 of 2018**.
## 🚀 Strategic Modules
- **🧠 Module E: Intelligence Hub**: Live strategic reasoning via **Gemini 2.0 Flash**. Interact with data using natural language.
- **🎲 Module B: Stochastic Risk**: 1,000-scenario Monte Carlo simulations for long-term insolvency probability (Solvency II style).
- **⚖️ Module F: Agentic Oversight**: Specialized AI Agents (Legislative, Actuarial, Financial) continuously auditing the system's health.
- **ℹ️ Module A: Explainable AI (XAI)**: Attribution analysis to pinpoint precisely which economic factors drive cost increases.
- **🛡️ Module C: Governance**: Immutable audit trail of every assumption change.
## 🏛️ Regulatory Alignment
- **Article 40 (State Guarantee)**: Automated insolvency triggers and treasury subsidy calculations.
- **Contribution Logic**: Precise calculation of payroll contributions for Employees, Self-employed, and State-supported citizens.
- **Admin Expense Cap**: Strict enforcement and monitoring of the 5% administrative overhead legal limit.
## 🛠️ Modern Tech Stack
- **Engine**: Pure Python Actuarial Logic (`pricing_engine.py`).
- **Intelligence**: Google Vertex AI (Gemini 2.0 Flash).
- **UI Architecture**: Modernized Streamlit (2026 Ready, `width='stretch'` optimized).
- **Authentication**: Master Key JSON Auth (Silent fail-safe architecture).
## 📦 Installation & Sync
```powershell
# 1. Clone & Install
git clone [repository-url]
cd actuarial-loss-estimation
pip install -r requirements.txt
# 2. Run Dashboard
streamlit run app.py
```
## 🔐 Authentication Protocol
For executive demonstrations, use the **"🔑 Upload Service Account JSON"** feature in the sidebar. This ensures 100% stability and bypasses chara …