/* ==========================================================================
   智仁安全服务部日程系统 - 核心视觉设计系统 (Vanilla CSS)
   ========================================================================== */

/* 核心变量定义 - 基于 HSL 精准配色体系 */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: 'Outfit', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 主题色系 - 暗黑高端科技感 */
  --bg-app: hsl(222, 47%, 7%);
  --bg-card: hsla(223, 47%, 12%, 0.7);
  --bg-card-hover: hsla(223, 47%, 16%, 0.85);
  --border-color: hsla(217, 30%, 20%, 0.5);
  --border-highlight: hsla(217, 30%, 40%, 0.3);
  
  --text-main: hsl(210, 40%, 96%);
  --text-muted: hsl(215, 20%, 65%);
  --text-dim: hsl(215, 15%, 45%);

  /* 功能状态色 */
  --color-primary: #3b82f6;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #06b6d4;

  /* 业务状态渐变配置 */
  --grad-tbd: linear-gradient(135deg, hsla(215, 15%, 20%, 0.4), hsla(215, 15%, 15%, 0.4));
  --grad-audit: linear-gradient(135deg, #4f46e5, #1e1b4b);      /* 代码审计 - 罗兰靛蓝 */
  --grad-weakpwd: linear-gradient(135deg, #d946ef, #4a044e);    /* 弱口令检查 - 魅惑紫 */
  --grad-presales: linear-gradient(135deg, #0d9488, #115e59);   /* 售前支撑 - 薄荷绿 */
  --grad-penetration: linear-gradient(135deg, #dc2626, #7f1d1d);/* 渗透扫描 - 炽热火焰红 */
  --grad-asset: linear-gradient(135deg, #475569, #1e293b);      /* 资产监测 - 钢蓝灰 */
  --grad-risk: linear-gradient(135deg, #6366f1, #312e81);       /* 风险评估 - 靛蓝 */
  --grad-hardening: linear-gradient(135deg, #10b981, #064e3b);  /* 加固整改 - 翡翠绿 */
  --grad-monitoring: linear-gradient(135deg, #06b6d4, #164e63); /* 安全巡检 - 冰川青 */
  --grad-emergency: linear-gradient(135deg, #f97316, #7c2d12);  /* 应急响应 - 警告橙 */
  --grad-drill: linear-gradient(135deg, #f59e0b, #78350f);      /* 应急演练 - 琥珀金 */
  --grad-guard: linear-gradient(135deg, #ec4899, #500724);      /* 重保值守 - 艳丽玫瑰 */
  --grad-attack: linear-gradient(135deg, #ef4444, #991b1b);     /* 攻防保障 - 珊瑚红 */
  --grad-training: linear-gradient(135deg, #8b5cf6, #3b0764);   /* 安全培训 - 罗兰紫 */
  --grad-consulting: linear-gradient(135deg, #84cc16, #365314); /* 安全咨询 - 荧光绿 */
  --grad-ops: linear-gradient(135deg, #059669, #064e3b);        /* 安全运维 - 墨绿 */
  --grad-dataclass: linear-gradient(135deg, #0891b2, #1e3a5f);  /* 数据分类分级 - 海洋蓝 */
  --grad-docs: linear-gradient(135deg, #7c3aed, #2e1065);       /* 服务材料撰写 - 深紫 */
  --grad-resident: linear-gradient(135deg, #0284c7, #075985);   /* 驻场服务 - 天蓝 */
  --grad-leave: linear-gradient(135deg, #d97706, #78350f);      /* 请假休假 - 金黄色 */
  --grad-other: linear-gradient(135deg, #a855f7, #581c87);      /* 其他 - 神秘紫 */

  /* 阴影效果 */
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-glow-blue: 0 0 15px hsla(217, 91%, 60%, 0.35);
  --shadow-glow-red: 0 0 15px rgba(239, 68, 68, 0.4);
  --shadow-glow-purple: 0 0 15px rgba(168, 85, 247, 0.4);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 全局与重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 2rem;
  line-height: 1.5;
}

/* 页面滚动条优化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: hsla(222, 47%, 5%, 0.5);
}
::-webkit-scrollbar-thumb {
  background: hsla(217, 30%, 25%, 0.8);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsla(217, 30%, 35%, 1);
}

/* 背景流光特效 - 已停用以提升渲染性能 */
.bg-glow {
  display: none !important;
}
.bg-glow-1 {
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -10%;
  right: 5%;
}
.bg-glow-2 {
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: 10%;
  left: -10%;
}
.bg-glow-3 {
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: 40%;
  left: 30%;
}

/* App 容器 */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 容器面板样式 - 移除模糊以极大提升渲染性能 */
.glass-panel {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}
.glass-panel:hover {
  border-color: var(--border-highlight);
}

/* ==========================================================================
   1. 头部组件
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow-blue);
  animation: logo-glow 3s infinite alternate;
}
@keyframes logo-glow {
  0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }
  100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.7); }
}

.brand-text h1 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}
.brand-text .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.header-controls {
  display: flex;
  align-items: center;
}

.date-picker-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.35rem 0.5rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

.current-week-text {
  font-family: var(--font-title);
  font-weight: 600;
  padding: 0 0.75rem;
  min-width: 140px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-primary);
}

/* 通用按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  color: var(--text-main);
  background: transparent;
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: hsla(217, 30%, 15%, 0.6);
  border: 1px solid var(--border-color);
}
.btn-icon:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.btn-secondary {
  background: hsla(217, 30%, 15%, 0.8);
  border-color: var(--border-color);
  padding: 0.35rem 1rem;
  border-radius: 20px;
}
.btn-secondary:hover {
  background: hsla(217, 30%, 25%, 1);
  border-color: var(--text-muted);
}
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.btn-danger {
  background: hsla(0, 84%, 60%, 0.15);
  border-color: hsla(0, 84%, 60%, 0.3);
  color: #f87171;
}
.btn-danger:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}
.btn-text {
  color: var(--color-primary);
  font-size: 0.85rem;
}
.btn-text:hover {
  text-decoration: underline;
}

/* ==========================================================================
   2. KPI 数据看板
   ========================================================================== */
.kpi-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-highlight);
  background-color: var(--bg-card-hover);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.icon-teal { background: hsla(188, 90%, 50%, 0.15); color: var(--color-info); }
.icon-blue { background: hsla(217, 90%, 60%, 0.15); color: var(--color-primary); }
.icon-warn { background: hsla(38, 90%, 50%, 0.15); color: var(--color-warning); }
.icon-green { background: hsla(160, 90%, 40%, 0.15); color: var(--color-success); }

.kpi-content h3 {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-value {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2px;
}
.kpi-value .unit {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ==========================================================================
   3. 主日程表大面板
   ========================================================================== */
.schedule-board {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.board-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}
.board-title i {
  color: var(--color-primary);
  font-size: 1.2rem;
}
.board-title h2 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-title);
}

/* 图例系统 */
.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-tbd { background: hsla(215, 15%, 45%, 0.8); outline: 1px dashed hsla(215, 15%, 65%, 0.8); }
.dot-holiday { background: #475569; border: 1px solid #94a3b8; }
.dot-audit { background: #6366f1; }
.dot-weakpwd { background: #d946ef; }
.dot-presales { background: #0d9488; }
.dot-penetration { background: #ef4444; }
.dot-emergency { background: #f97316; }
.dot-hardening { background: #10b981; }
.dot-resident { background: #06b6d4; }
.dot-leave { background: #eab308; }

/* 二维矩阵表格 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: hsla(222, 47%, 5%, 0.4);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 1080px; /* 保证在各屏幕下有宽裕的显示宽度且完美对齐 */
  table-layout: fixed; /* 强行固定列宽，防止内容撑宽列 */
}

/* 单元格尺寸与对齐 */
.schedule-table th, 
.schedule-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}
.schedule-table th:last-child, 
.schedule-table td:last-child {
  border-right: none;
}

/* 表头设计 */
.schedule-table thead tr {
  background: hsla(217, 30%, 12%, 0.6);
}
.schedule-table th {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.75rem 0.5rem;
}
.col-employee {
  width: 130px;
  min-width: 130px;
  text-align: left !important;
  padding-left: 1.25rem !important;
}
.col-day {
  width: calc((100% - 130px) / 7);
  min-width: 110px;
}

.day-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.day-header-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
}

/* 分组行标头 */
.group-header-row {
  background: hsla(217, 30%, 15%, 0.4);
}
.group-header-cell {
  padding: 0.5rem 1rem !important;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  background: linear-gradient(to right, hsla(217, 90%, 60%, 0.08), transparent);
}

/* 员工个人信息列 */
.employee-cell {
  vertical-align: middle;
  padding-left: 1.25rem !important;
}
.employee-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.employee-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}
.employee-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  font-weight: 500;
}
.badge-tax { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.25); }
.badge-cdut { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.25); }
.badge-offsite { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }

/* 日程数据格子 */
.schedule-cell {
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  height: 90px;
  max-height: 90px;
  padding: 4px !important;
  overflow: hidden;
}
.schedule-cell:hover {
  background: hsla(217, 30%, 20%, 0.2);
}

/* 日程内部卡片渲染 */
.schedule-cell-inner {
  position: relative; /* 用于 .more-indicator 绝对定位 */
  width: 100%;
  height: 82px;
  max-height: 82px;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  overflow: hidden; /* 防御超长内容溢出撑大格子 */
}

.schedule-cell:hover .schedule-cell-inner {
  transform: translateY(-2px) scale(1.02);
}

.schedule-cell-inner .client-name {
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.schedule-cell-inner .service-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  font-weight: 500;
}
.schedule-cell-inner .notes-text {
  color: var(--text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}

/* 不同服务类型的具体卡片样式 */
/* 1. 待定 - 虚线灰色 */
.cell-tbd {
  background: var(--grad-tbd);
  border: 1px dashed hsla(215, 15%, 45%, 0.4);
  opacity: 0.6;
}
.cell-tbd .client-name { color: var(--text-dim); font-weight: 400; }
.cell-tbd .service-tag { background: hsla(215, 15%, 45%, 0.15); color: var(--text-muted); }
.cell-tbd .notes-text { color: var(--text-dim); }
.cell-tbd:hover {
  opacity: 0.9;
  border-color: hsla(215, 15%, 65%, 0.7);
}

/* 2. 代码审计 */
.cell-audit {
  background: var(--grad-audit);
  box-shadow: 0 4px 10px -2px rgba(99, 102, 241, 0.25);
  border-left: 3px solid #818cf8;
}
.cell-audit .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-audit .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 2.5 弱口令专项检查 */
.cell-weakpwd {
  background: var(--grad-weakpwd);
  box-shadow: 0 4px 10px -2px rgba(217, 70, 239, 0.25);
  border-left: 3px solid #f472b6;
}
.cell-weakpwd .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-weakpwd .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 3. 售前支撑 */
.cell-presales {
  background: var(--grad-presales);
  box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.25);
  border-left: 3px solid #2dd4bf;
}
.cell-presales .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-presales .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 4. 渗透测试与漏洞扫描 */
.cell-penetration {
  background: var(--grad-penetration);
  box-shadow: 0 4px 10px -2px rgba(220, 38, 38, 0.25);
  border-left: 3px solid #f87171;
}
.cell-penetration .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-penetration .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 5. 资产梳理与暴露面监测 */
.cell-asset {
  background: var(--grad-asset);
  box-shadow: 0 4px 10px -2px rgba(71, 85, 105, 0.2);
  border-left: 3px solid #94a3b8;
}
.cell-asset .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-asset .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 6. 风险评估与基线核查 */
.cell-risk {
  background: var(--grad-risk);
  box-shadow: 0 4px 10px -2px rgba(99, 102, 241, 0.2);
  border-left: 3px solid #818cf8;
}
.cell-risk .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-risk .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 7. 安全加固与不符合项整改 */
.cell-hardening {
  background: var(--grad-hardening);
  box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.25);
  border-left: 3px solid #34d399;
}
.cell-hardening .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-hardening .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 8. 安全监测、分析与巡检 */
.cell-monitoring {
  background: var(--grad-monitoring);
  box-shadow: 0 4px 10px -2px rgba(6, 182, 212, 0.25);
  border-left: 3px solid #22d3ee;
}
.cell-monitoring .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-monitoring .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 9. 应急响应与处置 */
.cell-emergency {
  background: var(--grad-emergency);
  box-shadow: 0 4px 10px -2px rgba(249, 115, 22, 0.3);
  border-left: 3px solid #fb923c;
}
.cell-emergency .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-emergency .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 10. 应急演练与预案编写 */
.cell-drill {
  background: var(--grad-drill);
  box-shadow: 0 4px 10px -2px rgba(245, 158, 11, 0.25);
  border-left: 3px solid #fbbf24;
}
.cell-drill .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-drill .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 11. 重保与安全值守 */
.cell-guard {
  background: var(--grad-guard);
  box-shadow: 0 4px 10px -2px rgba(236, 72, 153, 0.25);
  border-left: 3px solid #f472b6;
}
.cell-guard .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-guard .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 12. 攻防演练保障 */
.cell-attack {
  background: var(--grad-attack);
  box-shadow: 0 4px 10px -2px rgba(239, 68, 68, 0.3);
  border-left: 3px solid #f87171;
}
.cell-attack .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-attack .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 13. 安全培训与意识宣传 */
.cell-training {
  background: var(--grad-training);
  box-shadow: 0 4px 10px -2px rgba(139, 92, 246, 0.25);
  border-left: 3px solid #a78bfa;
}
.cell-training .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-training .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 14. 安全咨询与体系建设 */
.cell-consulting {
  background: var(--grad-consulting);
  box-shadow: 0 4px 10px -2px rgba(132, 204, 22, 0.2);
  border-left: 3px solid #a3e635;
}
.cell-consulting .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-consulting .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 15. 日常安全运维 */
.cell-ops {
  background: var(--grad-ops);
  box-shadow: 0 4px 10px -2px rgba(5, 150, 105, 0.2);
  border-left: 3px solid #34d399;
}
.cell-ops .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-ops .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 16. 数据分类分级 */
.cell-dataclass {
  background: var(--grad-dataclass);
  box-shadow: 0 4px 10px -2px rgba(8, 145, 178, 0.25);
  border-left: 3px solid #22d3ee;
}
.cell-dataclass .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-dataclass .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 17. 服务材料撰写 */
.cell-docs {
  background: var(--grad-docs);
  box-shadow: 0 4px 10px -2px rgba(124, 58, 237, 0.25);
  border-left: 3px solid #a78bfa;
}
.cell-docs .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-docs .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 18. 驻场服务 */
.cell-resident {
  background: var(--grad-resident);
  box-shadow: 0 4px 10px -2px rgba(2, 132, 199, 0.25);
  border-left: 3px solid #38bdf8;
}
.cell-resident .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-resident .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 17. 请假/休假 */
.cell-leave {
  background: var(--grad-leave);
  box-shadow: 0 4px 10px -2px rgba(217, 119, 6, 0.2);
  border-left: 3px solid #fbbf24;
}
.cell-leave .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-leave .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 18. 其他 */
.cell-other {
  background: var(--grad-other);
  box-shadow: 0 4px 10px -2px rgba(168, 85, 247, 0.2);
  border-left: 3px solid #c084fc;
}
.cell-other .service-tag { background: rgba(255, 255, 255, 0.2); color: white; }
.cell-other .notes-text { color: rgba(255, 255, 255, 0.7); }

/* 今天对应的日期列高亮 */
.schedule-table th.today-col-header {
  color: var(--color-primary);
  background: hsla(217, 91%, 60%, 0.05);
}
.schedule-table td.today-col-cell {
  background: hsla(217, 91%, 60%, 0.015);
}
.schedule-table td.today-col-cell:hover {
  background: hsla(217, 91%, 60%, 0.08);
}

/* ==========================================================================
   4. 模态弹窗系统
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(3, 7, 18, 0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: hsla(222, 47%, 10%, 0.95);
  border: 1px solid var(--border-highlight);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-header h3 i {
  color: var(--color-primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.modal-close:hover {
  color: var(--color-danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem;
  max-height: 80vh;
  overflow-y: auto;
}

/* 表单元素样式 */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.row-inline {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.row-inline label {
  margin-bottom: 0;
}
.row-inline input {
  text-align: right;
  border: none;
  font-weight: 600;
  background: transparent;
  font-size: 1rem;
  color: var(--color-primary);
  width: auto;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: hsla(222, 47%, 5%, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: white;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

.select-dark {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='hsl(215, 20%, 65%)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}

.input-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* 二级联选客户选择器 */
.two-level-select-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.two-level-select-container select#form-client-industry {
  flex: 1;
  min-width: 120px;
}
.two-level-select-container select#form-client-select,
.two-level-select-container input#form-client-input {
  flex: 1.8;
}

/* 填报日期定制盒 */
.date-selection-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: hsla(222, 47%, 5%, 0.5);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}
.single-date-display {
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

/* 批量日期面板 */
.batch-date-picker {
  background: hsla(222, 47%, 5%, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.5rem;
  animation: slide-down 0.25s ease-out;
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.batch-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.weekdays-checkboxes {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  background: hsla(217, 30%, 15%, 0.5);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}
.checkbox-label:hover {
  background: hsla(217, 30%, 25%, 0.5);
  border-color: var(--border-highlight);
}
.checkbox-label input[type="checkbox"]:checked + * {
  color: var(--color-primary);
}

/* 日程类型标签切换组 */
.type-selector-tabs {
  display: flex;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
  margin-top: 0.35rem;
}
.type-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.type-tab-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}
.type-tab-btn.active {
  color: white;
  background: var(--color-primary);
  box-shadow: 0 2px 10px -2px rgba(59, 130, 246, 0.5);
}

.hidden {
  display: none !important;
}

/* 预览版卡片 */
.form-preview {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-preview label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.preview-card-container {
  background: hsla(222, 47%, 3%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-preview {
  height: 90px;
  width: 140px;
}

/* 动作按钮组 */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  gap: 0.75rem;
}
.right-actions {
  display: flex;
  gap: 0.5rem;
}

/* ==========================================================================
   5. 页脚与信息部分
   ========================================================================== */
.app-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.footer-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  font-size: 0.8rem;
  color: #93c5fd;
  max-width: 800px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ==========================================================================
   5.5 合同交付风险智能预警与呼吸闪烁效果
   ========================================================================== */
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid transparent;
  line-height: 1.2;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-healthy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

/* 合同大盘表格行呼吸闪烁和发光样式 */
.contract-glow-danger {
  border-left: 3px solid #ef4444 !important;
  transition: all 0.3s ease;
}
.contract-glow-danger:hover {
  background: rgba(239, 68, 68, 0.03) !important;
  box-shadow: inset 0 0 15px rgba(239, 68, 68, 0.08);
}

.contract-glow-warning {
  border-left: 3px solid #f59e0b !important;
  transition: all 0.3s ease;
}
.contract-glow-warning:hover {
  background: rgba(245, 158, 11, 0.03) !important;
  box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.08);
}

.contract-glow-healthy {
  border-left: 3px solid #10b981 !important;
  transition: all 0.3s ease;
}
.contract-glow-healthy:hover {
  background: rgba(16, 185, 129, 0.02) !important;
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.05);
}

/* 交付极危红线闪烁动画 */
@keyframes breathing-glow {
  0% {
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
    border-color: rgba(239, 68, 68, 0.8);
    background-color: rgba(239, 68, 68, 0.25);
  }
  100% {
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
  }
}

.blink-glow {
  animation: breathing-glow 2s infinite ease-in-out;
}

/* 一键打包与防伪预览按钮扩展 */
.btn-zip-export {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 默认在桌面端隐藏移动端顶部导航条 */
.mobile-top-bar {
  display: none;
}

/* ==========================================================================
   6. 响应式布局媒体查询 (Mobile Friendly Remake)
   ========================================================================== */
@media (max-width: 768px) {
  /* 移动端顶部标题导航条 */
  .mobile-top-bar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 56px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .btn-menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }
  
  .btn-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  
  .mobile-brand-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    letter-spacing: 0.5px;
  }
  
  .mobile-user-icon {
    font-size: 1.35rem;
    color: var(--color-primary);
  }

  /* 侧边栏转换为遮罩抽屉 */
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
  }
  
  .app-sidebar.active {
    transform: translateX(0);
  }
  
  /* 主内容布局间距适配顶部条 */
  .app-layout {
    flex-direction: column;
  }
  
  .app-main {
    padding: 70px 0.75rem 1.5rem 0.75rem !important; /* 预留顶部栏的高度 */
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
  }
  
  /* 看板头部自适应调整 */
  .module-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .date-picker-nav {
    width: 100%;
    justify-content: space-between;
  }
  
  .current-week-text {
    font-size: 0.8rem;
  }

  /* KPI 指标栏自适应网格 */
  .kpi-dashboard {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .kpi-card {
    padding: 0.75rem !important;
    gap: 0.5rem !important;
  }
  
  .kpi-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  
  .kpi-content h3 {
    font-size: 0.7rem !important;
  }
  
  .kpi-content .kpi-value {
    font-size: 1.1rem !important;
  }

  /* 核心优化：隐藏日程表头，扁平化为卡片流 */
  #schedule-matrix thead {
    display: none !important;
  }
  
  #schedule-matrix, 
  #schedule-matrix tbody, 
  #schedule-matrix tr {
    display: block !important;
    width: 100% !important;
  }
  
  /* 分组标题行适配 */
  #schedule-matrix tbody tr.group-header-row {
    background: transparent !important;
    border: none !important;
    margin: 20px 0 8px 0 !important;
    padding: 0 !important;
  }
  
  #schedule-matrix tbody tr.group-header-row td {
    display: block !important;
    padding: 4px 6px !important;
    font-size: 0.9rem !important;
    font-weight: 700;
    color: var(--color-secondary);
    border: none !important;
    background: transparent !important;
  }

  /* 个人行变成单独的玻璃质感卡片 */
  #schedule-matrix tbody tr:not(.group-header-row) {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    padding: 12px 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  
  #schedule-matrix td.employee-cell {
    display: block !important;
    width: 100% !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 0 0 8px 0 !important;
    margin-bottom: 6px !important;
  }
  
  #schedule-matrix .employee-info-wrapper {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
  }
  
  #schedule-matrix .employee-name {
    font-size: 0.95rem;
  }

  /* 日程格子转换为带伪元素左标签的纵向流 */
  #schedule-matrix td.schedule-cell {
    display: flex !important;
    width: 100% !important;
    border: none !important;
    padding: 4px 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
  }
  
  #schedule-matrix td.schedule-cell::before {
    content: attr(data-day);
    display: inline-block;
    width: 80px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
    text-align: left;
    font-family: var(--font-title);
  }

  #schedule-matrix td.schedule-cell .schedule-cell-inner {
    flex: 1;
    margin: 0 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  
  #schedule-matrix td.schedule-cell .client-name {
    font-size: 0.78rem;
    margin-bottom: 0;
    flex: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  #schedule-matrix td.schedule-cell .service-tag {
    font-size: 0.65rem;
    padding: 1px 4px;
    flex-shrink: 0;
  }
  
  #schedule-matrix td.schedule-cell .notes-text {
    display: none !important; /* 在极其有限的宽度下，隐藏移动端备注以保持紧凑 */
  }

  /* 历史与合同大盘看板移动端适配 */
  .glass-panel.schedule-board {
    padding: 0.75rem !important;
  }
  
  .board-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .board-legend {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .table-responsive {
    overflow-x: auto;
    width: 100%;
  }

  /* 弹窗及移动端表单交互触控优化 */
  .modal-card {
    max-height: 90vh !important;
    max-width: 95% !important;
  }
  
  .modal-body {
    padding: 1rem !important;
  }
  
  .form-actions {
    flex-direction: column !important;
    gap: 10px;
    align-items: stretch !important;
  }
  
  .form-actions .right-actions {
    width: 100%;
  }
  
  .form-actions button,
  .form-actions .right-actions button {
    flex: 1;
    width: 100%;
    min-height: 44px; /* Apple UI Guideline Min Touch Size */
  }
  
  .two-level-select-container {
    flex-direction: column;
    gap: 6px;
  }
}

/* ==========================================================================
   7. 节假日/周末及高亮标签样式定义
   ========================================================================== */
.cell-holiday {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.15) !important;
  opacity: 0.85;
}
.cell-holiday .client-name { color: var(--text-dim); font-weight: 400; }
.cell-holiday .service-tag { background: rgba(71, 85, 105, 0.2); color: var(--text-muted); }
.cell-holiday .notes-text { color: var(--text-dim); }
.cell-holiday:hover {
  opacity: 1;
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.3) !important;
}

/* 表头放假调休标签样式 */
.holiday-badge-header {
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 5px;
  font-weight: 500;
  vertical-align: middle;
  display: inline-block;
}
.label-holiday {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.label-work {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.label-weekend {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ==========================================================================
   OA 综合管理系统样式扩展
   ========================================================================== */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

/* 侧边导航栏 */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  background: hsla(222, 47%, 6%, 0.95);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-header .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}
.sidebar-header h1 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}
.sidebar-header .subtitle {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.nav-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  transition: var(--transition-smooth);
}
.nav-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  transition: var(--transition-smooth);
}
.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.04);
}
.nav-item.active {
  color: white;
  background: var(--color-primary);
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.45);
}
.nav-item.active i {
  color: white;
}

.nav-group {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 1rem;
}
.nav-group-title {
  padding-left: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-item.sub-item {
  padding-left: 1.75rem;
  font-size: 0.85rem;
}

/* 底部账户卡片 */
.sidebar-user-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background: hsla(222, 47%, 4%, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 150px;
}
.user-avatar {
  font-size: 1.8rem;
  color: var(--color-primary);
}
.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.user-actions {
  display: flex;
  gap: 0.25rem;
}
.btn-user-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}
.btn-user-action:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}
.btn-user-action.danger:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* 主内容展示区 */
.app-main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

/* 各模块面板 */
.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fade-in 0.3s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}
.module-title h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.module-title h2 i {
  color: var(--color-primary);
}

.text-panel-intro {
  padding: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 报告上传交付状态标签 */
.btn-upload-action {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.status-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }

/* 进度条样式 */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background: hsla(222, 47%, 3%, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), #10b981);
  transition: width 0.25s ease;
}

/* 合同拆解项目胶囊 */
.contract-capsule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.contract-capsule {
  font-size: 0.75rem;
  padding: 3px 8px;
  background: hsla(217, 30%, 15%, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 4px;
}
.contract-capsule:hover {
  color: white;
  background: hsla(217, 30%, 25%, 0.6);
  border-color: var(--border-highlight);
  transform: scale(1.02);
}
.contract-capsule.completed {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}
.contract-capsule.completed:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}

/* 文件浏览器树状图 */
.file-tree-panel {
  padding: 1.5rem;
  background: hsla(222, 47%, 5%, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.file-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}
.file-tree-header h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.tree-node-client {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: hsla(222, 47%, 6%, 0.3);
  overflow: hidden;
}
.tree-client-header {
  padding: 0.65rem 1rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  background: hsla(217, 30%, 15%, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  user-select: none;
}
.tree-client-header:hover {
  background: hsla(217, 30%, 25%, 0.4);
}
.tree-client-header i.chevron {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}
.tree-node-client.collapsed .tree-client-header i.chevron {
  transform: rotate(-90deg);
}
.tree-client-body {
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: max-height 0.25s ease;
}
.tree-node-client.collapsed .tree-client-body {
  display: none !important;
}

.tree-node-service {
  border-left: 2px dashed hsla(217, 30%, 30%, 0.4);
  padding-left: 0.85rem;
  margin: 0.35rem 0;
}
.tree-service-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px 4px;
  border-radius: 4px;
  user-select: none;
}
.tree-service-header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.tree-node-service.collapsed .tree-service-body {
  display: none !important;
}
.tree-service-body {
  padding: 0.35rem 0 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tree-file-item {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: hsla(222, 47%, 3%, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}
.tree-file-item:hover {
  color: white;
  background: hsla(222, 47%, 8%, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
}
.tree-file-size {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
}
.btn-download-file {
  color: var(--color-primary);
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: var(--transition-smooth);
  font-size: 0.7rem;
}
.btn-download-file:hover {
  background: var(--color-primary);
  color: white;
}

/* 月度统计月份选择 */
.month-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 日历卡片右上角 "+N" 多项目标识 */
.more-indicator {
  position: absolute;
  top: 2px;
  right: 4px;
  background: rgba(59, 130, 246, 0.85);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  z-index: 2;
}

/* 条目行悬停效果 */
.entry-row:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   可视化大盘图表响应式与布局扩展样式
   ========================================================================== */
.summary-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .summary-charts-grid {
    grid-template-columns: 1fr !important;
  }
}
