body {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.fa-solid {
    margin-right: 5px;
}

.spinner {
    text-align: center;
}

.btn-primary {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.text-right {
    text-align: right;
}

label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 700;
}

.flex-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.wrapper {
    width: 65%;
    padding: 2em;
    margin: 0 auto auto;
}

.header-title a,
.header-title a:hover {
    color: black;
}

h1 {
    border-bottom: 1px solid #ccc;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    padding: 0 0 0.2em 0;
}

h4 {
    font-size: 18px;
}

a {
    color: #6fa8dc;
    font-weight: 300;
    text-decoration: none;
}

a:hover {
    color: #3d85c6;
}

.menu-btn {
    font-size: 18.5px;
}

.dropdown-item:hover,
.dropdown-item:active,
.dropdown-toggle:hover {
    color: black;
    background-color: #e7f1ff;
}

.btn-primary:hover,
.btn-primary:active {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.dropdowns-div {
    display: flex;
}

.dropdowns-menu {
    background-color: #f5f5f5 !important;
}

.dropdowns-menu span {
    font-size: 3rem !important;
}

.dropdown-logout {
    background: none;
    border: none;
}

.btn-delete:hover,
.btn-delete:active {
    color: white;
}

.button-back {
    display: inline-flex;
    align-items: center;
}

#processingButton {
    background-color: #4CAF50;
    color: white;

    font-size: 1.65em;
    font-weight: bold;

    width: 100%;
    height: 3em;
    border-radius: 0.5em;
}

#processingButton:disabled {
    background-color: gray;
}

.loading {
    display: none;
}

.loading img {
    width: 1.5em;
}

.form-password {
    display: flex !important;
    padding: 0 !important;
}

.form-password input {
    padding: 6px 12px;
}

.form-password span {
    margin: 6px 12px;
}

.form-password:-internal-autofill-selected {
    appearance: menulist-button;
    background-image: none !important;
    background-color: light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important;
    color: fieldtext !important;
}

.form-password input {
    border: none;
    width: 100%;
}

.form-password input:focus {
    outline: none;
}

.form-password span {
    color: #337ab7;
    padding: 0 10px;
    cursor: pointer;
    background-color: #daeefe;
    border-radius: 100px;

    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
}

.header-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.back-button-div {
    margin-top: 2rem;
}

.long-btn {
    width: 100%;
    height: 3em;
    font-size: 1.5em !important;
    border-radius: 0.5em !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media only screen and (max-width: 576px) {
    .d-flex.flex-column .order-2 {
        margin-top: 0.5rem;
        align-items: flex-end;
    }

    .table-actions {
        flex-direction: column;
    }
}

@media only screen and (max-width: 700px) {
    .filters {
        flex-direction: column;
        width: 100%;
    }
 
}

@media only screen and (max-width: 900px) {
    .wrapper {
        width: 95%;
    }
    
    .square i {
        transform: rotate(-90deg);
    }

    ::-webkit-scrollbar {
        width: 12px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    ::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 6px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

@media only screen and (max-width: 1200px) {
    h1 {
        font-size: 36px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
}


/* 
--------------------------
    NEW STYLES 
--------------------------
*/

/* Homepage */
.rooms-container {
    max-width: 1200px;
    margin: 0 auto;
}

.rooms-header {
    margin-bottom: 25px;
}

.rooms-header h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.rooms-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.room-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease,
        border-color 0.15s ease;
}

.room-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.room-label {
    display: block;
    margin-bottom: 3px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.room-card h3 {
    margin: 0;
    font-size: 24px;
}

.room-status {
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.room-status.Available {
    background: #ecfdf5;
    color: #059669;
}

.room-status.Occupied {
    background: #fff7ed;
    color: #ea580c;
}

.room-status.Maintenance {
    background: #fef2f2;
    color: #dc2626;
}

.room-type {
    margin-top: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.room-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.room-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-detail i {
    color: #6366f1;
    font-size: 14px;
}

.room-detail span {
    display: block;
    color: #9ca3af;
    font-size: 10px;
}

.room-detail strong {
    display: block;
    margin-top: 2px;
    font-size: 13px;
}

.room-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f3f4f6;
}

.room-price strong {
    font-size: 17px;
}

.room-price span {
    color: #9ca3af;
    font-size: 11px;
}

.room-camera-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 6px;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.room-camera-button:hover {
    background: #4338ca;
    color: #fff;
}

@media (max-width: 900px) {
    .rooms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .rooms-grid {
        grid-template-columns: 1fr;
    }
}

/* Hotel Configurations */

.configuration-container {
    max-width: 1100px;
    margin: 0 auto;
}

.configuration-header {
    margin-bottom: 20px;
}

.configuration-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.configuration-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}


/* Card */

.configuration-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}


/* Tabs */

.configuration-card .nav-tabs {
    display: flex;

    margin-bottom: 0 !important;

    padding: 0 25px;

    border-bottom: 1px solid #e5e7eb;
}

.configuration-card .nav-tabs .nav-item {
    margin-bottom: -1px;
}

.configuration-card .nav-tabs .nav-link {
    position: relative;

    border: none;
    border-radius: 0;

    background: transparent;

    padding: 17px 5px;
    margin-right: 30px;

    color: #6b7280;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.configuration-card .nav-tabs .nav-link:hover {
    color: #374151;

    border-color: transparent;
}

.configuration-card .nav-tabs .nav-link.active {
    color: #4f46e5;

    background: transparent;

    border-color: transparent;
}



/* Tab content */

.configuration-card .nav-tabs .nav-link.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    background: #4f46e5;
}

#hotel-configuration,
#subscription {
    padding: 30px;
}

/* Forms */

.form-section {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-header {
    margin-bottom: 22px;
}

.form-section-header h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

.form-section-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

#room-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}



/* Buttons */

.form-actions {
    display: flex;
    justify-content: flex-end;

    padding-top: 25px;

    border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 10px 18px;

    border-radius: 6px;
    border: none;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fee2e2;
}


/* Subscription */

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 20px;
}

.subscription-header h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.subscription-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.subscription-status {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}

.subscription-status.active {
    background: #ecfdf5;
    color: #059669;
}


/* Subscription card */

.subscription-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;

    padding: 25px;

    margin-bottom: 35px;
}

