* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #f5f6fa;
    color: #333;
}

/* 登录页面 */
.login-box {
    width: 360px;
    margin: 150px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #e74c3c;
    font-size: 24px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #c0392b;
}

/* 布局 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #2c3e50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info button {
    padding: 6px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 200px;
    bottom: 0;
    background: #34495e;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-item {
    padding: 15px 25px;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.menu-item:hover, .menu-item.active {
    background: #e74c3c;
    color: white;
}

.content {
    margin-left: 200px;
    margin-top: 60px;
    padding: 25px;
    min-height: calc(100vh - 60px);
}

/* 模块显示 */
.module {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

/* 统计卡片 */
.dashboard-stats, .finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
}

/* 房间概览 */
.room-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.room-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.room-card:hover {
    transform: scale(1.05);
}

.room-card.free {
    background: #2ecc71;
    color: white;
}

.room-card.occupied {
    background: #e74c3c;
    color: white;
}

.room-card.cleaning {
    background: #f39c12;
    color: white;
}

.room-card .room-number {
    font-size: 24px;
    font-weight: bold;
}

.room-card .room-status {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.9;
}

/* 快速开单 */
.quick-order {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.quick-order h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row select, .form-row input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.form-row button {
    padding: 10px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 表格 */
table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-collapse: collapse;
}

th, td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: #34495e;
    color: white;
    font-weight: 500;
}

tr:hover {
    background: #f8f9fa;
}

/* 工具栏 */
.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.toolbar button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.toolbar input, .toolbar select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* 状态标签 */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
}

.status-badge.active, .status-badge.进行中 {
    background: #2ecc71;
    color: white;
}

.status-badge.inactive, .status-badge.空闲 {
    background: #95a5a6;
    color: white;
}

.status-badge.occupied, .status-badge.上钟 {
    background: #e74c3c;
    color: white;
}

.status-badge.completed, .status-badge.已完成 {
    background: #3498db;
    color: white;
}

/* 操作按钮 */
.btn-small {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-success {
    background: #2ecc71;
    color: white;
}

/* 弹窗 */
.modal {
    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: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

/* 设置页面 */
.settings-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
}

.settings-form h3 {
    margin: 20px 0 15px;
    color: #2c3e50;
}

.settings-form input, .settings-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar .menu-item {
        padding: 15px;
        font-size: 0;
    }
    .sidebar .menu-item::first-letter {
        font-size: 20px;
    }
    .content {
        margin-left: 60px;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 打印样式 */
@media print {
    .sidebar, header, .toolbar {
        display: none;
    }
    .content {
        margin: 0;
    }
}
