/* ==========================================================================
   WAVESYNC STYLING CORE MAPPED DESIGN ARCHITECTURE
   ========================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-surface: #131a26;
    --bg-darker: #090d14;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --accent: #a855f7;
    --text-main: #f1f5f9;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shadow-glow: 0 4px 20px rgba(56, 189, 248, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   NAVIGATION BAR & TAB SWITCHER
   ========================================================================== */

.navbar {
    background: rgba(19, 26, 38, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.logo-accent {
    color: var(--primary);
}

.system-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Central View Switcher Tabs */
.nav-view-switcher {
    display: flex;
    gap: 8px;
    background: var(--bg-darker);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.nav-tab-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-tab-link:hover {
    color: #fff;
}

.nav-tab-link.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Avatar Trigger Frame */
.user-profile-deck {
    position: relative;
}

.avatar-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.avatar-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.user-email-display {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.dropdown-chevron {
    font-size: 9px;
    color: var(--text-muted);
}

/* User Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 8px;
    display: flex;
    flex-direction: column;
    z-index: 1010;
}

.dropdown-header {
    padding: 12px;
}

.dropdown-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.dropdown-email {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

.dropdown-item {
    padding: 10px 12px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.dropdown-logout-btn {
    background: transparent;
    border: none;
    padding: 10px 12px;
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    width: 100%;
    transition: all 0.15s ease;
}

.dropdown-logout-btn:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   PRIMARY APP LAYOUT CONTEXT
   ========================================================================== */

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 110px 24px 60px;
}

/* Buttons Engine */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-success {
    background-color: #10b981;
    color: #fff;
}

.btn-success:hover {
    background-color: #059669;
}

.full-width {
    width: 100%;
}

/* Form Styling Tree */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 11px 14px;
    font-size: 14px;
    color: #fff;
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.15s ease;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* ==========================================================================
   MODULE A: AUTHENTICATION CONTAINER
   ========================================================================== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.toggle-password-btn:hover {
    color: #fff;
}

.eye-icon-svg {
    width: 18px;
    height: 18px;
}

/* Dynamic Account Switcher Cards */
.role-cards-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-card-option {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
}

.role-card-option:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.role-card-option.active {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.04);
}

.role-icon {
    font-size: 22px;
}

.role-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.role-details p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   MODULE B: DASHBOARD LAYER CONSOLE
   ========================================================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-text-block h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.header-text-block p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Sub-filter Controls Row */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.filter-btn.active {
    background: #fff;
    border-color: #fff;
    color: var(--bg-main);
    font-weight: 600;
}

/* Primary Working Grid Map */
.rooms-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   MODULE C: DYNAMIC ROOM DISPLAY CARDS & SLIDESHOWS
   ========================================================================== */

.room-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.3);
}

.room-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Multi-photo Slideshow System Layout */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-darker);
}

.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.15s ease;
}

.slide-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    scale: 1.05;
}

.slide-nav-btn.prev { left: 10px; }
.slide-nav-btn.next { right: 10px; }

