/* ============================================================
   富盛宗工作台 全局样式 v6.0
   2026前沿 · 白色毛玻璃主题 · 统一变量体系
   ============================================================ */

/* === 变量体系（只定义一次，全局覆盖）=== */
:root {
  /* 品牌色 */
  --brand-primary:   #1E2761;
  --brand-secondary: #C9A84C;

  --deep-blue:    var(--brand-primary);
  --deep-blue-dk: #0B1D3A;
  --gold:         var(--brand-secondary);
  --gold-light:   #e0c080;

  /* 基础色 */
  --white:        #ffffff;
  --black:        #000000;
  --bg:           #f8f9fc;

  /* 灰色系统 */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  /* 文字色 */
  --text:           #1a1a2e;
  --text-secondary:  #6b7280;
  --text-muted:     #9ca3af;

  /* 毛玻璃 */
  --glass-bg:       rgba(255, 255, 255, 0.82);
  --glass-border:    rgba(0, 0, 0, 0.06);
  --glass-shadow:    0 1px 3px rgba(0, 0, 0, 0.04);

  /* 功能色 */
  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #3b82f6;

  /* 间距/圆角/阴影 */
  --radius-xs:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-pill: 100px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow:     0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.16);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; }

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

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
svg { display: block; }

/* ============================================================
   导航栏 — 白色毛玻璃
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand > svg {
  width: 34px; height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(30,39,97,0.3));
}
/* 直接文字 FUSHENG */
.navbar-brand > span:not(.navbar-brand-text) {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--deep-blue);
  white-space: nowrap;
}
.navbar-brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--deep-blue);
  white-space: nowrap;
}

/* 导航链接 */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--glass-border);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}
.nav-link svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.nav-link.active {
  color: var(--deep-blue);
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  font-weight: 600;
}
/* 导航分割线 */
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--glass-border);
  margin: 0 4px;
  flex-shrink: 0;
}
/* 通知铃铛红点 */
.nav-link-bell {
  position: relative;
}
.nav-notify-dot {
  position: absolute;
  top: 6px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid var(--white);
}

/* 用户区 */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-points {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(200,164,85,0.1);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(200,164,85,0.18);
}
.nav-points svg { width: 13px; height: 13px; }
.nav-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.nav-logout {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  border: none;
  transition: var(--transition);
}
.nav-logout:hover {
  background: var(--deep-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================================
   主容器布局
   ============================================================ */
.main-container {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}

/* ============================================================
   侧边栏
   ============================================================ */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 1.25rem 0;
}

/* 用户身份卡片 */
.user-card {
  padding: 1.25rem 1.25rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 0.5rem;
}
.user-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep-blue), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
}
.user-avatar svg { width: 26px; height: 26px; stroke: var(--white); }
.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.3rem;
}
.user-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.7rem;
  background: linear-gradient(135deg, var(--deep-blue), var(--deep-blue-dk));
  color: var(--white);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.6rem;
}
.user-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.45rem 0.7rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.user-points-label { font-size: 0.72rem; color: var(--gray-500); }
.user-points-value { font-size: 1.05rem; font-weight: 700; color: var(--gold); }

/* 侧边栏分区 */
.sidebar-section { margin-bottom: 0.5rem; }
.sidebar-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-400);
  font-weight: 600;
  padding: 0.5rem 1.25rem 0.3rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.25rem;
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link:hover {
  background: rgba(30,39,97,0.05);
  color: var(--deep-blue);
  border-left-color: var(--gold);
}
.sidebar-link.active {
  background: rgba(30,39,97,0.06);
  color: var(--deep-blue);
  border-left-color: var(--gold);
  font-weight: 600;
}
.sidebar-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: white;
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   主内容区
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: 248px;
  padding: 1.75rem;
}

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: linear-gradient(135deg, var(--deep-blue) 0%, var(--deep-blue-dk) 100%);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -40%;
  width: 80%; height: 180%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.stat-card.gold {
  background: linear-gradient(135deg, var(--gold) 0%, #a07820 100%);
}
.stat-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.stat-icon svg { width: 18px; height: 18px; stroke: var(--gold-light); }
.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--white);
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
}

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  padding: 1.4rem;
  margin-bottom: 1.25rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--gray-100);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
}
.card-title svg { width: 17px; height: 17px; stroke: var(--gold); }
.card-action {
  font-size: 0.8rem;
  color: var(--deep-blue);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.card-action:hover { color: var(--gold); }

/* ============================================================
   快捷操作网格 — 修复按钮过大问题
   ============================================================ */
.quick-grid {
  display: grid;
  /* 用 minmax(120px, 1fr) 限制单格最大宽度，合理分布 */
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.1rem 0.6rem;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--gray-700);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}
.quick-item:hover {
  border-color: var(--deep-blue);
  color: var(--deep-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,39,97,0.1);
  background: rgba(30,39,97,0.02);
}
.quick-item svg {
  width: 22px; height: 22px;
  stroke: var(--deep-blue);
  flex-shrink: 0;
}
.quick-item span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.2;
}
.quick-item small {
  font-size: 0.7rem;
  color: var(--gray-500);
  line-height: 1.3;
}

