﻿/**
 * Daily List Module - Frontend Styles
 */

/* Hide scrollbar for main module container */
.hha-module-container:has(#hhdl-room-list) {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.hha-module-container:has(#hhdl-room-list)::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Header */
.hhdl-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 2px solid #e5e7eb;
    padding: 10px 16px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hhdl-header-date-area {
    flex: 1;
    cursor: pointer;
    transition: background 0.2s;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
}

.hhdl-header-date-area:hover {
    background: #f9fafb;
}

.hhdl-header-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhdl-header-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hhdl-header-settings-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.hhdl-header-settings-btn.active {
    background: #10b981;
    border-color: #10b981;
}

.hhdl-header-settings-btn .material-symbols-outlined {
    font-size: 20px;
    color: #6b7280;
}

.hhdl-header-settings-btn.active .material-symbols-outlined {
    color: #fff;
}

.hhdl-viewing-date {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Date Picker Modal */
.hhdl-date-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.hhdl-date-modal.hhdl-modal-open {
    display: flex;
}

.hhdl-date-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.2s ease-out;
}

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

.hhdl-date-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}

.hhdl-date-modal-header h3 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.hhdl-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.hhdl-calendar-nav:hover {
    background: #f3f4f6;
}

.hhdl-calendar-nav .material-symbols-outlined {
    font-size: 24px;
    color: #6b7280;
}

.hhdl-date-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.hhdl-date-modal-close:hover {
    background: #f3f4f6;
}

.hhdl-date-modal-close .material-symbols-outlined {
    font-size: 24px;
    color: #6b7280;
}

.hhdl-date-modal-body {
    padding: 20px;
}

/* Calendar Grid */
.hhdl-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.hhdl-calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 4px;
}

.hhdl-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.hhdl-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #1f2937;
    background: #fff;
}

.hhdl-calendar-day:hover {
    background: #f3f4f6;
}

.hhdl-calendar-day-other {
    color: #d1d5db;
    cursor: default;
}

.hhdl-calendar-day-other:hover {
    background: #fff;
}

