/* ===== 华普星图 - 全局样式 ===== */
:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #1e293b;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
  --star-gold: #f59e0b;
  --star-blue: #3b82f6;
  --star-green: #10b981;
  --star-purple: #8b5cf6;
  --star-red: #ef4444;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ===== 导航栏 ===== */
#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.brand-icon { font-size: 24px; }

.nav-links { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  background: var(--primary);
  color: white;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.points-badge {
  background: linear-gradient(135deg, var(--warning), var(--star-gold));
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-card);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2, .card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-body { padding: 20px; }

/* ===== 徽章/标签 ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0e7ff; color: #3730a3; }

/* ===== 登录/注册页面 ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.auth-card .brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card .brand-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.auth-card .brand-title { font-size: 24px; font-weight: 700; color: var(--primary); }
.auth-card .brand-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===== 会议大厅 ===== */
.meetings-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 24px; font-weight: 700; }

.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.meeting-card {
  cursor: pointer;
  transition: var(--transition);
}

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

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

.meeting-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.meeting-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.meeting-id {
  font-family: monospace;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

/* ===== 星图会议室 ===== */
.meeting-room {
  display: flex;
  height: calc(100vh - 56px);
}

.meeting-sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.meeting-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meeting-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.meeting-canvas {
  flex: 1;
  position: relative;
  overflow: auto;
  background:
    radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== 视频会议室（类腾讯会议布局）===== */
.video-meeting-room {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
  background: #0f1117;
  color: #e2e8f0;
}

/* 顶部栏 */
.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #181b22;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: 52px;
  flex-shrink: 0;
}
.meeting-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meeting-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}
.meeting-header-center {
  display: flex;
  align-items: center;
}
.meeting-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.meeting-timer {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,0.06);
  padding: 4px 12px;
  border-radius: 4px;
}

/* 阶段迷你条 */
.stage-mini-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stage-mini-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
}
.stage-mini-step.active {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(79,70,229,0.5);
}
.stage-mini-step.completed {
  background: var(--success);
}
.stage-mini-line {
  width: 16px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
}

/* 主内容区 */
.meeting-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 视频网格 */
.meeting-video-area {
  flex: 1;
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  background: #0f1117;
}
.meeting-video-area:empty { display: none; }

/* 视频块 */
.video-tile {
  position: relative;
  background: #171a22;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.video-tile:hover {
  border-color: rgba(74,144,226,0.6);
  box-shadow: 0 0 0 1px rgba(74,144,226,0.18);
}
.video-tile.pinned {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  aspect-ratio: auto;
  z-index: 5;
}
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-tile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.video-tile-name {
  font-size: 13px;
  font-weight: 500;
  color: white;
}
.video-tile-status {
  display: flex;
  gap: 4px;
}
.media-icon {
  font-size: 12px;
  opacity: 0.9;
}

/* 本地视频 tile */
.video-tile-local {
  order: -1;
}

