:root {
    --rh-primary: #14b8a6;
    --rh-primary-2: #06b6d4;
    --rh-gradient-teal: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    --rh-gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --rh-gradient-orange: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --rh-gradient-pink: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --rh-radius: 14px;
    --rh-radius-lg: 16px;
    --rh-scrollbar-size: 4px;
    --rh-scrollbar-thumb-border: 1px;
    --rh-glow-teal: 0 8px 32px rgba(20, 184, 166, 0.22);
    --rh-glow-purple: 0 8px 32px rgba(139, 92, 246, 0.22);
    --rh-glow-orange: 0 8px 32px rgba(245, 158, 11, 0.22);
    --rh-glow-pink: 0 8px 32px rgba(236, 72, 153, 0.22);
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --sidebar-active: #14b8a6;
}

[data-bs-theme="dark"] {
    --rh-bg: #0b0f14;
    --rh-surface: #121824;
    --rh-surface-2: #2c313b;
    --rh-surface-3: #1f2738;
    --rh-border: rgba(255, 255, 255, 0.08);
    --rh-border-strong: rgba(255, 255, 255, 0.14);
    --rh-text: #f1f5f9;
    --rh-muted: #94a3b8;
    --rh-topbar-bg: rgba(24, 31, 45, 0.85);
    --rh-auth-card-bg: rgba(18, 24, 36, 0.92);
    --rh-auth-card-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --rh-code-bg: #0b0f14;
    --rh-scrollbar-thumb: rgba(148, 163, 184, 0.55);
    --rh-scrollbar-thumb-hover: rgba(148, 163, 184, 0.85);
    --sidebar-bg: #0d1219;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #64748b;
    --page-bg: var(--rh-bg);
    --card-bg: var(--rh-surface);
    --border-color: var(--rh-border);
    --text-main: var(--rh-text);
    --text-secondary: var(--rh-muted);
    --bs-body-bg: var(--rh-bg);
    --bs-body-color: var(--rh-text);
    --bs-border-color: var(--rh-border);
    --bs-secondary-color: var(--rh-muted);
    --bs-tertiary-bg: var(--rh-surface-2);
    --bs-emphasis-color: #fff;
    --rh-card-header-bg: #123465;
}

[data-bs-theme="light"] {
    --rh-bg: #f4f7fb;
    --rh-surface: #ffffff;
    --rh-surface-2: #f8fafc;
    --rh-surface-3: #f1f5f9;
    --rh-border: rgba(15, 23, 42, 0.1);
    --rh-border-strong: rgba(15, 23, 42, 0.16);
    --rh-text: #0f172a;
    --rh-muted: #64748b;
    --rh-topbar-bg: rgba(255, 255, 255, 0.92);
    --rh-auth-card-bg: rgba(255, 255, 255, 0.96);
    --rh-auth-card-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --rh-code-bg: #f1f5f9;
    --rh-scrollbar-thumb: rgba(100, 116, 139, 0.45);
    --rh-scrollbar-thumb-hover: rgba(100, 116, 139, 0.7);
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #94a3b8;
    --page-bg: var(--rh-bg);
    --card-bg: var(--rh-surface);
    --border-color: var(--rh-border);
    --text-main: var(--rh-text);
    --text-secondary: var(--rh-muted);
    --bs-body-bg: var(--rh-bg);
    --bs-body-color: var(--rh-text);
    --bs-border-color: var(--rh-border);
    --bs-secondary-color: var(--rh-muted);
    --bs-tertiary-bg: var(--rh-surface-2);
    --bs-emphasis-color: #0f172a;
    --rh-card-header-bg: #305892;
}

* {
    box-sizing: border-box;
}

.rh-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--rh-scrollbar-thumb) transparent;
}

.rh-scrollbar::-webkit-scrollbar {
    width: var(--rh-scrollbar-size);
    height: var(--rh-scrollbar-size);
}

.rh-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.rh-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--rh-scrollbar-thumb);
    border: var(--rh-scrollbar-thumb-border) solid transparent;
    background-clip: content-box;
    border-radius: 999px;
}

.rh-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--rh-scrollbar-thumb-hover);
}

.rh-scrollbar::-webkit-scrollbar-corner {
    background: transparent;
}

body.app-body {
    margin: 0;
    font-family: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--page-bg);
    color: var(--text-main);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--page-bg);
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width 0.2s ease;
    border-right: 1px solid var(--rh-border);
    display: flex;
    flex-direction: column;
}

.sidebar.is-collapsed {
    width: 84px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 184, 166, 0.15);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.text-sidebar-muted {
    color: var(--sidebar-muted);
}

.sidebar-nav-wrap {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    margin-right: -0.25rem;
    padding-right: 0.25rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
    padding: 0 0.9rem;
    margin-bottom: 0.15rem;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 0.9rem;
    border-radius: var(--rh-radius);
    color: var(--sidebar-text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-link.active {
    background: var(--rh-gradient-teal);
    color: #fff;
    box-shadow: var(--rh-glow-teal);
}

.sidebar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rh-border);
    flex-shrink: 0;
}

.sidebar-logout:hover {
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
}

.sidebar.is-collapsed .sidebar-brand > div,
.sidebar.is-collapsed .sidebar-section-label,
.sidebar.is-collapsed .sidebar-link span {
    display: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    background: var(--page-bg);
}

