/* ===== 全局变量 ===== */
:root {
  --primary: #4f6ef7;
  --primary-dark: #3b5bdb;
  --primary-light: #e7f0ff;
  --success: #00b884;
  --success-light: #e6f9f3;
  --warning: #f5a623;
  --warning-light: #fff5e6;
  --danger: #ff5757;
  --danger-light: #ffe8e8;
  --info: #0ea5e9;
  --info-light: #e0f2fe;
  --dark: #1e293b;
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --bg: #f0f2f5;
  --sidebar-bg: #1e293b;
  --sidebar-active: #4f6ef7;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: all 0.2s ease;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.login-container {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.login-header {
  padding: 40px 40px 20px;
  text-align: center;
}
.login-header .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
}
.login-header h1 { font-size: 22px; color: var(--gray-900); margin-bottom: 8px; }
.login-header p { font-size: 13px; color: var(--gray-500); }
.login-body { padding: 20px 40px 40px; }
.login-body .form-group { margin-bottom: 20px; }
.login-body .form-group label {
  display: block;
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 8px;
  font-weight: 500;
}
.login-body .input-wrap {
  position: relative;
}
.login-body .input-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 18px;
}
.login-body .input-wrap input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  transition: var(--transition);
  outline: none;
}
.login-body .input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.login-body .btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.login-body .btn-login:hover { opacity: 0.9; transform: translateY(-1px); }
.login-body .btn-login:active { transform: translateY(0); }
.login-body .btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.login-tips {
  margin-top: 24px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.8;
}
.login-tips strong { color: var(--gray-800); }
.login-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.login-error.show { display: block; }

/* ===== 主布局 ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-header .logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}
.sidebar-header .title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar-nav .nav-section {
  padding: 8px 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-nav .nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}
.sidebar-nav .nav-item.active {
  background: rgba(79, 110, 247, 0.15);
  color: white;
  border-left-color: var(--sidebar-active);
}
.sidebar-nav .nav-item .icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-nav .nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,0.05); }
.sidebar-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 14px;
}
.sidebar-user .info { flex: 1; overflow: hidden; }
.sidebar-user .info .name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .info .role { font-size: 11px; color: rgba(255,255,255,0.5); }

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* 顶部栏 */
.topbar {
  height: 60px;
  background: white;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}
.topbar .menu-toggle {
  display: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-600);
}
.topbar .page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}
.topbar .spacer { flex: 1; }
.topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .notification-btn {
  position: relative;
  cursor: pointer;
  font-size: 20px;
  color: var(--gray-500);
  transition: var(--transition);
}
.topbar .notification-btn:hover { color: var(--gray-800); }
.topbar .notification-btn .badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}
.topbar .user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
}
.topbar .user-menu:hover { background: var(--gray-100); }
.topbar .user-menu .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
}
.topbar .user-menu .name { font-size: 13px; color: var(--gray-700); font-weight: 500; }

/* 内容区域 */
.content-area {
  flex: 1;
  padding: 24px;
}

/* ===== 卡片 ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header .title { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.card-body { padding: 20px; }

/* ===== 统计卡片 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-card .stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-card .stat-icon.danger { background: var(--danger-light); color: var(--danger); }
.stat-card .stat-icon.info { background: var(--info-light); color: var(--info); }
.stat-card .stat-info .label { font-size: 13px; color: var(--gray-500); margin-bottom: 4px; }
.stat-card .stat-info .value { font-size: 28px; font-weight: 700; color: var(--gray-900); line-height: 1.2; }

/* ===== 表格 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--gray-50);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  color: var(--gray-800);
}
.data-table tr:hover td { background: var(--gray-50); }
.data-table .table-actions { display: flex; gap: 8px; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-default { background: var(--gray-100); color: var(--gray-600); }

/* 状态标签 */
.status-tag { display: inline-flex; align-items: center; gap: 4px; }
.status-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pending { color: var(--gray-600); }
.status-pending::before { background: var(--gray-400); }
.status-in_progress { color: var(--warning); }
.status-in_progress::before { background: var(--warning); }
.status-pending_confirm { color: var(--info); }
.status-pending_confirm::before { background: var(--info); }
.status-completed { color: var(--success); }
.status-completed::before { background: var(--success); }
.status-rejected { color: var(--danger); }
.status-rejected::before { background: var(--danger); }

