<?php
$page_title = 'Legal & Secretarial';
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="display:flex; justify-content:space-between; align-items:center; margin-bottom:24px;">
    <div>
        <h2 style="font-family:'Outfit', sans-serif; font-size:1.8rem; color:#0f172a; margin:0;"><i class="fas fa-balance-scale" style="color:#6366f1; margin-right:10px;"></i>Legal & Secretarial</h2>
        <p style="color:#64748b; font-size:0.95rem; margin-top:5px;">Contract vaults, litigation tracking, trademarks, and board minutes.</p>
    </div>
    <button style="background:#2563eb; color:#fff; border:none; padding:10px 20px; border-radius:8px; font-weight:600; cursor:pointer;"><i class="fas fa-plus" style="margin-right:8px;"></i> Upload Contract</button>
</div>

<div class="grid-3" style="margin-bottom:24px;">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#dbeafe; color:#2563eb; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-file-contract"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">ACTIVE CONTRACTS</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">84</div>
        </div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#fee2e2; color:#ef4444; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-gavel"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">OPEN LITIGATIONS</div>
            <div style="color:#ef4444; font-size:1.4rem; font-weight:700;">2</div>
        </div>
    </div>
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0; display:flex; align-items:center; gap:15px;">
        <div style="width:45px; height:45px; border-radius:10px; background:#dcfce7; color:#10b981; display:flex; align-items:center; justify-content:center; font-size:1.3rem;"><i class="fas fa-trademark"></i></div>
        <div>
            <div style="color:#64748b; font-size:0.8rem; font-weight:600;">TRADEMARKS / IP</div>
            <div style="color:#0f172a; font-size:1.4rem; font-weight:700;">18</div>
        </div>
    </div>
</div>

<div class="grid-2">
    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-folder-open" style="color:#f59e0b; margin-right:8px;"></i> Contract Vault</h3>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:12px; margin-bottom:10px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0; font-size:0.9rem;">Tata Steel — Annual Supply Agreement</h4>
                <p style="margin:3px 0 0; font-size:0.8rem; color:#64748b;">Expires: 31 Mar 2027 • Value: ₹14 Cr</p>
            </div>
            <a href="#" style="color:#2563eb; font-size:0.85rem;"><i class="fas fa-eye"></i></a>
        </div>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:12px; margin-bottom:10px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0; font-size:0.9rem;">JSW Steel — Spot Purchase Contract</h4>
                <p style="margin:3px 0 0; font-size:0.8rem; color:#64748b;">Expires: 30 Jun 2026 • Value: ₹2.8 Cr</p>
            </div>
            <a href="#" style="color:#2563eb; font-size:0.85rem;"><i class="fas fa-eye"></i></a>
        </div>
        <div style="border:1px solid #e2e8f0; border-radius:8px; padding:12px; display:flex; justify-content:space-between; align-items:center;">
            <div>
                <h4 style="margin:0; font-size:0.9rem;">Factory Lease — Bhiwandi Unit 2</h4>
                <p style="margin:3px 0 0; font-size:0.8rem; color:#64748b;">Expires: 15 Dec 2028 • Rent: ₹4.2L/mo</p>
            </div>
            <a href="#" style="color:#2563eb; font-size:0.85rem;"><i class="fas fa-eye"></i></a>
        </div>
    </div>

    <div style="background:#fff; padding:20px; border-radius:12px; border:1px solid #e2e8f0;">
        <h3 style="margin:0 0 15px; font-size:1.15rem; color:#0f172a;"><i class="fas fa-calendar-check" style="color:#10b981; margin-right:8px;"></i> Secretarial Compliance Calendar</h3>
        <div style="border-left:3px solid #10b981; padding-left:15px; margin-bottom:20px;">
            <h4 style="margin:0 0 3px; font-size:0.95rem;">Annual General Meeting (AGM)</h4>
            <p style="margin:0; font-size:0.85rem; color:#64748b;">Scheduled: 28 Sep 2026 • Status: Notice drafted</p>
        </div>
        <div style="border-left:3px solid #3b82f6; padding-left:15px; margin-bottom:20px;">
            <h4 style="margin:0 0 3px; font-size:0.95rem;">ROC Annual Return Filing</h4>
            <p style="margin:0; font-size:0.85rem; color:#64748b;">Due: 30 Nov 2026 • Status: In preparation</p>
        </div>
        <div style="border-left:3px solid #f59e0b; padding-left:15px;">
            <h4 style="margin:0 0 3px; font-size:0.95rem;">Board Meeting — Q2 Review</h4>
            <p style="margin:0; font-size:0.85rem; color:#64748b;">Scheduled: 15 May 2026 • Agenda: Circulated</p>
        </div>
    </div>
</div>

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