.hhdl-calendar-day-today {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.hhdl-calendar-day-today:hover {
    background: #bfdbfe;
}

.hhdl-calendar-day-selected {
    background: #10b981;
    color: #fff;
    font-weight: 600;
}

.hhdl-calendar-day-selected:hover {
    background: #059669;
}

.hhdl-calendar-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.hhdl-calendar-today-btn {
    padding: 8px 24px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
}

.hhdl-calendar-today-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Filters */
.hhdl-filters-wrapper {
    position: relative;
    margin-top: 8px;
    transition: all 0.2s;
}

.hhdl-filters-wrapper.hhdl-filters-sticky {
    position: sticky;
    top: 46px; /* Below header */
    z-index: 90;
    background: #fff;
    margin-top: 0;
    padding-top: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.hhdl-filters {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px 16px;
    overflow-x: auto;
    transition: all 0.3s ease;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.hhdl-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.hhdl-filters-wrapper.hhdl-filters-hidden {
    display: none;
}

/* Scroll arrows */
.hhdl-filters-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    border: 1px solid #d1d5db;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.hhdl-filters-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.hhdl-filters-scroll-btn:hover {
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-filters-scroll-btn.left {
    left: 0;
    border-radius: 0 6px 6px 0;
    border-left: none;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
}

.hhdl-filters-scroll-btn.left:hover {
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-filters-scroll-btn.right {
    right: 0;
    border-radius: 6px 0 0 6px;
    border-right: none;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
}

.hhdl-filters-scroll-btn.right:hover {
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-filters-scroll-btn .material-symbols-outlined {
    font-size: 20px;
    color: #6b7280;
}

.hhdl-filter-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hhdl-filter-btn:hover {
    background: #e5e7eb;
}

.hhdl-filter-btn.active {
    background: #10b981;
    color: #fff;
}

.hhdl-filter-btn.filter-exclusive {
    background: #ef4444;
    color: #fff;
}

/* Stat Filters */
.hhdl-stat-filters-wrapper {
    position: relative;
    margin-top: 8px;
    transition: all 0.2s;
}

.hhdl-stat-filters {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px 16px;
    overflow-x: auto;
    transition: all 0.3s ease;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.hhdl-stat-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.hhdl-stat-filters-wrapper.hhdl-stat-filters-hidden {
    display: none;
}

/* Scroll arrows for stat filters */
.hhdl-stat-filters-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    border: 1px solid #d1d5db;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.hhdl-stat-filters-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.hhdl-stat-filters-scroll-btn:hover {
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-stat-filters-scroll-btn.left {
    left: 0;
    border-radius: 0 6px 6px 0;
    border-left: none;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
}

.hhdl-stat-filters-scroll-btn.left:hover {
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-stat-filters-scroll-btn.right {
    right: 0;
    border-radius: 6px 0 0 6px;
    border-right: none;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
}

.hhdl-stat-filters-scroll-btn.right:hover {
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
}

.hhdl-stat-filters-scroll-btn .material-symbols-outlined {
    font-size: 20px;
    color: #6b7280;
}

.hhdl-stat-filter-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hhdl-stat-filter-btn:hover {
    background: #e5e7eb;
}

.hhdl-stat-filter-btn.active {
    background: #3b82f6;
    color: #fff;
}

/* All Rooms active state - green */
.hhdl-stat-filter-btn.stat-filter-all-rooms {
    background: #10b981;
    border-color: #059669;
    color: #fff;
}

/* State-based styling for stat filters */
.hhdl-stat-filter-btn.stat-filter-outstanding {
    background: #ef4444;
    border-color: #dc2626;
    color: #fff;
}

.hhdl-stat-filter-btn.stat-filter-unsaved {
    background: #f59e0b;
    border-color: #d97706;
    color: #fff;
}

.hhdl-stat-filter-btn.stat-filter-complete,
.hhdl-stat-filter-btn.stat-filter-submitted {
    background: #10b981;
    border-color: #059669;
    color: #fff;
}

.hhdl-stat-filter-btn.stat-filter-none {
    background: #9ca3af;
    border-color: #6b7280;
    color: #fff;
}

.hhdl-stat-filter-btn .material-symbols-outlined {
    font-size: 16px;
}

.hhdl-stat-count-badge {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    margin-left: 4px;
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.hhdl-count-badge {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    margin-left: 6px;
    background: #d1d5db;
    color: #1f2937;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.hhdl-filter-btn.active .hhdl-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.hhdl-filter-btn.filter-exclusive .hhdl-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Room Cards */
.hhdl-room-list {
    padding: 0 0 24px 0;
}

.hhdl-room-card {
    background: #fff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    margin: 0 23px 5px 23px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.hhdl-room-card:hover {
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Early arrival glow effect - removed from room card */

/* Status-based border colors */
.hhdl-room-card[data-booking-status="departed"] {
    border-color: #a855f7 !important;
}

.hhdl-room-card[data-booking-status="confirmed"] {
    border-color: #10b981 !important;
}

.hhdl-room-card[data-booking-status="unconfirmed"] {
    border-color: #f59e0b !important;
}

.hhdl-room-card[data-booking-status="arrived"] {
    border-color: #3b82f6 !important;
}

/* Vacant room styling */
.hhdl-room-card.hhdl-vacant {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Visual extension effect for multi-day bookings */
.hhdl-room-card[data-spans-previous="true"] {
    border-left: none !important;
    padding-left: 54px !important;
    margin-left: -23px;
    border-radius: 0 8px 8px 0 !important;
}

.hhdl-room-card[data-spans-next="true"] {
    border-right: none !important;
    padding-right: 31px !important;
    margin-right: 0;
    border-radius: 8px 0 0 8px !important;
}

.hhdl-room-card[data-spans-previous="true"][data-spans-next="true"] {
    border-left: none !important;
    border-right: none !important;
    padding-left: 54px !important;
    padding-right: 31px !important;
    margin-left: -23px;
    margin-right: 0;
    border-radius: 0 !important;
}

/* Timeline indicators for adjacent nights */
/* Previous night - different booking */
.hhdl-room-card[data-previous-status]:not([data-spans-previous="true"])::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-right: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 0 8px 8px 0;
}

.hhdl-room-card[data-previous-status="departed"]:not([data-spans-previous="true"])::before {
    border-color: #a855f7;
}

.hhdl-room-card[data-previous-status="confirmed"]:not([data-spans-previous="true"])::before {
    border-color: #10b981;
}

.hhdl-room-card[data-previous-status="unconfirmed"]:not([data-spans-previous="true"])::before {
    border-color: #f59e0b;
}

.hhdl-room-card[data-previous-status="arrived"]:not([data-spans-previous="true"])::before {
    border-color: #3b82f6;
}

/* Wider left border - for today: all departing rooms still arrived, for future: only late checkouts */
.hhdl-room-card[data-show-wider-border="true"]:not([data-spans-previous="true"]) {
    margin-left: 53px !important; /* 23px base + 30px extra for wider border */
}

.hhdl-room-card[data-show-wider-border="true"]:not([data-spans-previous="true"])::before {
    width: 45px !important;
    left: -53px !important; /* Compensate for card moving right */
}

/* Previous booking departure time display - styled like arrival time */
.hhdl-prev-departure-time {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #3b82f6; /* Blue to match arrived status */
    padding: 2px 6px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    transition: all 0.2s;
}

/* Position departure time based on whether wider border is showing */
.hhdl-room-card[data-show-wider-border="true"] .hhdl-prev-departure-time {
    left: -53px; /* Further out in the wider border area */
}

.hhdl-room-card[data-show-wider-border="false"] .hhdl-prev-departure-time {
    left: -17px; /* 6px inside 15px normal border */
}

.hhdl-prev-departure-time .material-symbols-outlined {
    font-size: 14px;
    color: #3b82f6;
}

.hhdl-prev-departure-time .hhdl-time-text {
    font-size: 11px;
}

/* Glow effect for late checkout - applied to the box */
.hhdl-prev-departure-time.hhdl-late-checkout {
    border-color: #3b82f6;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6), 0 0 16px rgba(59, 130, 246, 0.3);
    animation: lateCheckoutPulse 2s ease-in-out infinite;
}

@keyframes lateCheckoutPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.6), 0 0 16px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.8), 0 0 24px rgba(59, 130, 246, 0.4);
    }
}

/* Previous night - vacant */
.hhdl-room-card[data-previous-vacant="true"]:not([data-spans-previous="true"]):not(.hhdl-vacant)::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-right: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 0 8px 8px 0;
}

/* Next night - different booking */
.hhdl-room-card[data-next-status]:not([data-spans-next="true"])::after {
    content: '';
    position: absolute;
    right: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-left: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 8px 0 0 8px;
}

.hhdl-room-card[data-next-status="departed"]:not([data-spans-next="true"])::after {
    border-color: #a855f7;
}

.hhdl-room-card[data-next-status="confirmed"]:not([data-spans-next="true"])::after {
    border-color: #10b981;
}

.hhdl-room-card[data-next-status="unconfirmed"]:not([data-spans-next="true"])::after {
    border-color: #f59e0b;
}

.hhdl-room-card[data-next-status="arrived"]:not([data-spans-next="true"])::after {
    border-color: #3b82f6;
}

/* Next night - vacant */
.hhdl-room-card[data-next-vacant="true"]:not([data-spans-next="true"]):not(.hhdl-vacant)::after {
    content: '';
    position: absolute;
    right: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-left: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 8px 0 0 8px;
}

/* Timeline indicators for vacant blocks adjacent to bookings */
/* Vacant block with booking on previous night */
.hhdl-room-card.hhdl-vacant[data-previous-status]:not([data-spans-previous="true"])::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-right: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 0 8px 8px 0;
}

.hhdl-room-card.hhdl-vacant[data-previous-status="departed"]:not([data-spans-previous="true"])::before {
    border-color: #a855f7;
}

.hhdl-room-card.hhdl-vacant[data-previous-status="confirmed"]:not([data-spans-previous="true"])::before {
    border-color: #10b981;
}

.hhdl-room-card.hhdl-vacant[data-previous-status="unconfirmed"]:not([data-spans-previous="true"])::before {
    border-color: #f59e0b;
}

.hhdl-room-card.hhdl-vacant[data-previous-status="arrived"]:not([data-spans-previous="true"])::before {
    border-color: #3b82f6;
}

/* Vacant block with booking on next night */
.hhdl-room-card.hhdl-vacant[data-next-status]:not([data-spans-next="true"])::after {
    content: '';
    position: absolute;
    right: -23px;
    top: 0;
    bottom: 0;
    width: 15px;
    border-left: 2px solid #d1d5db;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-radius: 8px 0 0 8px;
}

.hhdl-room-card.hhdl-vacant[data-next-status="departed"]:not([data-spans-next="true"])::after {
    border-color: #a855f7;
}

.hhdl-room-card.hhdl-vacant[data-next-status="confirmed"]:not([data-spans-next="true"])::after {
    border-color: #10b981;
}

.hhdl-room-card.hhdl-vacant[data-next-status="unconfirmed"]:not([data-spans-next="true"])::after {
    border-color: #f59e0b;
}

.hhdl-room-card.hhdl-vacant[data-next-status="arrived"]:not([data-spans-next="true"])::after {
    border-color: #3b82f6;
}

/* Room content */
.hhdl-vacant .hhdl-room-content,
.hhdl-blocked .hhdl-room-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Blocked room styling - entire card has task background */
.hhdl-room-card.hhdl-blocked {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hhdl-blocked .hhdl-room-number,
.hhdl-blocked .hhdl-task-icon,
.hhdl-blocked .hhdl-task-label {
    color: #fff;
}

.hhdl-blocked .hhdl-room-number {
    font-weight: 700;
}

.hhdl-blocked .hhdl-task-icon {
    font-size: 18px;
    line-height: 1;
}

.hhdl-blocked .hhdl-task-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Site status on blocked rooms needs white background to be visible */
.hhdl-blocked .hhdl-site-status {
    background: rgba(255, 255, 255, 0.95);
}

.hhdl-room-number {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    min-width: 40px;
}

.hhdl-vacant-label {
    flex: 1;
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.hhdl-blocked-label {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hhdl-blocked-label .hhdl-task-icon {
    font-size: 16px;
}

.hhdl-status-wrapper {
    width: 60px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hhdl-site-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.hhdl-site-status.clean {
    background: #d1fae5;
    color: #065f46;
}

.hhdl-site-status.dirty {
    background: #fee2e2;
    color: #991b1b;
}

.hhdl-site-status.unknown {
    background: #e5e7eb;
    color: #6b7280;
}

.hhdl-site-status.arrived {
    background: #dbeafe;
    color: #1e40af;
}

/* Booked room content */
.hhdl-room-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.hhdl-arrival-icon,
.hhdl-departure-icon {
    font-size: 14px;
    color: #10b981;
}

.hhdl-departure-icon {
    color: #ef4444;
}

.hhdl-booking-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.hhdl-guest-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
}

.hhdl-guest-blurred {
    color: #9ca3af;
    filter: blur(4px);
    user-select: none;
}

.hhdl-ref-number {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    font-family: monospace;
}

@keyframes earlyArrivalPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
    }
    50% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.5), 0 0 20px rgba(245, 158, 11, 0.25);
    }
}

.hhdl-pax-badge {
    font-size: 11px;
    font-weight: 600;
    color: #1f2937;
    padding: 2px 6px;
    background: #e5e7eb;
    border-radius: 4px;
}

/* Booking Type Badge */
.hhdl-booking-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    margin-left: 4px;
}

.hhdl-booking-type-badge .material-symbols-outlined {
    font-size: 13px;
}

.hhdl-booking-type-label {
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Arrive - Green */
.hhdl-booking-type-arrive {
    background: #d1fae5;
    color: #065f46;
}

.hhdl-booking-type-arrive .material-symbols-outlined {
    color: #10b981;
}

/* Depart - Purple */
.hhdl-booking-type-depart {
    background: #ede9fe;
    color: #5b21b6;
}

.hhdl-booking-type-depart .material-symbols-outlined {
    color: #8b5cf6;
}

/* Stopover - Blue */
.hhdl-booking-type-stopover {
    background: #dbeafe;
    color: #1e40af;
}

.hhdl-booking-type-stopover .material-symbols-outlined {
    color: #3b82f6;
}

/* Back to Back - Amber/Orange (high priority turnover) */
.hhdl-booking-type-back-to-back {
    background: #fef3c7;
    color: #92400e;
}

.hhdl-booking-type-back-to-back .material-symbols-outlined {
    color: #f59e0b;
}

.hhdl-booking-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Locked Booking Icon */
.hhdl-locked-icon {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.hhdl-locked-icon .material-symbols-outlined {
    font-size: 14px;
    color: #f59e0b;
    opacity: 0.9;
}

.hhdl-nights {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-right: 6px;
}

/* Push nights to right when no lock icon present */
.hhdl-room-header:not(:has(.hhdl-locked-icon)) .hhdl-nights {
    margin-left: auto;
}

.hhdl-nights .material-symbols-outlined {
    font-size: 14px;
    color: #9ca3af;
}

/* Room Stats Layout */
.hhdl-room-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.hhdl-stat-block {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhdl-stat-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
}

/* Arrival Time Block */
.hhdl-stat-content.hhdl-checkin-time {
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #10b981;
    padding: 2px 6px;
    border: 1px solid #10b981;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-checkin-time .material-symbols-outlined {
    font-size: 14px;
    color: #10b981;
}

.hhdl-stat-content.hhdl-early-arrival {
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
    animation: earlyArrivalPulse 3s ease-in-out infinite;
}

.hhdl-stat-content.hhdl-early-arrival .material-symbols-outlined {
    color: #f59e0b;
}

.hhdl-stat-content.hhdl-checkin-time:hover {
    transform: scale(1.05);
}

/* Bed Type Indicator (New System) */
.hhdl-stat-content.hhdl-bed-type {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-bed-type .material-symbols-outlined {
    font-size: 14px;
}

/* Twin bed icons - make them overlap slightly */
.hhdl-stat-content.hhdl-bed-type .material-symbols-outlined:nth-child(2) {
    margin-left: -5px;
}

/* Extra bed separator */
.hhdl-extra-bed-separator {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.hhdl-stat-content.hhdl-bed-type:hover {
    transform: scale(1.05);
}

/* Legacy Twin Beds Indicator (kept for backwards compatibility) */
.hhdl-stat-content.hhdl-twin-beds {
    gap: 0px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-twin-beds .material-symbols-outlined {
    font-size: 14px;
}

.hhdl-stat-content.hhdl-twin-beds .material-symbols-outlined:last-child {
    margin-left: -2px;
}

.hhdl-stat-content.hhdl-twin-confirmed {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.hhdl-stat-content.hhdl-twin-confirmed .material-symbols-outlined {
    color: #059669;
}

.hhdl-stat-content.hhdl-twin-potential {
    background: #fef3c7;
    border: 1px dashed #f59e0b;
}

.hhdl-stat-content.hhdl-twin-potential .material-symbols-outlined {
    color: #d97706;
}

.hhdl-stat-content.hhdl-twin-beds:hover {
    transform: scale(1.05);
}

/* Task Status Icons */
.hhdl-stat-content.hhdl-task-status {
    position: relative;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-task-status .material-symbols-outlined {
    font-size: 16px;
}

/* Outstanding tasks (red) */
.hhdl-stat-content.hhdl-task-late {
    border-color: #dc2626;
}

.hhdl-stat-content.hhdl-task-late .material-symbols-outlined {
    color: #dc2626;
}

/* Rollover tasks from previous dates (amber) */
.hhdl-stat-content.hhdl-task-return {
    border-color: #f59e0b;
}

.hhdl-stat-content.hhdl-task-return .material-symbols-outlined {
    color: #f59e0b;
}

/* No outstanding tasks (green) */
.hhdl-stat-content.hhdl-task-complete {
    border-color: #10b981;
}

.hhdl-stat-content.hhdl-task-complete .material-symbols-outlined {
    color: #10b981;
}

/* No tasks (grey) */
.hhdl-stat-content.hhdl-task-none {
    border-color: #d1d5db;
}

.hhdl-stat-content.hhdl-task-none .material-symbols-outlined {
    color: #9ca3af;
}

/* Future tasks (grey) */
.hhdl-stat-content.hhdl-task-future {
    border-color: #d1d5db;
}

.hhdl-stat-content.hhdl-task-future .material-symbols-outlined {
    color: #9ca3af;
}

.hhdl-stat-content.hhdl-task-status:hover {
    transform: scale(1.05);
}

/* Task Counter Badge */
.hhdl-task-count {
    display: inline-flex;
    align-items: center;
}

.hhdl-task-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    color: white;
    border-radius: 7px;
    pointer-events: none;
}

/* Counter colors based on task state */
.hhdl-task-late .hhdl-task-count-badge {
    background: #dc2626;
}

.hhdl-task-return .hhdl-task-count-badge {
    background: #f59e0b;
}

.hhdl-task-complete .hhdl-task-count-badge {
    background: #10b981;
}

.hhdl-task-future .hhdl-task-count-badge {
    background: #9ca3af;
}

.hhdl-tasks-waiting .hhdl-task-count-badge {
    background: #dc2626;
}

.hhdl-tasks-complete .hhdl-task-count-badge {
    background: #10b981;
}

/* Future Tasks Module Icons */
.hhdl-stat-content.hhdl-future-tasks {
    position: relative;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-future-tasks .material-symbols-outlined {
    font-size: 16px;
}

/* Waiting tasks (red) */
.hhdl-stat-content.hhdl-tasks-waiting {
    border-color: #dc2626;
}

.hhdl-stat-content.hhdl-tasks-waiting .material-symbols-outlined {
    color: #dc2626;
}

/* All tasks complete (green) */
.hhdl-stat-content.hhdl-tasks-complete {
    border-color: #10b981;
}

.hhdl-stat-content.hhdl-tasks-complete .material-symbols-outlined {
    color: #10b981;
}

/* No current tasks (grey) */
.hhdl-stat-content.hhdl-tasks-none {
    border-color: #d1d5db;
}

.hhdl-stat-content.hhdl-tasks-none .material-symbols-outlined {
    color: #9ca3af;
}

/* Overdue tasks (red) - from Management Tasks module */
.hhdl-stat-content.hhdl-tasks-overdue {
    border-color: #ef4444;
}

.hhdl-stat-content.hhdl-tasks-overdue .material-symbols-outlined {
    color: #ef4444;
}

/* Due today tasks (amber) - from Management Tasks module */
.hhdl-stat-content.hhdl-tasks-due {
    border-color: #f59e0b;
}

.hhdl-stat-content.hhdl-tasks-due .material-symbols-outlined {
    color: #f59e0b;
}

/* Pending tasks (blue) - from Management Tasks module */
.hhdl-stat-content.hhdl-tasks-pending {
    border-color: #3b82f6;
}

.hhdl-stat-content.hhdl-tasks-pending .material-symbols-outlined {
    color: #3b82f6;
}

/* Completed tasks (green) - from Management Tasks module */
.hhdl-stat-content.hhdl-tasks-completed {
    border-color: #22c55e;
}

.hhdl-stat-content.hhdl-tasks-completed .material-symbols-outlined {
    color: #22c55e;
}

/* Management Tasks badge background colors */
.hhdl-tasks-overdue .hhdl-task-count-badge {
    background: #ef4444;
}

.hhdl-tasks-due .hhdl-task-count-badge {
    background: #f59e0b;
}

.hhdl-tasks-pending .hhdl-task-count-badge {
    background: #3b82f6;
}

.hhdl-tasks-completed .hhdl-task-count-badge {
    background: #22c55e;
}

.hhdl-tasks-none .hhdl-task-count-badge {
    background: #9ca3af;
}

.hhdl-stat-content.hhdl-future-tasks:hover {
    transform: scale(1.05);
}

/* Spoilt Linen Module Icons */
.hhdl-stat-content.hhdl-linen-status {
    position: relative;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-stat-content.hhdl-linen-status .material-symbols-outlined {
    font-size: 16px;
}

/* Linen Counter Badge */
.hhdl-linen-count {
    display: inline-flex;
    align-items: center;
}

.hhdl-linen-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    color: white;
    border-radius: 7px;
    pointer-events: none;
}

/* Unsaved count (amber) */
.hhdl-stat-content.hhdl-linen-unsaved {
    border-color: #f59e0b;
}

.hhdl-stat-content.hhdl-linen-unsaved .material-symbols-outlined {
    color: #f59e0b;
}

.hhdl-stat-content.hhdl-linen-unsaved .hhdl-linen-count-badge {
    background: #f59e0b;
}

/* Submitted count (green) */
.hhdl-stat-content.hhdl-linen-submitted {
    border-color: #10b981;
}

.hhdl-stat-content.hhdl-linen-submitted .material-symbols-outlined {
    color: #10b981;
}

.hhdl-stat-content.hhdl-linen-submitted .hhdl-linen-count-badge {
    background: #10b981;
}

/* No values (grey) */
.hhdl-stat-content.hhdl-linen-none {
    border-color: #d1d5db;
}

.hhdl-stat-content.hhdl-linen-none .material-symbols-outlined {
    color: #9ca3af;
}

.hhdl-stat-content.hhdl-linen-status:hover {
    transform: scale(1.05);
}

.hhdl-occupancy-badge {
    font-size: 11px;
    color: #6b7280;
}

.hhdl-twin-icon {
    font-size: 14px;
    cursor: help;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s;
}

.hhdl-twin-icon.hhdl-twin-confirmed {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.hhdl-twin-icon.hhdl-twin-potential {
    background: #fef3c7;
    border: 1px dashed #f59e0b;
}

.hhdl-twin-icon:hover {
    transform: scale(1.1);
}

/* Modal */
.hhdl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.hhdl-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hhdl-modal {
    background: #fff;
    border-radius: 12px;
    width: calc(100% - 32px);
    max-width: 600px;
    height: calc(100vh - 40px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hhdl-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hhdl-modal-header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hhdl-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    color: #6b7280;
    transition: color 0.2s;
    align-self: center;
}

.hhdl-modal-close:hover {
    color: #111827;
}

.hhdl-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Section Header with darker background */
.hhdl-section-header {
    margin: -12px -12px 12px -12px;
    padding: 10px 12px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 6px 6px 0 0;
}

.hhdl-modal-body h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notes Section */
.hhdl-notes-section {
    margin-bottom: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.hhdl-notes-tabs {
    display: flex;
    gap: 0;
    background: #f3f4f6;
    border-bottom: 2px solid #e5e7eb;
}

.hhdl-note-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    background: #f9fafb;
}

.hhdl-note-tab:last-child {
    border-right: none;
}

.hhdl-note-tab .material-symbols-outlined {
    font-size: 20px;
}

.hhdl-note-tab.no-notes {
    color: #9ca3af;
}

.hhdl-note-tab.has-notes {
    font-weight: 600;
}

.hhdl-note-tab:hover {
    background: #f3f4f6;
}

.hhdl-note-tab.active {
    background: #fff;
    border-bottom: 2px solid currentColor;
    margin-bottom: -2px;
}

.hhdl-notes-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.hhdl-notes-content.active {
    max-height: 600px;
    transition: max-height 0.4s ease-in;
}

.hhdl-notes-content-inner {
    padding: 16px;
}

.hhdl-note-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #10b981;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.hhdl-note-card:last-child {
    margin-bottom: 0;
}

.hhdl-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.hhdl-note-type-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hhdl-note-type-info .material-symbols-outlined {
    font-size: 18px;
}

.hhdl-note-type-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.hhdl-note-updated {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

.hhdl-note-content {
    font-size: 13px;
    line-height: 1.5;
    color: #1f2937;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.hhdl-note-no-permission {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: #6b7280;
}

.hhdl-note-no-permission p {
    margin: 8px 0 0 0;
    font-size: 14px;
    font-weight: 500;
}

.hhdl-tasks-section {
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
}

.hhdl-placeholder {
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
}

/* Modal Room Info (now in header) */
.hhdl-modal-room-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.hhdl-modal-right-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.hhdl-modal-room-number {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.hhdl-modal-flow-label {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border: 1px solid #000;
    border-radius: 4px;
    background: transparent;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hhdl-modal-guest-name {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.hhdl-modal-ref-number {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    font-family: monospace;
}

.hhdl-modal-vacant-label {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
}

.hhdl-modal-nights {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
}

.hhdl-modal-nights .material-symbols-outlined {
    font-size: 14px;
    color: #9ca3af;
}

.hhdl-modal-site-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hhdl-modal-status-spacer {
    display: inline-block;
    width: 60px;
    height: 24px;
}

.hhdl-modal-site-status.clean {
    background: #d1fae5;
    color: #065f46;
}

.hhdl-modal-site-status.dirty {
    background: #fecaca;
    color: #991b1b;
}

.hhdl-modal-site-status.inspected {
    background: #dbeafe;
    color: #1e40af;
}

.hhdl-modal-site-status.arrived {
    background: #dbeafe;
    color: #1e40af;
}

/* Clickable status badge styles */
.hhdl-status-toggle-btn {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    user-select: none;
}

.hhdl-status-toggle-btn:hover:not([data-has-tasks="true"]) {
    opacity: 0.8;
    transform: scale(1.05);
}

.hhdl-status-toggle-btn[data-has-tasks="true"] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Status change card styles (for "No tasks but still dirty" card) */
.hhdl-status-change-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s, transform 0.1s;
}

.hhdl-status-change-card:hover {
    background-color: rgba(16, 185, 129, 0.05);
    transform: translateX(4px);
}

.hhdl-status-change-card .material-symbols-outlined {
    transition: transform 0.2s;
}

.hhdl-status-change-card:hover .material-symbols-outlined {
    transform: translateX(4px);
}

.hhdl-modal-room-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hhdl-modal-stat-block {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hhdl-modal-stat-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 22px;
    min-height: 25px;
}

/* Arrival Time - matches main list styling */
.hhdl-modal-stat-content.hhdl-modal-checkin-time {
    font-size: 11px;
    font-weight: 500;
    color: #10b981;
    padding: 2px 6px;
    border: 1px solid #10b981;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-modal-stat-content.hhdl-modal-checkin-time .material-symbols-outlined {
    font-size: 14px;
    color: #10b981;
}

.hhdl-modal-stat-content.hhdl-modal-early-arrival {
    border: 1px solid #f59e0b;
    color: #92400e;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
    animation: earlyArrivalPulse 3s ease-in-out infinite;
}

.hhdl-modal-stat-content.hhdl-modal-early-arrival .material-symbols-outlined {
    color: #f59e0b;
}

/* Bed Type - matches main list styling */
.hhdl-modal-stat-content.hhdl-modal-bed-type {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.hhdl-modal-stat-content.hhdl-modal-bed-type .material-symbols-outlined {
    font-size: 14px;
}

/* Twin bed icons - make them overlap slightly */
.hhdl-modal-stat-content.hhdl-modal-bed-type .material-symbols-outlined:nth-child(2) {
    margin-left: -5px;
}

/* Occupancy */
.hhdl-modal-stat-content.hhdl-modal-occupancy {
    font-size: 11px;
    color: #6b7280;
}

.hhdl-modal-stat-content.hhdl-modal-occupancy .material-symbols-outlined {
    font-size: 16px;
    color: #9ca3af;
}

.hhdl-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.hhdl-task-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 4px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #10b981;
    border-radius: 6px;
}

.hhdl-task-item .hhdl-task-checkbox {
    flex-shrink: 0;
    order: 2;
    align-self: center;
}

.hhdl-task-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    order: 1;
}

.hhdl-task-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hhdl-rollover-icon {
    font-size: 16px;
    color: #f59e0b;
    flex-shrink: 0;
}

.hhdl-task-meta {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Task Processing Overlay */
.hhdl-task-processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.95);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.hhdl-task-processing-overlay .hhdl-processing-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: hhdl-spinner-rotate 0.8s linear infinite;
}

.hhdl-task-processing-overlay .hhdl-processing-text {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hhdl-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.hhdl-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(107, 114, 128, 0.2);
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: hhdl-spinner-rotate 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes hhdl-spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hhdl-toast {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    padding: 12px 20px;
    background: #1f2937;
    color: #fff;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s;
}

.hhdl-toast.hhdl-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.hhdl-toast.hhdl-toast-success {
    background: #10b981;
}

.hhdl-toast.hhdl-toast-error {
    background: #dc2626;
}

.hhdl-toast.hhdl-toast-info {
    background: #3b82f6;
}

.hhdl-toast.hhdl-toast-warning {
    background: #f59e0b;
    color: #1f2937;
    font-weight: 500;
}

/* Confirmation Modal */
.hhdl-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.hhdl-confirm-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.hhdl-confirm-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.2s;
}

.hhdl-confirm-overlay.active .hhdl-confirm-modal {
    transform: scale(1);
}

.hhdl-confirm-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hhdl-confirm-icon {
    font-size: 32px;
    color: #f59e0b;
}

.hhdl-confirm-icon.warning {
    color: #f59e0b;
}

.hhdl-confirm-icon.danger {
    color: #ef4444;
}

.hhdl-confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.hhdl-confirm-body {
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.hhdl-confirm-task-name {
    font-weight: 600;
    color: #111827;
    margin-top: 8px;
}

.hhdl-confirm-footer {
    padding: 16px 24px;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.hhdl-confirm-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.hhdl-confirm-btn-cancel {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.hhdl-confirm-btn-cancel:hover {
    background: #f3f4f6;
}

.hhdl-confirm-btn-confirm {
    background: #3b82f6;
    color: #fff;
}

.hhdl-confirm-btn-confirm:hover {
    background: #2563eb;
}

.hhdl-confirm-btn-confirm.danger {
    background: #ef4444;
}

.hhdl-confirm-btn-confirm.danger:hover {
    background: #dc2626;
}

/* ========================================
   Checkout Notifications
   ======================================== */

/* Notification Container */
.hhdl-notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    max-width: 380px;
    pointer-events: none;
}

.hhdl-notification-container > * {
    pointer-events: auto;
}

/* Checkout Notification Card */
.hhdl-checkout-notification {
    background: white;
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(420px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hhdl-checkout-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Notification Header */
.hhdl-notification-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
    background: linear-gradient(to bottom, #fafafa, #ffffff);
}

.hhdl-notification-header .material-symbols-outlined {
    color: #8b5cf6;
    font-size: 22px;
}

.hhdl-notification-header h3 {
    flex: 1;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

/* Close Button */
.hhdl-notification-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.hhdl-notification-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Notification Body */
.hhdl-notification-body {
    padding: 14px 16px;
}

.hhdl-notification-body p {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.hhdl-notification-body p:last-child {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 13px;
}

.hhdl-notification-body strong {
    color: #1f2937;
    font-weight: 600;
}

/* ============================================
   View Controls
   ============================================ */

.hhdl-view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 16px;
    background: #fff;
    transition: all 0.3s ease;
}

.hhdl-view-controls.hhdl-controls-hidden {
    display: none;
}

.hhdl-view-mode-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Control groups */
.hhdl-control-group {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

/* View and filter groups stay together, reset goes to the right */
.hhdl-reset-group {
    margin-left: auto;
}

.hhdl-view-mode-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #fff;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hhdl-control-group .hhdl-view-mode-btn:not(:last-child) {
    border-right: 1px solid #d1d5db;
}

.hhdl-view-mode-btn:hover {
    background: #f3f4f6;
}

.hhdl-view-mode-btn.active {
    background: #10b981;
    color: #fff;
}

.hhdl-view-mode-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Responsive: Stack icon above text on narrow screens */
@media (max-width: 640px) {
    .hhdl-view-controls {
        gap: 6px;
        padding: 8px 12px;
    }

    .hhdl-view-mode-toggle {
        gap: 4px;
    }

    .hhdl-view-mode-btn {
        flex-direction: column;
        gap: 1px;
        padding: 6px 6px;
        font-size: 9px;
        min-width: 0;
    }

    .hhdl-view-mode-btn .material-symbols-outlined {
        font-size: 16px;
    }

    /* Reset button - make more compact */
    .hhdl-reset-group .hhdl-view-mode-btn {
        padding: 6px 8px;
    }
}

/* Extra small screens - even more compact */
@media (max-width: 380px) {
    .hhdl-view-controls {
        gap: 4px;
        padding: 6px 8px;
    }

    .hhdl-view-mode-toggle {
        gap: 3px;
    }

    .hhdl-view-mode-btn {
        padding: 5px 4px;
        font-size: 8px;
    }

    .hhdl-view-mode-btn .material-symbols-outlined {
        font-size: 14px;
    }

    .hhdl-reset-group .hhdl-view-mode-btn {
        padding: 5px 6px;
    }
}

/* ============================================
   Category Headers
   ============================================ */

.hhdl-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #e5e7eb;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    border-left: 2px solid #d1d5db;
    border-right: 2px solid #d1d5db;
    margin: 16px 23px 5px 23px;
    cursor: pointer;
    transition: all 0.2s;
    position: sticky;
    top: 46px;
    z-index: 50;
}

.hhdl-category-header:hover {
    background: #d1d5db;
    border-color: #9ca3af;
}

/* First category header has reduced top margin */
.hhdl-category-header:first-of-type {
    margin-top: 4px;
}

/* Edge blocks for category headers - extend borders to page edges */
.hhdl-category-header::before {
    content: '';
    position: absolute;
    left: -15px;
    top: -2px;
    bottom: -2px;
    width: 15px;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    background: #e5e7eb;
    transition: all 0.2s;
}

.hhdl-category-header:hover::before {
    border-color: #9ca3af;
    background: #d1d5db;
}

.hhdl-category-header::after {
    content: '';
    position: absolute;
    right: -15px;
    top: -2px;
    bottom: -2px;
    width: 15px;
    border-top: 2px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    background: #e5e7eb;
    transition: all 0.2s;
}

.hhdl-category-header:hover::after {
    border-color: #9ca3af;
    background: #d1d5db;
}

.hhdl-category-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.hhdl-category-arrow {
    font-size: 20px;
    color: #6b7280;
    transition: transform 0.2s;
}

.hhdl-category-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.hhdl-category-counts {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hhdl-room-count {
    font-size: 11px;
    color: #6b7280;
}

.hhdl-visible-count {
    font-weight: 600;
    color: #1f2937;
}

.hhdl-of-total {
    color: #9ca3af;
}

/* Task Badges in Category Headers */
.hhdl-task-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.hhdl-task-badge .material-symbols-outlined {
    font-size: 14px;
}

/* Outstanding tasks - Red */
.hhdl-task-badge.hhdl-task-outstanding {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

.hhdl-task-badge.hhdl-task-outstanding .material-symbols-outlined {
    color: #dc2626;
}

/* Complete tasks - Green */
.hhdl-task-badge.hhdl-task-complete {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.hhdl-task-badge.hhdl-task-complete .material-symbols-outlined {
    color: #10b981;
}

.hhdl-task-count {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    min-width: 18px;
}

/* Future tasks (greyed out) */
.hhdl-task-badge.hhdl-task-future {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
}

.hhdl-task-badge.hhdl-task-future .material-symbols-outlined {
    color: #9ca3af;
}

/* ============================================
   Category Room Containers
   ============================================ */

.hhdl-category-rooms {
    margin: 0;
    padding: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.hhdl-category-rooms.hhdl-collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
}

/* Adjust category header margin when followed by collapsed category */
.hhdl-category-header:has(+ .hhdl-category-rooms.hhdl-collapsed) {
    margin-bottom: -6px;
}

/* Room cards maintain their standard margins when in grouped view */

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .hhdl-view-mode-toggle {
        width: 100%;
        justify-content: center;
    }

    .hhdl-category-header {
        padding: 10px 12px;
        margin: 12px 12px 6px 12px;
    }

    .hhdl-category-header::before {
        left: -15px;
    }

    .hhdl-category-header::after {
        right: -15px;
    }
}

/* ============================================
   Activity Log Panel
   ============================================ */

/* Activity Modal Overlay */
.hhdl-activity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.hhdl-activity-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Activity Modal Panel */
.hhdl-activity-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.hhdl-activity-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Lock scrolling when activity modal is open */
body.hhdl-activity-panel-open {
    overflow: hidden !important;
}

.hhdl-activity-panel-header {
    padding: 12px 16px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #f9fafb;
}

.hhdl-activity-panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.hhdl-activity-date {
    color: #6b7280;
    font-weight: 400;
}

.hhdl-activity-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.hhdl-activity-panel-close:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.hhdl-activity-panel-close .material-symbols-outlined {
    font-size: 18px;
    color: #6b7280;
}

.hhdl-activity-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.hhdl-activity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
}

.hhdl-activity-loading .spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.hhdl-activity-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Activity Entry */
.hhdl-activity-entry {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.hhdl-activity-entry:hover {
    background: #f9fafb;
}

.hhdl-activity-entry.hhdl-activity-new {
    background: #fef3c7;
    animation: fadeToNormal 2s ease-in-out forwards;
}

@keyframes fadeToNormal {
    from { background: #fef3c7; }
    to { background: transparent; }
}

.hhdl-activity-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
}

.hhdl-activity-icon .material-symbols-outlined {
    font-size: 18px;
}

/* Event-type specific icon colors */
.hhdl-activity-entry[data-event-type="checkout"] .hhdl-activity-icon {
    background: #e9d5ff;
}

.hhdl-activity-entry[data-event-type="checkout"] .material-symbols-outlined {
    color: #9333ea;
}

.hhdl-activity-entry[data-event-type="checkin"] .hhdl-activity-icon {
    background: #dbeafe;
}

.hhdl-activity-entry[data-event-type="checkin"] .material-symbols-outlined {
    color: #3b82f6;
}

.hhdl-activity-entry[data-event-type="status_clean"] .hhdl-activity-icon {
    background: #d1fae5;
}

.hhdl-activity-entry[data-event-type="status_clean"] .material-symbols-outlined {
    color: #10b981;
}

.hhdl-activity-entry[data-event-type="status_dirty"] .hhdl-activity-icon {
    background: #fee2e2;
}

.hhdl-activity-entry[data-event-type="status_dirty"] .material-symbols-outlined {
    color: #ef4444;
}

.hhdl-activity-entry[data-event-type="tasks_complete"] .hhdl-activity-icon {
    background: #d1fae5;
}

.hhdl-activity-entry[data-event-type="tasks_complete"] .material-symbols-outlined {
    color: #10b981;
}

.hhdl-activity-entry[data-event-type="linen_submit"] .hhdl-activity-icon {
    background: #d1fae5;
}

.hhdl-activity-entry[data-event-type="linen_submit"] .material-symbols-outlined {
    color: #10b981;
}

.hhdl-activity-content {
    flex: 1;
    min-width: 0;
}

.hhdl-activity-message {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
}

.hhdl-activity-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.hhdl-activity-user {
    font-weight: 400;
}

.hhdl-activity-time {
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .hhdl-activity-panel {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
    }
}