/* ============================================================
   Tab 切换
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.25rem;
  gap: 0;
}
.tab {
  padding: 0.7rem 1.25rem;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.tab:hover { color: var(--deep-blue); }
.tab.active {
  color: var(--deep-blue);
  font-weight: 600;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }
#tabOverview { display: block; }
#tabOverview:not(.active) { display: none; }
#tabTasks, #tabDailyReports, #tabPoints, #tabClues, #tabProfile {
  display: none;
}
#tabTasks.active, #tabDailyReports.active, #tabPoints.active,
#tabClues.active, #tabProfile.active { display: block; }

/* ============================================================
   任务列表
   ============================================================ */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  gap: 12px;
}
.task-item:hover {
  border-color: var(--deep-blue);
  background: rgba(30,39,97,0.02);
  transform: translateX(3px);
}
.task-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); flex: 1; }
.task-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.task-status {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending    { background: #fff7ed; color: #c2410c; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-submitted { background: #ede9fe; color: #5b21b6; }
.status-approved  { background: #dcfce7; color: #15803d; }
.status-rejected  { background: #fee2e2; color: #b91c1c; }
.status-claimed   { background: #dbeafe; color: #1d4ed8; }
.task-points { font-size: 0.78rem; font-weight: 600; color: var(--gold); white-space: nowrap; }

/* ============================================================
   公告列表
   ============================================================ */
.announcement-item {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--gray-50);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.announcement-item:hover { background: var(--gray-100); }
.announcement-title { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; }
.announcement-time { font-size: 0.72rem; color: var(--gray-400); }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--deep-blue); color: var(--white); }
.btn-primary:hover { background: var(--deep-blue-dk); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--deep-blue-dk); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 1.5px solid var(--deep-blue); color: var(--deep-blue); }
.btn-outline:hover { background: var(--deep-blue); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }

/* ============================================================
   加载 / 空状态
   ============================================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  color: var(--gray-400);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--gray-400);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 10px; opacity: 0.4; }
.empty-state p { font-size: 0.875rem; }

/* ============================================================
   Toast 提示
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  color: white;
}
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #333; }
.toast.info    { background: var(--info); }

/* ============================================================
   模态框
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 560px; width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.92);
  transition: var(--transition);
}
.modal-overlay.show .modal { transform: scale(1); }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.modal-close {
  background: none; border: none;
  font-size: 1.3rem; cursor: pointer;
  color: var(--gray-400);
  line-height: 1;
}
.modal-body { padding: 1.25rem 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ============================================================
   表单
   ============================================================ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 0.4rem; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-input {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: var(--transition);
  background: var(--white);
}
.form-input:focus {
  outline: none;
  border-color: var(--deep-blue);
  box-shadow: 0 0 0 3px rgba(30,39,97,0.1);
}
.form-textarea { min-height: 100px; resize: vertical; }

/* ============================================================
   详情模态框内容样式
   ============================================================ */
.detail-section { margin-bottom: 1.25rem; }
.detail-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.5rem; }
.detail-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 0.5rem; }
.detail-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; }
.detail-text { font-size: 0.9rem; color: var(--gray-700); line-height: 1.7; }
.detail-footer { display: flex; gap: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--gray-100); }

