/* =======================================================================
   Online Hotel Booking & Management System
   Stylesheet
   ======================================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fb;
    color: #182230;
    line-height: 1.5;
}

/* ---- top navigation ------------------------------------------------- */

.topbar {
    background: #172033;
    color: #fff;
    padding: 16px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 25px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.topbar nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 18px;
    opacity: 0.9;
}

.topbar nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ---- hero banner ------------------------------------------------------ */

.hero {
    padding: 90px 7%;
    background: linear-gradient(120deg, #172033, #315b89);
    color: #fff;
}

.hero h1 {
    font-size: 48px;
    margin: 0 0 15px;
}

.hero .btn.secondary {
    margin-left: 10px;
}

/* ---- layout helpers ---------------------------------------------------- */

.container {
    width: 86%;
    max-width: 1200px;
    margin: 35px auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ---- cards / panels ------------------------------------------------- */

.card,
.panel {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

a.card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.room-img {
    height: 150px;
    background: #dfe8f4;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #315b89;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---- buttons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    background: #1769aa;
    color: #fff;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}

.btn.secondary {
    background: #445;
}

.btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ---- forms -------------------------------------------------------------- */

.form {
    max-width: 620px;
    margin: 40px auto;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 12px;
    margin: 7px 0 15px;
    border: 1px solid #ccd3dd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
}

.form label {
    font-weight: 600;
    font-size: 14px;
    color: #445;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    margin: 6px 0;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.service-list {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inline-form input,
.inline-form select {
    width: auto;
    flex: 1 1 160px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input[type="number"] {
    padding: 10px;
    border: 1px solid #ccd3dd;
    border-radius: 8px;
}

/* per-row admin forms live inside a <tr>; display:contents keeps the
   table structure valid-looking while still submitting each row on
   its own */
form.row-form {
    display: contents;
}

.cell-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #dde3ec;
    border-radius: 6px;
}

/* ---- alerts / badges --------------------------------------------------- */

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    background: #fff0d5;
    margin: 15px 0;
}

.alert-success {
    background: #ddf5e3;
    color: #1a6b34;
}

.alert-error {
    background: #fbe1e1;
    color: #9c1f1f;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-available,
.badge-confirmed,
.badge-completed {
    background: #ddf5e3;
    color: #1a6b34;
}

.badge-pending,
.badge-requested,
.badge-processing {
    background: #fff0d5;
    color: #9a6a00;
}

.badge-occupied,
.badge-maintenance,
.badge-cancelled {
    background: #fbe1e1;
    color: #9c1f1f;
}

/* ---- stats + tables ---------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat strong {
    display: block;
    font-size: 30px;
    margin-top: 5px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #e5e8ed;
    text-align: left;
}

.table th {
    background: #f0f3f8;
}

.muted {
    color: #6b7686;
    font-size: 14px;
}

/* ---- footer ---------------------------------------------------------- */

footer {
    text-align: center;
    padding: 25px;
    background: #172033;
    color: #fff;
    margin-top: 50px;
}

footer .muted {
    color: #aab3c5;
}

/* ---- small screens ----------------------------------------------------- */

@media (max-width: 700px) {
    .topbar {
        display: block;
    }

    .topbar nav {
        margin-top: 12px;
    }

    .topbar nav a {
        margin: 0 10px 0 0;
    }

    .hero h1 {
        font-size: 34px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}