.subscription-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 20px;

    border-bottom: 1px solid #e5e7eb;
}

.subscription-label {
    display: block;

    margin-bottom: 5px;

    color: #6b7280;

    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-card-header h3 {
    margin: 0;

    font-size: 22px;
}

.subscription-price {
    text-align: right;
}

.subscription-price strong {
    font-size: 22px;
}

.subscription-price span {
    color: #6b7280;
    font-size: 13px;
}


/* Subscription details */

.subscription-details {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    padding: 20px 0;

    gap: 20px;
}

.subscription-detail {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.detail-label {
    color: #6b7280;
    font-size: 12px;
}

.detail-value {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}


/* Subscription actions */

.subscription-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}


/* Transactions */

.subscription-history {
    margin-top: 10px;
}

.transaction-table-wrapper {
    overflow-x: auto;

    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.transaction-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

.transaction-table th {
    padding: 12px 15px;

    background: #f9fafb;

    color: #6b7280;

    font-size: 12px;
    font-weight: 600;

    text-align: left;

    border-bottom: 1px solid #e5e7eb;
}

.transaction-table td {
    padding: 14px 15px;

    color: #374151;

    border-bottom: 1px solid #f3f4f6;
}

.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

.transaction-status {
    display: inline-flex;

    padding: 4px 8px;

    border-radius: 15px;

    font-size: 11px;
    font-weight: 600;
}

.transaction-status.completed {
    background: #ecfdf5;
    color: #059669;
}


/* Mobile */

@media (max-width: 700px) {

    .configuration-container {
        width: 100%;
    }


    /* Tabs */

    .configuration-card .nav-tabs {
        padding: 0 20px;

        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .configuration-card .nav-tabs .nav-item {
        flex: 0 0 auto;
    }

    .configuration-card .nav-tabs .nav-link {
        white-space: nowrap;
    }


    /* Tab content */

    .data-tab-content {
        padding: 20px;
    }


    /* Forms */

    /* Subscription */

    .subscription-details {
        grid-template-columns: 1fr 1fr;
    }

    .subscription-card-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 15px;
    }

    .subscription-price {
        text-align: left;
    }

    .subscription-actions {
        flex-direction: column;
    }

    .subscription-actions button {
        width: 100%;
    }

}

@media (max-width: 450px) {

    .data-tab-content {
        padding: 15px;
    }

    .subscription-details {
        grid-template-columns: 1fr;
    }

    .subscription-card {
        padding: 18px;
    }

}

/* Manage Rooms */
.rooms-container {
    max-width: 1200px;
    margin: 30px auto 0;
}


/* Header */

.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 20px;
}

.rooms-header h2 {
    margin: 0 0 6px;

    font-size: 22px;
}

.rooms-header p {
    margin: 0;

    color: #6b7280;
    font-size: 14px;
}


/* Toolbar */

.rooms-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 15px;
}

