/* ============================================
   民宿管家 PMS - 全局样式系统
   设计方向：专业酒店管理 + 温暖民宿氛围
   ============================================ */

/* --- CSS 变量 / Design Tokens --- */
:root {
    /* 品牌色 - 温暖琥珀/橙色系（民宿温馨感） */
    --primary-50: #fff8e6;
    --primary-100: #ffefc7;
    --primary-200: #ffe399;
    --primary-300: #ffd261;
    --primary-400: #ffc33b;
    --primary-500: #f59e0b;  /* 主色 */
    --primary-600: #d97706;
    --primary-700: #b45309;
    --primary-800: #92400e;
    --primary-900: #78350f;

    /* 功能色 */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* 房态颜色 */
    --room-vacant-clean: #10b981;      /* 空净 - 绿 */
    --room-vacant-dirty: #f59e0b;       /* 空脏 - 黄 */
    --room-occupied: #3b82f6;           /* 住人 - 蓝 */
    --room-reserved: #8b5cf6;           /* 预留 - 紫 */
    --room-maintenance: #6b7280;        /* 维修 - 灰 */

    /* 浅色主题 */
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-sidebar-active: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-sidebar: #cbd5e1;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);

    /* 布局尺寸 */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --container-padding: 24px;

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

    /* 字体 */
    --font-sans: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- 深色主题 --- */
[data-theme="dark"] {
    --bg-primary: #0f1219;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #141824;
    --bg-sidebar: #0a0d14;
    --bg-sidebar-hover: #151a28;
    --bg-sidebar-active: #1a2035;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-sidebar: #94a3b8;
    --border-color: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6), 0 8px 10px -6px rgba(0,0,0,0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ============================================
   侧边栏 Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition-slow);
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 12px rgba(245,158,11,0.35);
}

.logo-text h1 {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-detail { display: none; }
.sidebar.collapsed .logo { justify-content: center; }
.sidebar.collapsed .user-info { justify-content: center; padding: 12px 0; }

/* 导航 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section { margin-bottom: 24px; }

.nav-section-title {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-list li { margin-bottom: 2px; }

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    font-weight: 500;
    font-size: 13.5px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item i { font-size: 19px; width: 22px; text-align: center; }

.nav-item a:hover {
    background: var(--bg-sidebar-hover);
    color: #ffffff;
}

.nav-item.active a {
    background: var(--bg-sidebar-active);
    color: var(--primary-400);
}

.nav-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-500);
    border-radius: 0 3px 3px 0;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--primary-500);
    color: white;
    min-width: 30px;
    text-align: center;
}

/* 侧边栏底部用户 */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, #374151, #4b5563);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ============================================
   主内容区域 Main Content
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

/* 顶部导航栏 */
.topbar {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(var(--bg-secondary-rgb, 255,255,255), 0.85);
}

[data-theme="dark"] .topbar {
    background: rgba(26,31,46,0.9);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 20px;
    transition: all var(--transition-fast);
}

.btn-sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.breadcrumb i { color: var(--primary-500); margin-right: 4px; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    font-size: 16px;
}

.topbar-search input {
    width: 280px;
    height: 38px;
    padding: 0 16px 0 38px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.topbar-search input:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
    width: 340px;
}

.topbar-search input::placeholder { color: var(--text-tertiary); }

.topbar-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 20px;
    position: relative;
    transition: all var(--transition-fast);
}

.topbar-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    display: none;
}

.notification-dot.show { display: block; }

.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary-500);
}

[data-theme="light"] #themeIconDark,
[data-theme="dark"] #themeIconLight { display: none; }

.topbar-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    padding-left: 12px;
    border-left: 1px solid var(--border-color);
    margin-left: 4px;
}

/* 页面容器 */
.page-container {
    padding: var(--container-padding);
    flex: 1;
    animation: fadeInPage 0.35s ease;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   通用组件 Components
   ============================================ */

/* 卡片 */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: all var(--transition-base);
}

.card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-500);
    font-size: 18px;
}

/* 统计卡片 */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.06;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stat-info .stat-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend-up { color: var(--success); }
.stat-trend-down { color: var(--danger); }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1.5px solid transparent;
}

