/* ========================================
   观澜 — 人员装备宿舍人员管理系统
   Frosted Glass / Dark & Light / Smooth
   ======================================== */

/* ==================== 浅色主题 (默认) ==================== */
:root {
  /* 主色调 - 暖金色 */
  --color-primary: #b8860b;
  --color-primary-light: #daa520;
  --color-primary-dark: #8b6914;
  --color-primary-bg: rgba(184, 134, 11, 0.08);
  --color-primary-glow: rgba(184, 134, 11, 0.15);

  /* 语义色 */
  --color-success: #30d158;
  --color-success-bg: rgba(48, 209, 88, 0.1);
  --color-success-dark: #248a3d;
  --color-warning: #ff9f0a;
  --color-warning-bg: rgba(255, 159, 10, 0.1);
  --color-danger: #ff453a;
  --color-danger-bg: rgba(255, 69, 58, 0.1);
  --color-info: #0a84ff;
  --color-info-bg: rgba(10, 132, 255, 0.1);
  --color-purple: #8b5cf6;
  --color-purple-bg: rgba(139, 92, 246, 0.1);

  /* 玻璃材质色 */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-strong: rgba(255, 255, 255, 0.88);
  --glass-bg-weak: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-border-strong: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);

  /* 表面色 */
  --surface-primary: #ffffff;
  --surface-secondary: #f5f5f7;
  --surface-tertiary: #e8e8ed;

  /* 文本 */
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --text-inverse: #ffffff;

  /* 背景 */
  --bg-root: #f2f2f7;
  --bg-gradient: linear-gradient(180deg, #f9f9fc 0%, #f2f2f7 50%, #e8e8ed 100%);

  /* 侧边栏 */
  --sidebar-bg: rgba(30, 30, 32, 0.88);
  --sidebar-blur: blur(40px) saturate(180%);
  --sidebar-text: rgba(255, 255, 255, 0.65);
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(218, 165, 32, 0.18);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-logo-border: rgba(255, 255, 255, 0.18);

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.1);

  /* 布局 */
  --sidebar-width: 250px;
  --topbar-height: 64px;
  --content-padding: 28px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* 灰阶 */
  --color-gray-100: #f3f4f6;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-border: #e5e7eb;
  --color-bg-card: rgba(255,255,255,0.88);
  --color-text-secondary: #6e6e73;
  --color-bg-secondary: #f3f4f6;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
  --transition: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-spring: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==================== 深色主题 ==================== */
[data-theme="dark"] {
  --color-primary: #daa520;
  --color-primary-light: #f0c040;
  --color-primary-dark: #b8860b;
  --color-primary-bg: rgba(218, 165, 32, 0.12);
  --color-primary-glow: rgba(218, 165, 32, 0.18);

  --color-success: #30d158;
  --color-success-bg: rgba(48, 209, 88, 0.12);
  --color-success-dark: #248a3d;
  --color-warning: #ff9f0a;
  --color-warning-bg: rgba(255, 159, 10, 0.12);
  --color-danger: #ff453a;
  --color-danger-bg: rgba(255, 69, 58, 0.12);
  --color-info: #0a84ff;
  --color-info-bg: rgba(10, 132, 255, 0.12);
  --color-purple: #a855f7;
  --color-purple-bg: rgba(168, 85, 247, 0.12);

  --glass-bg: rgba(30, 30, 32, 0.68);
  --glass-bg-strong: rgba(30, 30, 32, 0.85);
  --glass-bg-weak: rgba(30, 30, 32, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.12);

  --surface-primary: #1c1c1e;
  --surface-secondary: #2c2c2e;
  --surface-tertiary: #3a3a3c;

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #636366;
  --text-inverse: #1d1d1f;

  --bg-root: #000000;
  --bg-gradient: linear-gradient(180deg, #1c1c1e 0%, #121214 50%, #0a0a0c 100%);

  --sidebar-bg: rgba(20, 20, 22, 0.88);
  --sidebar-blur: blur(40px) saturate(180%);
  --sidebar-text: rgba(255, 255, 255, 0.5);
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(218, 165, 32, 0.2);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-logo-border: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.45);

  --color-gray-100: #2c2c2e;
  --color-gray-400: #636366;
  --color-gray-500: #8e8e93;
  --color-gray-600: #aeaeb2;
  --color-border: rgba(255,255,255,0.12);
  --color-bg-card: rgba(30,30,32,0.85);
  --color-text-secondary: #a1a1a6;
  --color-bg-secondary: #2c2c2e;
}

/* ==================== 全局重置 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 14px;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-root);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  transition: color 0.3s ease, background 0.3s ease;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--color-primary-light); }
button { font-family: inherit; cursor: pointer; border: none; background: none; outline: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

/* 美化滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ==================== 布局 ==================== */
#app { display: flex; height: 100vh; overflow: hidden; background: transparent; }

/* ==================== 侧边栏 — 液态玻璃 ==================== */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  backdrop-filter: var(--sidebar-blur);
  -webkit-backdrop-filter: var(--sidebar-blur);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              min-width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s ease;
  z-index: 100;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-border);
}
#sidebar:hover { background: rgba(30, 30, 32, 0.92); }
#sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}
#sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 8px; }
#sidebar.collapsed .logo span { display: none; }
#sidebar.collapsed .nav-item { justify-content: center; padding: 12px 8px; margin: 2px 8px; border-left: none; border-radius: var(--radius-sm); }
#sidebar.collapsed .nav-item.active { border-left: none; background: var(--sidebar-active); border-radius: var(--radius-sm); }
#sidebar.collapsed .nav-item span { display: none; }
#sidebar.collapsed .nav-group-arrow { display: none; }
#sidebar.collapsed .nav-badge { display: none !important; }
#sidebar.collapsed .nav-submenu { display: none; }
#sidebar.collapsed .nav-sub-item { display: none; }
#sidebar.collapsed .sidebar-footer .btn-text span { display: none; }
#sidebar.collapsed .sidebar-footer .btn-text { justify-content: center; padding: 8px; }
#sidebar.collapsed .sidebar-footer .btn-text svg { margin: 0; }

/* 侧边栏头部 */
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--sidebar-logo-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 导航 */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 2px 8px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  cursor: pointer;
  position: relative;
}
.nav-item svg { flex-shrink: 0; opacity: 0.55; transition: opacity 0.2s; }
.nav-item:hover {
  color: rgba(255,255,255,0.9);
  background: var(--sidebar-hover);
}
.nav-item:hover svg { opacity: 0.9; }
.nav-item.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
  border-left-color: var(--color-primary-light);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }

/* 导航徽章 */
.nav-badge {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

/* 导航分组 */
.nav-group-header { user-select: none; }
.nav-group-arrow {
  margin-left: auto;
  transition: transform 0.25s ease;
  opacity: 0.35;
  width: 14px; height: 14px;
}
.nav-group.open .nav-group-arrow { transform: rotate(90deg); opacity: 0.7; }
.nav-submenu {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: rgba(0,0,0,0.1);
  margin: 0 8px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.nav-group.open .nav-submenu { max-height: 300px; }

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 8px 50px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.nav-sub-item:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.03); }
.nav-sub-item.active {
  color: #fff;
  background: rgba(218, 165, 32, 0.12);
  border-left-color: var(--color-primary-light);
  font-weight: 500;
}