.search-container {
    flex: 1;
    max-width: 350px;
}

.search-container input,
.filter-container select {
    box-sizing: border-box;

    height: 40px;

    padding: 0 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #fff;

    color: #111827;

    font-family: inherit;
    font-size: 13px;

    outline: none;
}

.search-container input {
    width: 100%;
}

.search-container input:focus,
.filter-container select:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.1);
}

.filter-container {
    display: flex;
    gap: 10px;
}

.filter-container select {
    min-width: 150px;
}


/* Main card */

.rooms-card {
    background: #fff;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}


/* Table */

.rooms-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}

.rooms-table th {
    padding: 13px 15px;

    background: #f9fafb;

    border-bottom: 1px solid #e5e7eb;

    color: #6b7280;

    font-size: 12px;
    font-weight: 600;

    text-align: left;

    white-space: nowrap;
}

.rooms-table td {
    padding: 14px 15px;

    border-bottom: 1px solid #f3f4f6;

    color: #374151;

    white-space: nowrap;
}

.rooms-table tbody tr:last-child td {
    border-bottom: none;
}

.rooms-table tbody tr:hover {
    background: #fafafa;
}

.actions-column {
    text-align: right !important;
}

.room-actions {
    text-align: right;
}


/* Room status */

.room-status {
    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border-radius: 15px;

    font-size: 11px;
    font-weight: 600;
}

.room-status.available {
    background: #ecfdf5;
    color: #059669;
}

.room-status.occupied {
    background: #eff6ff;
    color: #2563eb;
}

.room-status.maintenance {
    background: #fff7ed;
    color: #ea580c;
}

.room-status.construction {
    background: #fef2f2;
    color: #dc2626;
}


/* Actions */

.action-button {
    padding: 6px 10px;

    border: none;
    border-radius: 5px;

    background: transparent;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.action-button.edit {
    color: #4f46e5;
}

.action-button.edit:hover {
    background: #eef2ff;
}

.action-button.delete {
    color: #dc2626;
}

.action-button.delete:hover {
    background: #fef2f2;
}


/* Empty state */

.rooms-empty {
    padding: 60px 20px;

    text-align: center;
}

.empty-icon {
    font-size: 35px;

    margin-bottom: 10px;
}

.rooms-empty h3 {
    margin: 0 0 5px;
}

.rooms-empty p {
    margin: 0 0 20px;

    color: #6b7280;

    font-size: 13px;
}


/* Buttons */

.btn-primary,
.btn-secondary {
    padding: 10px 18px;

    border-radius: 6px;
    border: none;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}


/* Modal */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(17, 24, 39, 0.45);
}

.room-modal {
    width: 100%;
    max-width: 650px;

    max-height: 90vh;

    overflow-y: auto;

    background: #fff;

    border-radius: 10px;

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    padding: 22px 25px;

    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0 0 5px;

    font-size: 18px;
}

.modal-header p {
    margin: 0;

    color: #6b7280;

    font-size: 13px;
}

.modal-close {
    border: none;
    background: transparent;

    color: #6b7280;

    font-size: 26px;
    line-height: 20px;

    cursor: pointer;
}

.modal-close:hover {
    color: #111827;
}


/* Modal form */

#room-form {
    padding: 25px;
}

.form-group {
    display: flex;

    flex-direction: column;

    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 7px;

    color: #374151;

    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    box-sizing: border-box;

    padding: 10px 12px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #fff;

    color: #111827;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 2px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
}


/* Modal actions */

.modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
    padding: 16px;
    background: #fff;
}

.confirmation-modal[hidden] {
    display: none !important;
}

.confirmation-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.confirmation-modal__content {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: confirmation-modal-appear 0.2s ease-out;
}

.confirmation-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 28px;
    font-weight: 700;
}

.confirmation-modal__content h2 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 22px;
}