/* 优先级标签 */
.priority-urgent { color: var(--danger); }
.priority-high { color: var(--warning); }
.priority-normal { color: var(--gray-500); }
.priority-low { color: var(--gray-400); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { opacity: 0.9; }
.btn-default { background: var(--gray-100); color: var(--gray-700); }
.btn-default:hover { background: var(--gray-200); }
.btn-outline { border: 1.5px solid var(--gray-300); background: white; color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-icon { padding: 6px 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
  background: white;
  color: var(--gray-800);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-control:disabled { background: var(--gray-50); color: var(--gray-500); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar .filter-item { flex-shrink: 0; }
.filter-bar .spacer { flex: 1; }
.filter-bar .search-input {
  position: relative;
}
.filter-bar .search-input input {
  padding: 8px 12px 8px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  width: 240px;
  outline: none;
  transition: var(--transition);
}
.filter-bar .search-input input:focus { border-color: var(--primary); }
.filter-bar .search-input .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}
.filter-bar select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
  background: white;
  color: var(--gray-700);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}
.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  transition: var(--transition);
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: var(--gray-500); margin: 0 8px; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.2s ease;
}
.modal.modal-lg { max-width: 900px; }
.modal.modal-sm { max-width: 480px; }
@keyframes modalSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header .title { font-size: 17px; font-weight: 600; color: var(--gray-900); }
.modal-header .close {
  font-size: 22px;
  color: var(--gray-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-header .close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== 进度条 ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.progress-bar.success .fill { background: var(--success); }
.progress-bar.warning .fill { background: var(--warning); }
.progress-bar.danger .fill { background: var(--danger); }
.progress-text { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

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

/* ===== 通知下拉 ===== */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  max-height: 480px;
  overflow: hidden;
  flex-direction: column;
}
.notification-dropdown.show { display: flex; }
.notification-dropdown .dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.notification-dropdown .dropdown-list {
  flex: 1;
  overflow-y: auto;
}
.notification-dropdown .notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50);
  cursor: pointer;
  transition: var(--transition);
}
.notification-dropdown .notification-item:hover { background: var(--gray-50); }
.notification-dropdown .notification-item.unread { background: var(--primary-light); }
.notification-dropdown .notification-item .title { font-size: 13px; font-weight: 500; color: var(--gray-800); margin-bottom: 2px; }
.notification-dropdown .notification-item .content { font-size: 12px; color: var(--gray-500); }
.notification-dropdown .notification-item .time { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.notification-dropdown .dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
  text-align: center;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .text { font-size: 14px; }

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--gray-300); }

/* ===== 看板视图 ===== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  min-height: 400px;
}
.kanban-column {
  flex: 1;
  min-width: 280px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 4px 8px;
}
.kanban-column-header .title { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.kanban-column-header .count {
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}
.kanban-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kanban-card.priority-urgent { border-left-color: var(--danger); }
.kanban-card.priority-high { border-left-color: var(--warning); }
.kanban-card.priority-normal { border-left-color: var(--gray-300); }
.kanban-card.priority-low { border-left-color: var(--gray-200); }
.kanban-card .card-title { font-size: 13px; font-weight: 500; color: var(--gray-800); margin-bottom: 8px; }
.kanban-card .card-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--gray-500); }
.kanban-card .card-meta .assignee { display: flex; align-items: center; gap: 4px; }

/* ===== 用户下拉菜单 ===== */
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.user-dropdown.show { display: block; }
.user-dropdown .dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-dropdown .dropdown-item:hover { background: var(--gray-50); color: var(--primary); }
.user-dropdown .dropdown-item.danger { color: var(--danger); }
.user-dropdown .dropdown-item.danger:hover { background: var(--danger-light); }

/* ===== 时间线 ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item .timeline-content { font-size: 13px; }
.timeline-item .timeline-content .action { font-weight: 500; color: var(--gray-800); }
.timeline-item .timeline-content .time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ===== 徽章 ===== */
.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .chart-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show { transform: translateX(0); }
  .main-content {
    margin-left: 0;
  }
  .topbar .menu-toggle { display: block; }
  .content-area { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }
  .stat-card .stat-info .value { font-size: 22px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .search-input input { width: 100%; }
  .form-row { flex-direction: column; gap: 0; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .chart-grid { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .topbar .user-menu .name { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100% !important; }
  .data-table { display: block; overflow-x: auto; }
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray-500); }
.fw-bold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.w-100 { width: 100%; }
.cursor-pointer { cursor: pointer; }
.position-relative { position: relative; }

/* 遮罩层 */
.overlay-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
  display: none;
}
.overlay-mask.show { display: block; }

/* Loading */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--gray-400);
  gap: 8px;
}
