/* 首页专用样式 */

/* 主容器布局 */
.home-container {
    display: flex;
    gap: 0;
    height: calc(100vh - 100px);
    overflow: hidden;
}

/* 左侧筛选面板 */
.room-sidebar {
    width: 200px;
    background-color: #f5f5f5;
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    flex-shrink: 0;
}

.filter-section {
    border-bottom: 1px solid #e8e8e8;
}

.filter-header {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #fafafa;
}

.filter-content {
    padding: 8px 0;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #666;
}

.filter-item:hover {
    background-color: #e6f7ff;
    color: #1890ff;
}

.filter-item.active {
    background-color: #e6f7ff;
    color: #1890ff;
    font-weight: 500;
}

.filter-item .count {
    color: #999;
    font-size: 12px;
}

.filter-item.active .count {
    color: #1890ff;
}

/* 房态统计 - checkbox形式 */
.status-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.status-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    gap: 6px;
}

.status-checkbox-item:hover {
    background-color: #f5f5f5;
}

.status-checkbox-item input[type="checkbox"] {
    width: 12px;
    height: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.vacant-clean {
    background-color: #52c41a; /* 绿色 - 空净 */
}

.status-dot.vacant-dirty {
    background-color: #faad14; /* 橙色 - 空脏 */
}

.status-dot.occupied {
    background-color: #1890ff; /* 蓝色 - 住净 */
}

.status-dot.maintenance {
    background-color: #999; /* 灰色 - 维修 */
}

.status-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* 房间展示区域 */
.room-main {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.room-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 5px;
}

/* 房间卡片 */
.room-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
}

.room-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.room-card:hover::before {
    height: 6px;
}

/* 房间状态颜色 */
.room-card.vacant-clean {
    background: linear-gradient(135deg, #ffffff 0%, #f6ffed 100%);
}

.room-card.vacant-clean::before {
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
}

.room-card.vacant-dirty {
    background: linear-gradient(135deg, #ffffff 0%, #fffbe6 100%);
}

.room-card.vacant-dirty::before {
    background: linear-gradient(90deg, #faad14 0%, #ffc53d 100%);
}

.room-card.occupied {
    background: linear-gradient(135deg, #ffffff 0%, #e6f7ff 100%);
}

.room-card.occupied::before {
    background: linear-gradient(90deg, #1890ff 0%, #40a9ff 100%);
}

.room-card.maintenance {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.room-card.maintenance::before {
    background: linear-gradient(90deg, #999 0%, #bbb 100%);
}

/* 房号 */
.room-number {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.room-card.vacant-clean .room-number {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.room-card.vacant-dirty .room-number {
    background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.room-card.maintenance .room-number {
    background: linear-gradient(135deg, #666 0%, #999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 房间类型 */
.room-type {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

/* 房间状态标签 */
.room-status-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    align-self: flex-start;
    letter-spacing: 0.3px;
}

.room-card.vacant-clean .room-status-label {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(82, 196, 26, 0.3);
}

.room-card.vacant-dirty .room-status-label {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(250, 173, 20, 0.3);
}

.room-card.occupied .room-status-label {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.room-card.maintenance .room-status-label {
    background: linear-gradient(135deg, #999 0%, #bbb 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(153, 153, 153, 0.3);
}

/* 客人信息 */
.room-guest {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    margin-top: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    padding: 6px 10px;
    background-color: rgba(24, 144, 255, 0.08);
    border-radius: 6px;
}

/* 额外信息 */
.room-info {
    font-size: 11px;
    color: #999;
    margin-top: auto;
}

/* 图标 */
.room-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 锁定图标 */
.icon-lock::before {
    content: "🔒";
}

/* 维修图标 */
.icon-maintenance::before {
    content: "🔧";
}

/* 模态弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-in;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.room-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 15px;
}

.detail-label {
    color: #666;
    min-width: 80px;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 400;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.modal-btn-primary {
    background-color: #1890ff;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #40a9ff;
}

.modal-btn-success {
    background-color: #52c41a;
    color: white;
}

.modal-btn-success:hover {
    background-color: #73d13d;
}

.modal-btn-warning {
    background-color: #faad14;
    color: white;
}

.modal-btn-warning:hover {
    background-color: #ffc53d;
}

.modal-btn-danger {
    background-color: #ff4d4f;
    color: white;
}

.modal-btn-danger:hover {
    background-color: #ff7875;
}

.modal-btn-default {
    background-color: #f5f5f5;
    color: #666;
}

.modal-btn-default:hover {
    background-color: #e8e8e8;
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .room-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 1200px) {
    .room-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .room-number {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .room-sidebar {
        width: 160px;
    }
    
    .room-main {
        padding: 12px;
    }
    
    .room-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .room-card {
        padding: 12px;
        min-height: 130px;
    }
    
    .room-number {
        font-size: 22px;
    }
    
    .room-type {
        font-size: 11px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-footer {
        flex-wrap: wrap;
    }
    
    .modal-btn {
        flex: 1;
        min-width: 100px;
    }
}

