/* ==========================================================================
   金老师的工作平台 - 折叠侧边栏导航样式 (Accordion Sidebar)
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --sidebar-width: 250px;
  --sidebar-bg: #ffffff;
  --sidebar-text: #475569;
  --sidebar-active: #0284c7;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 整体 App 布局 */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* 左侧固定导航侧边栏 Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  color: #475569;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 90;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.03);
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.35rem 1.15rem 1.15rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.3px;
}

/* 侧边栏导航与折叠手风琴 Menu */
.sidebar-menu {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease-in-out;
}

.nav-item-btn:hover {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.nav-item-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.nav-item-btn .nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.arrow-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.accordion-header-btn.open .arrow-icon {
  transform: rotate(90deg);
}

/* 折叠出来的子菜单列表 */
.accordion-submenu {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.75rem;
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
}

.accordion-submenu.open {
  display: flex;
}

.submenu-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  background: transparent;
  border: none;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}

.submenu-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.submenu-item-btn.active {
  color: #818cf8;
  font-weight: 700;
  background: rgba(79, 70, 229, 0.15);
}

.tree-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

/* 专业一级目录折叠项 (Two-tier Major Folder) */
.major-folder {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}

.major-header-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}

.major-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.major-header-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.major-left-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.major-arrow {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
  display: inline-block;
}

.major-folder.open .major-arrow {
  transform: rotate(90deg);
}

.major-classes-list {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.85rem;
  margin-top: 0.2rem;
  border-left: 1px dashed rgba(255, 255, 255, 0.15);
  margin-left: 0.65rem;
}

.major-folder.open .major-classes-list {
  display: flex;
}

.sidebar-footer {
  padding: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

/* 右侧主工作区 Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem 1.75rem 3rem 1.75rem;
  overflow-y: auto;
  min-width: 0;
}


.page-header {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  transition: all 0.25s ease-in-out;
}


.page-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* 快速筛选与排查控制栏 Quick Filter Bar */
.filter-tab-bar {
  background: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill-btn {
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-pill-btn:hover {
  background: #e2e8f0;
}

.filter-pill-btn.active {
  background: var(--sidebar-bg);
  color: white;
  border-color: var(--sidebar-bg);
}

.filter-pill-btn.danger.active {
  background: #ef4444;
  border-color: #ef4444;
}

.filter-pill-btn.warning.active {
  background: #f59e0b;
  border-color: #f59e0b;
}

/* 现代高级胶囊搜索框与排序选择器 */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  padding: 0.35rem 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  min-width: 250px;
}

.search-box:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.search-box:focus-within {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.search-box .search-icon {
  font-size: 0.95rem;
  color: #64748b;
  margin-right: 0.45rem;
  display: flex;
  align-items: center;
  pointer-events: none;
  user-select: none;
}

.search-box input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 0.875rem;
  color: #1e293b;
  width: 100%;
  font-family: inherit;
  padding: 0.2rem 0;
}

.search-box input::placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
}

.sort-select-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 0.25rem 0.85rem;
  border-radius: 24px;
  border: 1.5px solid #cbd5e1;
  transition: all 0.2s;
}

.sort-select-box:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.sort-select-box select,
.filter-select {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  padding: 0.25rem 0.2rem;
  font-family: inherit;
}

.action-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  background: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.search-filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-filter-group .filter-select {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 24px !important;
  padding: 0.35rem 0.85rem !important;
}

/* 400+ 高密数据表格 Dense Data Table */
.dense-table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar-header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.dense-table-wrapper {
  overflow-x: auto;
  max-height: 680px;
  overflow-y: auto;
}

.dense-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

/* 防挤压统一规则：单元格内容不折行（宽屏列宽充裕；窄屏由 wrapper 横向滚动兜底） */
.dense-table td,
.dense-table th {
  white-space: nowrap;
  vertical-align: middle;
}

.dense-table td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.dense-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.dense-table td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  vertical-align: middle;
}

.student-row-checkbox, #selectAllStudentsCheckbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #0284c7;
  border-radius: 4px;
  vertical-align: middle;
}

.dense-table tbody tr {
  transition: var(--transition);
}

.dense-table tbody tr:hover {
  background: #f8fafc;
}