/* === 折叠模式分组弹出框 === */
#sidebarPopups {
  position: fixed;
  left: 0; top: 0;
  pointer-events: none;
  z-index: 999;
}
.nav-group-popup {
  position: fixed;
  left: 68px;
  min-width: 180px;
  background: var(--sidebar-bg);
  backdrop-filter: var(--sidebar-blur);
  -webkit-backdrop-filter: var(--sidebar-blur);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px) scale(0.96) translateY(-50%);
  transition: opacity 0.2s ease, visibility 0.2s;
  pointer-events: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
}
.nav-group-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}
.nav-group-popup::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px; height: 12px;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--sidebar-border);
  border-bottom: 1px solid var(--sidebar-border);
  transform: translateY(-50%) rotate(45deg);
}
.popup-title {
  padding: 8px 16px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}
.popup-item {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  color: var(--sidebar-text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.popup-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-footer .btn-text {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.sidebar-footer .btn-text:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}

/* 侧边栏底部 ICP 备案号 */
.sidebar-icp {
  padding: 4px 8px 2px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-icp a {
  color: rgba(255,255,255,0.28);
  font-size: 11px;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.sidebar-icp a:hover {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}
#sidebar.collapsed .sidebar-icp { display: none; }

/* ==================== 主内容区 ==================== */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

/* 顶栏 — 液态玻璃 */
#topbar {
  height: var(--topbar-height);
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
#pageTitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图标按钮 */
.icon-btn {
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  display: flex;
  transition: all 0.15s ease;
}
.icon-btn:hover { background: var(--surface-tertiary); color: var(--text-primary); }

/* 深色浅色切换按钮 */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);
  transform: scale(1.08);
}
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s ease; }
.theme-toggle .sun-icon,
.theme-toggle .moon-icon { position: absolute; }
[data-theme="dark"] .theme-toggle .sun-icon { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="dark"] .theme-toggle .moon-icon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle .sun-icon { opacity: 0; transform: rotate(90deg) scale(0.6); }
.theme-toggle .moon-icon { opacity: 1; transform: rotate(0deg) scale(1); }

/* 顶栏右侧 */
.topbar-right { display: flex; align-items: center; gap: 12px; overflow: hidden; min-width: 0; }

/* 全局搜索 — 玻璃效果 */
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  max-width: 280px;
  width: 100%;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  overflow: hidden;
}
.global-search:focus-within {
  background: var(--glass-bg);
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}
.global-search svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color 0.2s;
}
.global-search:focus-within svg { color: var(--color-primary); }
.global-search input {
  background: none;
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
  color: var(--text-primary);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search input::placeholder { color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 搜索结果下拉 */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}
.search-results .result-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.1s;
  color: var(--text-primary);
}
.search-results .result-item:hover { background: var(--color-primary-bg); }
.search-results .result-item:last-child { border-bottom: none; }
.search-results .result-name { font-weight: 500; font-size: 13.5px; }
.search-results .result-meta { font-size: 12px; color: var(--text-tertiary); }
.search-results .no-results { padding: 24px; text-align: center; color: var(--text-tertiary); }

/* 用户信息 */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
.avatar {
  width: 36px; height: 36px;
  min-width: 36px; min-height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}
#userName {
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* 内容区 */
#content {
  flex: 1;
  overflow-y: auto;
  padding: var(--content-padding);
}

/* ==================== 加载 ==================== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  color: var(--text-tertiary);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--surface-tertiary);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 页面工具栏 ==================== */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
  overflow: hidden;
}
.page-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.page-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ==================== 页面Tabs ==================== */
.page-tabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: var(--glass-bg); border-radius: var(--radius);
  padding: 4px; border: 1px solid var(--glass-border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.page-tabs .tab-btn {
  padding: 8px 18px; border-radius: 6px; border: none;
  background: transparent; color: var(--color-gray-500);
  font-size: 14px; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all 0.2s;
}
.page-tabs .tab-btn:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.page-tabs .tab-btn.active {
  background: var(--color-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ==================== 卡片 — 液态玻璃 ==================== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.card-body { padding: 20px 22px; }

/* ==================== 统计卡片 — 玻璃质感 ==================== */
.dash-section { margin-bottom: 4px; }
.dash-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-left: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-align: center;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.stat-card-row {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}
.stat-card-left { text-align: left; }
.stat-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-card:hover::after { opacity: 1; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-secondary);
}
.stat-info h4 { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-trend { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-number {
  font-size: 28px; font-weight: 700; color: var(--text-primary);
  line-height: 1.2; margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--color-gray-500); }

/* 财务统计卡片 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.stat-card-value { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.02em; }
.stat-card-subtitle { font-size: 12px; color: var(--text-tertiary); margin-top: 8px; }

/* ==================== 环比对比工具栏 ==================== */
.compare-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  flex-wrap: wrap;
}
.compare-toolbar-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 4px;
}
.compare-btn {
  padding: 4px 12px;
  font-size: 12px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--surface-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  white-space: nowrap;
}
.compare-btn:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border-color: var(--color-primary);
}
.compare-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.compare-btn-clear {
  color: var(--color-gray-400);
  border-color: transparent;
  background: transparent;
  font-size: 16px;
  padding: 2px 8px;
  line-height: 1;
}
.compare-btn-clear:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

/* ==================== 环比差值显示 ==================== */
.stat-delta {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-tertiary);
  background: var(--surface-secondary);
}
.stat-delta-up {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}
.stat-delta-down {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

/* 环比差值行（宿舍概览） */
.compare-delta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
  margin-top: -10px;
}
.compare-delta-item {
  font-size: 13px;
}

/* ==================== 表格 — 玻璃风格 ==================== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border-strong);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  box-shadow: var(--glass-shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
thead { background: var(--surface-secondary); }
thead th {
  padding: 13px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 1px solid var(--glass-border-strong);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--color-primary-bg); }

.table-empty { text-align: center; padding: 48px; color: var(--text-tertiary); }

/* 表格操作按钮 —— 统一固定横排（分段式按钮组） */
.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface-secondary);
  border: 1px solid var(--glass-border-strong);
  border-radius: 10px;
  white-space: nowrap;
  vertical-align: middle;
}
.table-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}
.table-actions button:hover {
  background: var(--surface-primary);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}
