/* ===========================
   Base + theme variables
   =========================== */

:root {
    --app-bg: #f3f4f6;
    --app-surface: #ffffff;
    --app-border-subtle: #e5e7eb;
    --app-border-strong: #d1d5db;
    --app-text-main: #111827;
    --app-text-muted: #6b7280;
    --app-primary: #16a34a;
    --app-primary-soft: #dcfce7;
    --app-danger: #dc2626;
    --app-danger-soft: #fee2e2;
    --app-sidebar-bg: #0f172a;
    --app-sidebar-accent: #22c55e;
}

/* Dark theme */
html[data-theme="dark"] {
    --app-bg: #020617;
    --app-surface: #020617;
    --app-border-subtle: #1e293b;
    --app-border-strong: #334155;
    --app-text-main: #e5e7eb;
    --app-text-muted: #9ca3af;
    --app-primary-soft: #052e16;
    --app-danger-soft: #450a0a;
    --app-sidebar-bg: #020617;
}

html, body {
    height: 100%;
}

.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--app-bg);
    color: var(--app-text-main);
    font-size: 13px; 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

/* ===========================
   App shell
   =========================== */

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.app-sidebar {
    /* Reduced from 260px */
    width: 220px; 
    background: radial-gradient(circle at top left, #22c55e 0, #16a34a 18%, #0f172a 45%, #020617 100%);
    color: #e5e7eb;
    padding: 12px 14px 16px; 
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 20;
}

.app-sidebar-brand {
    padding: 4px 4px 14px;
}

.app-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
}

.app-brand-logo {
    width: auto; /* bigger logo as you requested */
    height: 34px;
    display: block;
    border-radius: 8px;
    background: #111;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
}

.app-brand-title {
    font-size: 1rem;
    font-weight: 700;
}

.app-brand-tagline {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Nav */

.app-nav {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.8rem;
    color: #e5e7eb;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.app-nav-item:hover {
    background: rgba(15, 23, 42, 0.7);
    transform: translateY(-1px);
}

.app-nav-item.is-active {
    background: #ecfdf5;
    color: #065f46;
}

.app-nav-item.is-active .app-nav-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ecfdf5;
}

.app-nav-danger {
    color: #fecaca;
}

.app-nav-danger.is-active {
    background: #fee2e2;
    color: #991b1b;
}

.app-nav-separator {
    margin: 6px 0 2px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.5), transparent);
}

/* Icons (emoji-based for now, wrapped in pill) */

.app-nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.8);
    font-size: 14px;
}

.app-icon-home::before { content: "🏠"; }
.app-icon-user::before { content: "👤"; }
.app-icon-bookings::before { content: "🧳"; }
.app-icon-logout::before { content: "🚪"; }

/* ===========================
   Main area
   =========================== */

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header */

.app-header {
    /* Reduced from 64px */
    height: 54px; 
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border-subtle);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header-center {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
}

.app-page-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.app-page-subtitle {
    margin: 1px 0 0;
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Header buttons */

.app-icon-button {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--app-border-subtle);
    background: var(--app-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.app-icon-button:hover {
    border-color: var(--app-primary);
}

.app-icon-bars,
.app-icon-sun,
.app-icon-moon {
    font-size: 14px;
}

.app-icon-bars::before { content: "☰"; }
.app-icon-sun::before { content: "☀"; }
.app-icon-moon::before { content: "🌙"; }

/* Only show right icon based on theme */
html[data-theme="light"] .app-icon-moon { display: inline-block; }
html[data-theme="light"] .app-icon-sun { display: none; }
html[data-theme="dark"]  .app-icon-moon { display: none; }
html[data-theme="dark"]  .app-icon-sun { display: inline-block; }

/* User pill */

.app-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--app-bg);
    border: 1px solid var(--app-border-subtle);
}

.app-user-initials {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ecfdf5;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-user-name {
    font-size: 0.8rem;
}

/* Main content and footer */

.app-main-content {
    flex: 1;
    padding: 16px 18px 24px;
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.06), transparent 120px),
                var(--app-bg);
}

.app-footer {
    padding: 10px 18px 14px;
    font-size: 0.7rem;
    color: var(--app-text-muted);
}

/* ===========================
   Cards and panels
   =========================== */

.app-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.app-cards-grid-2col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    align-items: stretch;
}