.confirmation-modal__content > p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.confirmation-modal__room {
    margin: 16px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155 !important;
    font-weight: 600;
}

.confirmation-modal__error {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c !important;
    text-align: left;
}

.confirmation-modal__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.confirmation-modal__actions button {
    min-height: 42px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.confirmation-modal__actions .btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.confirmation-modal__actions .btn-secondary:hover {
    background: #e2e8f0;
}

.confirmation-modal__actions .btn-danger {
    background: #dc2626;
    color: #fff;
}

.confirmation-modal__actions .btn-danger:hover {
    background: #b91c1c;
}

.confirmation-modal__actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes confirmation-modal-appear {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .confirmation-modal__content {
        padding: 22px;
    }

    .confirmation-modal__actions {
        flex-direction: column-reverse;
    }

    .confirmation-modal__actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .confirmation-modal__content {
        animation: none;
    }
}

/* Responsive */

@media (max-width: 750px) {

    .rooms-header {
        flex-direction: column;

        gap: 15px;
    }

    .rooms-header .btn-primary {
        width: 100%;
    }

    .rooms-toolbar {
        flex-direction: column;

        align-items: stretch;
    }

    .search-container {
        max-width: none;
    }

    .filter-container {
        display: grid;

        grid-template-columns: 1fr 1fr;
    }

    .filter-container select {
        width: 100%;
        min-width: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

}

@media (max-width: 500px) {

    .filter-container {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }

}



/* ================================
   Reservations Modal
================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.modal-overlay[hidden] {
    display: none !important;
}

/* Modal container */

.reservations-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 650px;
    max-height: min(85vh, 800px);
    overflow: hidden;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.22),
        0 8px 20px rgba(15, 23, 42, 0.10);
    animation: modalFadeIn 250ms ease-out;
    height: 80vh;
}

/* Modal header */

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.025em;
}

#modal-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Close button */

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.modal-close:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: rotate(90deg);
}

.modal-close:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 3px;
}

/* Modal content */

#reservations-content {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#reservations-view,
#new-reservation-view {
    width: 100%;
    padding: 24px 26px 26px;
    box-sizing: border-box;
}

#reservations-view[hidden],
#new-reservation-view[hidden] {
    display: none !important;
}

/* Reservation list */

.reservation-item {
    margin-bottom: 1rem;
}

.reservation-card,
.reservation-item {
    position: relative;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.reservation-card,
.reservation-item {
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    transform: translateY(-2px);
}

/* Current reservation */
.reservation-card.current-reservation,
.reservation-item.current-reservation {
    border-color: #86b99b;
    box-shadow: inset 3px 0 0 #34845a,
    0 2px 6px rgba(15, 23, 42, 0.03);
}

/* Header */
.reservation-card .reservation-header,
.reservation-item .reservation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.reservation-card h3,
.reservation-item h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.reservation-card .reservation-reference,
.reservation-item .reservation-reference {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
}

/* Status badge */
.reservation-status-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

/* Status dropdown */
.reservation-status-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 32px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-width: 100%;
}

.reservation-status-select:hover {
    border-color: #9ca3af;
}

.reservation-status-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Current / upcoming / past badge */
.reservation-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.reservation-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
}

.reservation-status.is-current {
    color: #047857;
    background-color: #d1fae5;
}

.reservation-status.is-upcoming {
    color: #1d4ed8;
    background-color: #dbeafe;
}

.reservation-status.is-past {
    color: #6b7280;
    background-color: #f3f4f6;
}

.reservation-contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.reservation-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reservation-contact-label {
    font-weight: 600;
}

.reservation-contact-value {
    overflow-wrap: anywhere;
}

/* Responsive layout */
@media (max-width: 600px) {
    .reservation-status-container {
        justify-content: flex-start;
        width: 100%;
    }

    .reservation-status-select {
        flex: 1;
        min-width: 140px;
    }
}

/* Dates section */
.reservation-dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #edf0f4;
    border-radius: 12px;
}

.reservation-date {
    min-width: 0;
}

.reservation-date-label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.reservation-date-value {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.reservation-date-arrow {
    color: #94a3b8;
    font-size: 1.1rem;
    text-align: center;
}

/* Guest count */
.reservation-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf0f4;
}

.reservation-guest-count {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.reservation-guest-count-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
}

/* Guest list */
.reservation-card h4,
.reservation-item h4 {
    margin: 18px 0 12px;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
}