.table-actions button:active { transform: scale(0.93); }
.table-actions button.text-danger { color: var(--color-danger); }
.table-actions button.text-danger:hover { background: var(--color-danger-bg); color: var(--color-danger); box-shadow: none; }
.table-actions button.text-success { color: var(--color-success-dark); }
.table-actions button.text-success:hover { background: var(--color-success-bg); color: var(--color-success-dark); box-shadow: none; }
.table-actions button.text-warning { color: #b25000; }
.table-actions button.text-warning:hover { background: var(--color-warning-bg); color: #b25000; box-shadow: none; }
.table-actions button.text-info { color: var(--color-info); }
.table-actions button.text-info:hover { background: var(--color-info-bg); color: var(--color-info); box-shadow: none; }
.table-actions button.text-primary { color: var(--color-primary-dark); }
.table-actions button.text-primary:hover { background: var(--color-primary-bg); color: var(--color-primary-dark); box-shadow: none; }
/* 组内实底主按钮（如"确认入职"）归一为同尺寸胶囊 */
.table-actions button.btn {
  min-width: 48px;
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  box-shadow: none;
}
.table-actions button.btn:hover { transform: translateY(-1px); }

/* ==================== 徽章 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-dark); }
.badge-warning { background: var(--color-warning-bg); color: #b45309; }
.badge-danger { background: var(--color-danger-bg); color: #be123c; }
.badge-info { background: var(--color-info-bg); color: #1d4ed8; }
.badge-default { background: var(--surface-secondary); color: var(--text-secondary); }
.badge-primary { background: var(--color-primary-bg); color: var(--color-primary-dark); }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* ==================== 按钮 — 圆润玻璃 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(184, 134, 11, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--surface-tertiary); }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  box-shadow: 0 2px 12px rgba(255, 69, 58, 0.25);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(255, 69, 58, 0.35); }

.btn-success {
  background: var(--color-success);
  color: #fff;
  box-shadow: 0 2px 12px rgba(48, 209, 88, 0.25);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(48, 209, 88, 0.35); }

.btn-outline {
  border: 1.5px solid var(--glass-border-strong);
  color: var(--text-primary);
  background: var(--glass-bg-weak);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
}

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: var(--radius-md); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.form-group label .req { color: var(--color-danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--glass-bg-weak);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  outline: none;
}
.form-control:hover { border-color: var(--text-tertiary); }
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
  background: var(--surface-primary);
}
.form-control::placeholder { color: var(--text-tertiary); }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236e6e73' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title {
  font-size: 14px; font-weight: 600; color: var(--color-primary);
  margin: 16px 0 12px 0; padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

/* ==================== 模态框 — 深度玻璃 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--glass-border);
  max-width: 640px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes modalIn {
  from { transform: translateY(40px) scale(0.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-box.modal-lg { max-width: 920px; }
.modal-box.modal-xl { max-width: 1140px; }
.modal-box.modal-sm { max-width: 440px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close {
  font-size: 22px;
  color: var(--text-tertiary);
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--surface-secondary); }

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border-strong);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-secondary);
}

/* ==================== Toast — 玻璃通知 ==================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-left: 4px solid var(--text-tertiary);
}
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }
.toast.warning { border-left-color: var(--color-warning); }
.toast.info { border-left-color: var(--color-info); }
.toast-icon { font-size: 18px; }
.toast-message { font-size: 13.5px; color: var(--text-primary); font-weight: 500; }

/* ==================== 分页 ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.pagination-info { font-size: 13px; color: var(--text-secondary); }
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  min-width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-strong);
  transition: all 0.15s ease;
  padding: 0 10px;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
}
.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-ellipsis { padding: 0 4px; color: var(--text-tertiary); align-self: center; }

/* 分页行（信息+按钮+条数选择器） */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.pagination-row .pagination { margin-top: 0; flex: 1; }
.page-size-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.page-size-select {
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border-strong);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.page-size-select:hover { border-color: var(--color-primary); }
.page-size-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-bg); }

/* ==================== 筛选栏 ==================== */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; overflow: hidden; }
.filter-bar .form-control, .filter-bar select {
  min-width: 0;
  width: auto;
  min-width: 140px;
  padding: 8px 12px;
  font-size: 13px;
}
.filter-bar .search-input { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== 步骤条 ==================== */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.step { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--text-tertiary);
  color: var(--text-tertiary);
  background: var(--surface-primary);
  transition: all 0.3s ease;
}
.step.active .step-circle {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-bg);
  box-shadow: 0 0 0 6px var(--color-primary-glow);
}
.step.completed .step-circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(48, 209, 88, 0.3);
}
.step-label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; font-weight: 500; }
.step.active .step-label { color: var(--color-primary); font-weight: 700; }
.step.completed .step-label { color: var(--color-success); }
.step-line {
  width: 48px; height: 2px;
  background: var(--surface-tertiary);
  margin: 0 6px; flex-shrink: 0;
  border-radius: 1px;
  transition: background 0.3s ease;
}
.step-line.completed { background: var(--color-success); }

/* ==================== 时间线 ==================== */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: var(--surface-tertiary);
  border-radius: 1px;
}
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -31px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 3px solid var(--surface-primary);
  z-index: 1;
}
.timeline-dot.success { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success); }
.timeline-dot.warning { background: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning); }
.timeline-dot.info { background: var(--color-info); box-shadow: 0 0 0 2px var(--color-info); }
.timeline-dot.danger { background: var(--color-danger); box-shadow: 0 0 0 2px var(--color-danger); }
.timeline-dot.primary { background: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }

.timeline-content {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.2s ease;
}
.timeline-content:hover { box-shadow: var(--shadow-md); }
.timeline-title { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.timeline-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 12px; flex-wrap: wrap; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* ==================== 空状态 ==================== */
.empty-state { text-align: center; padding: 56px 20px; color: var(--text-tertiary); }
.empty-state svg { margin-bottom: 20px; opacity: 0.2; }
.empty-state h4 { font-size: 16px; margin-bottom: 8px; color: var(--text-secondary); font-weight: 600; }
.empty-state p { font-size: 13.5px; margin-bottom: 16px; }

/* ==================== 网格布局 ==================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.quick-card { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* ==================== 图表容器 ==================== */
.chart-container { position: relative; height: 300px; }
.chart-row { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 24px; }

/* ==================== 仪表盘 — 节内图表 ==================== */
.dash-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}
.dash-chart { margin-bottom: 0; }
.dash-chart-full { grid-column: 1 / -1; }
.dash-chart-body { position: relative; height: 200px; }
.dash-chart-full .dash-chart-body { height: 180px; }

/* ==================== 宿舍 — 酒店式床位平面图 ==================== */

/* 楼栋Tab */
.building-tabs {
  display: flex; gap: 12px; margin-bottom: 20px; overflow-x: auto;
  padding-bottom: 4px;
}
.building-tab {
  flex-shrink: 0; min-width: 140px;
  padding: 14px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}
.building-tab:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 12px rgba(79,70,229,0.1);
}
.building-tab.active {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(79,70,229,0.03));
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.building-tab-icon { font-size: 24px; margin-bottom: 4px; }
.building-tab-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.building-tab-info { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

/* 楼层分区 */
.floor-section { margin-bottom: 28px; }
.floor-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--glass-border-strong);
}
.floor-header h3 {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.floor-stats { font-size: 13px; color: var(--text-secondary); }
.floor-stat-occ { color: var(--color-success); font-weight: 600; }
.floor-stat-div { margin: 0 6px; color: var(--text-tertiary); }
.floor-stat-total { color: var(--text-secondary); }

/* 房间网格 */
.room-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* 房间卡片 */
.room-plan-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}
.room-plan-card:hover {
  box-shadow: var(--shadow-lg);
}
.room-plan-card.room-full {
  border-color: rgba(245,158,11,0.3);
}

