body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    padding: 30px;
}
h2{
    margin-bottom: 0;
}
h2,
h3 {
    color: #333;
    margin-top: 0;
    font-size: 1.5em;
}


.container {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    max-width: 1119px;
    margin: 30px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* User info header */
.user-info {
    background: #f0f4f8;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Login button (moved from inline styles) */
.user-btn {
    background: #dc3545;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
}

label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

input,
select,
input[type="date"],
input[type="number"],
button {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.time-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Wrap each select with its own column to place error directly below it */
.time-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.time-field select {
    width: 100%;
}

.time-field .error-message {
    margin-top: 3px;
}

.time-group select {
    flex: 1;
}

.recurring-group {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.recurring-group>label {
    display: flex;
    align-items: center;
    font-size: 16px;
    margin: 0;
    cursor: pointer;
}

.recurring-group>label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 0;
}

#recurringOptions {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

/* Hide recurring option panels by default (was inline style) */
#recurringOptions,
#weeklyOptions {
    display: none;
}

/* Inline form utility (was inline style on table action forms) */
.inline-form { display: inline; }

.recurring-type-option {
    margin-bottom: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
}

.recurring-type-option label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}

.recurring-type-option input[type="radio"] {
    width: auto;
    margin-right: 8px;
    margin-top: 0;
}

.recurring-input {
    margin-left: 28px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recurring-input input {
    width: 120px;
    display: inline-block;
}

.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-buttons form {
    margin: 0;
}

.action-buttons button {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    background: #f8f9fa;
    margin: 0;
}

.action-buttons button:hover {
    background: #e9ecef;
}

.cancel-series {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.cancel-series:hover ,
.user-btn:hover{
    background: #c82333 !important;
}

.cancel-single {
    background: #000 !important;
    color: white !important;
    border-color: #000 !important;
}

.cancel-single:hover {
    background: #000 !important;
}

.weekday-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: 28px;
    margin-top: 10px;
}

.weekday-checkboxes>label {
    display: flex;
    align-items: center;
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #bbdefb;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.weekday-checkboxes input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    margin-top: 0;
}

.weekday-checkboxes>label:hover {
    background: #bbdefb;
    border-color: #90caf9;
}

.weekday-checkboxes input[type="checkbox"]:checked+span {
    color: #ffffff;
    font-weight: 600;
}

.weekday-checkboxes input[type="checkbox"]:checked~label {
    background: #1976d2;
    color: white;
    border-color: #1565c0;
}

.weekday-checkboxes label:has(input[type="checkbox"]:checked) {
    background: #0e79e2;
    color: white;
    border-color: #1565c0;
}

.weeks-input {
    margin-left: 28px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weeks-input label {
    margin: 0;
    font-weight: 500;
}

.weeks-input input {
    width: 100px;
    margin: 0;
}

button {
    background-color: #166619;
    color: white;
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 14px;
}

button:hover {
    background-color: #115114;
}

.success {
    color: green;
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}

.booking-list {
    background: #fff;
    padding: 20px;
    margin: 30px auto 0;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th,
td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

th {
    background-color: #41ae45;
    color: white;
}

td {
    background-color: #f9f9f9;
}


.check-availability,
.availability-result {
    border-radius: 10px;
}

.availability-result ul {
    list-style: disc;
    padding-left: 20px;
}

.availability-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.availability-card h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.availability-card span {
    color: #007BFF;
    font-weight: 600;
}

.room-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.room-list li {
    background: #e0f7fa;
    border: 1px solid #b2ebf2;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    color: #00796b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.room-list li:hover {
    background: #00acc1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    opacity: 0.7;
}

.modal-content form {
    padding: 30px;
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content label {
    margin-bottom: 8px;
    color: #333;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.booking-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #4CAF50;
}

.booking-info p {
    margin: 5px 0;
    color: #555;
}

.modal-content .btn {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-content .btn:hover {
    background: #45a049;
}

.no-rooms {
    color: #d32f2f;
    font-weight: bold;
}


.modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 200px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}
.error-message.recurring-input-error,
.error-message.weeks-input-error {
    padding-left: 28px;
}

/* Hide group-level errors when their containers are hidden */
.recurring-input[style*="display: none"] + .error-message.recurring-input-error { display: none !important; }
.weeks-input[style*="display: none"] + .error-message.weeks-input-error { display: none !important; }
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 15px;
        margin: 15px auto;
    }

    label {
        margin-top: 12px;
    }

    .time-group {
        flex-direction: column;
        gap: 6px;
    }


    .recurring-input,
    .weeks-input,
    .weekday-checkboxes {
        margin-left: 0;
    }

    .recurring-input,
    .weeks-input {
        flex-wrap: wrap;
    }

    .weekday-checkboxes {
        gap: 8px;
    }

    .action-buttons {
        justify-content: center;
    }

    button {
        width: 100%;
    }


    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: separate;
        border-spacing: 0;
    }

    th,
    td {
        white-space: nowrap;
    }
    .error-message.recurring-input-error,
    .error-message.weeks-input-error {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    h2,
    h3 {
        font-size: 1.1rem;
    }

    input,
    select,
    button {
        font-size: 14px;
    }

    .recurring-type-option {
        padding: 20px 10px;
    }

    .recurring-input input {
        width: 100px;
    }

    .recurring-group {
        padding: 15px;
    }
}

/* Login page specific styles */
.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.otp-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

/* Login container adjustments */
.login-container .container {
    max-width: 400px;
    margin: 50px auto;
}