.topbar {
    height: 72px;
    background: var(--rh-topbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-search-wrap {
    flex: 1;
    max-width: 420px;
}

.topbar-search {
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rh-muted);
    pointer-events: none;
}

.topbar-search .form-control {
    padding-left: 2.4rem;
    background: var(--rh-surface);
    border-color: var(--rh-border);
    border-radius: 999px;
    color: var(--rh-text);
}

.topbar-icon-btn,
.topbar-user-btn {
    background: var(--rh-surface);
    border: 1px solid var(--rh-border);
    color: var(--rh-text);
    border-radius: 12px;
}

.topbar-icon-btn:hover,
.topbar-user-btn:hover {
    background: var(--rh-surface-3);
    border-color: var(--rh-border-strong);
    color: #fff;
}

.content-area {
    padding: 1.5rem;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--rh-gradient-teal);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f43f5e;
}

.notification-count-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f43f5e;
    color: #fff;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-menu {
    width: 360px;
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    background: var(--rh-surface);
}

.notification-menu-header,
.notification-menu-footer {
    padding: 0.9rem 1rem;
    background: var(--rh-surface-2);
}

.notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--rh-border);
}

.notification-menu-footer {
    border-top: 1px solid var(--rh-border);
}

.notification-menu-list {
    max-height: 420px;
    overflow: auto;
    background: var(--rh-surface);
}

.notification-menu-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.notification-item {
    display: block;
    padding: 0.9rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--rh-border);
    background: var(--rh-surface);
}

.notification-item:hover {
    background: var(--rh-surface-2);
}

.notification-item.is-unread {
    background: rgba(20, 184, 166, 0.08);
}

.notification-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-item-message,
.notification-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notification-meta {
    margin-top: 0.35rem;
}

.notification-page-card {
    border: 1px solid var(--border-color);
    border-radius: var(--rh-radius-lg);
    padding: 1rem;
    background: var(--card-bg);
    margin-bottom: 0.9rem;
}

.notification-card-unread {
    border-color: rgba(20, 184, 166, 0.35);
    background: rgba(20, 184, 166, 0.08);
}

.report-chart-card,
.maintenance-card,
.timeline-log-item,
.dashboard-kpi-item,
.dashboard-mini-panel,
.room-card,
.dashboard-room-card,
.dashboard-floor-section,
.booking-calendar,
.notification-page-card {
    border: 1px solid var(--border-color);
    border-radius: var(--rh-radius-lg);
    background: var(--card-bg);
}

.report-chart-card {
    padding: 1rem;
    min-height: 320px;
}

.timeline-log {
    display: grid;
    gap: 1rem;
}

.timeline-log-item {
    padding: 1rem;
}

.staff-log-pre {
    background: var(--rh-code-bg);
    color: var(--rh-text);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-size: 0.8rem;
    overflow: auto;
    margin-bottom: 0.5rem;
    border: 1px solid var(--rh-border);
}

.maintenance-list {
    display: grid;
    gap: 1rem;
}

.maintenance-card {
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.maintenance-priority-urgent { border-left: 4px solid #f43f5e; }
.maintenance-priority-high { border-left: 4px solid #f59e0b; }
.maintenance-priority-medium { border-left: 4px solid #14b8a6; }
.maintenance-priority-low { border-left: 4px solid #64748b; }

.maintenance-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.maintenance-gallery a { display: block; }

.maintenance-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.room-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.room-image-card {
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 0.5rem;
    background: var(--rh-surface-2);
}

.room-image-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 0.65rem;
    border: 1px solid var(--border-color);
    display: block;
}

.room-image-card .form-check { margin-top: 0.5rem; }

.image-gallery-uploader {
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 1rem;
    background: var(--rh-surface-2);
}

.image-gallery-dropzone {
    border: 2px dashed var(--rh-border-strong);
    border-radius: 0.85rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

.image-gallery-dropzone:hover,
.image-gallery-dropzone.is-dragover {
    border-color: var(--rh-primary);
    background: rgba(20, 184, 166, 0.08);
}

.image-gallery-dropzone.is-full,
.image-gallery-dropzone.is-processing {
    opacity: 0.7;
    pointer-events: none;
}

.image-gallery-dropzone.is-full { cursor: not-allowed; }

.image-gallery-dropzone.is-processing .image-gallery-dropzone-title::after {
    content: ' (กำลังปรับขนาดรูป...)';
}

.image-gallery-dropzone-icon {
    font-size: 2rem;
    color: var(--rh-muted);
    line-height: 1;
}

.image-gallery-dropzone-title {
    font-weight: 600;
    color: var(--rh-text);
    margin-top: 0.5rem;
}

.image-gallery-dropzone-hint {
    font-size: 0.8125rem;
    color: var(--rh-muted);
    margin-top: 0.25rem;
}

.image-gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-gallery-list:empty { display: none; }

.image-gallery-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--rh-surface-3);
    aspect-ratio: 1 / 1;
    cursor: grab;
}

.image-gallery-item:active { cursor: grabbing; }

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.image-gallery-handle {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.image-gallery-remove {
    position: absolute;
    bottom: 0.35rem;
    right: 0.35rem;
    width: 1.65rem;
    height: 1.65rem;
    border: 0;
    border-radius: 999px;
    background: rgba(244, 63, 94, 0.92);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0;
}

.image-gallery-remove:hover { background: #e11d48; }

.image-gallery-cover-badge {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.92);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    display: none;
}

.image-gallery-item.is-cover .image-gallery-cover-badge { display: inline-flex; }
.image-gallery-item.sortable-ghost { opacity: 0.45; }
.image-gallery-item.sortable-chosen { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }

.image-gallery-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.image-gallery-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--rh-primary);
}

body.property-room-type-modal-open {
    overflow: hidden;
}

body.property-room-type-modal-open #property_room_type_modal {
    z-index: 1070;
    overflow: hidden !important;
}

#property_room_type_modal .modal-dialog {
    margin: 0.75rem auto;
    max-width: min(960px, calc(100vw - 1.5rem));
    max-height: calc(100vh - 1.5rem);
}