.room-plan-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.room-plan-header:hover { background: rgba(0,0,0,0.02); }
.room-plan-header-left { display: flex; align-items: center; gap: 10px; }
.room-plan-no { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.room-plan-type {
  font-size: 12px; color: var(--text-tertiary);
  background: var(--surface-secondary); padding: 2px 8px; border-radius: 10px;
}
.room-plan-header-right { display: flex; align-items: center; gap: 10px; }
.room-plan-occ { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.room-plan-expand { font-size: 11px; color: var(--text-tertiary); transition: transform 0.3s; }

/* 床位平面图 */
.room-plan-beds {
  padding: 0 16px 16px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.01);
}
.bed-row {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 12px;
}

.bed-unit {
  width: 80px; min-height: 80px;
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  position: relative;
}
.bed-unit:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.bed-unit:active { transform: scale(0.95); }

/* 已入住 — 绿色 */
.bed-occupied {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 2px solid #6ee7b7;
  color: #065f46;
}
.bed-occupied:hover { box-shadow: 0 6px 20px rgba(16,185,129,0.25); }

/* 空置 — 红色 */
.bed-available {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #fca5a5;
  color: #991b1b;
}
.bed-available:hover { box-shadow: 0 6px 20px rgba(239,68,68,0.25); }

/* 维修中 — 灰色 */
.bed-maintenance {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border: 2px solid #9ca3af;
  color: #4b5563;
}

.bed-icon { font-size: 20px; line-height: 1; }
.bed-number { font-size: 12px; font-weight: 700; }
.bed-occupant {
  font-size: 11px; font-weight: 500;
  max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0.85;
}

/* 响应式 — 宿舍平面图 */
@media (max-width: 768px) {
  .building-tabs { gap: 8px; }
  .building-tab { min-width: 110px; padding: 10px 12px; }
  .room-plan-grid { grid-template-columns: 1fr; gap: 10px; }
  .bed-unit { width: 68px; min-height: 68px; padding: 8px 4px; }
  .bed-icon { font-size: 16px; }
  .bed-number { font-size: 10px; }
  .bed-occupant { font-size: 10px; }
  .bed-row { gap: 6px; }
}

/* ==================== 详情面板 ==================== */
.detail-section { margin-bottom: 28px; }
.detail-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--glass-border-strong);
}
.detail-row {
  display: flex;
  padding: 9px 0;
  border-bottom: 1px solid var(--glass-border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 130px; color: var(--text-secondary); font-size: 13px; flex-shrink: 0; }
.detail-value { color: var(--text-primary); font-size: 13.5px; font-weight: 500; }

/* ==================== 骑士选择器卡片 ==================== */
.rider-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 4px 0;
}
/* ==================== 财务汇总 ==================== */
.finance-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.finance-item {
  flex: 1 1 33%;
  min-width: 100px;
  padding: 12px 8px;
  text-align: center;
}
.finance-value {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.finance-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.finance-divider {
  width: 100%;
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

/* ==================== 信息块 ==================== */
.info-block {
  padding: 10px 14px;
  background: var(--bg-page);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}
.info-block-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mb-12 { margin-bottom: 12px; }

/* ==================== 提示框 ==================== */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid transparent;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}
.alert-info { background: var(--color-info-bg); color: #1e40af; border-left-color: var(--color-info); }
.alert-warning { background: var(--color-warning-bg); color: #b45309; border-left-color: var(--color-warning); }
.alert-danger { background: var(--color-danger-bg); color: #be123c; border-left-color: var(--color-danger); }

/* ==================== 标签页 ==================== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--glass-border-strong);
  margin-bottom: 22px;
}
.tab {
  padding: 10px 22px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab:hover { color: var(--text-primary); background: var(--surface-secondary); }
.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ==================== 勾选框 ==================== */
.checkbox-list { display: flex; flex-direction: column; gap: 8px; }
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  background: var(--glass-bg-weak);
}
.checkbox-item:hover { border-color: var(--color-primary); background: var(--color-primary-bg); }
.checkbox-item input { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }
.checkbox-item label { cursor: pointer; flex: 1; font-size: 13.5px; color: var(--text-primary); }
.checkbox-item .equip-meta { font-size: 12px; color: var(--text-tertiary); }

/* ==================== 登录页 — 液态玻璃 ==================== */
.login-page {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #fff5eb 0%, #ffe8d0 25%, #ffdbb8 50%, #ffcf9e 75%, #ffc588 100%);
  overflow: hidden;
}
/* ===== 浅橙色液态丝带飘动效果 ===== */
.login-ribbons {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.login-ribbon {
  position: absolute;
  width: 160%;
  height: auto;
  opacity: 0.7;
  filter: blur(6px);
}
.login-ribbon.rbn-1 { top: 5%;  animation: ribbonFlow1 14s ease-in-out infinite; }
.login-ribbon.rbn-2 { top: 22%; animation: ribbonFlow2 18s ease-in-out infinite; }
.login-ribbon.rbn-3 { top: 38%; animation: ribbonFlow3 20s ease-in-out infinite; }
.login-ribbon.rbn-4 { top: 55%; animation: ribbonFlow4 16s ease-in-out infinite; }
.login-ribbon.rbn-5 { top: 72%; animation: ribbonFlow5 22s ease-in-out infinite; }

@keyframes ribbonFlow1 {
  0%  { transform: translateX(-8%) translateY(0) rotate(0deg); }
  25% { transform: translateX(-4%) translateY(15px) rotate(0.5deg); }
  50% { transform: translateX(-10%) translateY(0) rotate(-0.3deg); }
  75% { transform: translateX(-3%) translateY(-12px) rotate(0.4deg); }
  100%{ transform: translateX(-8%) translateY(0) rotate(0deg); }
}
@keyframes ribbonFlow2 {
  0%  { transform: translateX(-5%) translateY(0) rotate(0.2deg); }
  33% { transform: translateX(-12%) translateY(-18px) rotate(-0.6deg); }
  66% { transform: translateX(-2%) translateY(10px) rotate(0.3deg); }
  100%{ transform: translateX(-5%) translateY(0) rotate(0.2deg); }
}
@keyframes ribbonFlow3 {
  0%  { transform: translateX(-10%) translateY(0) rotate(-0.4deg); }
  25% { transform: translateX(-6%) translateY(20px) rotate(0.5deg); }
  50% { transform: translateX(-14%) translateY(-5px) rotate(-0.2deg); }
  75% { transform: translateX(-4%) translateY(-15px) rotate(0.6deg); }
  100%{ transform: translateX(-10%) translateY(0) rotate(-0.4deg); }
}
@keyframes ribbonFlow4 {
  0%  { transform: translateX(-3%) translateY(0) rotate(0.3deg); }
  50% { transform: translateX(-15%) translateY(-10px) rotate(-0.5deg); }
  100%{ transform: translateX(-3%) translateY(0) rotate(0.3deg); }
}
@keyframes ribbonFlow5 {
  0%  { transform: translateX(-7%) translateY(0) rotate(-0.2deg); }
  33% { transform: translateX(-3%) translateY(-22px) rotate(0.4deg); }
  66% { transform: translateX(-11%) translateY(8px) rotate(-0.3deg); }
  100%{ transform: translateX(-7%) translateY(0) rotate(-0.2deg); }
}
/* ===== 企业文化标语 — 无规则散落排列 ===== */
.login-slogan-wrap {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.login-slogan-s1, .login-slogan-s2, .login-slogan-s3,
.login-slogan-s4, .login-slogan-s5, .login-slogan-s6 {
  position: absolute;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: rgba(180, 120, 40, 0.28);
  text-shadow: 0 0 32px rgba(255, 220, 180, 0.5), 0 2px 8px rgba(0,0,0,0.05);
  white-space: nowrap;
  user-select: none;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  animation: sloganFade 7s ease-in-out infinite;
}
@keyframes sloganFade {
  0%, 100% { opacity: 0.45; transform: translateY(0) rotate(var(--slogan-rot, 0deg)); }
  50% { opacity: 0.9; transform: translateY(-12px) rotate(var(--slogan-rot, 0deg)); }
}
.login-slogan-s1 {
  top: 4%; left: 3%;
  font-size: 56px;
  --slogan-rot: -8deg;
  animation-delay: 0s;
}
.login-slogan-s2 {
  top: 4%; right: 3%;
  font-size: 34px;
  --slogan-rot: 12deg;
  animation-delay: 2.8s;
}
.login-slogan-s3 {
  bottom: 4%; right: 3%;
  font-size: 50px;
  --slogan-rot: -4deg;
  animation-delay: 5.2s;
}
.login-slogan-s4 {
  bottom: 4%; left: 3%;
  font-size: 28px;
  --slogan-rot: 6deg;
  animation-delay: 1.4s;
}
.login-slogan-s5 {
  top: 48%; left: 2%;
  font-size: 40px;
  --slogan-rot: -10deg;
  animation-delay: 3.8s;
}
.login-slogan-s6 {
  top: 44%; right: 2%;
  font-size: 32px;
  --slogan-rot: 8deg;
  animation-delay: 4.6s;
}
/* 浮动光晕装饰 */
.login-page::before {
  content: '';
  position: absolute;
  top: 15%; left: 5%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255, 200, 140, 0.3) 0%, rgba(255, 180, 100, 0.08) 45%, transparent 65%);
  border-radius: 50%;
  animation: loginGlowFloat 14s ease-in-out infinite;
  z-index: 0;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: 25%; right: 8%;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255, 220, 170, 0.2) 0%, rgba(255, 200, 130, 0.06) 45%, transparent 65%);
  border-radius: 50%;
  animation: loginGlowFloat 16s ease-in-out infinite reverse;
  z-index: 0;
}
@keyframes loginGlowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.92); }
}
/* ===== 暗色主题适配 ===== */
body.dark .login-page {
  background: linear-gradient(135deg, #1a120c 0%, #221810 25%, #2a1c10 50%, #22150a 75%, #1c1008 100%);
}
body.dark .login-slogan-s1,
body.dark .login-slogan-s2,
body.dark .login-slogan-s3,
body.dark .login-slogan-s4,
body.dark .login-slogan-s5,
body.dark .login-slogan-s6 {
  color: rgba(255, 200, 140, 0.22);
  text-shadow: 0 0 28px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0,0,0,0.15);
}
body.dark .login-page::before {
  background: radial-gradient(circle, rgba(200, 140, 80, 0.1) 0%, transparent 60%);
}
body.dark .login-page::after {
  background: radial-gradient(circle, rgba(180, 120, 60, 0.06) 0%, transparent 60%);
}
body.dark .login-card { background: rgba(20, 22, 28, 0.45); }