.btn i { font-size: 16px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245,158,11,0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover { opacity: 0.9; }

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
    background: var(--primary-50);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* 表单元素 */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.form-input::placeholder { color: var(--text-tertiary); }

textarea.form-input {
    height: auto;
    min-height: 80px;
    padding: 10px 14px;
    resize: vertical;
}

/* 表格 */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table thead th {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(245,158,11,0.03);
}

.data-table tbody tr:last-child td { border-bottom: none; }

/* 徽章/Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }
.badge-purple { background: #f3e8ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.badge-gray { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* 标签页 Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-item {
    padding: 10px 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--primary-600); border-bottom-color: var(--primary-500); }

/* Modal 弹窗 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity var(--transition-base);
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-base);
    animation: modalIn 0.3s ease forwards;
}

@keyframes modalIn {
    to { transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h2 i { color: var(--primary-500); }

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 20px;
    transition: all var(--transition-fast);
}

.modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.modal-body { padding: 20px 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 24px 20px;
}

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    font-weight: 500;
    animation: toastIn 0.35s ease forwards;
    min-width: 280px;
    max-width: 420px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i { font-size: 20px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* 通知面板 */
.notification-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1500;
    transition: right var(--transition-slow);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.notification-panel.active { right: 0; }

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-header h3 i { color: var(--primary-500); }

.notification-list { flex: 1; overflow-y: auto; padding: 12px; }

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.notification-item:hover { background: var(--bg-tertiary); }
.notification-item.unread { background: rgba(245,158,11,0.04); }

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notif-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-content p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13.5px;
    max-width: 300px;
    margin: 0 auto;
}