.dense-table tbody tr.row-overdue {
  background: #fff5f5;
}

.dense-table tbody tr.row-overdue:hover {
  background: #ffe4e6;
}

.talk-time-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.time-never { background: #f1f5f9; color: #64748b; }
.time-overdue { background: #ffe4e6; color: #dc2626; border: 1px solid #fca5a5; }
.time-warning { background: #fef3c7; color: #b45309; }
.time-recent { background: #d1fae5; color: #047857; }

/* 统计数据看板 Cards & Charts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-info .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-info .stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-indigo { background: #e0e7ff; color: #4338ca; }
.icon-rose { background: #ffe4e6; color: #e11d48; }
.icon-emerald { background: #d1fae5; color: #059669; }

.dashboard-analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.analysis-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.analysis-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.75rem;
}

.analysis-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-blue { background: #0284c7; }
.fill-purple { background: #9333ea; }
.fill-amber { background: #d97706; }
.fill-emerald { background: #059669; }
.fill-rose { background: #e11d48; }

.attention-student-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.875rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
}

.attention-student-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 看板模式通用样式 */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.kanban-column {
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.kanban-column-title {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.badge-count {
  background: white;
  color: var(--primary);
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.kanban-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.kanban-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.kanban-student-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.kanban-card-topic {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.kanban-card-content {
  font-size: 0.85rem;
  color: #475569;
  background: #f8fafc;
  padding: 0.625rem;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.kanban-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.6rem;
  margin-top: 0.2rem;
}

.status-select-picker {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
}

/* 按钮通用 */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-card-action {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-action:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* 风险等级 Badge */
.risk-level-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.risk-常规谈话 { background: #e0f2fe; color: #0369a1; }
.risk-心理关怀 { background: #fae8ff; color: #86198f; }
.risk-学业预警 { background: #fef3c7; color: #b45309; }
.risk-生活困难 { background: #d1fae5; color: #047857; }
.risk-违纪提醒 { background: #ffe4e6; color: #be123c; }

.position-badge {
  font-size: 0.75rem;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  background: #e0e7ff;
  color: #4338ca;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* 模态框基础层（z-index 高于全屏抽屉 9999，确保在抽屉内点击弹窗置顶显示） */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container, .modal-content {
  background: #ffffff;
  color: #1e293b;
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
  z-index: 10051;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.close-btn, .modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.close-btn:hover, .modal-close-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   FUI 学籍档案系统 (Exact Match to Reference UI Design)
   ========================================================================== */

/* 全屏暗黑沉浸背景 */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* FUI 全屏主窗口容器 */
.drawer-content {
  position: relative;
  width: 95vw;
  max-width: 1380px;
  height: 88vh;
  max-height: 860px;
  min-height: 580px;
  background: #060d19;
  background-image: 
    radial-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 229, 255, 0.15), inset 0 0 60px rgba(0, 229, 255, 0.03);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.97) translateY(15px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
  padding: 1.15rem 1.5rem;
  box-sizing: border-box;
}

.drawer-overlay.active .drawer-content {
  transform: scale(1) translateY(0);
}

/* 顶部 Header */
.fui-ref-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  margin-bottom: 0.85rem;
}

.fui-ref-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.fui-ref-dot {
  width: 8px;
  height: 8px;
  background: #00e5ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #00e5ff;
  display: inline-block;
}

.fui-ref-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
  font-family: monospace;
}

/* 主视口布局：左侧战术表盘与身份栏 (50%) + 右侧 4 大战术 Bento 矩阵 (50%) */
.fui-ref-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

/* 左侧：全息表盘与核心身份 (占 50%) */
.fui-ref-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  background: rgba(6, 17, 34, 0.72);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.05);
}

/* 标准矩形证件照展示框 (无圆圈，原版比例大图展示) */
.fui-ref-photo-container {
  position: relative;
  width: 210px;
  height: 280px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 四个战术角标 Reticle Corner */
.fui-ref-corner-tl { position: absolute; top: -6px; left: -6px; width: 16px; height: 16px; border-top: 3px solid #00e5ff; border-left: 3px solid #00e5ff; }
.fui-ref-corner-tr { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-top: 3px solid #00e5ff; border-right: 3px solid #00e5ff; }
.fui-ref-corner-bl { position: absolute; bottom: -6px; left: -6px; width: 16px; height: 16px; border-bottom: 3px solid #00e5ff; border-left: 3px solid #00e5ff; }
.fui-ref-corner-br { position: absolute; bottom: -6px; right: -6px; width: 16px; height: 16px; border-bottom: 3px solid #00e5ff; border-right: 3px solid #00e5ff; }

/* 矩形照片卡片 (标准 1寸/2寸 黄金比例) */
.fui-ref-photo-card {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #0b1d33;
  border: 2px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 229, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fui-ref-photo-card:hover {
  border-color: #00e5ff;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
}

.fui-ref-center-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.fui-ref-icon-box {
  width: 22px;
  height: 22px;
  border: 1.5px solid #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.fui-ref-icon-inner {
  width: 8px;
  height: 8px;
  background: #00e5ff;
}

.fui-ref-aperture-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 1px;
}

.fui-ref-aperture-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* 左侧学生姓名 */
.fui-ref-student-name {
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
  margin-bottom: 0.25rem;
}

.fui-ref-class-title {
  font-size: 0.95rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.fui-ref-meta-line {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  background: rgba(0, 229, 255, 0.05);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 229, 255, 0.12);
  width: 90%;
  box-sizing: border-box;
}

/* 右侧 4 大子 Tab 全息容器 */
.fui-ref-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.fui-subtab-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  background: rgba(6, 17, 34, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
  overflow-x: auto;
}

.fui-subtab-btn {
  flex: 1 0 auto;
  padding: 0.42rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.fui-subtab-btn:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.25);
}

.fui-subtab-btn.active {
  color: #061122;
  background: #00e5ff;
  border-color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.fui-subtab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.fui-subtab-content::-webkit-scrollbar {
  width: 5px;
}

.fui-subtab-content::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 4px;
}

.fui-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: fuiFadeIn 0.2s ease-out;
}

.fui-tab-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

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

/* 统一战术卡片样式（高度随内容自适应，告别截断） */
.fui-ref-card {
  position: relative;
  background: rgba(6, 17, 34, 0.78);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fui-ref-card::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid #00e5ff;
  border-right: 2px solid #00e5ff;
}

.fui-ref-card-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.18);
}

/* 卡片内部紧凑键值行列表（彻底杜绝折行与挤压） */
.fui-ref-row-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
  justify-content: space-around;
}

.fui-ref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.12rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.fui-ref-row:last-child {
  border-bottom: none;
}

.fui-row-label {
  color: #64748b;
  font-size: 0.72rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.fui-row-val {
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72%;
}

.fui-val-cyan {
  color: #00e5ff !important;
  font-weight: 700;
}

.fui-val-amber {
  color: #f59e0b !important;
  font-weight: 700;
}

.fui-val-green {
  color: #86efac !important;
  font-weight: 600;
}

.fui-row-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.15rem 0;
}

.fui-row-block .fui-row-val {
  text-align: left;
  white-space: normal;
  max-width: 100%;
  line-height: 1.35;
  color: #cbd5e1;
}

/* 底部状态条 */
.fui-ref-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 229, 255, 0.15);
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
}

.fui-ref-footer-actions {
  display: flex;
  gap: 0.5rem;
}

.fui-ref-footer-btn {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.fui-ref-footer-btn:hover {
  background: rgba(0, 229, 255, 0.28);
  color: white;
}

.drawer-section {
  margin-bottom: 1.5rem;
}

.drawer-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.4rem;
  color: var(--primary);
}

/* 标准《谈心谈话登记表》打印预览样式 */
.print-paper {
  background: white;
  padding: 2rem;
  color: black;
  font-family: "SimSun", "Songti SC", serif;
  line-height: 1.6;
}

.print-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1.25rem;
  letter-spacing: 2px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.print-table th, .print-table td {
  border: 1px solid black;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.print-table th {
  background: #f1f5f9;
  font-weight: bold;
  text-align: center;
  width: 110px;
}

.print-sign-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * { visibility: hidden; }
  #printModalOverlay, #printModalOverlay * { visibility: visible; }
  #printModalOverlay { position: absolute; left: 0; top: 0; width: 100%; height: auto; background: white; }
  .modal-header, .modal-footer { display: none !important; }
}

/* 全局云端与操作状态 Toast (置顶悬浮，最高层级) */
.sync-toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(2, 132, 199, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.4);
  z-index: 20000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.sync-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 全屏加载遮罩 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-main);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Excel 拖拽上传区 */
.excel-drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.excel-drop-zone:hover, .excel-drop-zone.dragover {
  border-color: var(--primary);
  background: #eef2ff;
}

/* 政治面貌与党员发展阶段徽章 */
.badge-party-league {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-party-applicant {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-party-activist {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-party-target {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-party-probationary {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.badge-party-official {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

/* ==========================================================================
   班级课表与实时查课看板样式 (Timetable & Live Inspection)
   ========================================================================== */
.apple-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.live-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.live-class-card {
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  transition: var(--transition);
}

.live-class-card.is-active {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.live-class-card.is-idle {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.live-class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-class-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.live-badge-active {
  background: #22c55e;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.live-badge-idle {
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

.live-course-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #166534;
  margin: 0.2rem 0;
}

.live-info-row {
  display: flex;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
}

.live-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

/* 7x6 课程表网格样式 */
.counselor-timetable-container {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.825rem;
}

.timetable-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 0.65rem 0.5rem;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.timetable-period-th {
  width: 120px;
  background: #f1f5f9 !important;
  text-align: center !important;
  vertical-align: middle;
  padding: 0.5rem;
}

.timetable-table td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem;
  vertical-align: top;
  min-height: 90px;
  height: 90px;
  background: #ffffff;
}

.timetable-table td:hover {
  background: #fdfdfd;
}

/* 课程卡片 */
.course-chip-counselor {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 3.5px solid #2563eb;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.course-chip-counselor:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(37, 99, 235, 0.12);
}

.chip-course-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #1e40af;
  line-height: 1.25;
}

.chip-class-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0284c7;
  margin-top: 0.15rem;
}

.chip-location {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 寝室床位安排 (走廊双侧平面图) ==================== */

.dorm-stat-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-family: monospace;
}

.dorm-stat-badge.stat-blue {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.dorm-stat-badge.stat-green {
  background: rgba(16, 185, 129, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.dorm-stat-badge.stat-rose {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

/* 平面图主视口 (珍珠白底 + 典雅灰蓝微边) */
.dorm-floor-viewport {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow-x: auto;
  min-height: 520px;
}

.dorm-viewport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #e2e8f0;
}

.dorm-viewport-header #dormCurrentFloorTitle {
  color: #0284c7 !important;
  font-size: 1.05rem;
  font-weight: 800;
}

/* 房间水平行 */
.dorm-rooms-row {
  display: flex;
  gap: 1.15rem;
  padding: 0.5rem 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dorm-rooms-row::-webkit-scrollbar {
  height: 6px;
}

.dorm-rooms-row::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* 单个寝室房间卡片 (纯白微卡片 + 柔和投影) */
.dorm-room-card {
  flex: 0 0 255px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dorm-room-card:hover {
  background: #ffffff;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.12);
}

.dorm-room-card.highlight-searched {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4) !important;
  animation: pulseHighlight 1.5s infinite;
}

@keyframes pulseHighlight {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* 房间头部 */
.dorm-room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.dorm-room-number {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.5px;
}

.dorm-room-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dorm-room-occ {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
}

.dorm-room-score {
  font-size: 0.72rem;
  color: #15803d;
  background: #f0fdf4;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}

/* 4 人间床位 2×2 网格 */
.dorm-bed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

/* 单个床位卡片 (纯白小卡) */
.dorm-bed-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.15s ease;
  position: relative;
}

.dorm-bed-card:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.dorm-bed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: #64748b;
}

.dorm-bed-num {
  color: #0284c7;
  font-weight: 800;
  font-family: monospace;
}

.dorm-bed-leader-star {
  color: #f59e0b;
  font-size: 0.75rem;
}

.dorm-bed-body {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dorm-bed-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

.dorm-bed-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dorm-bed-class {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 空床位样式 */
.dorm-bed-card.empty-bed {
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
}

.dorm-bed-card.empty-bed:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

/* 中心走廊跑道 (清爽温润浅蓝天青风) */
.dorm-corridor-lane {
  margin: 1.25rem 0;
  position: relative;
}

.dorm-corridor-track {
  background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
  border-top: 2px solid #38bdf8;
  border-bottom: 2px solid #38bdf8;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.08);
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.dorm-corridor-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  font-size: 0.78rem;
  color: #475569;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.dorm-corridor-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0369a1;
  letter-spacing: 1.5px;
}

/* 抽屉样式扩展 */
.dorm-drawer-content {
  background: #0b1728;
  border-left: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  color: #e2e8f0;
  max-width: 480px;
}

/* ==================== 辅导员专属登录认证门禁（轻奢天青蓝·高校学术雅致主题） ==================== */

/* 后台内容默认不可见，只有云端真实登录态验证成功后才显示，避免页面闪现或伪造前端标记绕过。 */
body.auth-locked .app-container {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.login-gatekeeper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
  background-image: 
    radial-gradient(at 20% 20%, rgba(2, 132, 199, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 80%, rgba(37, 99, 235, 0.08) 0px, transparent 50%);
  backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.login-gatekeeper-overlay.logged-in {
  opacity: 0;
  pointer-events: none;
}

.login-gatekeeper-card {
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-radius: 18px;
  padding: 2.5rem 2.6rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.login-gatekeeper-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #2563eb, #38bdf8);
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
  flex-shrink: 0;
}

.login-brand-title {
  font-size: 1.28rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.2;
}

.login-brand-sub {
  font-size: 0.73rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
  font-weight: 500;
}

.login-input {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.92rem;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.login-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-footer-security {
  margin-top: 1.5rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* 侧边栏用户卡片 */
.sidebar-user-card {
  margin: 0.75rem 0.6rem 0.5rem 0.6rem;
  padding: 0.65rem 0.75rem;
  background: rgba(6, 17, 34, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #07c160, #0284c7);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.logout-btn {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* ==================== 档案药丸按钮 ==================== */
.btn-dossier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 12px;
  height: 30px;
  min-width: 68px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-dossier-pill:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
}

/* ==================== 学生表格智能分页控制栏 ==================== */
.table-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
}

.pagination-info {
  font-weight: 500;
}

.pagination-divider {
  color: #cbd5e1;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-nav-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-nav-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.page-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-number-buttons {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.page-num-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.page-num-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
}

.page-num-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.page-ellipsis {
  padding: 0 0.3rem;
  color: #94a3b8;
  font-weight: bold;
}

.page-jump-box {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
  font-size: 0.82rem;
  color: #64748b;
}

.page-jump-box input {
  width: 48px;
  padding: 0.25rem 0.3rem;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.page-jump-box input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.page-jump-btn {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.page-jump-btn:hover {
  opacity: 0.9;
}

/* ==================== 高级自定义多维筛选面板 ==================== */
.advanced-filter-panel {
  margin-top: 0.85rem;
  padding: 1.1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  animation: advSlideDown 0.25s ease-out;
}

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

.adv-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem 1rem;
}

.adv-filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adv-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.adv-filter-item select {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  color: #1e293b;
  outline: none;
  transition: all 0.15s ease;
}

.adv-filter-item select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.adv-filter-footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==================== 学生干部多重任职与履历徽章体系 ==================== */
.cadre-roles-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.badge-cadre {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

/* 1. 宿舍寝室及安全防线 */
.badge-cadre-dorm {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-cadre-safety {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* 2. 班级班委会 */
.badge-cadre-class {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* 3. 院系组织 */
.badge-cadre-dept {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

/* 4. 校级组织 */
.badge-cadre-univ {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-cadre-ordinary {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* 模态框任职预设药丸 */
.btn-preset-role {
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset-role:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.btn-preset-role.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* 模态框已选药丸 */
.selected-cadre-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.55rem;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.selected-cadre-tag .tag-remove-btn {
  border: none;
  background: transparent;
  color: #0284c7;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0;
  margin-left: 2px;
  line-height: 1;
}

.selected-cadre-tag .tag-remove-btn:hover {
  color: #ef4444;
}

/* 档案详情四年履历时间线 */
.cadre-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
}

.cadre-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(0, 229, 255, 0.25);
}

.cadre-timeline-item {
  position: relative;
  padding: 0.6rem 0.8rem;
  background: rgba(6, 17, 34, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
}

.cadre-timeline-dot {
  position: absolute;
  left: -1.25rem;
  top: 0.85rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e5ff;
  border: 2px solid #061122;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
}

.cadre-timeline-dot.past {
  background: #64748b;
  box-shadow: none;
}


/* 顶栏单行紧凑按钮组样式 (金老师极简高端风) */
.header-action-btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.header-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ==================== 6 人寝标准微拟物空间排布体系 (学校官方平面图标准) ==================== */
.dorm-room-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dorm-room-card:hover {
  transform: translateY(-2px);
  border-color: #0284c7;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}

.dorm-6p-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem;
}

.dorm-window-bar {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 4px;
  padding: 2px 0;
  border: 1px dashed #bae6fd;
}

.dorm-door-bar {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 2px 0;
  border: 1px dashed #cbd5e1;
}

.dorm-window-row, .dorm-door-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.dorm-bunk-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dorm-aisle-area {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem;
  text-align: center;
}

/* =========================================================================
   🖥️ 全屏智慧会议动态投屏大荧幕 (Dark Luxury Projection Screen - v2.9.0)
   ========================================================================= */
.conference-projection-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #050b18;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.conference-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.proj-danmaku-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  display: none;
}

.proj-toast-container {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proj-screen-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 1.5rem 2.5rem;
  box-sizing: border-box;
}

.proj-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.proj-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.proj-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7e22ce, #00d4ff);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.proj-logo-text {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.proj-logo-text span {
  background: linear-gradient(90deg, #f3e8ff, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.proj-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(126, 34, 206, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.4);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.proj-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 1.5s infinite;
}

.proj-topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.proj-clock-box {
  text-align: right;
}

.proj-time {
  font-size: 1.2rem;
  font-weight: 900;
  color: #00d4ff;
  font-family: monospace;
  letter-spacing: 1px;
}

.proj-date {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}

.proj-btn {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.proj-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.proj-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.proj-btn-danger {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.proj-btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.proj-main-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.75rem;
  flex: 1;
  min-height: 0;
}

.proj-left-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.proj-anticheat-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.proj-pulse-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
}

.proj-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.proj-qr-frame {
  position: relative;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.35);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.proj-qr-frame:hover {
  transform: scale(1.03);
  box-shadow: 0 0 42px rgba(0, 212, 255, 0.6);
}

.proj-qr-frame.qr-zoomed {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 0;
  border-radius: 0;
  background: rgba(2, 6, 23, 0.96);
  cursor: zoom-out;
  transform: none;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
}

.proj-qr-frame.qr-zoomed .proj-qr-container {
  width: min(78vw, 78vh);
  height: min(78vw, 78vh);
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 0 70px rgba(0, 212, 255, 0.65);
}

.proj-qr-frame.qr-zoomed .proj-qr-container img,
.proj-qr-frame.qr-zoomed .proj-qr-container canvas {
  width: 100% !important;
  height: 100% !important;
  filter: none !important;
  opacity: 1 !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.proj-qr-container {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-wechat-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.proj-qr-zoom-btn {
  appearance: none;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(0, 212, 255, 0.6);
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.14);
  color: #67e8f9;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.16);
  transition: all 0.2s ease;
}

.proj-qr-zoom-btn:hover {
  color: #ffffff;
  background: rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}

.proj-countdown-box {
  width: 100%;
}

.proj-countdown-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.proj-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.proj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7e22ce, #00d4ff);
  border-radius: 999px;
  transition: width 0.9s linear;
}

.proj-hud-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

.proj-hud-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
}

.proj-hud-val {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: monospace;
}

.proj-hud-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.neon-green { color: #4ade80; text-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
.neon-cyan { color: #00d4ff; text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
.neon-purple { color: #c084fc; text-shadow: 0 0 10px rgba(192, 132, 252, 0.5); }

.proj-right-panel {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-height: 0;
}

.proj-leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.85rem;
}

.proj-leaderboard-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.proj-leaderboard-meta {
  font-size: 0.78rem;
  color: #00d4ff;
  font-weight: 700;
}

.proj-leaderboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
}