.login-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--glass-border);
  padding: 44px 42px 40px;
  width: 420px;
  max-width: 92vw;
  position: relative;
  z-index: 1;
  animation: loginFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(30px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 登录页底部 ICP 备案号 */
.login-icp {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  z-index: 1;
  pointer-events: none;
  animation: loginFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.login-icp a {
  pointer-events: auto;
  color: rgba(120, 80, 40, 0.5);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.login-icp a:hover {
  color: rgba(120, 80, 40, 0.85);
  text-decoration: underline;
}
body.dark .login-icp a { color: rgba(255, 205, 150, 0.45); }
body.dark .login-icp a:hover { color: rgba(255, 215, 165, 0.85); }

.login-header { text-align: center; margin-bottom: 30px; }
.login-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-primary);
  box-shadow: 0 8px 32px rgba(184, 134, 11, 0.15);
  border: 3px solid var(--glass-border);
}
.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.login-header h1 {
  font-size: 23px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }
.login-field { display: flex; flex-direction: column; gap: 7px; }
.login-field label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.login-field input {
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: all 0.2s ease;
  outline: none;
  background: var(--glass-bg-weak);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
}
.login-field input:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
  background: var(--surface-primary);
}
.login-field input::placeholder { color: var(--text-tertiary); }
.login-error {
  background: var(--color-danger-bg);
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}
.login-btn {
  height: 50px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
  letter-spacing: 0.02em;
}
.login-btn:hover:not(:disabled) {
  box-shadow: 0 8px 28px rgba(184, 134, 11, 0.45);
  transform: translateY(-2px);
}
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-hint {
  text-align: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-border-strong);
}
.login-hint p { font-size: 12px; color: var(--text-tertiary); }
.login-hint strong { color: var(--color-primary); }