.reservation-card ul,
.reservation-item ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.reservation-card li,
.reservation-item li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.reservation-card li + li,
.reservation-item li + li {
    border-top: 1px solid #f1f5f9;
}

.reservation-guest-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.reservation-no-guests {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

.open-scan-form {
    text-align: center;
}

.open-scan-form button {
    font-size: 15px;
    width: 7rem;
}

/* Existing paragraph fallback */
.reservation-card p,
.reservation-item p {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Modal action buttons */

.modal-actions button,
#new-reservation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.modal-actions button:active,
#new-reservation-button:active {
    transform: translateY(1px);
}

.modal-actions button:disabled,
#new-reservation-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* New reservation form */

#reservation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#reservation-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#reservation-form label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

#reservation-form input,
#reservation-form select,
#reservation-form textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.95rem;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

#reservation-form input:hover,
#reservation-form select:hover,
#reservation-form textarea:hover {
    border-color: #94a3b8;
}

#reservation-form input:focus,
#reservation-form select:focus,
#reservation-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#reservation-form input[type="date"] {
    min-height: 46px;
    cursor: pointer;
}

#reservation-form .modal-actions {
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

/* Form errors */

.form-error {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-error[hidden] {
    display: none !important;
}

/* Loading and empty states */

#reservations-list:empty {
    display: none;
}

#reservations-list:not(:has(.reservation-card, .reservation-item)) {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
}

#reservations-list:not(:has(.reservation-card, .reservation-item)) {
    overflow-wrap: anywhere;
}

/* Slide transitions between list and form */

.slide-in-right {
    animation: slideInRight 350ms ease both;
}

.slide-in-left {
    animation: slideInLeft 350ms ease both;
}

.slide-out-left {
    animation: slideOutLeft 350ms ease both;
}

.slide-out-right {
    animation: slideOutRight 350ms ease both;
}

.form-success {
    margin: 12px 0;
    padding: 12px 14px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 0.9rem;
}

.form-error {
    margin: 12px 0;
    padding: 12px 14px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 0.9rem;
}

#save-reservation-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(35px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-35px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-35px);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(35px);
    }
}

/* Responsive layout */

@media (max-width: 480px) {
    .reservation-card,
    .reservation-item {
    padding: 16px;
    border-radius: 13px;
    }

    .reservation-dates {
        gap: 8px;
        padding: 12px;
    }

    .reservation-date-value {
        font-size: 0.85rem;
    }

    .reservation-date-label {
        font-size: 0.68rem;
    }

    .reservation-card .reservation-header,
    .reservation-item .reservation-header {
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reservation-card,
    .reservation-item {
    transition: none;
    }

    .reservation-card:hover,
    .reservation-item:hover {
        transform: none;
    }
}

@media (max-width: 640px) {
    .modal-overlay {
        align-items: center;
        padding: 12px;
    }

    .reservations-modal {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        border-radius: 13px;
    }

    .modal-header {
        padding: 18px 18px 16px;
        gap: 12px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    #reservations-view,
    #new-reservation-view {
        padding: 18px;
    }

    .reservation-card,
    .reservation-item {
        padding: 15px;
    }

    .modal-actions {
        gap: 10px;
    }

    .modal-actions button,
    #new-reservation-button {
        min-height: 44px;
    }
}

@media (max-width: 400px) {
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-actions button,
    #new-reservation-button {
        width: 100%;
    }

    #reservation-form input[type="number"] {
        max-width: none;
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    .reservations-modal,
    .modal-close,
    .reservation-card,
    .reservation-item,
    .modal-actions button,
    #new-reservation-button {
        animation: none !important;
        transition: none !important;
    }

    .slide-in-right,
    .slide-in-left,
    .slide-out-left,
    .slide-out-right {
        animation: none !important;
    }
}




/*
-------
EXPORT
-------
*/

.export-guests-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 28px 24px;
    color: #1f2937;
}

#export-guests-form {
    margin-top: 1rem;
}

.export-card {
    padding: 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.custom-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.custom-date-range[hidden] {
    display: none !important;
}

.export-info {
    margin: 4px 0 24px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.export-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .export-guests-page {
        padding: 20px 14px;
    }

    .export-card {
        padding: 20px;
    }

    .custom-date-range {
        grid-template-columns: 1fr;
        gap: 0;
    }
}