/* 公告详情 */
.ann-title { font-size: 1.05rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.4rem; }
.ann-time { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 1rem; }
.ann-content { font-size: 0.9rem; color: var(--gray-700); line-height: 1.8; white-space: pre-wrap; }
.ann-content img { max-width: 100%; height: auto; border-radius: 6px; cursor: zoom-in; transition: transform 0.15s; }
.ann-content img:hover { opacity: 0.9; }

/* 公告图片灯箱 */
#annLightbox { display: none; position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.75); align-items: center; justify-content: center; cursor: pointer; }
#annLightbox.show { display: flex; }
#annLightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,0.4); }
#annLightbox .lb-close { position: absolute; top: 16px; right: 20px; font-size: 28px; color: #fff; cursor: pointer; user-select: none; line-height: 1; }
#annLightbox .lb-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.5); font-size: 13px; pointer-events: none; }

/* ============================================================
   工具类
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--gray-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes seg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 1rem; }
  .nav-link span:not(.nav-notify-dot) { display: none; }
  .nav-link { padding: 8px 10px; }
  .nav-divider { margin: 0 2px; }
  .nav-user .nav-username { display: none; }
  .main-content { padding: 1rem; }
}

/* ============================================================
   统一任务卡组件系统 — TK Design System v1.0
   Linear / Stripe / Vercel 2026
   零Emoji · 信息密度优先 · 几何状态指示
   ============================================================ */

/* ── 任务卡基础 ─────────────────────────────────────────── */
.tk-card {
  display: grid;
  grid-template-columns: 3px 1fr;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}