.login-reset {
  text-align: center;
  margin-top: 6px;
}
.login-reset a {
  font-size: 11px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  opacity: 0.6;
}
.login-reset a:hover {
  color: var(--color-primary);
  opacity: 1;
  text-decoration: underline;
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-mono { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }
.font-bold { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.ml-8 { margin-left: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ==================== 移动端遮罩 ==================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.show { display: block; opacity: 1; }

/* ==================== 响应式 ==================== */

/* ---------- 全局移动端基础 ---------- */
@media (max-width: 768px) {
  /* 侧边栏 → 抽屉式 */
  #sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0; z-index: 1000;
    min-width: var(--sidebar-width) !important;
    width: var(--sidebar-width) !important;
    flex-basis: auto !important;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    border-radius: 0;
    border-right: none;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  #sidebar.collapsed { width: var(--sidebar-width) !important; min-width: var(--sidebar-width) !important; flex-basis: auto !important; transform: translateX(-100%); }
  #sidebar.mobile-open { transform: translateX(0); }

  /* 增大触控目标 */
  .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 34px; padding: 6px 12px; }
  .btn-lg { min-height: 48px; }
  .nav-item, .nav-group-header { min-height: 44px; }

  /* 移动端操作按钮组：允许换行、加大触控高度 */
  .table-actions { flex-wrap: wrap; }
  .table-actions button { min-width: 44px; height: 32px; font-size: 12px; }
  .table-actions button.btn { height: 32px; }
  .nav-sub-item { min-height: 38px; display: flex; align-items: center; }
  select, .form-control { min-height: 42px; }

  /* 表格容器横向滚动提示 */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8px, black calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8px, black calc(100% - 24px), transparent 100%);
  }
  table { font-size: 13px; min-width: 600px; width: max-content; }
  thead th { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
  tbody td { padding: 10px 12px; font-size: 13px; white-space: nowrap; }

  /* 弹窗全屏化 */
  .modal-box { width: 94% !important; max-width: 94% !important; max-height: 90vh; border-radius: var(--radius-lg); margin: 0; }
  .modal-box.modal-lg { max-width: 96% !important; }
  .modal-header { padding: 14px 18px; }
  .modal-header h3 { font-size: 16px; }
  .modal-body { padding: 16px 18px; }
  .modal-footer { padding: 12px 18px; flex-wrap: wrap; gap: 8px; }

  /* 卡片间距缩小 */
  .card { padding: 14px; margin-bottom: 12px; }
  #content { padding: 14px; }

  /* Toast 适配 */
  .toast-container { top: 8px; right: 8px; left: 8px; }
  .toast { min-width: 0; max-width: 100%; font-size: 14px; padding: 12px 16px; }

  /* 输入框防止 iOS 缩放 */
  input[type="text"], input[type="password"], input[type="number"],
  input[type="search"], input[type="email"], input[type="tel"],
  select, textarea, .form-control, .global-search input,
  .filter-bar .form-control, .filter-bar select {
    font-size: 16px !important;
  }
}

/* ---------- 手机竖屏 (窄屏) ---------- */
@media (max-width: 480px), (max-width: 768px) and (orientation: portrait) {
  /* 单列布局 */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid, .stats-row { grid-template-columns: 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .chart-row { grid-template-columns: 1fr; }
  .dash-chart-row { grid-template-columns: 1fr; }
  .daily-tables-grid { grid-template-columns: 1fr !important; }
  .upload-grid { grid-template-columns: 1fr; }
  .onboard-file-grid { grid-template-columns: 1fr; }
  .onboard-file-list { grid-template-columns: 1fr; }

  /* 顶部栏 */
  #topbar { padding: 0 10px; height: 52px; }
  #pageTitle { font-size: 15px; }
  .topbar-right { gap: 6px; }
  .global-search { max-width: 120px; padding: 6px 10px; }
  .user-info span#userName { display: none; }
  .avatar { width: 30px; height: 30px; min-width: 30px; min-height: 30px; font-size: 11px; }

  /* 页面工具栏 */
  .page-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .page-toolbar-left { flex-wrap: wrap; gap: 8px; }
  .page-toolbar-right { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

  /* 统计卡片 */
  .stat-card { padding: 12px 14px; gap: 8px; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 12px; }

  /* 筛选栏 */
  .filter-bar { flex-direction: column; gap: 8px; }
  .filter-bar .form-control, .filter-bar select { width: 100%; }
  .filter-bar .search-input { width: 100%; }

  /* 弹窗内容适配 */
  .modal-box { width: 98% !important; max-width: 98% !important; max-height: 88vh; }
  .modal-body { padding: 14px; }

  /* 按钮组 */
  .btn-group { flex-wrap: wrap; gap: 6px; }
  .btn-group .btn { flex: 1 1 auto; min-width: 80px; }

  /* 标签页 */
  .emp-tabs { gap: 0; }
  .emp-tab { padding: 10px 12px; font-size: 12px; }
  .tabs { gap: 0; }
  .tab { padding: 10px 12px; font-size: 12px; }

  /* 分页 */
  .pagination { flex-direction: column; gap: 8px; align-items: stretch; }
  .pagination-info { text-align: center; }
  .pagination-btns { justify-content: center; flex-wrap: wrap; }
  .pagination-row { flex-direction: column; gap: 8px; align-items: stretch; }
  .page-size-selector { justify-content: flex-end; }

  /* Excel 按钮隐藏文字 */
  .excel-btn span { display: none; }
  .excel-btn { padding: 8px; min-width: 36px; }

  /* 详情行 */
  .detail-row { flex-direction: column; gap: 2px; }
  .detail-label { width: auto; }

  /* 步骤条 */
  .steps { padding-bottom: 4px; }
  .step-line { width: 16px; margin: 0 3px; }
  .step-label { font-size: 11px; }

  /* 时间线 */
  .timeline { padding-left: 20px; }
  .timeline::before { left: 6px; }
  .timeline-dot { left: -21px; width: 12px; height: 12px; }

  /* 图表 */
  .chart-container { height: 220px; }
  .login-card { padding: 28px 20px; }
  .login-logo { width: 72px; height: 72px; }
  .login-header h1 { font-size: 18px; }

  /* 配置标签页 */
  .config-tab { padding: 8px 12px; font-size: 12px; }

  /* 身份证上传 */
  .idcard-dual-row { flex-direction: column; gap: 12px; }
  .idcard-ocr-status { width: 100%; }

  /* 宿舍类型选择 */
  .room-type-checkboxes { gap: 6px; }
  .room-type-chip { padding: 8px 12px; font-size: 12px; }

  /* 内容区边距 */
  #content { padding: 10px; }

  /* 侧边栏弹出框位置适配窄屏 */
  .nav-group-popup { left: 56px; min-width: 150px; }
}

/* ---------- body[data-orientation="portrait"] — JS 备用（兼容不支持 orientation MQ 的浏览器） ---------- */
body[data-device="phone"][data-orientation="portrait"] .grid-2,
body[data-device="phone"][data-orientation="portrait"] .grid-3,
body[data-device="phone"][data-orientation="portrait"] .grid-4,
body[data-device="tablet"][data-orientation="portrait"] .grid-2,
body[data-device="tablet"][data-orientation="portrait"] .grid-3,
body[data-device="tablet"][data-orientation="portrait"] .grid-4 { grid-template-columns: 1fr; }
body[data-device="phone"][data-orientation="portrait"] .stats-grid,
body[data-device="phone"][data-orientation="portrait"] .stats-row,
body[data-device="tablet"][data-orientation="portrait"] .stats-grid,
body[data-device="tablet"][data-orientation="portrait"] .stats-row { grid-template-columns: 1fr; }
body[data-device="phone"][data-orientation="portrait"] .form-grid,
body[data-device="tablet"][data-orientation="portrait"] .form-grid { grid-template-columns: 1fr; }
body[data-device="phone"][data-orientation="portrait"] .form-row,
body[data-device="tablet"][data-orientation="portrait"] .form-row { flex-direction: column; }
body[data-device="phone"][data-orientation="portrait"] #topbar,
body[data-device="tablet"][data-orientation="portrait"] #topbar { padding: 0 10px; height: 52px; }
body[data-device="phone"][data-orientation="portrait"] #pageTitle,
body[data-device="tablet"][data-orientation="portrait"] #pageTitle { font-size: 15px; }
body[data-device="phone"][data-orientation="portrait"] .global-search,
body[data-device="tablet"][data-orientation="portrait"] .global-search { max-width: 120px; padding: 6px 10px; }
body[data-device="phone"][data-orientation="portrait"] #userName,
body[data-device="tablet"][data-orientation="portrait"] #userName { display: none; }
body[data-device="phone"][data-orientation="portrait"] .page-toolbar,
body[data-device="tablet"][data-orientation="portrait"] .page-toolbar { flex-direction: column; align-items: stretch; }
body[data-device="phone"][data-orientation="portrait"] .modal-box,
body[data-device="tablet"][data-orientation="portrait"] .modal-box { width: 98% !important; max-width: 98% !important; }
body[data-device="phone"][data-orientation="portrait"] .filter-bar,
body[data-device="tablet"][data-orientation="portrait"] .filter-bar { flex-direction: column; }
body[data-device="phone"][data-orientation="portrait"] .filter-bar .form-control,
body[data-device="phone"][data-orientation="portrait"] .filter-bar select,
body[data-device="tablet"][data-orientation="portrait"] .filter-bar .form-control,
body[data-device="tablet"][data-orientation="portrait"] .filter-bar select { width: 100%; }
body[data-device="phone"][data-orientation="portrait"] .pagination,
body[data-device="tablet"][data-orientation="portrait"] .pagination { flex-direction: column; align-items: stretch; }
body[data-device="phone"][data-orientation="portrait"] #content,
body[data-device="tablet"][data-orientation="portrait"] #content { padding: 10px; }

/* ---------- 手机/平板横屏 — JS 备用 ---------- */
body[data-device="phone"][data-orientation="landscape"] .grid-2,
body[data-device="phone"][data-orientation="landscape"] .grid-3,
body[data-device="tablet"][data-orientation="landscape"] .grid-2,
body[data-device="tablet"][data-orientation="landscape"] .grid-3 { grid-template-columns: repeat(2, 1fr); }
body[data-device="phone"][data-orientation="landscape"] .grid-4,
body[data-device="tablet"][data-orientation="landscape"] .grid-4 { grid-template-columns: repeat(2, 1fr); }
body[data-device="phone"][data-orientation="landscape"] .stats-grid,
body[data-device="phone"][data-orientation="landscape"] .stats-row,
body[data-device="tablet"][data-orientation="landscape"] .stats-grid,
body[data-device="tablet"][data-orientation="landscape"] .stats-row { grid-template-columns: repeat(2, 1fr); }
body[data-device="phone"][data-orientation="landscape"] .form-grid,
body[data-device="tablet"][data-orientation="landscape"] .form-grid { grid-template-columns: repeat(2, 1fr); }
body[data-device="phone"][data-orientation="landscape"] #topbar,
body[data-device="tablet"][data-orientation="landscape"] #topbar { padding: 0 12px; height: 48px; }
body[data-device="phone"][data-orientation="landscape"] #pageTitle,
body[data-device="tablet"][data-orientation="landscape"] #pageTitle { font-size: 15px; }
body[data-device="phone"][data-orientation="landscape"] .modal-box,
body[data-device="tablet"][data-orientation="landscape"] .modal-box { max-height: 80vh; }
body[data-device="phone"][data-orientation="landscape"] .modal-body,
body[data-device="tablet"][data-orientation="landscape"] .modal-body { max-height: calc(80vh - 120px); overflow-y: auto; }
body[data-device="phone"][data-orientation="landscape"] .chart-container,
body[data-device="tablet"][data-orientation="landscape"] .chart-container { height: 200px; }
body[data-device="phone"][data-orientation="landscape"] #content,
body[data-device="tablet"][data-orientation="landscape"] #content { padding: 10px 14px; }
body[data-device="phone"][data-orientation="landscape"] .stat-value,
body[data-device="tablet"][data-orientation="landscape"] .stat-value { font-size: 18px; }

/* ---------- 手机横屏 (宽屏但矮) ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  /* 横屏可用空间更充裕，但高度有限 */
  .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid, .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .upload-grid { grid-template-columns: repeat(2, 1fr); }
  .onboard-file-grid { grid-template-columns: repeat(2, 1fr); }

  /* 顶部栏横屏缩小 */
  #topbar { padding: 0 12px; height: 48px; }
  #pageTitle { font-size: 15px; }

  /* 横屏弹窗需要限制高度 */
  .modal-box { max-height: 80vh; }
  .modal-body { max-height: calc(80vh - 120px); overflow-y: auto; }

  /* 图表横屏高度减小 */
  .chart-container { height: 200px; }

  /* 内容区缩小 */
  #content { padding: 10px 14px; }

  /* 统计卡片横屏双列 */
  .stat-card { padding: 10px 14px; }
  .stat-value { font-size: 18px; }

  /* 筛选栏横屏不强制单列 */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-bar .form-control, .filter-bar select { flex: 1; min-width: 120px; }

  /* 标签页横屏 */
  .emp-tab { padding: 8px 14px; font-size: 13px; }
  .tab { padding: 8px 14px; font-size: 13px; }

  /* 按钮组横屏不撑满 */
  .btn-group .btn { flex: 0 0 auto; }
}

/* ---------- 平板 (768-1024) ---------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .global-search { max-width: 200px; }
  .chart-row { grid-template-columns: 1fr; }
  .dash-chart-row { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== 树形表格 ==================== */
.tree-row td:first-child { position: relative; }
.tree-indent { display: inline-block; width: 24px; }
.tree-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  margin-right: 4px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease, color 0.2s ease;
}
.tree-toggle:hover { color: var(--color-primary); }
.tree-toggle.expanded { transform: rotate(90deg); }

/* ==================== 进度条 ==================== */
.progress-bar {
  height: 6px;
  background: var(--surface-tertiary);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

/* ==================== 文件上传 ==================== */
.upload-zone {
  border: 2px dashed var(--glass-border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--glass-bg-weak);
}
.upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  transform: translateY(-1px);
}
.upload-preview { margin-top: 10px; }
.upload-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--color-success-bg);
  border: 1px solid rgba(48, 209, 88, 0.3);
  border-radius: var(--radius-sm);
}
.upload-thumb {
  width: 64px; height: 64px;
  flex-shrink: 0;
  background: var(--surface-secondary);
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 入职文件 */
.upload-section { margin-top: 24px; border-top: 1px solid var(--glass-border-strong); padding-top: 20px; }
.upload-section-title { font-size: 16px; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.upload-field { display: flex; flex-direction: column; }
.upload-field-label { font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-primary); }
.upload-zone-icon { color: var(--text-tertiary); margin-bottom: 8px; display: flex; justify-content: center; }
.upload-zone-text { font-size: 13.5px; color: var(--text-secondary); }
.upload-zone-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }
.upload-item-info { flex: 1; min-width: 0; }
.upload-item-name { font-weight: 600; font-size: 13.5px; word-break: break-all; color: var(--text-primary); }
.upload-item-status { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--color-success); margin-top: 3px; }