/* ============================================
   页面特定样式 Page-specific Styles
   ============================================ */

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-grid-2 { grid-template-columns: repeat(2, 1fr); }
.dashboard-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1400px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* 房态墙 Room Status Wall */
.room-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.room-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.room-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.room-card .room-number {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.room-card .room-type {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.room-card .room-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.room-card .room-status-text {
    font-size: 12px;
    font-weight: 600;
}

.room-card .room-guest {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 房态颜色 */
.room-card.status-vacant-clean { border-color: var(--room-vacant-clean); }
.room-card.status-vacant-clean .room-number { color: var(--room-vacant-clean); }
.room-card.status-vacant-dirty { border-color: var(--room-vacant-dirty); }
.room-card.status-vacant-dirty .room-number { color: var(--room-vacant-dirty); }
.room-card.status-occupied { border-color: var(--room-occupied); }
.room-card.status-occupied .room-number { color: var(--room-occupied); }
.room-card.status-reserved { border-color: var(--room-reserved); }
.room-card.status-reserved .room-number { color: var(--room-reserved); }
.room-card.status-maintenance { border-color: var(--room-maintenance); opacity: 0.65; }
.room-card.status-maintenance .room-number { color: var(--room-maintenance); }

/* 青旅床位卡片样式 */
.room-card.bed-card {
    min-width: 120px;
    max-width: 160px;
    padding: 12px;
    border-style: dashed;
    border-width: 1.5px;
}
.room-card.bed-card:hover {
    transform: translateY(-2px) scale(1.02);
}
.room-card.bed-card .room-number {
    font-size: 13px;
    font-weight: 700;
}

/* 日历视图 Calendar View */
.calendar-view {
    display: flex;
    flex-direction: column;
}

.calendar-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-month-nav h3 {
    font-size: 18px;
    font-weight: 700;
    min-width: 140px;
    text-align: center;
}

/* 日历外层滚动容器 */
.calendar-scroll-wrapper {
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    max-height: 70vh;
}

.calendar-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.calendar-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
.calendar-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}
.calendar-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
.calendar-scroll-wrapper::-webkit-scrollbar-corner {
    background: var(--bg-tertiary);
}

.calendar-grid {
    display: grid;
    gap: 1px;
    background: var(--border-color);
    min-width: max-content;
}

.cal-cell {
    background: var(--bg-secondary);
    width: 54px;
    height: 54px;
    padding: 2px;
    font-size: 11px;
    position: relative;
    cursor: default;
    transition: background var(--transition-fast);
}

.cal-cell:hover {
    background: var(--bg-tertiary);
}

/* 日期头行 */
.cal-cell-date {
    background: var(--bg-tertiary);
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    z-index: 3;
    border-bottom: 2px solid var(--border-color);
    cursor: default;
}
.cal-cell-date .cal-weekday {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* 房间名列 - 吸左固定 */
.cal-cell-room {
    background: var(--bg-tertiary);
    height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
    position: sticky;
    left: 0;
    z-index: 2;
    width: 70px;
    min-width: 70px;
    border-right: 2px solid var(--border-color);
    cursor: default;
}
.cal-cell-room .cal-room-type {
    font-weight: 400;
    font-size: 9px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* 左上角固定格子 */
.cal-cell-corner {
    background: var(--bg-tertiary);
    position: sticky;
    left: 0;
    top: 0;
    z-index: 5;
    width: 70px;
    min-width: 70px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: var(--text-tertiary);
    border-right: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.cal-cell.today {
    background: rgba(245,158,11,0.06);
}
.cal-cell.today:hover {
    background: rgba(245,158,11,0.12);
}

.cal-cell.past { opacity: 0.45; }

/* 预订条 - 填充整个格子 */
.cal-booking-bar {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 4px;
    font-size: 10px;
    padding: 2px 5px;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.cal-booking-bar:hover {
    opacity: 0.9;
    transform: scale(1.04);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 预订详情弹出 */
.cal-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    font-size: 13px;
    min-width: 200px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.15s ease;
}
.cal-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.cal-tooltip-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.cal-tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    color: var(--text-secondary);
    font-size: 12px;
}
.cal-tooltip-row span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* 日历图例 */
.calendar-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* 图表占位 (CSS-only simple chart) */
.chart-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 180px;
    padding-top: 20px;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-width: 20px;
    transition: height var(--transition-slow);
    position: relative;
}

.chart-bar:hover { opacity: 0.85; }
.chart-bar .bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.chart-bar:hover .bar-value { opacity: 1; }

/* 进度条 Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* 快速操作按钮组 */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    flex-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 1;
    min-width: 150px;
    max-width: 220px;
}

.quick-action-btn:hover {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 24px;
    color: var(--primary-500);
}

.quick-action-btn span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 待办列表 Todo List */
.todo-list { display: flex; flex-direction: column; gap: 8px; }

.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.todo-item:hover { border-color: var(--primary-300); }

.todo-check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 12px;
    color: white;
}

.todo-check.done {
    background: var(--success);
    border-color: var(--success);
}

.todo-info { flex: 1; }
.todo-info h4 { font-size: 13.5px; font-weight: 600; }
.todo-info p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.todo-time { font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }

/* 高亮闪烁动画 */
@keyframes highlight-flash {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(59,130,246,0.2); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
.highlight-flash {
  animation: highlight-flash 0.6s ease 3;
  border-color: var(--primary-400) !important;
  background: rgba(59,130,246,0.05) !important;
}

/* 分页 Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.page-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.page-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.page-btn.active { background: var(--primary-500); color: white; }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* 网格布局工具 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Flex 工具 */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-gap { display: flex; gap: 12px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 20px; }
.mb-lg { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--primary-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-secondary); }

/* ============================================
   移动端响应式 Mobile Responsive
   ============================================ */

/* --- 平板适配 --- */
@media (max-width: 1024px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .logo-text, .sidebar .nav-section-title,
    .sidebar .nav-item span, .sidebar .nav-badge, .sidebar .user-detail { display: none; }
    .sidebar .logo { justify-content: center; }
    .sidebar .user-info { justify-content: center; padding: 12px 0; }
    .main-content { margin-left: var(--sidebar-collapsed); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .topbar-search { display: none; }
}

/* --- 手机适配 --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 12px;
        --topbar-height: 52px;
    }

    /* 1. 侧边栏改为抽屉式 */
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    /* 恢复侧边栏文字显示 */
    .sidebar .logo-text,
    .sidebar .nav-section-title,
    .sidebar .nav-item span,
    .sidebar .nav-badge,
    .sidebar .user-detail { display: revert; }
    .sidebar .logo { justify-content: revert; }
    .sidebar .user-info { justify-content: revert; padding: 8px; }

    /* 侧边栏遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1999;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active {
        display: block;
    }

    /* 主内容全屏 */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 64px; /* 给底部导航留空间 */
    }

    /* 2. 顶部栏精简 */
    .topbar {
        padding: 0 12px;
        height: var(--topbar-height);
        min-height: var(--topbar-height);
    }
    .topbar-search { display: none; }
    .topbar-date { display: none; }
    .breadcrumb { font-size: 14px; }
    .btn-sidebar-toggle {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    /* 3. 底部导航栏 */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        z-index: 1500;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--text-tertiary);
        font-size: 10px;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s;
        cursor: pointer;
        padding: 4px 0;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-item i {
        font-size: 20px;
        transition: transform 0.2s;
    }
    .mobile-nav-item.active {
        color: var(--primary-500);
    }
    .mobile-nav-item.active i {
        transform: scale(1.1);
    }
    .mobile-nav-more {
        flex: 0 0 56px;
    }

    /* 4. Grid全部单栏 */
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .dashboard-grid { grid-template-columns: 1fr !important; }

    /* 5. 卡片内边距缩小 */
    .card { padding: 16px; }
    .stat-card { padding: 14px 16px; }

    /* 6. 表格卡片化 - data-table变成卡片列表 */
    .data-table thead { display: none; }
    .data-table tbody tr {
        display: block;
        padding: 12px 14px;
        margin-bottom: 8px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
        position: relative;
    }
    .data-table tbody tr:hover {
        background: rgba(245,158,11,0.03);
    }
    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border-bottom: none;
        max-width: 100% !important;
        white-space: normal !important;
        font-size: 13px;
    }
    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-right: 12px;
        flex-shrink: 0;
    }
    .data-table tbody td:last-child {
        border-bottom: none;
    }
    /* 操作列保持右对齐 */
    .data-table tbody td:last-child {
        justify-content: flex-end;
    }
    /* 表格容器取消圆角和边框（外层卡片已处理） */
    .table-container {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    /* 7. Modal全屏化 */
    .modal-overlay { padding: 0; }
    .modal-container {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        overflow-y: auto;
    }
    .modal-body { padding: 16px 20px; }
    .modal-header { padding: 16px 20px 0; }
    .modal-footer {
        padding: 12px 20px 20px;
        flex-wrap: wrap;
    }

    /* 8. 工具栏换行 */
    .flex-between {
        flex-wrap: wrap;
        gap: 10px !important;
    }
    .flex-gap {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    /* 9. 房间卡片自适应 */
    .room-wall {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
    .room-card { padding: 12px; }

    /* 10. 统计条自适应 */
    .quick-action-btn {
        min-width: 100%;
        max-width: 100%;
        padding: 12px 16px;
    }

    /* 11. 通知面板全屏 */
    .notification-panel {
        width: 100%;
        right: -100%;
    }

    /* 12. Toast底部显示（避开底部导航） */
    .toast-container {
        top: auto;
        bottom: 76px;
        right: 12px;
        left: 12px;
    }
    .toast {
        min-width: auto;
        max-width: 100%;
    }

    /* 13. 内联grid强制单栏 */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* 14. 固定宽度输入框自适应 */
    input[style*="width:"],
    select[style*="width:"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 15. 搜索框自适应 */
    input[type="text"][style*="width:22"],
    input[type="text"][style*="width:24"],
    input[type="text"][style*="width:20"] {
        width: 100% !important;
    }

    /* 16. 分页按钮增大触摸区域 */
    .page-btn { width: 40px; height: 40px; }
    .btn { min-height: 40px; }
    .btn-sm { min-height: 36px; padding: 6px 12px; }

    /* 17. 表单输入框增大 */
    .form-input, .form-select {
        height: 44px;
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 18. 弹窗内grid单栏 */
    .modal-body [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .modal-body .grid-2,
    .modal-body [class*="grid-"] {
        grid-template-columns: 1fr !important;
    }

    /* 19. 侧边栏折叠态下主内容不留边距 */
    .sidebar.collapsed ~ .main-content { margin-left: 0 !important; }

    /* 20. 登录页隐藏底部导航 */
    body.login-mode .mobile-nav { display: none !important; }
}

/* --- 超小屏幕（iPhone SE等） --- */
@media (max-width: 400px) {
    .mobile-nav-item { font-size: 9px; }
    .mobile-nav-item i { font-size: 18px; }
    .stat-icon { width: 40px; height: 40px; font-size: 20px; }
    .stat-info .stat-value { font-size: 20px !important; }
    .room-wall { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* --- 桌面端隐藏底部导航和遮罩 --- */
@media (min-width: 769px) {
    .mobile-nav { display: none; }
    .sidebar-overlay { display: none !important; }
}

/* 打印样式 */
@media print {
    .sidebar, .topbar, .btn, .modal-overlay { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: white; color: black; }
    .card { border: 1px solid #ddd; box-shadow: none; }
}

/* 动画辅助类 */
.animate-in {
    animation: fadeSlideIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 脉冲动画（用于实时更新提示） */
.pulse-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 数字滚动效果 */
.count-up {
    display: inline-block;
    transition: all 0.5s ease;
}

/* 选择框美化 */
select.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}


/* ============================================
   页面切换 Loading 动画
   ============================================ */
.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.loading-spinner {
    position: relative;
    width: 48px;
    height: 48px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary-500);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--primary-400);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    animation-delay: -0.15s;
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: var(--primary-300);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    animation-delay: -0.3s;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
}

.loading-text {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 保留原有的 spin 动画兼容 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 通用内容加载动画 */
.content-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 8px;
    color: var(--text-tertiary);
}

.content-loading i {
    font-size: 20px;
    animation: spin 1s linear infinite;
}


/* ==================== LOGO主题切换 ==================== */
[data-theme="light"] .logo-dark { display: none !important; }
[data-theme="light"] .logo-light { display: inline-block !important; }
[data-theme="dark"] .logo-light { display: none !important; }
[data-theme="dark"] .logo-dark { display: inline-block !important; }

/* ==================== 登录页全屏样式 ==================== */
body.login-mode .sidebar { display: none !important; }
body.login-mode .main-content { padding-left: 0 !important; margin-left: 0 !important; }
body.login-mode .topbar { display: none !important; }


/* ==================== 登录页LOGO主题切换 ==================== */
[data-theme="light"] .login-logo-dark { display: none !important; }
[data-theme="light"] .login-logo-light { display: inline-block !important; }
[data-theme="dark"] .login-logo-light { display: none !important; }
[data-theme="dark"] .login-logo-dark { display: inline-block !important; }

/* ==================== 
/* --- 日历房间名列溢出保护 --- */
.cal-cell-room { overflow: hidden; }
.cal-cell-room .cal-room-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 68px; }
字体自适应 / Text Overflow Prevention ==================== */

/* --- 统计卡片：数值自适应 --- */
.stat-card {
    container-type: inline-size;
}
.stat-info {
    min-width: 0; /* 允许flex子元素收缩 */
    flex: 1;
}
.stat-info .stat-value {
    font-size: clamp(18px, 4cqi, 28px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.stat-info h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.stat-info .stat-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* --- 房间卡片：文字自适应 --- */
.room-card {
    container-type: inline-size;
}
.room-card .room-number {
    font-size: clamp(14px, 3.5cqi, 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.room-card .room-type {
    font-size: clamp(10px, 2cqi, 11.5px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.room-card .room-status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 表格单元格：自适应 --- */
.data-table {
    table-layout: auto;
}
.data-table th,
.data-table td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.data-table td:not(:last-child) {
    white-space: nowrap;
}
/* 日期列允许换行 */
.data-table td br + small,
.data-table td small {
    white-space: nowrap;
}

/* --- 徽章/Badge：文字自适应 --- */
.badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

/* --- 侧边栏LOGO文字自适应 --- */
.logo-text {
    min-width: 0;
    overflow: hidden;
}
.logo-text h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.logo-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* --- 卡片标题自适应 --- */
.card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* --- 待办列表文字自适应 --- */
.todo-info {
    min-width: 0;
    flex: 1;
}
.todo-info h4 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.todo-info p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 日历事件标签自适应 --- */
.calendar-event {
    font-size: clamp(8px, 1.5cqi, 10px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 通用文字溢出保护 --- */
.nav-item a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- 青旅床位卡片 --- */
.room-card.bed-card {
    container-type: inline-size;
}
.room-card.bed-card .room-number {
    font-size: clamp(10px, 2.5cqi, 13px);
}

/* --- 房态统计块自适应 --- */
.room-wall .room-card div[style] {
    overflow: hidden;
    text-overflow: ellipsis;
}
