<style>
.headline {
    font-family: "Playfair Display",serif;
}
</style>
<?php if ($this->Identity->isLoggedIn() && $this->Identity->get('role') === 'admin'): ?>
    <h1 style="text-align:center; margin-bottom:40px; color:#4B3621;" class="headline">Admin Dashboard</h1>
<?php endif; ?>
<?php if ($this->Identity->isLoggedIn() && $this->Identity->get('role') === 'staff'): ?>
    <h1 style="text-align:center; margin-bottom:40px; color:#4B3621;" class="headline">Staff Dashboard</h1>
<?php endif; ?>
<h3 style="text-align: center" class="headline">Welcome back, <?=h($this->Identity->get('email'))?></h3><br><br><br><br>
<div style="display:flex; flex-wrap:wrap; justify-content:center; gap:30px;" class="headline">
    <a href="<?= $this->Url->build(['controller' => 'Auth', 'action' => 'inquiries']) ?>"
       style="text-decoration:none;">
        <div style="width:300px; height:150px; background:#4B3621; color:white; display:flex;
                    flex-direction:column; justify-content:center; align-items:center;
                    border-radius:12px; box-shadow:0 4px 6px rgba(0,0,0,0.3); transition:0.3s;">
            <h3>Manage Inquiries</h3>
            <p>View and edit inquiries</p>
        </div>
    </a>
    <a href="<?= $this->Url->build(['controller' => 'Orders', 'action' => 'adminIndex']) ?>"
       style="text-decoration:none;">
        <div style="width:300px; height:150px; background:#4B3621; color:white; display:flex;
                  flex-direction:column; justify-content:center; align-items:center;
                  border-radius:12px; box-shadow:0 4px 6px rgba(0,0,0,0.3); transition:0.3s;">
            <h3>Manage Orders</h3>
            <p>View, update status, or cancel</p>
        </div>
    </a>
    <?php if ($this->Identity->isLoggedIn() && $this->Identity->get('role') === 'admin'): ?>
    <a href="<?= $this->Url->build(['controller' => 'adminContentBlocks', 'action' => 'index']) ?>"
       style="text-decoration:none;">
        <div style="width:300px; height:150px; background:#4B3621; color:white; display:flex;
                    flex-direction:column; justify-content:center; align-items:center;
                    border-radius:12px; box-shadow:0 4px 6px rgba(0,0,0,0.3); transition:0.3s;">
            <h3>Manage Content</h3>
            <p>Edit landing page</p>
        </div>
    </a>

        <a href="<?= $this->Url->build(['controller' => 'Products', 'action' => 'index']) ?>"
           style="text-decoration:none;">
            <div style="width:300px; height:150px; background:#4B3621; color:white; display:flex;
                    flex-direction:column; justify-content:center; align-items:center;
                    border-radius:12px; box-shadow:0 4px 6px rgba(0,0,0,0.3); transition:0.3s;">
                <h3>Manage products</h3>
                <p>View, add and edit products</p>
            </div>
        </a>


    <?php endif; ?>
</div>
<br><br><br><br><br><br>
<style>
    div a div:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 12px rgba(0,0,0,0.5);
    }
</style>
