/* ---------------------- General Body ---------------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px;
    background: #f0f2f5;
    color: #333;
}

/* ---------------------- Tabs ---------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.tabs button {
    padding: 10px 16px;
    margin: 0;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.tabs button:hover {
    background: #2980b9;
}

/* ---------------------- Tab Content ---------------------- */
.tab {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-top: 10px;
    overflow-x: auto;
}

/* ---------------------- Room Grid ---------------------- */
#roomGrid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(60px,1fr));
    gap:8px;
}

.room {
    padding: 12px;
    color: white;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
}
.available { background: #2ecc71; }
.occupied { background: #e74c3c; }

/* ---------------------- Tables Styling ---------------------- */
table{
width:100%;
border-collapse:collapse;
font-size:14px;
}

th{
background:#3498db;
color:white;
padding:10px;
}

td{
padding:8px;
border-bottom:1px solid #ddd;
text-align:center;
}

td input{
width:70px;
padding:4px;
}

tfoot td{
font-weight:bold;
background:#f4f4f4;
}

/* ---------------------- Paid / Unpaid Coloring ---------------------- */
.unpaid { background: #ffe3e3 !important; }
.paid { background: #e3ffe3 !important; }

/* ---------------------- Buttons ---------------------- */
button {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}
button:hover {
    opacity: 0.85;
}
#occupiedBody button,
#historyBody button,
#expenseList button {
    font-size: 12px;
    padding: 4px 8px;
    margin: 2px 0;
}

/* ---------------------- Checkout Alerts ---------------------- */
#checkoutAlerts {
    margin-top: 10px;
    font-weight: bold;
    color: #c0392b;
}

/* ---------------------- Login Page ---------------------- */
#loginPage {
    width: 300px;
    margin: auto;
    margin-top: 150px;
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
#loginPage input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}
#loginPage button {
    width: 95%;
    padding: 10px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
#loginPage button:hover {
    background: #2980b9;
}

/* ---------------------- Shake Animation ---------------------- */
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}
.shake { animation: shake 0.5s; }

/* ---------------------- Logout Button ---------------------- */
#logoutBtn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    float: right;
    margin-top: -50px;
    font-weight: bold;
}
#logoutBtn:hover {
    background: #c0392b;
}

/* ---------------------- New Booking Form ---------------------- */
/* ---------------------- New Booking Form Fixed ---------------------- */
.booking-form {
    display: grid;
    grid-template-columns: 150px 1fr; /* labels + inputs */
    gap: 12px 20px; /* row gap, column gap */
    max-width: 700px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    align-items: center;
}
.booking-form label {
    font-weight: bold;
    text-align: right;
    padding-right: 10px;
}
.booking-form input,
.booking-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}
.booking-form button {
    grid-column: 1 / 3; /* button spans both columns */
    padding: 10px 15px;
    margin-top: 10px;
    background: #3498db;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.booking-form button:hover {
    background: #2980b9;
}

/* Responsive fix */
@media screen and (max-width: 600px) {
    .booking-form {
        grid-template-columns: 1fr; /* stack labels + inputs */
    }
    .booking-form label {
        text-align: left;
        padding-right: 0;
    }
    .booking-form button {
        grid-column: 1 / 2; /* full width on mobile */
    }
}

/********* popup *********/
.popup{
display:none;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.4);
justify-content:center;
align-items:center;
}

.popup-content{
background:white;
padding:20px;
border-radius:8px;
width:250px;
text-align:center;
}

.popup-content input{
width:90%;
padding:8px;
margin-top:10px;
}

/****** dashboard chart ********/
.available{
background:#2ecc71;
}

.occupied{
background:#e74c3c;
}

.checkout{
background:#f1c40f;
color:black;
}

.dirty{
background:#8e44ad;
}

.clean-btn{
background:#2ecc71;
color:white;
border:none;
padding:6px 12px;
border-radius:4px;
cursor:pointer;
font-size:13px;
}

.clean-btn:hover{
background:#27ae60;
}

#cleaning table td{
vertical-align:middle;
}

#cleaning table td:last-child{
text-align:center;
}

/* Mobile responsive */

@media (max-width:768px){

body{
margin:10px;
}

/* Title */
h1{
font-size:22px;
}

/* Tabs wrap */
.tabs{
display:flex;
flex-wrap:wrap;
gap:5px;
}

.tabs button{
flex:1 1 45%;
font-size:14px;
padding:8px;
}

/* Logout button */
#logoutBtn{
font-size:12px;
padding:6px 10px;
}

}
.table-container{
width:100%;
overflow-x:auto;
}

.booking-form{
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
}

.booking-form input,
.booking-form select{
width:100%;
padding:8px;
}

@media (max-width:600px){

.booking-form{
grid-template-columns:1fr;
}

}