#property_room_type_modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 1.5rem);
    overflow: hidden;
}

#property_room_type_modal .modal-header,
#property_room_type_modal .modal-footer {
    flex-shrink: 0;
}

#property_room_type_modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0.75rem 1.25rem 0.5rem;
}

#property_room_type_modal .property-room-type-form-fields {
    --bs-gutter-y: 0.5rem;
}

#property_room_type_modal .property-room-type-form-fields .form-label {
    margin-bottom: 0.2rem;
    font-size: 0.8125rem;
}

#property_room_type_modal .property-room-type-form-fields .form-control,
#property_room_type_modal .property-room-type-form-fields .form-select {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.875rem;
}

#property_room_type_modal #txt_room_type_description {
    min-height: 2.25rem;
    resize: none;
}

#property_room_type_modal .property-room-type-gallery {
    padding: 0.5rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-dropzone {
    padding: 0.55rem 0.65rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-dropzone-icon {
    font-size: 1.1rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-dropzone-title {
    margin-top: 0.15rem;
    font-size: 0.8125rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-dropzone-hint {
    font-size: 0.68rem;
    line-height: 1.3;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-list {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.5rem;
    max-height: none;
    overflow: visible;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-item {
    width: 100%;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-meta {
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-handle,
#property_room_type_modal .property-room-type-gallery .image-gallery-remove {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.65rem;
}

#property_room_type_modal .property-room-type-gallery .image-gallery-cover-badge {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
}

#property_room_type_modal .modal-footer {
    padding: 0.65rem 1.25rem;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    position: relative;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.12), transparent 32%),
        var(--page-bg);
}

.auth-theme-toggle {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 5;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--rh-auth-card-bg);
    border: 1px solid var(--rh-border);
    border-radius: var(--rh-radius-lg);
    padding: 2rem;
    box-shadow: var(--rh-auth-card-shadow);
    backdrop-filter: blur(10px);
}

.auth-card-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rh-gradient-teal);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: var(--rh-glow-teal);
}

