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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    font-size: 14px;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a237e 0%, #0d1442 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 32px;
}

.logo-text h1 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-group-title {
    padding: 16px 16px 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.nav-group-title:hover {
    color: rgba(255,255,255,0.7);
}
.nav-group-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}
.nav-group.collapsed .nav-group-arrow {
    transform: rotate(-90deg);
}
.nav-group-items {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 500px;
}
.nav-group.collapsed .nav-group-items {
    max-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,215,0,0.15);
    color: #ffd700;
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    line-height: 1.8;
}

/* 主内容区 */
.main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.header {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header h2 {
    font-size: 20px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 酒店选择器 */
.hotel-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 8px;
}
.hotel-selector label {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    white-space: nowrap;
}
.hotel-selector select {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    min-width: 160px;
}
.hotel-selector select option {
    background: #1a2332;
    color: #fff;
}

/* 页面 */
.page {
    display: none;
    padding: 24px 32px;
}

.page.active {
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: #888;
}

/* 面板 */
.panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

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

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.panel-body {
    padding: 20px 24px;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid #f0f0f0;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.table tr:hover {
    background: #fafafa;
}

.text-center {
    text-align: center;
    color: #999;
    padding: 24px !important;
}

.text-muted {
    color: #999;
    font-size: 12px;
    font-weight: normal;
}

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

.status-online {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-offline {
    background: #ffebee;
    color: #c62828;
}

.status-active {
    background: #e3f2fd;
    color: #1565c0;
}

.status-inactive {
    background: #f5f5f5;
    color: #757575;
}

.status-maintenance {
    background: #fff3e0;
    color: #ef6c00;
}

/* 按钮 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #1a237e;
    color: #fff;
}

.btn-primary:hover {
    background: #0d1442;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ffebee;
    color: #c62828;
}

.btn-danger:hover {
    background: #ffcdd2;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 酒店卡片网格 */
.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.hotel-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8eaf0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.hotel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.hotel-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hotel-card-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.hotel-card-title {
    flex: 1;
    min-width: 0;
}

.hotel-card-title h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotel-card-title p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.85;
    font-family: monospace;
}

.hotel-card-status {
    padding: 4px 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.hotel-card-body {
    padding: 16px 20px;
}

.hotel-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.hotel-stat-item {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.hotel-stat-item .num {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.hotel-stat-item .label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.hotel-stat-item.auth .num { color: #667eea; }
.hotel-stat-item.used .num { color: #1976d2; }
.hotel-stat-item.online .num { color: #4caf50; }
.hotel-stat-item.offline .num { color: #f44336; }

.hotel-card-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hotel-card-info .icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.hotel-card-info .text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotel-card-actions {
    padding: 12px 20px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f2f5;
}

.hotel-card-actions .btn {
    flex: 1;
    min-width: 70px;
    padding: 8px 10px;
    font-size: 13px;
}

/* 表单 */
.form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a237e;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* 弹窗 */
.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;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 480px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

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

/* 提示框 */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #1565c0;
    color: #1565c0;
}

.alert-info code {
    background: rgba(255,255,255,0.7);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.alert-info ol {
    margin-left: 20px;
    margin-top: 8px;
    line-height: 1.8;
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    font-size: 14px;
}

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

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

/* 操作链接 */
.action-link {
    color: #1a237e;
    text-decoration: none;
    margin-right: 12px;
    cursor: pointer;
    font-size: 13px;
}

.action-link:hover {
    text-decoration: underline;
}

.action-link.danger {
    color: #c62828;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo-text, .nav-item span:not(.nav-icon), .sidebar-footer {
        display: none;
    }
    .main {
        margin-left: 60px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* 紧急工单闪烁动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 统计卡片悬停效果 */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}


/* ===== 酒店卡片美化版 ===== */
.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.hotel-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8eaf0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.hotel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}
.hotel-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.hotel-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hotel-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.hotel-card-title {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.hotel-card-title h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hotel-card-title p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.85;
    font-family: monospace;
    letter-spacing: 0.5px;
}
.hotel-card-status {
    padding: 5px 12px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.hotel-card-status.inactive {
    background: rgba(244, 67, 54, 0.3);
}
.hotel-card-body {
    padding: 18px 20px;
}
.hotel-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fc;
    border-radius: 10px;
}
.hotel-stat-item {
    text-align: center;
}
.hotel-stat-item .num {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}
.hotel-stat-item .label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.hotel-stat-item.online .num { color: #4caf50; }
.hotel-stat-item.offline .num { color: #f44336; }
.hotel-card-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hotel-card-info .icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}
.hotel-card-actions {
    padding: 14px 20px;
    background: #fafbfc;
    border-top: 1px solid #f0f1f5;
    display: flex;
    gap: 8px;
}
.hotel-card-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
}

/* ===== 酒店列表页面深度优化 ===== */
/* 统计卡片优化 */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
}
.stat-card {
    background: #fff !important;
    border-radius: 14px !important;
    padding: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    border: 1px solid #e8eaf0 !important;
    transition: all 0.3s !important;
}
.stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}
.stat-icon {
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 26px !important;
}
.stat-info h3 {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}
.stat-info p {
    font-size: 13px !important;
    color: #999 !important;
    margin: 4px 0 0 !important;
}

/* 搜索栏优化 */
.card-header {
    padding: 20px 24px !important;
    border-bottom: 1px solid #f0f1f5 !important;
}
#hotelSearch {
    border: 2px solid #e8eaf0 !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    transition: all 0.3s !important;
}
#hotelSearch:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s !important;
}
.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4) !important;
}

/* 酒店卡片操作按钮优化 */
.hotel-card-actions {
    padding: 12px 16px !important;
    gap: 6px !important;
}
.hotel-card-actions .btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}
.hotel-card-actions .btn-primary {
    background: #667eea !important;
    box-shadow: none !important;
}
.hotel-card-actions .btn-secondary {
    background: #f5f6fa !important;
    border: 1px solid #e8eaf0 !important;
    color: #666 !important;
}
.hotel-card-actions .btn-danger {
    background: #fff0f0 !important;
    border: 1px solid #ffd0d0 !important;
    color: #f44336 !important;
}

/* ===== 全面现代化优化 ===== */
* {
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
    background: #f0f2f5 !important;
}

/* 侧边栏优化 */
.sidebar {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%) !important;
}
.nav-item {
    border-radius: 10px !important;
    margin: 4px 12px !important;
    transition: all 0.2s !important;
}
.nav-item:hover {
    background: rgba(255,255,255,0.1) !important;
}
.nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* 主内容区优化 */
.main {
    background: #f0f2f5 !important;
}

/* 顶部栏优化 */
.header {
    background: #fff !important;
    border-bottom: 1px solid #e8eaf0 !important;
    padding: 16px 24px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
.header h2 {
    font-weight: 600 !important;
    color: #1a1a2e !important;
}

/* 卡片优化 */
.card {
    background: #fff !important;
    border-radius: 14px !important;
    border: 1px solid #e8eaf0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* 按钮优化 */
.btn {
    border-radius: 10px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}
.btn:hover {
    transform: translateY(-1px) !important;
}

/* 酒店卡片深度优化 */
.hotel-card {
    border-radius: 16px !important;
    border: 1px solid #e8eaf0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.hotel-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.15) !important;
}
.hotel-card-header {
    padding: 20px !important;
}
.hotel-card-stats {
    background: #f8f9fc !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 0 0 16px 0 !important;
}
.hotel-stat-item .num {
    font-size: 24px !important;
    font-weight: 700 !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