/* 入职文件Tab页 */
.onboard-file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.onboard-file-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  background: var(--glass-bg);
}
.onboard-file-card:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-md); }
.onboard-file-card-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.onboard-file-card-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.onboard-file-card-preview img,
.onboard-file-card-preview video { max-width: 100%; max-height: 130px; border-radius: var(--radius-xs); object-fit: cover; }
.onboard-file-card-name { font-size: 11px; color: var(--text-tertiary); word-break: break-all; text-align: center; }
.onboard-file-card-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px; border: 2px dashed var(--glass-border-strong); border-radius: var(--radius-sm);
  background: var(--surface-secondary);
}
.onboard-file-card-upload-icon { color: var(--text-tertiary); }

.onboard-file-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.onboard-file-item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--glass-bg);
}
.onboard-file-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.onboard-file-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.onboard-file-preview img { max-width: 100%; max-height: 110px; border-radius: var(--radius-xs); object-fit: cover; }
.onboard-file-name { font-size: 11px; color: var(--text-tertiary); word-break: break-all; text-align: center; }
.onboard-file-empty { font-size: 12px; color: var(--text-tertiary); text-align: center; padding: 16px; }

/* ==================== 身份证上传区（正反双面） ==================== */
.idcard-dual-row {
  display: flex;
  gap: 16px;
}
.idcard-half {
  flex: 1;
  min-width: 0;
}
.idcard-half-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.idcard-ocr-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--glass-bg-weak);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.idcard-ocr-status .ocr-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--glass-border-strong);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.ocr-loading {
  color: var(--color-primary);
  font-size: 13px;
}

/* 身份证关联卡片 — 入职文件区展示 */
.idcard-grid-card {
  border: 1px dashed var(--glass-border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.idcard-grid-card:hover {
  border-color: var(--color-primary);
}
.idcard-grid-placeholder {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.idcard-grid-preview {
  width: 100%;
}

/* ==================== 骑士搜索选择器 ==================== */
.emp-search-wrapper { position: relative; }
.emp-search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--glass-bg-weak);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
  color: var(--text-primary);
}
.emp-search-input:focus {
  border-color: var(--color-primary);
  background: var(--surface-primary);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
}
.emp-search-results {
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--shadow-lg);
}
.emp-search-results:empty { display: none; }
.emp-search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.12s ease;
}
.emp-search-item:last-child { border-bottom: none; }
.emp-search-item:hover { background: var(--color-primary-bg); }
.emp-search-item.selected { background: var(--color-primary-bg); border-left: 3px solid var(--color-primary); }
.emp-search-item-main { display: flex; align-items: center; gap: 8px; }
.emp-search-item-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.emp-search-item-no { font-size: 12px; color: var(--text-tertiary); }
.emp-search-item-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.emp-search-empty { padding: 20px; text-align: center; color: var(--text-tertiary); font-size: 13px; }
.emp-search-more { padding: 10px 14px; text-align: center; font-size: 12px; color: var(--text-tertiary); background: var(--surface-secondary); }

.emp-selected-info { margin-top: 10px; }
.emp-selected-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-success-bg);
  border: 1.5px solid rgba(48, 209, 88, 0.3);
  border-radius: var(--radius-sm);
}
.emp-selected-avatar {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emp-selected-detail { flex: 1; min-width: 0; }
.emp-selected-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.emp-selected-no { font-weight: 400; font-size: 12px; color: var(--text-tertiary); margin-left: 6px; }
.emp-selected-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.emp-selected-clear {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 15px;
  background: transparent;
  transition: all 0.15s ease;
}
.emp-selected-clear:hover { background: var(--color-danger-bg); color: var(--color-danger); }

/* ==================== 类别分布条 ==================== */
.category-bar-wrap {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 22px;
  box-shadow: var(--glass-shadow);
}
.category-bar-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; }
.category-bar {
  display: flex;
  height: 40px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--surface-tertiary);
}
.category-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  cursor: default;
  min-width: 2%;
}
.category-bar-segment:hover { opacity: 0.8; }
.category-bar-label { font-size: 11px; color: #fff; font-weight: 600; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }

/* 类别管理列表 */
.category-list { display: flex; flex-direction: column; gap: 8px; }
.category-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}
.category-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.category-list-label { font-weight: 600; color: var(--text-primary); flex: 1; font-size: 13.5px; }
.category-list-count { font-size: 12px; color: var(--text-secondary); }

