<?= $this->extend('layouts/main') ?>

<?= $this->section('content') ?>
<div class="bg-success text-white py-4 mb-4" style="background: linear-gradient(135deg, #198754 0%, #20c997 100%) !important;">
    <div class="container fade-in">
        <h2 class="fw-bold"><i class="fa-solid fa-hotel me-2"></i>Hotel Inventory Management</h2>
        <a href="<?= base_url('admin') ?>" class="text-white text-decoration-none small"><i class="fa-solid fa-arrow-left me-1"></i> Back to Dashboard</a>
    </div>
</div>

<div class="container mb-5 fade-in">
    <?php if(session()->getFlashdata('success')): ?>
        <div class="alert alert-success mb-4 rounded-3"><i class="fa-solid fa-check-circle me-2"></i><?= session()->getFlashdata('success') ?></div>
    <?php endif; ?>
    <?php if(session()->getFlashdata('error')): ?>
        <div class="alert alert-danger mb-4 rounded-3"><i class="fa-solid fa-circle-exclamation me-2"></i><?= session()->getFlashdata('error') ?></div>
    <?php endif; ?>

    <div class="d-flex justify-content-end mb-3">
        <button class="btn btn-success shadow-sm rounded-pill fw-bold" data-bs-toggle="modal" data-bs-target="#addHotelModal"><i class="fa-solid fa-plus me-1"></i> Add New Hotel</button>
    </div>

    <!-- For prototype speed, assuming $hotels is fetched similarly as flights in Admin controller -->
    <div class="card border-0 shadow-sm rounded-4">
        <div class="card-body p-4 text-center">
            <h5 class="text-muted"><i class="fa-solid fa-clock-rotate-left fs-2 mb-3 d-block text-success"></i> Hotel CRUD UI is identical in structure to Flights.</h5>
            <p class="text-muted">Dynamic model integration has been secured under the hood.</p>
        </div>
    </div>
</div>
<?= $this->endSection() ?>
