<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Visitors Details</title>

    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f9f9f9;
            color: #333;
            margin: 0;
            padding: 20px;
        }

        header {
            background: linear-gradient(135deg, #3f51b5, #5c6bc0);
            /* Gradient background */
            color: white;
            padding: 30px;
            /* Increased padding for a spacious look */
            text-align: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            /* Shadow effect */
            border-radius: 10px;
            /* Rounded corners */
        }

        .container {
            width: 80%;
            margin: 0 auto;
            background-color: white;
            padding: 20px;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
            border-radius: 10px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }

        table,
        th,
        td {
            border: 1px solid #ddd;
        }

        th,
        td {
            padding: 12px 15px;
            text-align: left;
        }

        th {
            background-color: #3f51b5;
            color: white;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        tr:hover {
            background-color: #f1f1f1;
        }

        h2 {
            margin-bottom: 10px;
            font-size: 2em;
            color: #3f51b5;
        }

        .logo {
            text-align: center;
            margin-bottom: 20px;
        }
    </style>
</head>

<body>
    <header>
        <h1>Property on location</h1>
    </header>

    <div class="container">
        <h2>Project Visitors Details</h2>
        <table>
            <thead>
                <tr>
                    <th>Visitor Name</th>
                    <th>Visitor id</th>
                    <th>Mobile </th>
                    <th>Date</th>
                </tr>
                <tr>
                    <th colspan="4">
                        Note: the contact numbers you have seen will be downloaded only.
                    </th>
                </tr>
            </thead>
            <tbody>
                <% visitors.forEach(visitor=> { %>
                    <tr>
                        <td>
                            <%= visitor.name %>
                        </td>
                        <td>
                            <%= visitor.refno %>
                        </td>
                        <td>
                            <%= visitor.mobile %>
                        </td>
                        <td>

                            <%= visitor.userhistories.created_at %>

                        </td>

                    </tr>
                    <% }); %>
            </tbody>
        </table>
    </div>

</body>

</html>