/* 远程用户状态 */
.video-tile.peer-muted .video-tile-overlay::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(239,68,68,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-tile.peer-no-video {
  background: #1e293b;
}
.video-tile.peer-no-video video { display: none; }
.video-tile.peer-no-video::after {
  content: attr(data-name);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
}

/* 右侧面板 */
.meeting-right-panel {
  width: 0;
  background: #181b22;
  border-left: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease;
  flex-shrink: 0;
}
.meeting-right-panel.open {
  width: 320px;
}

/* 右侧面板 tab */
.right-panel-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.panel-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  transition: color 0.2s;
  position: relative;
}
.panel-tab:hover { color: #e2e8f0; }
.panel-tab.active {
  color: white;
}
.panel-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.panel-tab-label {
  font-size: 12px;
}
.chat-badge {
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

/* 右侧面板内容 */
.right-panel-content {
  flex: 1;
  overflow-y: auto;
}

/* 聊天面板 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
}
.chat-msg.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.chat-msg-body {
  display: flex;
  flex-direction: column;
}
.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.chat-msg-name {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}
.chat-msg-time {
  font-size: 11px;
  color: #64748b;
}
.chat-msg-text {
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  color: #e2e8f0;
  word-break: break-word;
}
.chat-msg.self .chat-msg-text {
  background: var(--primary);
  color: white;
}
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus {
  border-color: var(--primary);
}
.chat-input::placeholder {
  color: #64748b;
}
.chat-send-btn {
  padding: 8px 16px;
  background: var(--primary);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-send-btn:hover { background: var(--primary-dark); }

/* ===== 管理员工作台 ===== */
.admin-workspace {
  padding: 24px;
}
.admin-subtitle {
  margin-top: 4px;
  color: var(--text-light);
  font-size: 13px;
}
.admin-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-tab {
  border: none;
  background: transparent;
  color: var(--text-light);
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.admin-tab.active {
  background: var(--primary);
  color: white;
}
.admin-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.admin-summary > div {
  min-width: 120px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-summary strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}
.admin-summary span {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
  font-size: 12px;
}
.admin-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-table-wrap.compact {
  max-width: 760px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  padding: 12px;
  text-align: left;
  background: var(--bg);
  color: var(--text-light);
  font-weight: 600;
  white-space: nowrap;
}
.admin-table td {
  padding: 12px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table .strong {
  font-weight: 600;
}

/* 参会人员面板 */
.participants-list-panel {
  padding: 12px;
}
.participants-header {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}
.participant-item-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.participant-item-v2:hover {
  background: rgba(255,255,255,0.04);
}
.participant-avatar-v2 {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.participant-info-v2 { flex: 1; }
.participant-name-v2 {
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
}
.participant-role-v2 {
  font-size: 12px;
  color: #64748b;
}
.online-dot-v2 {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.online-dot-v2.offline { background: #64748b; }

/* 主持人面板 */
.host-panel {
  padding: 0;
}
.host-panel .sidebar-section {
  border-bottom-color: rgba(255,255,255,0.08);
}
.host-panel .sidebar-section h3 {
  color: #94a3b8;
}

/* 底部工具栏 */
.meeting-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px 20px 12px;
  background: rgba(24, 27, 34, 0.98);
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 -18px 34px rgba(0,0,0,0.28);
  flex-shrink: 0;
}
.bottom-bar-left,
.bottom-bar-center,
.bottom-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bottom-bar-center {
  gap: 16px;
  padding: 0 18px;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(255,255,255,0.08);
}

/* 控制按钮 */
.meeting-control,
.meeting-tool {
  border: none;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  background: transparent;
  transition: color 0.18s ease, transform 0.18s ease;
}
.meeting-control {
  min-width: 76px;
}
.meeting-tool {
  min-width: 58px;
}
.meeting-control-icon,
.meeting-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2b2f39;
  border: 1px solid rgba(255,255,255,0.09);
  color: #f8fafc;
  font-size: 19px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.meeting-tool-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
}
.meeting-control-label,
.meeting-tool-label {
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
}
.meeting-control:hover .meeting-control-icon,
.meeting-tool:hover .meeting-tool-icon {
  background: #343846;
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.meeting-control.muted .meeting-control-icon {
  background: #4a1f25;
  border-color: rgba(248,113,113,0.35);
  color: #fecaca;
}
.meeting-control.share .meeting-control-icon {
  background: #173c2c;
  border-color: rgba(37,196,127,0.32);
  color: #b9f6d3;
}
.meeting-control.share.active .meeting-control-icon {
  background: #20b36b;
  border-color: #29d17f;
  color: white;
}
.meeting-tool.active .meeting-tool-icon {
  background: #2554c7;
  border-color: rgba(96,165,250,0.5);
}
.meeting-control.leave .meeting-control-icon {
  background: #cf2e2e;
  border-color: rgba(248,113,113,0.5);
  font-size: 25px;
}
.meeting-control.leave:hover .meeting-control-icon {
  background: #ef4444;
}
.meeting-control.leave .meeting-control-label {
  color: #fecaca;
}

/* 星图覆盖层 */
.starmap-overlay {
  background: rgba(0,0,0,0.8);
}
.starmap-modal {
  max-width: 1200px !important;
  width: 95% !important;
  max-height: 90vh !important;
  padding: 20px !important;
}

/* 视频区域内的 empty state */
.meeting-video-area .empty-state {
  color: #64748b;
}

/* 深色模式下 badge */
.video-meeting-room .badge {
  opacity: 0.9;
}

/* 深色模态框 */
.video-meeting-room ~ .modal-overlay .modal {
  background: #1a1a2e;
  color: #e2e8f0;
}
.video-meeting-room ~ .modal-overlay .form-input,
.video-meeting-room ~ .modal-overlay .form-textarea {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
}

/* ===== 星图节点 ===== */
.star-map-svg {
  width: 100%;
  height: 100%;
  min-width: 1200px;
  min-height: 800px;
}

.star-node {
  cursor: pointer;
  transition: var(--transition);
}

.star-node:hover { filter: brightness(0.95); }

.star-node-circle {
  fill: var(--star-gold);
  stroke: white;
  stroke-width: 2;
}

.star-node-circle.root-cause { fill: var(--star-blue); }
.star-node-circle.solution { fill: var(--star-green); }

.star-node-text {
  font-size: 13px;
  fill: var(--text);
  font-family: inherit;
  pointer-events: none;
}

.star-node-author {
  font-size: 11px;
  fill: var(--text-light);
}

.connection-line {
  stroke: var(--border);
  stroke-width: 2;
  fill: none;
}

.connection-line.verified {
  stroke: var(--success);
  stroke-width: 3;
}

/* ===== 侧边栏 ===== */
.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}

.participant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.participant-info { flex: 1; }

.participant-name { font-weight: 500; }
.participant-role { font-size: 11px; color: var(--text-light); }

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.online-dot.offline { background: var(--text-light); }

.invite-user-item:hover {
  background: var(--bg);
}

.invite-checkbox {
  flex-shrink: 0;
}

.stage-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-light);
}

.stage-step.active {
  background: #e0e7ff;
  color: var(--primary);
  font-weight: 500;
}

.stage-step.completed {
  color: var(--success);
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.stage-step.active .stage-dot { background: var(--primary); }
.stage-step.completed .stage-dot { background: var(--success); }

/* ===== 节点编辑面板 ===== */
.node-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 360px;
  height: calc(100vh - 56px);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.node-panel.open { transform: translateX(0); }

.node-panel h3 { margin-bottom: 16px; }

/* ===== 积分面板 ===== */
.points-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.points-card {
  text-align: center;
  padding: 16px;
}

.points-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.points-card .label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.ranking-list { list-style: none; }

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.ranking-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.ranking-rank.gold { background: #fef3c7; color: #92400e; }
.ranking-rank.silver { background: #f1f5f9; color: #475569; }
.ranking-rank.bronze { background: #fef2f2; color: #991b1b; }

.ranking-info { flex: 1; }
.ranking-name { font-weight: 500; }
.ranking-dept { font-size: 12px; color: var(--text-light); }
.ranking-points { font-weight: 700; color: var(--primary); }

/* ===== 知识库 ===== */
.knowledge-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.search-bar .form-input { flex: 1; }

.search-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

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

.knowledge-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.knowledge-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.knowledge-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

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

.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.data-table th {
  font-weight: 600;
  background: var(--bg);
  color: var(--text-secondary);
}

/* ===== Toast ===== */
#toast-container {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.toast-error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.toast-info { background: #e0e7ff; color: #3730a3; border-left: 4px solid var(--primary); }
.toast-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.modal h3 { margin-bottom: 16px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .meeting-room { flex-direction: column; }
  .meeting-sidebar { width: 100%; height: auto; max-height: 200px; }
  .meeting-grid { grid-template-columns: 1fr; }
  .meeting-toolbar { gap: 4px; padding: 8px; }
  .meeting-toolbar .btn { padding: 6px 10px; font-size: 12px; }
  .nav-links { display: none; }
  .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }

  /* 视频会议响应式 */
  .meeting-video-area {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 2px;
  }
  .meeting-right-panel.open {
    position: absolute;
    right: 0;
    top: 44px;
    bottom: 64px;
    width: 280px;
    z-index: 10;
  }
  .meeting-body { position: relative; }
  .meeting-bottom-bar { min-height: 66px; padding: 8px 10px; }
  .meeting-control { min-width: 56px; }
  .meeting-control-icon { width: 38px; height: 38px; font-size: 17px; }
  .meeting-control-label { font-size: 10px; }
  .bottom-bar-left, .bottom-bar-right { display: none; }
  .panel-tab-label { display: none; }
}