/* Optional: Add a responsive breakpoint to ensure it stacks on mobile */
@media (max-width: 900px) {
    .app-cards-grid-2col {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    .app-cards-grid {
        grid-template-columns: 1fr; /* Stacks cards vertically on mobile */
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .app-form {
        grid-template-columns: 1fr;
    }
}

/* Ensure the map preview card fills the available vertical space */
.map-card-preview {
    display: flex;
    flex-direction: column;
    /* Add any specific height/min-height properties here if needed */
}


.app-stat-card {
    background: var(--app-surface);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid var(--app-border-subtle);
    box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.3);
}

.app-stat-label {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.app-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 4px;
}

.app-stat-meta {
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--app-text-muted);
}

.app-panels-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
    gap: 14px;
}

.app-panels-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-panel {
    background: var(--app-surface);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid var(--app-border-subtle);
}

.app-panel-muted {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.02), rgba(15, 23, 42, 0.02));
}

.app-panel-danger {
    background: var(--app-danger-soft);
    border-color: #fecaca;
}

html[data-theme="dark"] .app-panel-danger {
    border-color: #7f1d1d;
}

.app-panel-center {
    text-align: center;
}

.app-panel-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.app-panel-text {
    margin: 4px 0 10px;
    font-size: 0.8rem;
    color: var(--app-text-muted);
}

.app-panel-list {
    list-style: disc;
    margin: 8px 0 0 18px;
    font-size: 0.8rem;
}

/* Empty state */

.app-empty-state {
    text-align: center;
    padding: 20px 10px;
}

.app-empty-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.app-empty-text {
    font-size: 0.8rem;
    color: var(--app-text-muted);
}
/* TILL HERE EVERY THING IS PERFECT //
/* -------------------------------------- //
/* -------------------------------------- //
/* -------------------------------------- //
/* -------------------------------------- //
/* -------------------------------------- //
/* -------------------------------------- //
/* -------------------------------------- //

/* Container for the side-by-side layout */
.app-two-column-layout {
    display: grid;
    /* Create two equal columns with a gap between them */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 24px; /* Space between the map and the form */
    align-items: start; /* Align items to the top (important for card height consistency) */
}

/* Ensure the map card takes up the same height as the form card */
.app-two-column-layout .map-card {
    height: 100%;
}

