<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Custora CRM - Welcome</title>
    <link rel="icon" href="public/assets/img/custora_logo.png" type="image/png">
    <style>
        /* Reset defaults */
        * { box-sizing: border-box; margin:0; padding:0; }

        body {
            font-family: Arial, sans-serif;
            background: #f4f7fa;
        }

        header {
            background: #005f8d;
            color: #fff;
            padding: 15px 20px;
            text-align: center;
        }

        header h2 { margin:0; font-size: 1.8rem; }

        .container {
            max-width: 800px;
            width: 90%;
            margin: 30px auto;
            background: #fff;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        h1 {
            color: #005f8d;
            font-size: 2rem;
            margin-bottom: 10px;
        }

        h3 {
            color: #005f8d;
            font-size: 1.2rem;
            margin-bottom: 20px;
        }

        p {
            color: #333;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        p.italic {
            font-style: italic;
            color: #666;
        }

        .btn-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 20px;
            justify-content: center;
        }

        .btn {
            display: inline-block;
            padding: 12px 20px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: bold;
            color: #fff;
            text-align: center;
            min-width: 140px;
            transition: background 0.3s;
        }

        .btn-login { background: #005f8d; }
        .btn-login:hover { background: #17a2b8; }

        .btn-contact { background: #17a2b8; }
        .btn-contact:hover { background: #005f8d; }

        footer {
            text-align: center;
            padding: 15px;
            margin-top: 40px;
            background: #f0f0f0;
            color: #555;
            font-size: 14px;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            h1 { font-size: 1.6rem; }
            h3 { font-size: 1.1rem; }
            p { font-size: 14px; }
            .btn { font-size: 14px; padding: 10px 16px; min-width: 120px; }
        }

        @media (max-width: 480px) {
            h1 { font-size: 1.4rem; }
            h3 { font-size: 1rem; }
            p { font-size: 13px; }
            .btn { font-size: 13px; padding: 8px 12px; min-width: 100px; }
        }
    </style>
</head>
<body>
    <header>
        <h2>Custora CRM</h2>
    </header>

    <div class="container">
        <h1>Welcome to Custora CRM</h1>
        <h3>Hello guest!</h3>
        
        <p>
            Custora CRM is a powerful and user-friendly platform designed to help teams manage projects, 
            track issues, assign reporters, and coordinate with support and admin members efficiently.  
            Our CRM ensures smooth project tracking and communication.
        </p>

        <p>
            Whether you are a project reporter, a support team member, or an admin, Custora CRM streamlines your workflow 
            by keeping all tasks organized and accessible from one place.  
        </p>

        <p class="italic">
            Please log in if you have an account, or contact the system administrator for access.
        </p>

        <div class="btn-container">
            <a href="auth/login.php" class="btn btn-login">Login</a>
            <a href="auth/contact_admin.php" class="btn btn-contact">Contact System Admin</a>
        </div>
    </div>

    <footer>
        &copy; <?php echo date('Y'); ?> Custora CRM - Digital Vortex Technologies Limited. All rights reserved.
    </footer>
</body>
</html>