.tk-card:hover {
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

/* Left rail — branch color */
.tk-rail {
  grid-row: 1 / -1;
  border-radius: 3px 0 0 3px;
  align-self: stretch;
}
.tk-rail.online  { background: var(--info); }
.tk-rail.offline { background: #e67e22; }

.tk-body {
  padding: 16px 18px;
  min-width: 0;
}

/* ── Row 1: Header ──────────────────────────────────────── */
.tk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tk-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Status badge */
.tk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.tk-badge .bdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Status colors */
.tk-badge.s-open      { background: rgba(16,185,129,0.08); color: #047857; }
.tk-badge.s-open .bdot { background: var(--success); }
.tk-badge.s-claimed    { background: rgba(59,130,246,0.08); color: #1d4ed8; }
.tk-badge.s-claimed .bdot { background: var(--info); }
.tk-badge.s-progress   { background: rgba(201,168,76,0.1); color: #92400e; }
.tk-badge.s-progress .bdot { background: var(--brand-secondary); }
.tk-badge.s-submitted  { background: rgba(139,92,246,0.08); color: #5b21b6; }
.tk-badge.s-submitted .bdot { background: #8b5cf6; }
.tk-badge.s-approved   { background: rgba(16,185,129,0.08); color: #047857; }
.tk-badge.s-approved .bdot { background: var(--success); }
.tk-badge.s-rejected   { background: rgba(239,68,68,0.08); color: #b91c1c; }
.tk-badge.s-rejected .bdot { background: var(--danger); }

/* Points pill */
.tk-pts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  color: #8b6914;
  flex-shrink: 0;
  white-space: nowrap;
}
.tk-pts svg { width: 11px; height: 11px; }

/* ── Row 2: Strip (meta bar) ────────────────────────────── */
.tk-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.73rem;
  color: var(--gray-400);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tk-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tk-strip-item svg { width: 12px; height: 12px; stroke: var(--gray-300); flex-shrink: 0; }

/* Branch tag */
.tk-branch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tk-branch.online  { background: rgba(59,130,246,0.06); color: var(--info); }
.tk-branch.offline { background: rgba(230,126,34,0.06); color: #c0392b; }

/* Difficulty — dot indicators */
.tk-diff {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.tk-diff-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-200);
}
.tk-diff-dot.on { background: var(--brand-secondary); }

/* Capacity bar */
.tk-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tk-cap-bar {
  width: 48px;
  height: 3px;
  background: var(--gray-100);
  border-radius: 2px;
  overflow: hidden;
}
.tk-cap-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.tk-cap-fill.safe   { background: var(--success); }
.tk-cap-fill.warn   { background: var(--warning); }
.tk-cap-fill.full   { background: var(--danger); }

/* ── Row 3: Description preview ─────────────────────────── */
.tk-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Row 4: Reward note ─────────────────────────────────── */
.tk-reward {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(201,168,76,0.06);
  font-size: 0.72rem;
  color: #8b6914;
  margin-bottom: 10px;
  font-weight: 500;
}
.tk-reward svg { width: 12px; height: 12px; stroke: #8b6914; }

/* ── Row 5: Progress (my-tasks only) ────────────────────── */
.tk-progress {
  display: flex;
  gap: 3px;
  margin-bottom: 8px;
  height: 4px;
}
.tk-progress-seg {
  flex: 1;
  border-radius: 2px;
  background: var(--gray-100);
  transition: background 0.3s;
}
.tk-progress-seg.filled   { background: var(--success); }
.tk-progress-seg.current  { background: var(--brand-secondary); animation: seg-pulse 2.5s ease-in-out infinite; }
.tk-progress-seg.fail     { background: var(--danger); }

.tk-progress-labels {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}
.tk-progress-labels span {
  flex: 1;
  text-align: center;
  font-size: 0.6rem;
  color: var(--gray-300);
  font-weight: 500;
}
.tk-progress-labels span.done    { color: var(--success); }
.tk-progress-labels span.current { color: var(--brand-secondary); font-weight: 600; }
.tk-progress-labels span.fail    { color: var(--danger); }

/* ── Row 6: Actions ─────────────────────────────────────── */
.tk-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.tk-act {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tk-act-primary {
  background: var(--brand-primary);
  color: var(--white);
}
.tk-act-primary:hover { background: var(--deep-blue-dk); }
.tk-act-gold {
  background: var(--brand-secondary);
  color: var(--white);
}
.tk-act-gold:hover { background: #a07820; }
.tk-act-danger {
  background: var(--danger);
  color: var(--white);
}
.tk-act-danger:hover { background: #dc2626; }
.tk-act-success {
  background: var(--success);
  color: var(--white);
}
.tk-act-success:hover { background: #059669; }
.tk-act-ghost {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
}
.tk-act-ghost:hover { color: var(--gray-600); border-color: var(--gray-300); background: var(--gray-50); }
.tk-act-blue {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.tk-act-blue:hover { background: #1d4ed8; }

/* Claimed / Full indicators */
.tk-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}
.tk-indicator.claimed {
  background: rgba(16,185,129,0.06);
  color: #047857;
}
.tk-indicator.full {
  background: var(--gray-100);
  color: var(--gray-400);
}

/* Review note on rejected cards */
.tk-note {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,0.04);
  border-left: 2px solid var(--danger);
  font-size: 0.75rem;
  color: #7f1d1d;
  line-height: 1.5;
}

/* ── Task Grid Layout ───────────────────────────────────── */
.tk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 12px;
}

/* ── Empty State ────────────────────────────────────────── */
.tk-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1rem;
}
.tk-empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tk-empty-icon svg { width: 22px; height: 22px; stroke: var(--gray-300); }
.tk-empty-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.tk-empty-desc {
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ============================================================
   任务市场专属 — Hall Page
   ============================================================ */

/* Branch selector — two equal columns */
.hall-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.hall-branch {
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.hall-branch:hover {
  border-color: var(--gray-300);
}
.hall-branch.active {
  border-color: var(--brand-primary);
  background: rgba(30,39,97,0.02);
}
.hall-branch.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--brand-primary);
}
.hall-branch.locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.hall-branch-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.hall-branch-icon svg { width: 16px; height: 16px; }
.hall-branch-icon.online  { background: rgba(59,130,246,0.08); }
.hall-branch-icon.online svg  { stroke: var(--info); }
.hall-branch-icon.offline { background: rgba(230,126,34,0.08); }
.hall-branch-icon.offline svg { stroke: #c0392b; }

.hall-branch-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.hall-branch-desc {
  font-size: 0.73rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.hall-branch-count {
  font-size: 0.73rem;
  font-weight: 600;
}
.hall-branch-count.online  { color: var(--info); }
.hall-branch-count.offline { color: #c0392b; }

/* Permission warning */
.hall-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(239,68,68,0.04);
  border: 1px solid rgba(239,68,68,0.12);
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: #991b1b;
}
.hall-warning svg { width: 16px; height: 16px; stroke: var(--danger); flex-shrink: 0; }

/* Filter bar */
.hall-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hall-filter select,
.hall-filter input {
  padding: 7px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--gray-600);
  background: var(--white);
  min-width: 100px;
  transition: var(--transition);
}
.hall-filter select:focus,
.hall-filter input:focus {
  border-color: var(--brand-primary);
  outline: none;
}
.hall-filter-btn {
  padding: 7px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--gray-400);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
}
.hall-filter-btn:hover { color: var(--gray-600); border-color: var(--gray-300); }

/* ============================================================
   我的任务专属 — My Tasks Page
   ============================================================ */

/* Stats strip */
.my-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.my-stat {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  background: var(--white);
  text-align: center;
}
.my-stat-val {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.03em;
}
.my-stat-val.is-zero { color: var(--gray-300); }
.my-stat-val.gold    { color: var(--brand-secondary); }
.my-stat-lbl {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: 2px;
}

/* Status filter chips */
.my-filter {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.my-filter-btn {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--gray-100);
  color: var(--gray-500);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.my-filter-btn:hover { background: var(--gray-200); color: var(--gray-700); }
.my-filter-btn.on {
  background: var(--brand-primary);
  color: var(--white);
}
.my-filter-btn .cnt {
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(0,0,0,0.08);
}
.my-filter-btn.on .cnt {
  background: rgba(255,255,255,0.2);
}

/* Archive bar */
.my-archive-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  margin-bottom: 14px;
  font-size: 0.78rem;
  color: var(--gray-500);
}
.my-archive-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.my-archive-bar input[type="checkbox"] { cursor: pointer; }

/* ============================================================
   任务详情模态框 — Detail Modal (shared)
   ============================================================ */
.tk-modal .modal { max-width: 680px; }
.tk-modal .modal-body { padding: 0; }

.tk-detail {
  padding: 20px 24px;
}
.tk-detail-head {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

/* Reward highlight */
.tk-detail-reward {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.02));
  border-left: 3px solid var(--brand-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.tk-detail-reward-val {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-secondary);
}
.tk-detail-reward-cash {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

/* Info grid */
.tk-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.tk-detail-cell {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gray-50);
}
.tk-detail-cell-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-bottom: 2px;
}
.tk-detail-cell-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* Section blocks in modal */
.tk-detail-section {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--gray-600);
}
.tk-detail-section strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--gray-700);
}
.tk-detail-section.sop       { background: #f0f7ff; border-color: var(--info); }
.tk-detail-section.principle { background: #fff3e0; border-color: #ff9800; }
.tk-detail-section.market    { background: #f3e5f5; border-color: #9c27b0; }
.tk-detail-section.risk      { background: #ffebee; border-color: var(--danger); }
.tk-detail-section.tools     { background: #e3f2fd; border-color: #2196f3; }
.tk-detail-section.milestone { background: #fff8e1; border-color: #ffc107; }
.tk-detail-section.threshold { background: #e8f5e9; border-color: #4caf50; }
.tk-detail-section.cost      { background: #fce4ec; border-color: #e91e63; }
.tk-detail-section.revenue   { background: #e8f5e9; border-color: #28a745; }
.tk-detail-section.desc      { background: var(--gray-50); border-color: var(--gray-300); }
.tk-detail-section.reward    { background: rgba(201,168,76,0.06); border-color: var(--brand-secondary); }
.tk-detail-section.note      { background: rgba(243,156,18,0.06); border-color: #f39c12; }

/* Assignee list */
.tk-detail-assignees {
  padding: 14px 16px;
  border-radius: 8px;
  background: #f0fff0;
  border-left: 3px solid var(--success);
  margin-bottom: 10px;
}
.tk-detail-assignee {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.82rem;
  color: var(--gray-600);
}

/* ============================================================
   任务动态 — Activity Feed (dashboard)
   ============================================================ */
.activity-card { overflow: visible; }

.act-stat-strip {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-100);
  margin: 0 -1.4rem;
  padding: 0 1.4rem;
}
.act-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px 12px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.act-stat:hover { background: var(--gray-50); }
.act-stat::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.25s;
}
.act-stat:hover::after,
.act-stat.active::after { background: var(--brand-secondary); }

.act-stat-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gray-800);
  letter-spacing: -0.03em;
}
.act-stat-num.is-zero { color: var(--gray-300); }

.act-stat-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.act-stat .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.act-stat.s-claimed .dot    { background: var(--info); }
.act-stat.s-progress .dot   { background: var(--brand-secondary); }
.act-stat.s-submitted .dot  { background: #8b5cf6; }
.act-stat.s-approved .dot   { background: var(--success); }
.act-stat.s-rejected .dot   { background: var(--danger); }
.act-stat.s-earned .dot     { background: var(--brand-secondary); box-shadow: 0 0 0 2px rgba(201,168,76,0.2); }

.act-filter-bar {
  display: flex;
  gap: 2px;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 4px;
}
.act-filter {
  padding: 5px 14px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}
.act-filter:hover { color: var(--gray-600); background: var(--gray-50); }
.act-filter.on {
  color: var(--brand-primary);
  background: rgba(30,39,97,0.06);
  font-weight: 600;
}

.act-feed {
  max-height: 580px;
  overflow-y: auto;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.act-feed::-webkit-scrollbar { width: 3px; }
.act-feed::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.act-more {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: none;
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--gray-400);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.act-more:hover { background: var(--gray-100); color: var(--gray-600); }

/* ============================================================
   响应式 — TK Components
   ============================================================ */
@media (max-width: 768px) {
  .act-stat-strip { flex-wrap: wrap; }
  .act-stat { min-width: 33.33%; }
  .tk-grid { grid-template-columns: 1fr; }
  .hall-selector { grid-template-columns: 1fr; }
  .my-stats { grid-template-columns: repeat(3, 1fr); }
  .tk-detail-grid { grid-template-columns: 1fr; }
  .tk-progress-labels { display: none; }
  .my-filter { overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 480px) {
  .act-stat { min-width: 50%; }
  .my-stats { grid-template-columns: repeat(2, 1fr); }
  .hall-filter { flex-wrap: nowrap; overflow-x: auto; }
  .tk-head { flex-direction: column; gap: 6px; }
  .tk-badge { align-self: flex-start; }
}

/* ===== Daily Reports (Dashboard) ===== */
.dr-wrap { padding: 1.5rem 1.5rem 2rem; }
.dr-page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.dr-page-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.15rem; font-weight: 700; color: var(--brand-primary);
}
.dr-page-title svg { width: 20px; height: 20px; stroke: var(--brand-secondary); }

/* Stats Strip */
.dr-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.dr-stat-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: #fff; border: 1px solid #e8eaf0;
  border-radius: 12px; padding: 0.9rem 1rem;
  box-shadow: 0 1px 4px rgba(30,39,97,0.06);
}
.dr-stat-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dr-stat-icon svg { width: 18px; height: 18px; }
.dr-icon-total { background: #eef2ff; }
.dr-icon-total svg { stroke: #4f56d4; }
.dr-icon-streak { background: #fff8e6; }
.dr-icon-streak svg { stroke: var(--brand-secondary); }
.dr-icon-pending { background: #fef3e2; }
.dr-icon-pending svg { stroke: #f59e0b; }
.dr-stat-body { min-width: 0; }
.dr-stat-num {
  font-size: 1.3rem; font-weight: 700; color: var(--brand-primary);
  line-height: 1.2;
}
.dr-stat-lbl { font-size: 0.75rem; color: #888; margin-top: 1px; }

/* Filter Bar */
.dr-filter-bar {
  display: flex; gap: 0.5rem; margin-bottom: 1rem;
  border-bottom: 1px solid #e8eaf0; padding-bottom: 0;
}
.dr-filter-btn {
  padding: 0.5rem 1rem; border: none; background: none;
  font-size: 0.85rem; color: #666; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s; border-radius: 4px 4px 0 0;
}
.dr-filter-btn:hover { color: var(--brand-primary); }
.dr-filter-btn.active { color: var(--brand-primary); border-bottom-color: var(--brand-secondary); font-weight: 600; }

/* Report Cards */
.dr-list { display: flex; flex-direction: column; gap: 0.75rem; }
.dr-card {
  background: #fff; border: 1px solid #e8eaf0;
  border-radius: 12px; padding: 1rem 1.1rem;
  box-shadow: 0 1px 4px rgba(30,39,97,0.05);
  transition: box-shadow 0.2s;
}
.dr-card:hover { box-shadow: 0 2px 10px rgba(30,39,97,0.1); }
.dr-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.dr-card-meta { display: flex; align-items: center; gap: 0.5rem; }
.dr-date { font-size: 0.8rem; color: #888; font-weight: 500; }
.dr-branch {
  font-size: 0.72rem; background: #eef2ff; color: #4f56d4;
  padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.dr-card-right { display: flex; align-items: center; gap: 0.5rem; }
.dr-badge {
  font-size: 0.72rem; font-weight: 600; padding: 2px 8px;
  border-radius: 20px;
}
.dr-badge-pending { background: #fef3c7; color: #92400e; }
.dr-badge-approved { background: #d1fae5; color: #065f46; }
.dr-badge-rejected { background: #fee2e2; color: #991b1b; }
.dr-toggle-btn {
  border: none; background: none; cursor: pointer; padding: 4px;
  color: #888; display: flex; align-items: center;
  transition: transform 0.2s;
}
.dr-toggle-btn svg { transition: transform 0.2s; }
.dr-card-title { font-size: 0.95rem; font-weight: 600; color: var(--brand-primary); margin-bottom: 0.35rem; }
.dr-card-preview { font-size: 0.82rem; color: #666; line-height: 1.5; margin-bottom: 0.5rem; }
.dr-card-foot { display: flex; gap: 1rem; }
.dr-foot-item { font-size: 0.78rem; color: #888; }

/* Expandable Detail */
.dr-card-detail {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px dashed #e0e4f0;
}
.dr-detail-section { margin-bottom: 0.75rem; }
.dr-detail-label { font-size: 0.75rem; font-weight: 600; color: #888; margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.03em; }
.dr-detail-content { font-size: 0.85rem; color: #333; line-height: 1.65; }
.dr-detail-issues { background: #fef3c7; padding: 0.6rem 0.8rem; border-radius: 8px; }
.dr-detail-review { background: #f0fdf4; padding: 0.6rem 0.8rem; border-radius: 8px; }

/* Empty / Loading */
.dr-empty {
  text-align: center; padding: 3rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.dr-empty-icon { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 0.25rem; }
.dr-empty-icon svg { width: 100%; height: 100%; stroke: #888; }
.dr-empty-title { font-size: 1rem; font-weight: 600; color: #555; }
.dr-empty-desc { font-size: 0.82rem; color: #999; }
.dr-loading { text-align: center; padding: 2rem; }
.dr-loading .spinner { margin: 0 auto; }

/* Submit Modal */
.dr-form-modal .modal { max-width: 520px; }
.dr-form-modal .modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.dr-field { margin-bottom: 1rem; }
.dr-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.dr-label { display: block; font-size: 0.8rem; font-weight: 600; color: #555; margin-bottom: 0.4rem; }
.dr-required { color: #e74c3c; }
.dr-task-loading {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: #888; margin-top: 0.3rem;
}
.dr-range {
  -webkit-appearance: none; width: 100%; height: 6px;
  border-radius: 3px; background: linear-gradient(to right, var(--brand-secondary) 0%, #e8eaf0 var(--pct, 0%));
  outline: none; cursor: pointer;
}
.dr-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--brand-secondary);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.dr-progress-wrap { display: flex; align-items: center; gap: 0.75rem; }
.dr-progress-val { font-size: 0.85rem; font-weight: 700; color: var(--brand-secondary); min-width: 38px; text-align: right; }
.dr-textarea { resize: vertical; font-family: inherit; line-height: 1.6; }
.dr-form-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 0.25rem; }

/* Responsive */
@media (max-width: 600px) {
  .dr-wrap { padding: 1rem; }
  .dr-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .dr-stat-card { padding: 0.7rem 0.75rem; flex-direction: column; text-align: center; gap: 0.4rem; }
  .dr-stat-icon { width: 32px; height: 32px; }
  .dr-stat-num { font-size: 1.1rem; }
  .dr-field-row { grid-template-columns: 1fr; }
  .dr-form-modal .modal { margin: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
}