/* Responsive adjustment for small screens (e.g., phones) */
@media (max-width: 992px) {
    .app-two-column-layout {
        /* On smaller screens, stack the two cards vertically */
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===========================
   Forms & buttons
   =========================== */
.app-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.app-form-grid-2col {
    display: grid;
    /* Explicitly define two columns */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 10px;
} 


@media (max-width: 600px) {
    .app-form-grid-2col {
        /* Stack vertically on small mobile screens */
        grid-template-columns: minmax(0, 1fr); 
    }
}

.app-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-form-label {
    /* Keep size, but make color darker and bolder for clarity */
    font-size: 0.8rem; 
    color: var(--app-text-main); /* Use the main text color: #111827 */
    font-weight: 600; /* Bolder to stand out */
    margin-bottom: 2px; /* Pull it closer to the input */
}

.app-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-input-group span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}


.app-input-group input,
.app-input-group select,
.app-input-group textarea {
    /* Reduced from 10px 12px */
    padding: 8px 10px; 
    border-radius: 8px; /* Slightly tighter radius */
    border: 1px solid #d1d5db;
    font-size: 0.8rem; /* Slightly smaller text */
    transition: all 0.2s ease;
    background: #fff;
}

/*.app-input-group textarea {
    resize: vertical;
    min-height: 90px;
}


.app-input-group input:focus,
.app-input-group select:focus,
.app-input-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
*/

/*.app-input, 
.app-textarea, 
.app-form-field select { /* Target the select dropdown */
    /* Reuse existing app-input styles */
/*    border-radius: 10px;
    border: 1px solid var(--app-border-strong);
    padding: 9px 10px;
    font-size: 0.9rem;
    background: #f9fafb;
    /* ... and the focus state */
/* } */



.app-form-field select:focus {
    /* Apply the professional focus style to select fields too */
    border-color: var(--app-primary);
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.app-input {
    border-radius: 8px;
    border: 1px solid var(--app-border-strong);
    padding: 8px 10px;
    font-size: 0.8rem;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.app-input:focus {
    border-color: var(--app-primary);
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.app-input-error {
    font-size: 0.7rem;
    color: #b91c1c;
}

.app-form-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
}

.app-form-actions-centered {
    justify-content: center;
}

/* .app-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
*/

.app-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

/* .app-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}
*/

/* .app-help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}
*/

/*    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fb;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}
*/

/*.app-checkbox-item input {
    transform: scale(1.1);
}
*/

/* Buttons */

.app-btn {
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

/* Fix for links used as buttons */
.app-btn,
.app-btn:hover,
.app-btn-secondary,
.app-btn-secondary:hover {
    text-decoration: none !important; /* Forces removal of underline on anchor tags */
}

.app-btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    box-shadow: 0 8px 14px -6px rgba(22, 163, 74, 0.6);
}

.app-btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.app-btn-secondary {
    background: var(--app-surface); 
    color: var(--app-text-muted);
    border: 1px solid var(--app-border-strong);
    box-shadow: none; 
}

.app-btn-secondary:hover {
    background: var(--app-bg); 
    color: var(--app-primary);
    border-color: var(--app-primary);
}

.app-btn-danger {
    background: var(--app-danger);
    color: #fef2f2;
    border-color: transparent;
}

.app-btn-danger:hover {
    background: #b91c1c;
}

/* Alerts */

.app-alert {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.app-alert-success {
    background: var(--app-primary-soft);
    color: #14532d;
}

.app-time-group-row {
    /* Use Grid for simple, robust 2-column layout */
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* Creates two equal columns */
    gap: 16px; /* Space between the two fields */
    margin-bottom: 12px; /* Standard spacing after the row */
}

/* Optional: Ensure the time inputs themselves don't stretch fully on the smallest screens if desired */
.app-time-group-row .app-input {
    max-width: 100%; /* Keeps them within the grid column */
}

/* On very small screens, revert to stacked layout for readability */
@media (max-width: 500px) {
    .app-time-group-row {
        grid-template-columns: minmax(0, 1fr); /* Single column on mobile */
    }
}

/* ===========================
   Sidebar overlay + mobile
   =========================== */

.app-sidebar-overlay {
    display: none;
}

@media (max-width: 1024px) {
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        transform: translateX(-100%);
        transition: transform 0.18s ease-out;
        max-width: 220px;
    }

    html.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease-out;
        z-index: 15;
    }

    html.sidebar-open .app-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .app-panels-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-main-content {
        padding-inline: 14px;
    }
}

/* -------------------------------------------------------------
|  PROPERTY INFO MODULE — BASE STYLING
|--------------------------------------------------------------*/

/* Page Containers */
.property-section {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.property-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

.property-section .section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 18px;
}

/* Form Layout */
.property-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.property-form-grid .full-width {
    grid-column: 1 / 3;
}

/* Labels & Inputs */
.property-input-group {
    display: flex;
    flex-direction: column;
}

.property-input-group label {
    font-weight: 600;
    margin-bottom: 6px;
}

.property-input-group input,
.property-input-group textarea,
.property-input-group select {
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    background: #fff;
}

.property-input-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Amenities Grid */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.amenity-item input {
    transform: scale(1.2);
}

.amenity-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.app-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 10px;
}

.app-amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.app-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

/* Small Badge */
.info-badge {
    display: inline-block;
    font-size: 11px;
    background: #eee;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 6px;
}

/* Save Button */
.property-save-btn {
    margin-top: 24px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    background: #0071c2;
    color: #fff;
    border-radius: 8px;
    border: none;
    transition: 0.2s;
}

.property-save-btn:hover {
    background: #005a9b;
}

/* Section Separator */
.property-divider {
    height: 1px;
    background: #e6e6e6;
    margin: 24px 0;
}

.app-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.app-summary-card {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.app-summary-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.app-btn-small {
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.room-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.room-photo-card {
    border-radius: 12px;
    overflow: hidden;
    background: #f7f7f7;
    padding: 8px;
}

.room-photo-card.is-cover {
    border: 2px solid #0d6efd;
}

.room-photo-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.cover-badge {
    font-size: 12px;
    color: #0d6efd;
    font-weight: bold;
}


.room-photo-item img {
    width: 100%;
    border-radius: 8px;
}

.room-photo-item form {
    margin-top: 6px;
}

.hotel-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.hotel-photo-item {
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hotel-photo-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.photo-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.photo-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #007bff;
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* ------------------------------

NEW PATCH -----------------------

------------------------------*/
/* Submenu container (white rounded box) */
.app-nav-submenu-box {
    background: #ffffff;
    margin: 4px 0 10px 0;
    padding: 6px 0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

/* Submenu items */
.app-nav-subitem {
    display: block;
    padding: 6px 14px;
    font-size: 12px;
    color: #0d1b2a;
    text-decoration: none !important;
}

/* Submenu hover */
.app-nav-subitem:hover {
    background: #eef3f7;
}

/* Submenu active */
.app-nav-subitem.is-active {
    background: #f5f7fa;
    font-weight: 600;
    border-left: 3px solid #2d8cff;
}

/* ─────────────────────────────────────────
   ROOMS MODULE UI
───────────────────────────────────────── */

.room-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    margin-bottom: 16px;
    background: #fff;
}

.room-card-photo {
    width: 180px;
    flex-shrink: 0;
}

.room-card-photo img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
}

.room-photo-placeholder {
    height: 130px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.room-card-details {
    flex: 1;
}

.room-meta {
    color: #666;
    margin: 4px 0;
}

.room-price {
    font-weight: 600;
    margin-top: 6px;
}

.room-amenities {
    margin-top: 10px;
}

.room-amenity {
    display: inline-block;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.room-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* AMENITIES CHECKBOX GRID */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.amenity-checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ROOM PHOTO GRID */
.room-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.room-photo-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.room-photo-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.photo-btn {
    background: #f1f5f9;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.photo-btn.danger {
    background: #fee2e2;
}

.cover-badge {
    background: #dcfce7;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* =====================================================
   TABLE SYSTEM
===================================================== */

.app-table-wrapper {
    overflow-x: auto;
    margin-top: 12px;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.app-table thead th {
    background: #f5f7fa;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.app-table tbody td {
    padding: 14px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    font-size: 14px;
}

.app-table tbody tr:hover {
    background: #f9fafb;
}

.app-table-actions {
    text-align: left;
    white-space: nowrap;
}

.app-table-empty {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

/* =====================================================
   BADGES
===================================================== */

.app-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 600;
}

.app-badge-success {
    background: #e6f7ed;
    color: #0f5132;
}

.app-badge-danger {
    background: #fde8e8;
    color: #842029;
}

/* =====================================================
   AVAILABILITY — TOGGLE BADGES
===================================================== */

.availability-toggle {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.availability-toggle:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* =====================================================
   AVAILABILITY — CONTROLS BAR (Prev / Date / Next)
===================================================== */

.availability-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.availability-controls input[type="date"] {
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.availability-controls input[type="date"]:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
}

.availability-controls input[type="date"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.availability-controls .inline-form {
    margin: 0;
}

/* =====================================================
   AVAILABILITY — INLINE FORM (TOP FORM)
===================================================== */

.availability-inline-form {
    margin-top: 10px;
}

.availability-inline-fields {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.availability-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.availability-field label {
    font-size: 10px;
    font-weight: 600;
    color: #555;
}

/* ALL inputs/selects same height */
.availability-field select,
.availability-field input[type="date"] {
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #fff;
    font-size: 10px;
}

/* RADIO GROUP */
.availability-radio {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-bottom: 4px;
}

.availability-radio label {
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* APPLY BUTTON MATCH HEIGHT */
.availability-field .app-btn {
    height: 30px;
    padding: 0 16px;
}

.app-btn-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* =====================================================
   ABOVE THIS LINE IS PERFECT, DON'T TOUCH
===================================================== */

/* =========================================================
   RATES & AVAILABILITY — CALENDAR (DEFINITIVE)
   ========================================================= */

/* -------- PANEL WRAPPER -------- */

.calendar-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

/* -------- SCROLL CONTAINER -------- */
/* Horizontal scrollbar lives HERE (below header visually) */

.calendar-scroll {
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    isolation: isolate;
    
}

/* -------- TABLE -------- */

.calendar-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    background: #ffffff;
}

/* -------- HEADER -------- */

.calendar-table thead th {
    position: sticky;
    top: 0;
    z-index: 40;

    background: #f5f7fa;
    padding: 8px 6px;

    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;

    text-align: center;
    white-space: nowrap;

    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

/* -------- STICKY FIRST COLUMN -------- */

/* Lock first column width */
.calendar-table th:first-child,
.calendar-table td:first-child {
    width: 200px;
    min-width: 200px;
    max-width: 200px;

    white-space: normal;        /* allow wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;

    position: sticky;
    left: 0;
    z-index: 30;

    background: #ffffff;
    text-align: left;
    font-weight: 600;
    padding: 8px 12px;
    border-right: 1px solid #e5e7eb;
}

/* Header cell specifically */
.calendar-table thead th:first-child {
    z-index: 30;
    background: #f5f7fa;
}

/* --- 3. The Corner (Intersection of Top & Left) --- */
.calendar-table thead th:first-child.corner-header {
    z-index: 60; /* THE FIX: Highest Z-index */
    background: #f5f7fa; /* Match header bg */
    text-align: left;
    padding-left: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* -------- BODY CELLS -------- */

.calendar-table tbody td {
    z-index: 1;
    
    padding: 6px;
    border-bottom: 1px solid #f0f2f5;

    font-size: 11px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;

    min-width: 72px; /* MATCH HEADER WIDTH */
}

/* -------- ROW HOVER -------- */

.calendar-table tbody tr:hover {
    background: #fafafa;
}

/* -------- ROOM GROUP HEADER -------- */

.calendar-room-header td.room-header-cell {
    position: sticky;
    left: 0;
    z-index: 35; /* Slightly higher than normal left col */
    background: #eef2ff;
    color: #1e40af;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    border-top: 1px solid #c7d2fe;
    border-bottom: 1px solid #c7d2fe;
}

/* -------- STATUS BADGES -------- */

.calendar-table .app-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 999px;
}

/* -------- INPUTS -------- */

.calendar-input {
    width: 60px;
    height: 25px;

    border-radius: 6px;
    border: 1px solid #d0d5dd;

    font-size: 11px;
    text-align: center;
    background: #ffffff;

    transition: all 0.15s ease;
}

.calendar-input:hover {
    background: #f9fafb;
    border-color: #94a3b8;
}

.calendar-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* -------- RATE PLAN TOGGLE -------- */
.rate-toggle {
    cursor: pointer;
    font-weight: 700;
    margin-right: 4px;
    user-select: none;
}

.rate-plan-row td:first-child {
    font-weight: 500;
    font-size: 11px;
}

/* Rate plans hidden by default */
.rate-plan-row {
    display: none;
    background: #fafafa;
}

/* ===============================
   BULK MODAL — CLEAN VERSION
================================ */

.bulk-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.bulk-modal.hidden {
    display: none;
}

.bulk-modal-box {
    background: #ffffff;
    width: 560px;
    max-width: 95%;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

/* ---------- HEADER ---------- */

.bulk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.bulk-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bulk-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
}

/* ---------- SECTION ---------- */

.bulk-section {
    margin-bottom: 20px;
}

.bulk-section h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---------- GRID ---------- */

.bulk-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ---------- FIELD ---------- */

.bulk-field {
    display: flex;
    flex-direction: column;
}

.bulk-field label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.bulk-field input,
.bulk-field select {
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    font-size: 13px;
    background: #ffffff;
    transition: border 0.15s ease;
}

.bulk-field input:focus,
.bulk-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ===============================
   WEEKDAY SELECTOR (Bulk Modal)
================================= */

.bulk-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.weekday-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.weekday-pill input {
    display: none;
}

.weekday-pill span {
    pointer-events: none;
}

.weekday-pill input:checked + span {
    color: #ffffff;
}

.weekday-pill:has(input:checked) {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.bulk-note {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}


/* ---------- PREVIEW ---------- */

.bulk-preview {
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 14px;
    color: #475569;
}

/* ---------- PROGRESS ---------- */

.bulk-progress {
    margin-bottom: 16px;
}

.bulk-progress.hidden {
    display: none;
}

.bulk-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.bulk-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.2s ease;
}

.bulk-progress-text {
    font-size: 12px;
    margin-top: 6px;
    color: #475569;
}

/* ---------- ACTIONS ---------- */

.bulk-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* ---------- TOAST ---------- */

.app-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #16a34a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
}

.app-toast.hidden {
    display: none;
}