/* 自定义字段 */
.custom-field-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.btn-icon-danger {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-danger-bg);
  color: var(--color-danger);
  transition: all 0.15s ease;
}
.btn-icon-danger:hover { background: var(--color-danger); color: #fff; }

.custom-field-tag {
  display: inline-block;
  padding: 3px 10px;
  margin: 2px 3px;
  background: var(--surface-secondary);
  border-radius: var(--radius-xs);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 骑士编辑Tab页 */
.emp-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--glass-border-strong);
  margin-bottom: 22px;
}
.emp-tab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.emp-tab:hover { color: var(--color-primary); background: var(--surface-secondary); }
.emp-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.emp-tab .tab-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  background: var(--surface-tertiary);
  color: var(--text-secondary);
}
.emp-tab.active .tab-badge { background: var(--color-primary-bg); color: var(--color-primary); }
.emp-tab-content { display: none; }
.emp-tab-content.active { display: block; }

.emp-resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.2s ease;
  background: var(--glass-bg);
}
.emp-resource-item:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-md); }
.emp-resource-info { flex: 1; }
.emp-resource-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.emp-resource-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.emp-resource-actions { display: flex; gap: 6px; flex-shrink: 0; }

.emp-assign-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  margin-top: 10px;
  background: var(--glass-bg);
}
.emp-assign-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.12s ease;
}
.emp-assign-list-item:last-child { border-bottom: none; }
.emp-assign-list-item:hover { background: var(--color-primary-bg); }
.emp-assign-list-item.selected { background: var(--color-primary-bg); }
.emp-assign-search {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  outline: none;
  background: var(--glass-bg-weak);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.emp-assign-search:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-glow); }

/* 房型多选 */
.room-type-checkboxes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.room-type-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 18px;
  border: 2px solid var(--glass-border-strong);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
  background: var(--glass-bg);
  color: var(--text-primary);
}
.room-type-chip:hover { border-color: var(--color-primary); background: var(--color-primary-bg); }
.room-type-chip input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-primary); }
.room-type-chip:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 600;
}
.room-type-chip .room-type-beds { font-size: 12px; color: var(--text-tertiary); font-weight: 400; }
.room-type-chip:has(input:checked) .room-type-beds { color: var(--color-primary); }
.room-type-qty {
  width: 52px;
  padding: 4px 6px;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-xs);
  font-size: 13px;
  text-align: center;
  display: none;
  outline: none;
  font-weight: 600;
  color: var(--color-primary);
  -moz-appearance: textfield;
  background: var(--surface-primary);
}
.room-type-qty::-webkit-inner-spin-button,
.room-type-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.room-type-qty-label { display: none; font-size: 12px; color: var(--color-primary); font-weight: 500; }
.room-type-chip:has(input:checked) .room-type-qty { display: inline-block; }
.room-type-chip:has(input:checked) .room-type-qty-label { display: inline-block; }

/* 动画辅助 */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 入职配置标签页 */
.config-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--glass-border-strong);
  margin-bottom: 16px;
}
.config-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.config-tab:hover { color: var(--color-primary); background: var(--surface-secondary); }
.config-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }

.info-card { animation: slideDown 0.3s ease; }

/* ==================== 人员标签（城市 / 性别） ==================== */
.ptag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  vertical-align: middle;
  white-space: nowrap;
}
.ptag-city { background: #eef2ff; color: #4f46e5; }
.ptag-gender-m { background: #dbeafe; color: #1d4ed8; }
.ptag-gender-f { background: #fce7f3; color: #be185d; }
.ptag-xs { font-size: 10px; padding: 0 4px; margin-left: 2px; }
.bed-occupant .ptag { margin-left: 2px; }

/* ===== 考勤 Excel 拖拽导入区 ===== */
.att-dropzone {
  border: 2px dashed var(--text-tertiary);
  border-radius: var(--radius-lg, 12px);
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.att-dropzone:hover,
.att-dropzone-active {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--text-primary);
}
.att-dropzone-title {
  font-weight: 600;
  font-size: 15px;
  margin-top: 8px;
  color: var(--text-primary);
}
.att-dropzone-sub {
  font-size: 13px;
  margin-top: 4px;
}
.att-filelist { margin-top: 10px; }
.att-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--glass-border-strong, rgba(0, 0, 0, 0.08));
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  background: var(--surface-secondary);
  color: var(--text-primary);
}
.att-file-item button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}

/* ===== 考勤管理：页面内双拖拽上传框 ===== */
.att-dropzone-grid {
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
}
.att-dropzone-grid .att-dropzone {
  flex: 1;
  padding: 22px 14px;
}
.att-dropzone-filled {
  border-style: solid;
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}
.att-dropzone-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== 组织架构 —— 左侧树 + 右侧人员 ==================== */
.org-split-layout {
  display: flex;
  gap: 18px;
  height: calc(100vh - var(--topbar-height) - var(--content-padding) * 2);
  min-height: 520px;
}
.org-tree-sidebar {
  width: 280px;
  min-width: 240px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  resize: horizontal;
}
.org-tree-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.org-tree-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.org-tree-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border-strong);
}
.org-tree-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.org-tree-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-glow); }
.org-tree-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.org-tree-node { user-select: none; }
.org-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13.5px;
  transition: all 0.15s ease;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-right: 8px;
}
.org-tree-row:hover { background: var(--surface-secondary); color: var(--text-primary); }
.org-tree-row.active { background: var(--color-primary-bg); color: var(--color-primary-dark); font-weight: 600; }
.org-tree-row .tree-toggle {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); transition: transform 0.2s ease; flex-shrink: 0;
}
.org-tree-row .tree-toggle.expanded { transform: rotate(90deg); }
.org-tree-row .org-tree-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; opacity: 0.85;
}
.org-tree-row .org-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-tree-row .org-tree-count {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--surface-tertiary); color: var(--text-secondary); font-weight: 500; flex-shrink: 0;
}
.org-tree-row.active .org-tree-count { background: var(--color-primary); color: #fff; }
.org-tree-children { overflow: hidden; transition: max-height 0.25s ease; }
.org-tree-children.collapsed { max-height: 0; }
.org-main-panel {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
.org-panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--glass-border-strong);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
}
.org-panel-title { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.org-panel-sub { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.org-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--glass-border-strong);
  padding: 0 22px; flex-shrink: 0;
}
.org-tab {
  padding: 12px 22px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; gap: 6px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.org-tab:hover { color: var(--color-primary); background: var(--surface-secondary); }
.org-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.org-tab .tab-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--surface-tertiary); color: var(--text-secondary); font-weight: 600;
}
.org-tab.active .tab-badge { background: var(--color-primary-bg); color: var(--color-primary); }
.org-list-toolbar {
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
}
.org-list-toolbar .toolbar-left,
.org-list-toolbar .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-list-toolbar input,
.org-list-toolbar select {
  padding: 7px 12px;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.org-list-toolbar input:focus,
.org-list-toolbar select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-glow); }
.org-list-body { flex: 1; overflow-y: auto; padding: 0 22px 22px; }
.org-list-body .table-wrap { box-shadow: none; border: none; background: transparent; backdrop-filter: none; }
.org-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-tertiary); gap: 10px; padding: 40px; text-align: center;
}
.org-empty svg { width: 64px; height: 64px; opacity: 0.35; }
@media (max-width: 768px) {
  .org-split-layout { flex-direction: column; height: auto; }
  .org-tree-sidebar { width: 100%; max-width: none; resize: none; height: 320px; }
  .org-main-panel { min-height: 400px; }
}