.dashboard-card,
.placeholder-card,
.surface-card {
    border: 1px solid var(--border-color);
    border-radius: var(--rh-radius-lg);
    background: var(--card-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.room-card {
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border-top-width: 4px;
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.room-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.room-number { font-size: 1.15rem; font-weight: 700; }
.room-tenant { min-height: 24px; font-weight: 600; }
.room-status-available { border-top-color: #22c55e; }
.room-status-occupied { border-top-color: #f43f5e; }
.room-status-reserved { border-top-color: #f59e0b; }
.room-status-maintenance { border-top-color: #64748b; }
.room-status-cleaning { border-top-color: #06b6d4; }

.stat-card {
    padding: 1.15rem 1.25rem;
    border: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    top: -30px;
    right: -20px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
}

.stat-value-suffix {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    position: relative;
    z-index: 1;
}

.stat-card .small.text-secondary {
    color: rgba(255, 255, 255, 0.72) !important;
}

.stat-card-occupied {
    background: var(--rh-gradient-teal);
    box-shadow: var(--rh-glow-teal);
}

.stat-card-revenue {
    background: var(--rh-gradient-purple);
    box-shadow: var(--rh-glow-purple);
}

.stat-card-pending {
    background: var(--rh-gradient-orange);
    box-shadow: var(--rh-glow-orange);
}

.stat-card-maintenance {
    background: var(--rh-gradient-pink);
    box-shadow: var(--rh-glow-pink);
}

.stat-card-booking {
    background: var(--rh-gradient-pink);
    box-shadow: var(--rh-glow-pink);
}

.dashboard-chart-wrap {
    position: relative;
    min-height: 320px;
}

.dashboard-action-list { display: grid; gap: 0.85rem; }

.dashboard-action-item {
    border: 1px solid var(--border-color);
    border-radius: var(--rh-radius);
    padding: 0.95rem 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--rh-surface-2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-action-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
    border-color: rgba(20, 184, 166, 0.35);
    color: inherit;
}

.dashboard-room-summary { display: grid; gap: 1rem; }

.dashboard-room-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.dashboard-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dashboard-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dashboard-floor-stack { display: grid; gap: 1.25rem; }

.dashboard-floor-section {
    padding: 1rem;
    background: var(--rh-surface-2);
}

.dashboard-floor-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.dashboard-room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
}

.dashboard-room-card {
    display: block;
    border-top-width: 4px;
    padding: 0.9rem;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-room-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    color: var(--text-main);
}

.dashboard-room-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.dashboard-room-card-number { font-size: 1.05rem; font-weight: 700; }
.dashboard-room-card-meta { font-weight: 600; min-height: 24px; }
.dashboard-room-card-submeta { margin-top: 0.35rem; font-size: 0.82rem; color: var(--text-secondary); }
.dashboard-room-summary-row { padding-bottom: 0.25rem; }

.dashboard-progress {
    height: 10px;
    background: var(--rh-surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.dashboard-progress-bar { height: 100%; border-radius: 999px; }
.room-progress-available { background: #22c55e; }
.room-progress-occupied { background: #f43f5e; }
.room-progress-reserved { background: #f59e0b; }
.room-progress-maintenance { background: #64748b; }
.room-progress-cleaning { background: #06b6d4; }

.dashboard-mini-panel { padding: 1rem; height: 100%; }
.dashboard-mini-title { font-weight: 700; margin-bottom: 0.75rem; }

.dashboard-list-item {
    padding: 0.75rem 0;
    border-top: 1px solid var(--rh-border);
}

.dashboard-list-item:first-of-type { border-top: 0; padding-top: 0; }
.dashboard-inline-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dashboard-empty { color: var(--text-secondary); padding: 1rem 0; }
.dashboard-kpi-stack { display: grid; gap: 0.85rem; }
.dashboard-kpi-item { padding: 1rem; }

.booking-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
}

.booking-calendar-head {
    padding: 0.85rem;
    background: var(--rh-surface-2);
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    text-align: center;
    color: var(--text-secondary);
}

.booking-calendar-cell {
    min-height: 152px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.booking-calendar-cell:nth-child(7n) { border-right: 0; }
.booking-calendar-cell.is-muted { background: rgba(255, 255, 255, 0.02); }
.booking-calendar-cell.is-today { background: rgba(20, 184, 166, 0.08); }
.booking-calendar-date { font-weight: 700; }
.booking-calendar-items { display: grid; gap: 0.35rem; }
.booking-calendar-empty,
.booking-calendar-more { color: var(--text-secondary); font-size: 0.85rem; }

.booking-chip {
    border: 0;
    border-radius: 0.75rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
    text-align: left;
    color: #fff;
    cursor: pointer;
}

.booking-chip.status-pending,
.booking-chip.status-confirmed { background: #d97706; }
.booking-chip.status-checked_in { background: #16a34a; }
.booking-chip.status-checked_out { background: #64748b; }
.booking-chip.status-cancelled,
.booking-chip.status-no_show { background: #dc2626; }

.booking-chip-contract,
.booking-grid-chip-contract {
    background: #7c3aed !important;
}

.booking-calendar-empty-btn {
    border: 1px dashed var(--rh-border);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    width: 100%;
    cursor: pointer;
}

.booking-calendar-empty-btn:hover {
    border-color: var(--rh-primary);
    color: var(--rh-primary);
}

.booking-today-board-card {
    display: flex;
    flex-direction: column;
    height: 210px;
}

.booking-today-board-card .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.booking-today-board-search {
    flex: 1 1 120px;
    max-width: 180px;
    min-width: 100px;
    font-size: 0.75rem;
    padding: 0.2rem 0.45rem;
}

.booking-today-board-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.booking-today-board-list {
    height: 100%;
    overflow-y: auto;
}

.booking-today-board-item {
    padding: 0.3rem 0.55rem;
    font-size: 0.8125rem;
}

.booking-today-board-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.booking-today-board-meta {
    font-size: 0.7rem;
    line-height: 1.2;
}

.btn-today-board {
    padding: 0.12rem 0.38rem;
    font-size: 0.68rem;
    line-height: 1.2;
    border-radius: 0.25rem;
}

.booking-today-board-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.8125rem;
}

.booking-room-grid-wrap {
    max-height: max(180px, calc(100dvh - 38rem));
    overflow: auto;
    isolation: isolate;
}

.booking-room-grid {
    table-layout: fixed;
    min-width: 960px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.booking-room-grid th,
.booking-room-grid td {
    border-top: 0;
    border-left: 0;
    border-right: 1px solid var(--rh-border);
    border-bottom: 1px solid var(--rh-border);
}

.booking-room-grid tr > :first-child {
    border-left: 1px solid var(--rh-border);
}

.booking-room-grid thead tr:first-child > * {
    border-top: 1px solid var(--rh-border);
}

.booking-room-grid thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--rh-surface-2);
    background-clip: padding-box;
    vertical-align: middle;
}

.booking-room-grid-room-col {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
}

.booking-room-grid thead th.booking-room-grid-room-col {
    position: sticky;
    left: 0;
    z-index: 12;
    background-color: var(--rh-surface-2);
}

.booking-room-grid tbody td.booking-room-grid-room-col {
    position: sticky;
    left: 0;
    z-index: 4;
    background-color: var(--rh-surface);
}

.booking-room-grid tbody td.booking-room-grid-cell {
    position: relative;
    z-index: 0;
    background-color: var(--rh-surface);
}

.booking-room-grid-day-col {
    width: 64px;
    min-width: 64px;
}

.booking-room-grid thead th.booking-room-grid-day-col.is-today,
.booking-room-grid tbody td.booking-room-grid-cell.is-today {
    background-color: var(--rh-surface-2);
    box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, 0.12);
}

.booking-room-grid-cell {
    vertical-align: top;
    padding: 0.25rem;
    min-height: 52px;
    cursor: pointer;
}

.booking-room-grid-cell:hover:not(.is-today) {
    background-color: rgba(255, 255, 255, 0.04);
}

.booking-room-grid tbody td.booking-room-grid-cell.is-today:hover {
    box-shadow: inset 0 0 0 9999px rgba(20, 184, 166, 0.16);
}

.booking-grid-chip {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 0.4rem;
    padding: 0.2rem 0.35rem;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    text-align: left;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 0;
}

.booking-grid-chip.status-pending,
.booking-grid-chip.status-confirmed { background: #d97706; }
.booking-grid-chip.status-checked_in { background: #16a34a; }
.booking-grid-chip.status-checked_out { background: #64748b; }
.booking-grid-chip.status-cancelled,
.booking-grid-chip.status-no_show { background: #dc2626; }

.ts-wrapper.form-select.single .ts-control,
.ts-wrapper.form-select.multi .ts-control {
    background-color: var(--rh-surface);
    border-color: var(--rh-border);
    color: var(--rh-text);
}

.ts-dropdown {
    background: var(--rh-surface);
    border-color: var(--rh-border);
    color: var(--rh-text);
    z-index: 2000;
}

.ts-dropdown.ts-dropdown-in-modal,
body > .ts-dropdown {
    z-index: 20000 !important;
}

.ts-dropdown .dropdown-input-wrap {
    background: var(--rh-surface);
    border-bottom: 1px solid var(--rh-border);
    padding: 0.4rem 0.5rem;
}

.ts-dropdown .dropdown-input {
    background: var(--rh-surface-2);
    border: 1px solid var(--rh-border);
    border-radius: 0.375rem;
    color: var(--rh-text);
    width: 100%;
    padding: 0.35rem 0.5rem;
}

.ts-dropdown .dropdown-input:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.15);
}

.ts-dropdown .option {
    color: var(--rh-text);
}

.ts-dropdown .option.active {
    background: rgba(20, 184, 166, 0.15);
    color: var(--rh-text);
}

.ts-dropdown .option.disabled {
    opacity: 0.55;
}

.ts-dropdown .no-results {
    color: var(--rh-muted);
    padding: 0.5rem 0.75rem;
}

.alert-floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    min-width: 280px;
}

.text-muted-rh { color: var(--rh-muted) !important; }

.modal-header-brand {
    background: var(--rh-gradient-teal);
    color: #fff;
    border-bottom: 0;
}

.modal-header-brand .btn-close {
    filter: invert(1) grayscale(1);
}

/* Bootstrap overrides */
.card {
    background: var(--card-bg);
    border-color: var(--border-color);
    border-radius: var(--rh-radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.card-header,
.card-footer {
    background: var(--rh-card-header-bg);
    border-color: var(--border-color);
    color: #fff;
}

.card-header .text-secondary,
.card-footer .text-secondary {
    color: rgba(255, 255, 255, 0.78) !important;
}

.card-header .btn-outline-secondary,
.card-footer .btn-outline-secondary {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.45);
}

.card-header .btn-outline-secondary:hover,
.card-header .btn-outline-secondary.active,
.card-footer .btn-outline-secondary:hover,
.card-footer .btn-outline-secondary.active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.72);
    color: #fff;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--rh-text);
    --bs-table-border-color: var(--rh-border);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(20, 184, 166, 0.06);
    --bs-table-hover-color: var(--rh-text);
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--rh-border);
}

.table thead th {
    color: var(--rh-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    background: var(--rh-surface-2);
}

.form-control,
.form-select {
    background-color: var(--rh-surface-2);
    border-color: var(--rh-border);
    color: var(--rh-text);
    border-radius: 12px;
}

.form-control.meter-readonly,
.form-control.meter-readonly:focus {
    background-color: var(--rh-surface-3);
    border-color: var(--rh-border);
    color: var(--rh-text);
    opacity: 1;
    box-shadow: none;
    cursor: default;
}

.invoice-summary-box {
    background: var(--rh-surface-3);
    border-color: var(--rh-border) !important;
    color: var(--rh-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--rh-surface-2);
    border-color: rgba(20, 184, 166, 0.55);
    color: var(--rh-text);
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.18);
}

.form-control::placeholder { color: #64748b; }
.form-label { color: var(--rh-text); font-weight: 500; }
.form-text { color: var(--rh-muted); }

.btn-primary {
    background: var(--rh-gradient-teal);
    border: 0;
    color: #fff;
    border-radius: 12px;
    box-shadow: var(--rh-glow-teal);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    border: 0;
    color: #fff;
}

.btn-outline-primary {
    color: #5eead4;
    border-color: rgba(20, 184, 166, 0.45);
    border-radius: 12px;
}

.btn-outline-primary:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: #14b8a6;
    color: #99f6e4;
}

.btn-outline-secondary {
    color: var(--rh-muted);
    border-color: var(--rh-border-strong);
    border-radius: 12px;
}

.btn-outline-secondary:hover,
.btn-outline-secondary.active {
    background: var(--rh-surface-3);
    border-color: var(--rh-border-strong);
    color: #fff;
}

.btn-light {
    background: var(--rh-surface-2);
    border-color: var(--rh-border);
    color: var(--rh-text);
}

.dropdown-menu {
    background: var(--rh-surface);
    border-color: var(--rh-border);
    border-radius: var(--rh-radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.dropdown-item { color: var(--rh-text); }
.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--rh-surface-2);
    color: #fff;
}

.dropdown-divider { border-color: var(--rh-border); }

.modal-content,
.offcanvas,
.rh-form-overlay-panel {
    background: var(--rh-surface);
    border-color: var(--rh-border);
    color: var(--rh-text);
}

.modal-header,
.offcanvas-header {
    border-bottom-color: var(--rh-border);
}

.modal-footer,
.offcanvas-body {
    border-top-color: var(--rh-border);
}

.nav-tabs {
    border-bottom-color: var(--rh-border);
}

.nav-tabs .nav-link {
    color: var(--rh-muted);
    border: 0;
    border-radius: 10px;
}

.nav-tabs .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-tabs .nav-link.active {
    color: #fff;
    background: rgba(20, 184, 166, 0.15);
}

.list-group-item {
    background: var(--rh-surface);
    border-color: var(--rh-border);
    color: var(--rh-text);
}

.page-link {
    background: var(--rh-surface-2);
    border-color: var(--rh-border);
    color: var(--rh-text);
}

.page-link:hover {
    background: var(--rh-surface-3);
    border-color: var(--rh-border-strong);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--rh-gradient-teal);
    border-color: transparent;
}

.badge.bg-light,
.badge.bg-white {
    background: var(--rh-surface-3) !important;
    color: var(--rh-text) !important;
}

.badge.bg-dark-subtle {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--rh-text) !important;
}

.bg-success-subtle { background: rgba(34, 197, 94, 0.15) !important; color: #86efac !important; }
.bg-danger-subtle { background: rgba(244, 63, 94, 0.15) !important; color: #fda4af !important; }
.bg-warning-subtle { background: rgba(245, 158, 11, 0.15) !important; color: #fcd34d !important; }
.bg-primary-subtle { background: rgba(20, 184, 166, 0.15) !important; color: #5eead4 !important; }
.bg-info-subtle { background: rgba(6, 182, 212, 0.15) !important; color: #67e8f9 !important; }
.bg-secondary-subtle { background: rgba(148, 163, 184, 0.15) !important; color: #cbd5e1 !important; }

.text-success { color: #4ade80 !important; }
.text-danger { color: #f87171 !important; }
.text-warning { color: #fbbf24 !important; }
.text-primary { color: #2dd4bf !important; }
.text-info { color: #22d3ee !important; }
.text-secondary { color: var(--rh-muted) !important; }

.bg-white { background-color: var(--rh-surface) !important; }

.alert {
    border-radius: var(--rh-radius);
    border-color: var(--rh-border);
}

.spinner-border.text-primary { color: #2dd4bf !important; }

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--rh-border-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.status-pill--active { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.status-pill--pending { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.status-pill--danger { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }

.page-rooms .content-area {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 72px);
    min-height: 0;
    overflow: hidden;
}

.page-rooms .rooms-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.page-rooms .rooms-page-workspace {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0 !important;
}

.page-rooms .rooms-page-workspace > [class*="col-"] {
    min-height: 0;
}

@media (min-width: 1200px) {
    .page-rooms .rooms-page-workspace > .col-12 {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
}

.page-rooms .rooms-list-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.page-rooms .rooms-list-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 1rem;
}

.page-rooms .rooms-list-filters {
    flex-shrink: 0;
}

.page-rooms .rooms-list-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.page-rooms .rooms-list-view,
.page-rooms .rooms-grid-view {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.page-rooms .rooms-table-scroll,
.page-rooms .rooms-grid-scroll {
    flex: 1 1 0;
    min-height: 0;
    max-height: calc(100vh - 22rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.page-rooms .rooms-table-scroll {
    overflow-x: auto;
}

.page-rooms .rooms-grid-scroll {
    overflow-x: hidden;
}

.page-rooms .rooms-grid-scroll > .row {
    margin-inline: 0;
    width: 100%;
}

.page-rooms .rooms-table-scroll .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rh-surface-2);
    box-shadow: inset 0 -1px 0 var(--rh-border);
}

.page-rooms .rooms-list-pagination {
    flex-shrink: 0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--rh-border);
}

.page-rooms .rooms-list-pagination > .d-flex {
    margin-top: 0 !important;
}

@media (max-width: 1199.98px) {
    .page-rooms .content-area {
        height: auto;
        overflow: visible;
    }

    .page-rooms .rooms-page {
        overflow: visible;
    }

    .page-rooms .rooms-table-scroll,
    .page-rooms .rooms-grid-scroll {
        flex: none;
        max-height: min(60vh, 520px);
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        z-index: 1040;
    }

    .sidebar.is-open { transform: translateX(0); }

    .content-area,
    .topbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .booking-calendar { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .booking-calendar-head { display: none; }
    .booking-calendar-cell { min-height: 0; border-right: 0; }
}

/* Wide overlay form (e.g. properties) */
body.rh-form-overlay-open {
    overflow: hidden;
}

.rh-form-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    visibility: hidden;
    pointer-events: none;
}

.rh-form-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
}

.rh-form-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rh-form-overlay.is-open .rh-form-overlay-backdrop {
    opacity: 1;
}

.rh-form-overlay-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 70vw;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--rh-surface);
    border-left: 4px solid var(--rh-primary);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.28);
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

#tenant_detail_overlay .rh-form-overlay-panel {
    width: 80vw;
}

#room_checkin_overlay .rh-form-overlay-panel,
#room_detail_overlay .rh-form-overlay-panel {
    width: 85vw;
}

.rh-form-overlay.is-open .rh-form-overlay-panel {
    transform: translateX(0);
}

.rh-form-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
}

.rh-form-overlay-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.rh-form-overlay-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
}

.room-checkin-id-photo-box {
    width: 100%;
    max-width: 140px;
    aspect-ratio: 3 / 4;
    margin-left: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--bs-secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-checkin-id-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.room-checkin-id-photo-placeholder {
    text-align: center;
    padding: 0.5rem;
    line-height: 1.3;
}

.tenant-id-card-image {
    max-width: 140px;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.tenant-detail-profile-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.tenant-detail-summary-card {
    padding: 1rem 1.25rem;
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    background: var(--rh-surface-2);
}

.tenant-detail-summary-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.tenant-detail-field-list dt {
    color: var(--rh-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.tenant-detail-field-list dd {
    margin-bottom: 0.85rem;
}

.tenant-detail-field-list dd:last-child {
    margin-bottom: 0;
}

.tenant-active-rental-card {
    background: var(--rh-surface-2);
}

#tenant_detail_overlay .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
}

#tenant_detail_overlay .nav-tabs .nav-link {
    white-space: nowrap;
}

.checkout-charge-row {
    --bs-gutter-x: 0.5rem;
}

.checkout-stay-summary {
    column-gap: 1.25rem;
    row-gap: 0.25rem;
}

.room-checkout-id-photo-box {
    max-width: 96px;
}

.checkout-slip-dropzone {
    position: relative;
    width: 100%;
    min-height: 150px;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    background: var(--bs-secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    padding: 0.75rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.checkout-slip-dropzone:hover,
.checkout-slip-dropzone:focus-visible {
    border-color: var(--bs-primary);
    outline: none;
}

.checkout-slip-dropzone.is-dragover {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle, rgba(13, 110, 253, 0.1));
}

.checkout-slip-dropzone.has-file {
    padding: 0.25rem;
    cursor: default;
}

.checkout-slip-dropzone-placeholder {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.checkout-slip-dropzone-placeholder i {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.35rem;
}

.checkout-slip-dropzone-img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 0.375rem;
}

.checkout-slip-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.checkout-slip-remove:hover {
    background: rgba(220, 53, 69, 0.9);
}

.checkout-qr-mock {
    width: 180px;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-align: center;
    background: var(--bs-secondary-bg);
}

.checkout-qr-mock-grid {
    width: 84px;
    height: 84px;
    background-image:
        linear-gradient(45deg, var(--bs-secondary-color) 25%, transparent 25%, transparent 75%, var(--bs-secondary-color) 75%),
        linear-gradient(45deg, var(--bs-secondary-color) 25%, transparent 25%, transparent 75%, var(--bs-secondary-color) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
    opacity: 0.5;
    border-radius: 0.25rem;
}

.checkout-qr-mock-label {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.checkout-qr-mock-amount {
    font-weight: 600;
    color: var(--bs-success);
}

.checkout-qr-box {
    width: 220px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background: #fff;
}

.checkout-qr-box img,
.checkout-qr-box canvas {
    width: 200px;
    height: 200px;
}

.checkout-qr-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bs-success);
}

#checkout_other_charges:empty::before {
    content: "ยังไม่มีรายการค่าใช้จ่ายอื่น";
    display: block;
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

@media (max-width: 991.98px) {
    .rh-form-overlay-panel {
        width: 100vw;
    }
}

.rooms-today-strip-wrap {
    overflow-x: auto;
}

.rooms-today-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    min-width: min-content;
}

.rooms-today-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    background: var(--rh-surface);
    color: var(--rh-text);
    min-width: 88px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rooms-today-chip:hover {
    border-color: var(--rh-primary);
    background: var(--rh-surface-2);
}

.rooms-today-chip.is-active {
    border-color: rgba(var(--bs-primary-rgb), 0.65);
    background: rgba(var(--bs-primary-rgb), 0.16);
    color: var(--rh-text);
}

.rooms-today-chip.is-active .rooms-today-label,
.rooms-today-chip.is-active .rooms-today-value {
    color: var(--rh-text);
}

.rooms-today-chip.is-active:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.8);
    background: rgba(var(--bs-primary-rgb), 0.22);
}

.rooms-today-chip-accent {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
}

.rooms-today-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.rooms-today-value {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
}

.room-desk-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.room-desk-badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.room-desk-action-bar .btn {
    font-weight: 600;
}

.rh-swal-popup {
    background: var(--rh-surface, #fff) !important;
    color: var(--rh-text, #0f172a) !important;
    border: 1px solid var(--rh-border, rgba(15, 23, 42, 0.1));
    border-radius: var(--rh-radius-lg, 16px);
}

/* Above Bootstrap modals stacked over room/booking overlays (~1070) */
.swal2-container {
    z-index: 20050 !important;
}

.rh-swal-popup .swal2-title,
.rh-swal-popup .swal2-html-container {
    color: var(--rh-text, #0f172a) !important;
}

.property-structure-floors-scroll {
    max-height: min(320px, 42vh);
    overflow: auto;
    border: 1px solid var(--rh-border);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.property-structure-floors-scroll .property-structure-floors-table {
    margin-bottom: 0;
}

.property-structure-floors-scroll .property-structure-floors-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--rh-surface-2);
    box-shadow: inset 0 -1px 0 var(--rh-border);
}

.property-structure-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom-color: var(--rh-border);
}

.property-structure-nav .nav-item {
    flex-shrink: 0;
}

.property-structure-tab-content {
    padding-top: 0.25rem;
}

.property-structure-tab-content .property-structure-floors-scroll {
    max-height: min(420px, calc(100vh - 320px));
}

.property-structure-floor-drag {
    width: 36px;
    text-align: center;
    color: var(--rh-text-muted, #64748b);
    cursor: grab;
    user-select: none;
    vertical-align: middle;
}

.property-structure-floor-drag:active {
    cursor: grabbing;
}

.property-structure-floor-drag .bi {
    font-size: 1.1rem;
    line-height: 1;
}

.property-structure-floor-ghost {
    opacity: 0.45;
    background: var(--rh-surface-2, #f8fafc);
}

.property-structure-floor-chosen {
    background: var(--rh-surface-2, #f8fafc);
}

.property-structure-floor-dragging {
    opacity: 0.9;
}

.property-room-types-scroll {
    max-height: min(480px, calc(100vh - 280px));
    overflow: auto;
    border: 1px solid var(--rh-border);
    border-radius: 12px;
}

.property-room-types-scroll .list-group-item {
    background: transparent;
    border-color: var(--rh-border);
}

body.property-room-type-modal-open .modal-backdrop {
    z-index: 1065;
}

.room-status-clean-done {
    cursor: pointer;
}

.room-status-clean-done:hover {
    text-decoration: underline;
}

body.promptpay-modal-open #room_promptpay_modal,
body.promptpay-modal-open #booking_promptpay_modal,
body.promptpay-modal-open #payment_promptpay_modal {
    z-index: 1070;
}

body.promptpay-modal-open .modal-backdrop {
    z-index: 1065;
}

body.room-staff-payment-open #room_payment_modal {
    z-index: 1070;
}

body.room-staff-payment-open .modal-backdrop {
    z-index: 1065;
}

body.move-in-charge-modal-open #move_in_charge_modal {
    z-index: 1075;
}

body.move-in-charge-modal-open .modal-backdrop {
    z-index: 1072;
}

body.room-maintenance-modal-open #room_maintenance_modal {
    z-index: 1075;
}

body.room-contract-modal-open #room_contract_modal {
    z-index: 1075;
}

body.room-contract-modal-open .modal-backdrop {
    z-index: 1072;
}

body.tenant-maintenance-modal-open #tenant_maintenance_modal,
body.tenant-invoice-modal-open #tenant_invoice_modal,
body.tenant-bill-modal-open #tenant_bill_modal,
body.tenant-contract-modal-open #tenant_contract_modal {
    z-index: 1075;
}

body.tenant-maintenance-modal-open .modal-backdrop,
body.tenant-invoice-modal-open .modal-backdrop,
body.tenant-bill-modal-open .modal-backdrop,
body.tenant-contract-modal-open .modal-backdrop {
    z-index: 1072;
}

body.room-bill-modal-open #room_bill_modal {
    z-index: 1075;
}

body.room-bill-modal-open .modal-backdrop {
    z-index: 1072;
}

.room-bill-slip-panel {
    min-height: 280px;
    background: var(--rh-surface-3, rgba(255, 255, 255, 0.03));
    border-color: var(--rh-border) !important;
}

.room-bill-slip-img {
    max-height: 360px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.room-bill-slip-link:hover .room-bill-slip-img {
    opacity: 0.92;
}

body.room-maintenance-modal-open .modal-backdrop {
    z-index: 1072;
}

#room_maintenance_modal .room-maintenance-gallery,
#tenant_maintenance_modal .room-maintenance-gallery {
    padding: 0.75rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone {
    min-height: auto;
    padding: 0.65rem 0.75rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-icon,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-icon {
    font-size: 1.25rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-title,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-title {
    font-size: 0.875rem;
    margin-top: 0.2rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-hint,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-dropzone-hint {
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-list,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-item,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-item {
    flex: 0 0 calc(25% - 0.375rem);
    width: calc(25% - 0.375rem);
    min-width: 0;
    max-width: calc(25% - 0.375rem);
}

#room_maintenance_modal .room-maintenance-gallery .image-gallery-meta,
#tenant_maintenance_modal .room-maintenance-gallery .image-gallery-meta {
    margin-top: 0.5rem;
}

.room-detail-tenant-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    flex: 0 0 auto;
}

.room-detail-tenant-photo-placeholder {
    background: var(--rh-surface-2);
    font-size: 32px;
}

/* CKEditor: force readable black text on white editing area (overrides dark theme) */
.ck.ck-editor__editable.ck-content,
.ck.ck-editor__editable.ck-content * {
    color: #1f2937 !important;
}

.ck.ck-editor__editable.ck-content {
    background-color: #ffffff !important;
}

.contract-template-view-frame {
    display: block;
    width: 100%;
    min-height: 75vh;
    border: 0;
    background: #fff;
}

.ck.ck-editor__editable.ck-content a {
    color: #2563eb !important;
}

.page-payments .payments-table-scroll {
    max-height: calc(100vh - 120px);
    overflow: auto;
    overscroll-behavior: contain;
}

.page-payments .payments-table-scroll .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--rh-surface-2);
    box-shadow: inset 0 -1px 0 var(--rh-border);
}

.page-reports .report-catalog-card {
    display: block;
    padding: 1rem 1.1rem;
    border: 1px solid var(--rh-border);
    border-radius: 0.85rem;
    background: var(--rh-surface);
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.page-reports .report-catalog-card:hover {
    border-color: var(--rh-primary);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.12);
    transform: translateY(-1px);
}

.page-reports .report-catalog-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: var(--rh-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.page-reports .report-catalog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    background: rgba(20, 184, 166, 0.12);
    color: var(--rh-primary);
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

#report_overlay .rh-form-overlay-panel {
    width: 80vw;
}

.page-reports .report-overlay-placeholder .border {
    border-color: var(--rh-border) !important;
    background: var(--rh-surface-2, rgba(255, 255, 255, 0.02));
}
