<?php
session_start();
if (!isset($_SESSION['role_id']) || !in_array($_SESSION['role_id'], [1, 4])) {
    header("Location: ../../index.php");
    exit();
}
include('../../includes/header.php');
?>

<style>
body {
    font-family: 'Segoe UI', sans-serif;
    background: url('../../images/profile.jpg') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    color: #fff;
}
.container {
    max-width: 1850px;
    margin: 60px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    backdrop-filter: blur(18
    px);
    box-shadow: 0 0 20px rgba(255, 123, 0, 0.3);
}
h1 {
    color: #ffa500;
    margin-bottom: 30px;
    font-size: 28px;
}
.section-title {
    margin-top: 30px;
    font-size: 22px;
    color: #ffa500;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 5px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.report-card {
    background: rgba(255,255,255,0.06);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}
.report-card:hover {
    background: rgba(255,165,0,0.1);
    transform: scale(1.02);
}
.report-card i {
    font-size: 28px;
    color: #ffa500;
    margin-bottom: 10px;
}
.report-card a {
    text-decoration: none;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    display: block;
}
</style>

<div class="container">
    <h1>📊 Financial Reports Dashboard</h1>

    <div class="section-title">📈 Financial Statements</div>
    <div class="grid">
        <div class="report-card"><i class="fas fa-file-invoice-dollar"></i><a href="income_statement.php">Income Statement</a></div>
        <div class="report-card"><i class="fas fa-balance-scale-left"></i><a href="balance_sheet.php">Balance Sheet</a></div>
        <div class="report-card"><i class="fas fa-cash-register"></i><a href="cashflow_report.php">Cash Flow Statement</a></div>
        <div class="report-card"><i class="fas fa-book"></i><a href="general_ledger.php">General Ledger</a></div>
        <div class="report-card"><i class="fas fa-scale-balanced"></i><a href="trial_balance.php">Trial Balance</a></div>
    </div>

    <div class="section-title">💰 Tax & Compliance</div>
    <div class="grid">
        <div class="report-card"><i class="fas fa-percent"></i><a href="tax_report.php">VAT Tax Report</a></div>
        <div class="report-card"><i class="fas fa-receipt"></i><a href="vat_collection_report.php">VAT Collection Report</a></div>
        <div class="report-card"><i class="fas fa-hand-holding-usd"></i><a href="payment_method_report.php">Payment Method Report</a></div>
    </div>

    <div class="section-title">🏦 Bank & Reconciliation</div>
    <div class="grid">
        <div class="report-card"><i class="fas fa-university"></i><a href="bank_reconciliation.php">Bank Reconciliation</a></div>
        <div class="report-card"><i class="fas fa-file-signature"></i><a href="reconciliation_reports.php">Reconciliation Reports</a></div>
        <div class="report-card"><i class="fas fa-history"></i><a href="reconciliation_audit_history.php">Audit History</a></div>
        <div class="report-card"><i class="fas fa-chart-line"></i><a href="variance_report.php">Variance Report</a></div>
    </div>

    <div class="section-title">📦 Inventory & Cost</div>
    <div class="grid">
        <div class="report-card"><i class="fas fa-boxes"></i><a href="inventory_valuation.php">Inventory Valuation</a></div>
        <div class="report-card"><i class="fas fa-money-bill-wave"></i><a href="cogs_report.php">COGS Report</a></div>
    </div>

    <div class="section-title">🧾 Transactions & Journals</div>
    <div class="grid">
        <div class="report-card"><i class="fas fa-random"></i><a href="transactions.php">Transaction Ledger</a></div>
        <div class="report-card"><i class="fas fa-pen-fancy"></i><a href="journal_entries.php">Journal Entries</a></div>
        <div class="report-card"><i class="fas fa-receipt"></i><a href="accountant_sales.php">Sales Records</a></div>
        <div class="report-card"><i class="fas fa-file-invoice"></i><a href="accountant_invoices.php">Invoices</a></div>
        <div class="report-card"><i class="fas fa-money-check-alt"></i><a href="accountant_expenses.php">Expenses</a></div>
        <div class="report-card"><i class="fas fa-chart-bar"></i><a href="accountant_reports.php">Accountant Reports</a></div>
    </div>
</div>

<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/a2e0c6d5c5.js" crossorigin="anonymous"></script>

<?php include('../../includes/footer.php'); ?>