.slideshow-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: #e2e8f0;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Status Availability Badges */
.badge {
    font-size: 10px;
    padding: 3px 8px;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.badge-available {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-booked {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   MODAL DIALOG POPUPS & SLIDE OVERLAYS
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 12, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.close-x-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.close-x-btn:hover {
    color: #fff;
}

.modal-form {
    padding: 24px;
}

.modal-actions-footer {
    margin-top: 10px;
}

/* ==========================================================================
   UTILITY INFRASTRUCTURE & SCROLLBARS
   ========================================================================== */

.loading-spinner {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px 0;
}

.alert-message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    margin-top: 14px;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.hidden {
    display: none !important;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   ADVANCED RESPONSIVE GRID & MOBILE OPTIMIZATION
   ========================================================================== */

@media (max-width: 768px) {
    /* Navbar Layout Optimization */
    .navbar {
        height: auto;
        padding: 12px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
        align-items: center;
    }

    .logo-box {
        font-size: 18px;
    }

    /* Make the central view switcher expand cleanly on mobile */
    .nav-view-switcher {
        width: 100%;
        justify-content: center;
        gap: 4px;
    }

    .nav-tab-link {
        flex: 1;
        justify-content: center;
        font-size: 12px;
        padding: 8px 10px;
        white-space: nowrap;
    }

    /* Main Content Adjustments */
    .main-content {
        padding: 170px 16px 40px; /* Shifts content downwards to clear stacked mobile nav */
    }

    .header-text-block h1 {
        font-size: 22px;
    }

    /* Action Buttons & Filter Layouts */
    .filter-bar {
        display: flex;
        flex-wrap: wrap; 
        gap: 8px;
        margin-bottom: 20px;
    }

    .filter-btn {
        flex: 1 1 calc(50% - 8px); /* Beautiful twin-column responsive layout */
        text-align: center;
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Make listing button full span on touch devices */
    .main-content .btn-success {
        width: 100%;
        margin-bottom: 4px;
        box-sizing: border-box;
    }

    /* Center-align the navigation dropdown tray on mobile */
    .profile-dropdown-menu {
        right: 50%;
        transform: translateX(50%);
        width: calc(100vw - 32px);
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        flex: 1 1 100%; /* Stacks items single column on pocket viewports */
    }
}
/* ==========================================================================
   IMPROVEMENTS: SEARCH BAR, PRICE FILTER, BOOKING MODAL, HISTORY
   ========================================================================== */

/* Search + Filter combined row */
.search-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 14px 9px 36px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.15s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.search-input::placeholder { color: var(--text-muted); }

.price-filter-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.price-filter-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.price-filter-input {
    width: 110px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    font-size: 14px;
    color: #fff;
    outline: none;
    transition: border-color 0.15s ease;
}

.price-filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Move filter-bar inside search row — reset its margin */
.search-filter-row .filter-bar {
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Booking modal summary */
.booking-room-summary {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booking-room-summary .summary-resort {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}

.booking-room-summary .summary-type {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.booking-room-summary .summary-cap {
    font-size: 13px;
    color: var(--text-muted);
}

/* Price preview breakdown */
.booking-price-preview {
    background: rgba(56,189,248,0.05);
    border: 1px solid rgba(56,189,248,0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
}

.price-breakdown { display: flex; flex-direction: column; gap: 10px; }

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.price-row.price-total {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* Booking history card in modal */
.booking-history-card {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.booking-history-card .bh-resort {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.booking-history-card .bh-room {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.booking-history-card .bh-dates {
    font-size: 13px;
    color: var(--text-muted);
}

.booking-history-card .bh-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.booking-history-card .bh-total {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.booking-history-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.bh-badge-confirmed {
    background: rgba(16,185,129,0.12);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.bh-badge-past {
    background: rgba(100,116,139,0.15);
    color: #94a3b8;
    border: 1px solid rgba(100,116,139,0.2);
}

/* Real-time sync indicator */
.realtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #34d399;
    font-weight: 600;
}

.realtime-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    animation: realtime-pulse 2s ease-in-out infinite;
}

@keyframes realtime-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Settings panel */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.settings-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child { border-bottom: none; }

.settings-label-block { flex: 1; }
.settings-label { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.settings-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid var(--border-color);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px; left: 3px;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(18px);
}

/* ==========================================================================
   RESPONSIVE ADDITIONS
   ========================================================================== */

@media (max-width: 768px) {
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .price-filter-wrap { justify-content: flex-start; }
    .price-filter-input { flex: 1; width: auto; }

    .search-filter-row .filter-bar {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
/* ==========================================================================
   CALENDAR MODAL STYLES
   ========================================================================== */

#calendar-modal-body {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

#calendar-modal-body .cal-day:hover {
    filter: brightness(1.2);
}

/* ==========================================================================
   MESSAGING MODAL STYLES
   ========================================================================== */

#messaging-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

#chat-messages::-webkit-scrollbar {
    width: 4px;
}
#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

/* ==========================================================================
   LIGHT MODE THEME
   ========================================================================== */

body.light-mode {
    --bg-main: #f0f4f8;
    --bg-surface: #ffffff;
    --bg-darker: #e8edf3;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #7c3aed;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(2, 132, 199, 0.12);
}

body.light-mode .navbar {
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

body.light-mode .logo-text { color: #0f172a; }

body.light-mode input[type="text"],
body.light-mode input[type="number"],
body.light-mode input[type="email"],
body.light-mode input[type="password"],
body.light-mode select,
body.light-mode .search-input,
body.light-mode .price-filter-input {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: rgba(0,0,0,0.12);
}

body.light-mode input::placeholder,
body.light-mode .search-input::placeholder { color: #94a3b8; }

body.light-mode .auth-card,
body.light-mode .modal-card,
body.light-mode .room-card {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

body.light-mode .room-card-body,
body.light-mode .modal-form { color: #0f172a; }

body.light-mode .role-card-option {
    background: #f8fafc;
    border-color: rgba(0,0,0,0.1);
}

body.light-mode .role-card-option.active {
    background: rgba(2,132,199,0.06);
    border-color: var(--primary);
}

body.light-mode .auth-tab { color: #64748b; }
body.light-mode .auth-tab.active { color: var(--primary); }

body.light-mode .profile-dropdown-menu {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

body.light-mode .dropdown-item { color: #374151; }
body.light-mode .dropdown-email { color: #0f172a; }
body.light-mode .dropdown-label { color: #64748b; }

body.light-mode .filter-btn {
    background: #fff;
    color: #374151;
    border-color: rgba(0,0,0,0.1);
}
body.light-mode .filter-btn.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

body.light-mode .booking-room-summary,
body.light-mode .booking-history-card {
    background: #f8fafc;
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .btn-secondary {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #0f172a;
}

body.light-mode .modal-header { border-color: rgba(0,0,0,0.08); }
body.light-mode .modal-header h3 { color: #0f172a; }
body.light-mode .close-x-btn { color: #64748b; }
body.light-mode .close-x-btn:hover { color: #0f172a; }

body.light-mode .settings-row { border-color: rgba(0,0,0,0.08); }
body.light-mode .settings-label { color: #0f172a; }
body.light-mode .toggle-track { background: rgba(0,0,0,0.1); border-color: rgba(0,0,0,0.12); }

body.light-mode .nav-tab-link { color: #64748b; }
body.light-mode .nav-tab-link:hover { color: #0f172a; }
body.light-mode .nav-tab-link.active { color: #0f172a; background: rgba(2,132,199,0.1); }

body.light-mode .user-email-display { color: #0f172a; }
body.light-mode .avatar-trigger { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }

body.light-mode .header-text-block h1 { color: #0f172a; }
body.light-mode .header-text-block p { color: #64748b; }

/* Theme toggle button */
.theme-toggle-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.1); }
body.light-mode .theme-toggle-btn { background: rgba(0,0,0,0.04); }
body.light-mode .theme-toggle-btn:hover { background: rgba(0,0,0,0.08); }

/* ==========================================================================
   IMPROVED AUTH CARD
   ========================================================================== */

.auth-wrapper {
    min-height: calc(100vh - 110px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.auth-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-brand-strip {
    background: linear-gradient(135deg, rgba(56,189,248,0.12) 0%, rgba(168,85,247,0.08) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 28px 32px 24px;
    text-align: center;
}

.auth-brand-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 6px;
}
body.light-mode .auth-brand-logo { color: #0f172a; }
.auth-brand-logo span { color: var(--primary); }

.auth-brand-tagline {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.auth-body { padding: 28px 32px 32px; }

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
body.light-mode .auth-header h2 { color: #0f172a; }

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    background: var(--bg-darker);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    border: none;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 9px 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
    border-bottom: none;
}

.auth-tab.active {
    background: var(--bg-surface);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    border-bottom-color: transparent;
}
body.light-mode .auth-tab.active { color: #0f172a; box-shadow: 0 1px 6px rgba(0,0,0,0.1); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   IMPROVED ROOM LISTING MODAL
   ========================================================================== */

.room-modal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.room-modal-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(168,85,247,0.15));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    border: 1px solid var(--border-color);
}

.room-form-section {
    margin-bottom: 22px;
}
.room-form-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-input-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.status-select-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s;
}

/* Location filter chip row */
.location-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.location-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.location-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
}
body.light-mode .location-chip { color: #374151; background: #fff; }
.location-chip:hover {
    border-color: var(--primary);
    color: #fff;
}
body.light-mode .location-chip:hover { color: #0f172a; }
.location-chip.active {
    background: rgba(56,189,248,0.12);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}