<?php
$page_title = 'Corporate HQ Control Tower';
require_once __DIR__ . '/../config.php';
if (session_status() === PHP_SESSION_NONE) { session_start(); }
if (!isset($_SESSION['admin_id'])) { redirect(SITE_URL . '/admin/login.php'); }
require_once __DIR__ . '/header.php';
?>

<div style="background:#0f172a; border-radius:16px; padding:30px; color:#fff; margin-bottom:24px; position:relative; overflow:hidden;">
    <div style="position:relative; z-index:2;">
        <h2 style="font-size:2rem; margin:0 0 10px; font-family:'Outfit', sans-serif;">Executive Command Center</h2>
        <p style="color:#94a3b8; font-size:1rem; margin:0 0 20px;">Real-time enterprise overview for C-level executives.</p>
        
        <div style="display:grid; grid-template-columns:repeat(4, 1fr); gap:20px; margin-top:30px;">
            <div style="background:rgba(255,255,255,0.05); padding:20px; border-radius:12px; border:1px solid rgba(255,255,255,0.1);">
                <div style="color:#94a3b8; font-size:0.85rem; text-transform:uppercase; font-weight:600; margin-bottom:10px;"><i class="fas fa-chart-bar" style="color:#3b82f6; margin-right:5px;"></i> Live Revenue Ticker</div>
                <div style="font-size:2rem; font-weight:700;">₹45.2 Cr</div>
                <div style="color:#10b981; font-size:0.8rem; margin-top:5px;"><i class="fas fa-arrow-up"></i> +12.4% Today</div>
            </div>
            <div style="background:rgba(255,255,255,0.05); padding:20px; border-radius:12px; border:1px solid rgba(255,255,255,0.1);">
                <div style="color:#94a3b8; font-size:0.85rem; text-transform:uppercase; font-weight:600; margin-bottom:10px;"><i class="fas fa-industry" style="color:#f59e0b; margin-right:5px;"></i> Factory Output</div>
                <div style="font-size:2rem; font-weight:700;">14,250 <span style="font-size:1rem; color:#94a3b8;">Units</span></div>
                <div style="color:#10b981; font-size:0.8rem; margin-top:5px;">98% Line Efficiency</div>
            </div>
            <div style="background:rgba(255,255,255,0.05); padding:20px; border-radius:12px; border:1px solid rgba(255,255,255,0.1);">
                <div style="color:#94a3b8; font-size:0.85rem; text-transform:uppercase; font-weight:600; margin-bottom:10px;"><i class="fas fa-smile" style="color:#10b981; margin-right:5px;"></i> CSAT Index</div>
                <div style="font-size:2rem; font-weight:700;">4.8<span style="font-size:1.2rem; color:#94a3b8;">/5.0</span></div>
                <div style="color:#10b981; font-size:0.8rem; margin-top:5px;">Based on 1,240 reviews</div>
            </div>
            <div style="background:rgba(255,255,255,0.05); padding:20px; border-radius:12px; border:1px solid rgba(255,255,255,0.1); border-left:4px solid #ef4444;">
                <div style="color:#94a3b8; font-size:0.85rem; text-transform:uppercase; font-weight:600; margin-bottom:10px;"><i class="fas fa-exclamation-triangle" style="color:#ef4444; margin-right:5px;"></i> Risk Alerts</div>
                <div style="font-size:2rem; font-weight:700; color:#ef4444;">2</div>
                <div style="color:#ef4444; font-size:0.8rem; margin-top:5px;">High Severity Complaints</div>
            </div>
        </div>
    </div>
    <div style="position:absolute; top:-50px; right:-50px; opacity:0.1;">
        <i class="fas fa-globe" style="font-size:30rem;"></i>
    </div>
</div>

<div style="display:grid; grid-template-columns:1fr 1fr; gap:24px;">
    <!-- Heatmap & Geography -->
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; box-shadow:0 4px 6px -1px rgba(0,0,0,0.05);">
        <h3 style="margin:0 0 15px; font-size:1.1rem; color:#0f172a;">Dealer Sales Heatmap</h3>
        <div style="height:300px; background:#f1f5f9; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#94a3b8;">
            <i class="fas fa-map" style="font-size:4rem; margin-bottom:10px;"></i>
            <p style="margin:0; text-align:center; position:absolute;">Interactive Geographic Map Loading...<br><span style="font-size:0.8rem;">State-wise Performance Metrics Active</span></p>
        </div>
    </div>

    <!-- Board Governance -->
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; box-shadow:0 4px 6px -1px rgba(0,0,0,0.05);">
        <h3 style="margin:0 0 15px; font-size:1.1rem; color:#0f172a;">Board Governance & Compliance</h3>
        
        <div style="border-left:3px solid #3b82f6; padding-left:15px; margin-bottom:20px;">
            <h4 style="margin:0 0 5px; font-size:0.95rem; color:#0f172a;">Q3 Board Performance Pack</h4>
            <p style="margin:0 0 10px; font-size:0.85rem; color:#64748b;">Ready for committee review.</p>
            <button style="background:#f1f5f9; color:#0f172a; border:1px solid #cbd5e1; padding:6px 12px; border-radius:6px; font-size:0.8rem; cursor:pointer;"><i class="fas fa-file-pdf"></i> Download Pack</button>
        </div>
        
        <div style="border-left:3px solid #10b981; padding-left:15px; margin-bottom:20px;">
            <h4 style="margin:0 0 5px; font-size:0.95rem; color:#0f172a;">Regulatory Compliance Tracker</h4>
            <p style="margin:0 0 10px; font-size:0.85rem; color:#64748b;">All local and national compliances met for current quarter.</p>
            <div style="background:#dcfce7; color:#166534; padding:4px 8px; border-radius:4px; font-size:0.75rem; display:inline-block; font-weight:600;">100% Compliant</div>
        </div>
        
        <div style="border-left:3px solid #f59e0b; padding-left:15px;">
            <h4 style="margin:0 0 5px; font-size:0.95rem; color:#0f172a;">Pending Audit Resolutions</h4>
            <p style="margin:0; font-size:0.85rem; color:#64748b;">3 minor resolutions pending from internal audit team.</p>
        </div>
    </div>
</div>

<?php require_once __DIR__ . '/footer.php'; ?>
